1
votes

I have problems running a program compiled with MCC that uses parfor. The non-compiled .m version works (no bug). When I run the compiled version, I get "distcomp.remoteparfor" is undefined. I believe I exactly have the error described in the following link.

http://www.mathworks.com/support/solutions/en/data/1-PAHWE/index.html?product=CO&solution=1-PAHWE

However, since MCR is not installed on my machine (got Matlab and MCC), I am wondering what the pathes $APPNAME_mcr/java/jar/toolbox and $MCR/MATLAB Component Runtime/v70/java/jar/toolbox correspond to. I found the distcomp.jar file in C:\Program Files\MATLAB\R2011b\java\jar\toolbox, but I don't know where to put it since see any path corresponding to $MCR/MATLAB Component Runtime/v70/java/jar/toolbox since MCR is not installed.

Thanks a lot! Fred

2
Did you compile this yourself, and was it compiled with the same R2011b version you're running? - Andrew Janke
The solution in the link that you specified has nothing to do with this error. - eternaln00b
@AndrewJanke Yes, I compiled it myself with the same R2011b I'm running. - Frédéric Godin

2 Answers

0
votes

No need to install the MCR if you are simply trying to run the application on the same machine that has MATLAB. The question to ask is, HOW are you launching the compiled application? From a DOS command window? From within MATLAB using the SYSTEM command?

If you are launching the application from a DOS / UNIX command line, then the important thing to keep in mind is that the MATLAB binaries need to be on your system path i.e. just make sure:

$MATLABROOT\bin\$ARCH

is on your system path. Where $MATLABROOT is the matlab installation folder, and $ARCH is your system architecture. For example:

c:\work\matlab\bin\win64

on my machine since my installation folder which contains MATLAB is:

c:\work

and i am on a win64 machine.

0
votes

The problem is solved. The solution is to make the program a function instead of a script : http://www.mathworks.com/matlabcentral/answers/22825-parfor-errors-when-file-is-compiled