1

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 Answers2

0

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.

eternaln00b
  • 1,043
  • 9
  • 18
  • Thanks for your advice. Unfortunately, I tried this, and it did not fix the problem. PS, I'm running it from the DOS command line. – Frédéric Godin Feb 10 '12 at 20:59
  • Try looking for an answer on MATLAB Answers: http://www.mathworks.com/matlabcentral/answers/ – eternaln00b Feb 10 '12 at 21:09
  • This guy's got the same problem. However, he didn not solve it : http://www.mathworks.com/matlabcentral/answers/26661-trying-to-get-executable-to-use-other-computer-s-multiple-cores-with-matlabpool-but-getting-error – Frédéric Godin Feb 10 '12 at 21:35
0

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