I'm getting an error when I try to use parpool (MATLAB 2018a)
Show older comments
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 Comments
Edric Ellis
on 5 Apr 2018
What precise command are you using to try and create the parallel pool?
Agapi Dav
on 30 Jul 2018
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!
Accepted Answer
More Answers (1)
Ben
on 30 Jul 2018
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 Comments
Agapi Dav
on 31 Jul 2018
Hi! I was testing a working function that I found on Internet and I wanted to implement on my code.
Good thing is that when I rebooted the PC everything worked without changing anything. Bad news, I have no idea why it works.
Thank you very much anyway.
Agapi Dav
on 31 Jul 2018
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
on 31 Jul 2018
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 :)
Categories
Find more on Parallel Computing Fundamentals in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!