matlab parfor loops in unix
Show older comments
Hi everybody, i have a matlab script with parfor loop used. in my local personal PC, the script works in a parallel fashion. however, after i submitted it to unix, it seems the script runs in "for" loop (not in parallel way) as first of all, the time of run is even more than that in my personal PC. Can somebody help me with this? Thanks. Best, J.
9 Comments
Rik
on 16 Nov 2017
Are you getting any warning or error?
Looking at the documentation and the system requirements, I see no reason why parfor shouldn't work on a Unix system.
Adam
on 16 Nov 2017
Does the computer running the Unix system have the Parallel Toolbox?
Code with a parfor that is run on a machine that does not have the Parallel Toolbox thankfully doesn't simply crash, but it does revert to just using a standard for loop.
Julie G
on 16 Nov 2017
Edited: Walter Roberson
on 16 Nov 2017
Julie G
on 16 Nov 2017
Adam
on 16 Nov 2017
So you have unix on the same machine? I don't use Matlab on Unix, but again, does it have the required parallel toolbox license in the Unix version?
Walter Roberson
on 16 Nov 2017
On the unix machine, inside MATLAB do
ver('distcomp')
If it does not show Parallel Computing Toolbox in the output then the parallel computing toolbox is not installed.
If it is installed, there is still the possibility that you do not have a license for it:
license('test', 'Distrib_Computing_Toolbox')
will return 1 if there is a license for the parallel computing toolbox.
Julie G
on 17 Nov 2017
Walter Roberson
on 17 Nov 2017
I know that at least some parts of the Parallel Computing Toolbox require java. I do not know if parfor is one of them.
Edric Ellis
on 20 Nov 2017
To run in parallel, parfor does require Java to be enabled.
Answers (0)
Categories
Find more on Startup and Shutdown 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!