- It's not trivial to work out how large the variables present in an SPMD block are because of the workspace transparency constraint - basically, you cannot call WHOS. More in the doc.
- No, the labs are simply mostly normal MATLAB processes. They do not have any pre-allocated memory, and acquire the necessary memory when you create variables.
- The labs can hit the normal MATLAB out-of-memory error.
How is memory allocated among parallel workers when using the SPMD setup in the MATLAB 2013b Parallel Toolbox
-
14-10-2022 - |
문제
I am currently running a series of experiments in parallel using the SPMD function in MATLAB 2013b and running into memory issues (here is a rough outline of the script).
I can design a way to avoid these issues, but need to understand how memory is allocated among the labs (workers/cores) when using this setup.
Specifically, I am wondering:
Is there a way to assess the memory usage of variables that exist in the lab workspace?
Is each lab allocated a fixed amount of memory beforehand? If so, how much? Otherwise, is it right to assume that each lab is granted as much memory as they require (so if I have 48 GB of RAM and 8 workers, it's possible that 1 lab uses up 24 GB and the remaining labs use 24 GB split evenly)
Based on the above, what happens when a lab exceeds its allotted memory limit (assuming that it goes unresponsive but that the memory is free'd up). If each lab does not have a fixed memory limit, then what will happen to the lab who sends the "back-breaking" request (i.e. what happens to a lab who asks for 49 GB of memory on a system with 48 GB of total memory).
해결책