0

I'm trying to compile a matlab .m file on a linux cluster using mcc. R2008b is installed on the cluster.

I am using http://www.it.northwestern.edu/research/sscc/matlabcompiler.html as a guide.

My plusone.m file is as follows:

function y = plusone(x)
if(ischar(x)), x = str2num(x), end;
y = x + 1;

I am running matlab on the cluster using the command "matlab -nodisplay". I have run mbuild -setup and have added (my matlab root folder)/bin and /sbin to $PATH.

I am using the command mcc -m -v plusone.m from within MATLAB, and the full output is:

"??? Error using ==> mcc Error executing mcc, return status = 1."

This output is the same for a few different .m files and a number of different flag settings.

Without more error information, I'm a bit stumped. Suggestions about what might be causing the error or ways of getting more information about the error would be greatly appreciated.

fedorqui
  • 275,237
  • 103
  • 548
  • 598
  • Your given code compiles fine for me. When you ran mbuild -setup, which compiler options were there and which are you using? – nkjt Apr 23 '13 at 11:23
  • @nkjt `1: /opt/matlabR2008b/bin/mbuildopts.sh : Build and link with MATLAB C-API or Matlab Compiler - generate library via the system ANSI C/C++ compiler` and `0: Exit with no changes` I am using option 1. – user2306810 Apr 25 '13 at 23:30
  • Check buildopts.sh to make sure that the file is pointing to the correct compiler in the correct location - otherwise unless you can get more info out I don't know what to suggest (I'm surprised that you only get that line but perhaps it's a nodisplay issue) – nkjt Apr 26 '13 at 09:34

0 Answers0