Problem with parallel pool

11 ビュー (過去 30 日間)
Francesco Terribile
Francesco Terribile 2019 年 10 月 8 日
コメント済み: Jason Ross 2019 年 10 月 9 日
Hi,
I am trying to run from Linux a simple parallel Matlab code :
parpool(4)
tic
parfor i=1:10
pause(10)
end
time=toc;
time
delete(gcp('nocreate'))
and I'm doing that with the sh file:
#!/bin/bash
#PBS -S /bin/bash
#PBS -l nodes=1:ppn=2,walltime=24:00:00
#PBS -N parallel_trial.m
#PBS -o out-hostname-XyZ-N1x1-qsub.txt
#PBS -j oe
#PBS -e out-hostname-XyZ-N1x1.txt
cd ${PBS_O_WORKDIR}
/opt/bin/matlab -nosplash -nodisplay < parallel_trial.m > parallel_output.txt 2>&1
The problem is that I get the message 'Starting parallel pool (parpool) using the 'local' profile ...' for minutes, and nothing happens.
If I try to use the command -nojvm, I get the error: Undefined variable "com" or class
"com.mathworks.toolbox.distcomp.pmode.SessionInfo.NULL_SESSION_INFO".
Can someone help to fix this problem?

回答 (1 件)

Edric Ellis
Edric Ellis 2019 年 10 月 9 日
Don't use -nojvm, Java is required for Parallel Computing Toolbox functionality.
It looks like you're trying to start 4 workers, having already launched a "client" under PBS (or Torque?). Perhaps the scheduler is limiting the resources you're allowed to use - does it work to use parpool(1) instead?
  2 件のコメント
Francesco Terribile
Francesco Terribile 2019 年 10 月 9 日
It works both with 4 and 1 workers, without -nojvm, but it takes almost one hour to start the parallel profile
Jason Ross
Jason Ross 2019 年 10 月 9 日
In your PBS/Torque resource selection, you are asking for 2 processors (ppn="processors per node") on 1 node:
nodes=1:ppn=2
In your code you are trying to start a MATLAB and then four addtitional MATLAB processes with the parpool. So depending on how strict your scheduler is enforcing job limits, you are trying to use five cores when you have asked for two. Are you able to ask for five cores?
I'll also note that there are ways to submit a job to a PBS/Torque cluster if it's been set up to integrate with Parallel Server.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeParallel Computing Fundamentals についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by