Problem in running multiple parallel jobs on cluster

Hi,
I'm running a program using parallel computing toolbox on a cluster (just a simple matlabpool-parfor loop). It happened that if I only have one program running, things are fine. However, when I submit the second job (using same functions with different parameters), I got an error in one of the programs that looks like:
_??? Error using ==> matlabpool at 127
> The interactive parallel job is unavailable.
> Most likely, the parallel job has been destroyed.
I can run these multiple jobs simultaneously with no problem without PCT (just use "for").
If anyone can help explain this behavior, I would be really appreciated.

 采纳的回答

Are you including the "matlabpool" command in your code to run on the cluster? If so, that's not the right way, you should be submitting a job which already has a pool available. For example,
numArgsOut = 1;
argsIn = {1, 2, 3};
job = batch( @myFcn, numArgsOut, argsIn, 'Matlabpool', 4 );
will submit a job where "myFcn" is run and can use PARFOR loops. See the batch documentation for more.

1 个评论

Hi Edric,
Thank you for your quick reply.
I followed your suggestion and the problem solved. The only thing I noticed is that when I called batch(...,'Matlabpool',3). It does use 3 workers on the cluster, not 3+1 as I expected.
Is there a further document on what's wrong with using matlabpool on the cluster?
thanks again!

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Parallel for-Loops (parfor) 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by