|
"Juliette Salexa" <juliette.physicist@gmail.com> writes:
> The same error message comes up when the matlabpool open/close commands are
> embedded within the function (like in my above example), AND when they are
> applied outside of the function, for example if I were to modify "file 2" in
> my last example into:
>
> matlabpool open local 4
> a=2;
> g=tempFunction(a);
> matlabpool close
>
> The error message that comes up in both cases is this:
> ??? Error using ==> parallel_function>make_general_channel/channel_general at 829
> Undefined function handle.
> [...]
> Warning: Could not find appropriate function on path loading function handle
> C:\..\tempFunction.m>makeF%1/F%
> [...]
Error messages like that still suggest to me that the problem you're having is
with the MATLAB path. Where is "tempFunction.m", and how did that directory get
onto the MATLAB path? The workers need access to the same function via the
MATLAB path. With the "local" scheduler, we normally do a good job of setting up
the path to be in sync, but maybe something's going wrong.
I managed to get precisely the same error that you saw, but only by adding a
path in the client MATLAB, and then modifying the path inside PARFOR to remove
the path to "tempFunction.m".
Cheers,
Edric.
|