Writing error in parfor loop
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi everyone,
I have a script that randomly removes and repredicts links in networks 100 times. Of course the bigger the networks are the longer it takes so, I made the 100 iterations into a parfor loop. It works fine for smaller networks but with the big ones I get the error
A write error occurred while sending to worker xy.
I assumed its due to memory problems but I can check in the task manager that the error occurs before the memory of my pc is used up. Also it says writing error...So does anybody have an idea what this error message refers to? Im using windows 7 pro, 64bit and matlab R2014a and I have 196GB of ram(I know quite a lot (:).
Any help would be appreciated! Thanks a lot, Josephine
답변 (2개)
Thomas Koelen
2015년 6월 5일
Try writing a function that writes the data, then call this function in your parfor loop.
Walter Roberson
2015년 6월 5일
The data needs to be transferred to even the one worker so Yes you can run out of memory even with one worker.
댓글 수: 2
Walter Roberson
2015년 6월 8일
The documentation is the File Exchange Contribution page and the code itself which is there. It works using handle objects.
There is one part of it that invokes "spmd" as part of the initialization. That suggests that you should open your parfor pool first before using the worker object wrapper.
참고 항목
카테고리
Help Center 및 File Exchange에서 Parallel for-Loops (parfor)에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!