Having problem in running parfor loop on my system, getting messages" A worker aborted during execution of the parfor loop. "?
55 次查看(过去 30 天)
显示 更早的评论
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 个评论
Edric Ellis
2024-12-3,6:54
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.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Parallel Computing Fundamentals 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!