I'm getting an error when I try to use parpool (MATLAB 2018a)

조회 수: 21 (최근 30일)
Helen Marshall
Helen Marshall 2018년 4월 4일
댓글: Srishty Aggarwal 2022년 9월 10일
I'm trying to process some MRI data but the parpool function isn't working. I know there were some bugs in earlier versions of Matlab with macOS Sierra but this shouldn't be happening in the 2018a version?
Error using parpool (line 113) 'size' is not the name of a profile. Valid names are: 'local' 'MATLAB Parallel Cloud'
  댓글 수: 2
Edric Ellis
Edric Ellis 2018년 4월 5일
What precise command are you using to try and create the parallel pool?
Agapi Dav
Agapi Dav 2018년 7월 30일
Hi! I have exactly the same problem with matlab R2018a.
Error using parpool (line 113) 'size' is not the name of a profile. Valid names are: 'local' 'MATLAB Parallel Cloud'
I use this command:
if true
% if(~parpool('size'))
parpool
end
end
Can someone help me? Thanks in advance!

댓글을 달려면 로그인하십시오.

채택된 답변

Agapi Dav
Agapi Dav 2018년 7월 31일
I think the problem is that the matlabpool was replaced by parpool. Therefore, matlabpool('size') is not valid anymore and parpool('size') does not do the job.
I found this quick fix here: https://github.com/RobotLocomotion/drake/issues/1009
try
if (matlabpool('size')==0) matlabpool; end
catch
if isempty(gcp('nocreate')) parpool; end
end
For me it worked. Cheers!
P.S. Thanks Ben, new here!
  댓글 수: 1
Srishty Aggarwal
Srishty Aggarwal 2022년 9월 10일
when I use the command, I got the following error
Error using parpool (line 146)
Parallel pool failed to start with the following error. For more detailed information, validate the profile 'local'
in the Cluster Profile Manager.
Caused by:
Error using parallel.internal.pool.AbstractInteractiveClient>iThrowWithCause (line 305)
Failed to initialize the interactive session.
Error using parallel.internal.pool.AbstractInteractiveClient>iThrowIfBadParallelJobStatus (line 426)
The interactive communicating job failed with no message.
How to resolve it?

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Ben
Ben 2018년 7월 30일
If you look at the parpool docs I don't believe you're using a valid input with
parpool('size')
as the error says, and you actually want to use
parpool(2) %or whatever number of workers you want
Unless you want to make a non-local parpool. What are you trying to do?
  댓글 수: 3
Agapi Dav
Agapi Dav 2018년 7월 31일
So, I had changed something, I forgot. I think the problem was that the matlabpool was replaced by parpool. Therefore, matlabpool('size') is not valid anymore and parpool('size') (as I was trying) does not do the job.
try
if (matlabpool('size')==0) matlabpool; end
catch
if isempty(gcp('nocreate')) parpool; end
end
For me it worked. Cheers!
Ben
Ben 2018년 7월 31일
Yeah, I see that matlabpool was removed in 2015a. If you don't need to support releases before 2015a, you don't need to use a try … catch and can just use parpool by itself (well, the if statement).
Also, you should write your solution in a new answer and accept it so that others with the same problem can see it :)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by