MATLAB Answers

Can't start parpool with the 'threads' option

29 views (last 30 days)
Arwel
Arwel on 19 May 2020
Commented: Steven Lord on 4 Jun 2020
Hi,
I am able to run parfor loops by staring a parpool like this.....
parpool(8)
.. and then things work.
However, according to this part of the documentation.. https://www.mathworks.com/help/parallel-computing/choose-between-thread-based-and-process-based-environments.html#mw_6bbf0761-74c0-404e-9db6-77b82c7c138c .... I should be able to open a parallel pool that is tread based by going..
pool = parpool('threads');
.. as per the example. However, when I try this I get an error....
Error using parpool (line 113)
'threads' is not the name of a profile. Valid names are:
'local'
So, it seems I need to create the 'threads' profile somehow. I can't find how to do this though.
Can someone post me in the right direction with this? Thread-based is far more suited to what I want to do.
(I'm using R2019a on Linux)
Cheers,
Arwel

  0 Comments

Sign in to comment.

Answers (1)

Steven Lord
Steven Lord on 19 May 2020
According to the Release Notes this functionality was introduced in release R2020a.

  3 Comments

Arwel
Arwel on 19 May 2020
Ah.. that would explaint it! :) Thanks Stephen, I will upgrade...
mitja jancic
mitja jancic on 4 Jun 2020
Steven, do you happen to know the limitation of number of threads? I know the standard licence has a limitation of 12 workers, I am not sure about the number of threads though.
Steven Lord
Steven Lord on 4 Jun 2020
I don't know if there's a license-based limitation on the number of threads or what that limitation is if there is one.
There's obviously a machine-based limitation in that if you try to start more threads than your machine is capable of running things will likely slow ... way ... down. But that would be based on your particular machine's capabilities.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!