Prev: LibMdlStartCustomCode
Next: How to convert .mat file to .arff file (or) How to import WEKAsoftware into MATLAB
From: Michele de Rosa on 24 Sep 2009 10:53 Hi all, I have a problem with a parallel algorithm I developed. I have configured 2 PCs: one as job manager with 4 workers and one with 2 workers. The configuration validation is ok, but when I try to execute my parallel routine, which uses a parfor loop, I have the following error: ??? Error using ==> parallel_function at 587 Error in ==> remoteParallelFunction>iDeserializeByteBuffer at 65 Unable to find function makeF%1/F% within C:\.....\myRoutine.m I don't understand what is the "makeF%1/F%" function. Could you help me? Thanks a lot
From: Edric M Ellis on 24 Sep 2009 11:19 "Michele de Rosa" <mic_der(a)yahoo.it> writes: > I have a problem with a parallel algorithm I developed. I have configured 2 > PCs: one as job manager with 4 workers and one with 2 workers. The > configuration validation is ok, but when I try to execute my parallel routine, > which uses a parfor loop, I have the following error: > > ??? Error using ==> parallel_function at 587 > Error in ==> remoteParallelFunction>iDeserializeByteBuffer at 65 > Unable to find function makeF%1/F% within C:\.....\myRoutine.m > > I don't understand what is the "makeF%1/F%" function. The problem appears to be that your function "myRoutine.m" is on the C:\ drive of one of the machines, and the other machine trying to run part of it cannot see the file. (If "myRoutine.m" contains a PARFOR loop, or is called from one, then all workers need to be able to access that file via their MATLAB path). The simplest way to address this is to put your M-code on a shared drive somewhere that your client and all workers can see. Otherwise, you can use FileDependencies (see the documentation for details) to send the files over. If you've got R2009b, you can update file dependencies while the MATLABPOOL is open, see "doc matlabpool" for more details. Cheers, Edric.
From: Michele de Rosa on 25 Sep 2009 08:07 Thanks a lot Eric, I tried to add to FileDependencies, but I have the same problem. Keep in mind that the same folders' tree is present on the "master" pc and on the "slave" pc. I set the path of the matlab slave pc on that folder, but it seems that the workers don't use that path. Is it possible to set the path to the workers in another way? Best regards Michele Edric M Ellis <eellis(a)mathworks.com> wrote in message <ytwws3ojrp0.fsf(a)uk-eellis-deb5-64.mathworks.co.uk>... > "Michele de Rosa" <mic_der(a)yahoo.it> writes: > > > I have a problem with a parallel algorithm I developed. I have configured 2 > > PCs: one as job manager with 4 workers and one with 2 workers. The > > configuration validation is ok, but when I try to execute my parallel routine, > > which uses a parfor loop, I have the following error: > > > > ??? Error using ==> parallel_function at 587 > > Error in ==> remoteParallelFunction>iDeserializeByteBuffer at 65 > > Unable to find function makeF%1/F% within C:\.....\myRoutine.m > > > > I don't understand what is the "makeF%1/F%" function. > > The problem appears to be that your function "myRoutine.m" is on the C:\ drive > of one of the machines, and the other machine trying to run part of it cannot > see the file. (If "myRoutine.m" contains a PARFOR loop, or is called from one, > then all workers need to be able to access that file via their MATLAB path). > > The simplest way to address this is to put your M-code on a shared drive > somewhere that your client and all workers can see. > > Otherwise, you can use FileDependencies (see the documentation for details) to > send the files over. > > If you've got R2009b, you can update file dependencies while the MATLABPOOL is > open, see "doc matlabpool" for more details. > > Cheers, > > Edric.
From: Edric M Ellis on 25 Sep 2009 08:41 "Michele de Rosa" <mic_der(a)yahoo.it> writes: > I tried to add to FileDependencies, but I have the same problem. Keep in mind > that the same folders' tree is present on the "master" pc and on the "slave" > pc. I set the path of the matlab slave pc on that folder, but it seems that > the workers don't use that path. Is it possible to set the path to the workers > in another way? Once the MATLABPOOL is open, you could try "pctRunOnAll" to add the path on the workers, something like this: matlabpool open ... pctRunOnAll addpath c:\my\path Cheers, Edric.
From: Michele de Rosa on 25 Sep 2009 09:17
Thanks a lot Eric, I solved using the FileDependency property and cancelling the folder on the slave pc. Kind regards Michele Edric M Ellis <eellis(a)mathworks.com> wrote in message <ytwocozjixv.fsf(a)uk-eellis-deb5-64.mathworks.co.uk>... > "Michele de Rosa" <mic_der(a)yahoo.it> writes: > > > I tried to add to FileDependencies, but I have the same problem. Keep in mind > > that the same folders' tree is present on the "master" pc and on the "slave" > > pc. I set the path of the matlab slave pc on that folder, but it seems that > > the workers don't use that path. Is it possible to set the path to the workers > > in another way? > > Once the MATLABPOOL is open, you could try "pctRunOnAll" to add the path on the > workers, something like this: > > matlabpool open ... > pctRunOnAll addpath c:\my\path > > Cheers, > > Edric. |