Search code examples
matlabparfor

The client lost connection to lab X Matlab


I need help on how to tackle the Matlab error below. After a couple of successful runs I got the error message below in Matlab using parfor.

Opened 2 pools. Send function1 to worker1 and send function2 to worker2. Both functions does some sort of calcs on matrices and generate CSV at the end. It was fine until after a few runs.

The session that parfor is using has shut down

The client lost connection to lab 2. This might be due to network problems, or the interactive matlabpool job might have errored.

We're using VM machine with a processor Intel Xeon X7560 @2.27GHz (4 processors). The RAM is 16GB. 64-bit OS.


Solution

  • This is part of a batch run. To resolve the issue instead of re-using the pools for every batch iteration. Make sure to "close" it. Then open fresh Matlab pools for every iteration. Seems to be more stable now, although a lot slower than the previous implementation.