Closed apodkowa closed 2 years ago
Hmmm, this may be specific to the type of parcluster.
Does it work if you setup your parpool manually with parpool('local', 'SpmdEnabled', false);
and then call UltrasoundSystem/simus
?
Does it work if you shutdown the parallel pool with delete(gcp('nocreate'))
?
I just tested this on my system. It seems that parfor syntax is fine as it will run on a local parpool and on no parpool, just not a thread-based parpool.
The reason is the adMessage
subroutine in the pfield.m function in MUST calls uiwait
and msgbox
. Even though it's not run, the interpreter errors when it detects a potential call to uiwait
and/or msgbox
.
There are 2 ways to get around this:
parpool('local', 'SpmdEnabled', false)
. You may have to shutdown the current one with delete(gcp('nocreate'))
. This is less memory efficient, but probably still better than single-threaded.adMessage
). Then use munlock pfield.m
to unlock the file so that MATLAB loads it in again. This gives you the best performance.
It appears that parallel SIMUS doesn't work out of the box. I just downloaded the MUST toolbox and ran into the following error:
I suspect that MUST doesn't support this type of parfor syntax natively. It might require working with the maintainer to figure out a workable solution.