Having problem in running parfor loop on my system, getting messages" A worker aborted during execution of the parfor loop. "?
28 views (last 30 days)
Show older comments
I have a code that uses parfor. Intrestingly when I use that code earlier on another machine on windows it does not give an error and was run properly.
However, when I try to run that code on a new machine also on windows it always gives me the following error:
Warning: A worker aborted during execution of the parfor loop. The parfor loop will now run again on the remaining workers.
> In parallel.internal.parfor/ParforEngine/handleIntervalErrorResult (line 285)
In parallel.internal.parfor/ParforEngine/getCompleteIntervals (line 227)
In parallel_function>distributed_execution (line 742)
In parallel_function (line 574)
In MolecularNetworking_LongBINOMIAL_AverageFOR_4PAR (line 15)
Parallel pool using the 'Processes' profile is shutting down.
Error using parallel.internal.parfor.ParforEngine/rebuildParforController (line 134)
The parallel pool that parfor was using has shut down. To start a new parallel pool, run your parfor code again or use parpool.
Error in parallel.internal.parfor.ParforEngine/handleIntervalErrorResult (line 304)
obj.rebuildParforController();
Error in parallel.internal.parfor.ParforEngine/getCompleteIntervals (line 227)
[r, err] = obj.handleIntervalErrorResult(r);
Error in MolecularNetworking_LongBINOMIAL_AverageFOR_4PAR (line 15)
parfor binomialaverageloop=1:NumberofBINOMIALTrials
Caused by:
Error using parallel.internal.parfor.ParforEngine/buildParforController (line 93)
No running parallel pool. To start a new parallel pool use parpool.
I have tried it several times, always the same error is encountered. What should I do?
Somewhere, some one suggested to increase memory per core. I am using windows and do not know how to do that.
2 Comments
Edric Ellis
on 3 Dec 2024
There are several possibilities as to why your workers are aborting during parfor. Running low on memory is one possibility - try opening a parallel pool with a lower number of workers before running your code, for example parpool("Processes",2). If you have crash dump files (you'll see a warning when a pool starts up telling you about these), then there might be some other problem. In any case, I would recommend contacting MathWorks support who can work through some more diagnostic steps to help get to the bottom of this.
Answers (1)
Kautuk Raj
on 31 Dec 2024 at 5:20
Edited: Kautuk Raj
on 31 Dec 2024 at 5:21
It seems like you are encountering an issue related to the parallel pool shutting down unexpectedly during the execution of your parfor loop. This is a known issue, and you might find relevant information in this bug report from MathWorks: https://www.mathworks.com/support/bugreports/3187300
Specifically, it is suggested to increase the value of the MW_PCT_TRANSPORT_HEARTBEAT_INTERVAL environment variable to a large integer value, such as 100000, before opening your MATLAB session.
0 Comments
See Also
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!