MATLAB: Problems in sharing mex codes with workers in a cluster

mex; parallel computing; distributed computing

Hi fellows, I am playing with the matlab 2011a parallel computing (via MATLAB Distributed Computing Server) in a cluster consisting of three computer in my office. I successfully got a test problem running when there were no mex files. However, when there are mex files, matlab reports that the mex files can not be found. The reason for using mex files from C is that they are faster. Could anyone help me out? Many thanks.

Best Answer

You need to use
matlabpool('addfiledependencies', {'mex1', 'mex2'})
to make the MEX files available to the workers. See the matlabpool reference page for more information.