MATLAB: Matlab reboots the computer when running parellel computation

MATLABmatlab ubuntu memory reboot parellel-computationParallel Computing Toolbox

I'm running Matlab 2018b on Ubuntu 18.04 with a 14-cores CPU and 32GB memory. When I try to run my code (using parellel computation to call c++ and CPLEX), the computer will automatically reboot without any warning. Sometimes the computer does not reboot but crashs (no display, no audio output, no usb) and the small screen on motherboard says I need to detect my memory. If I shutdown some workers, the reboot or crash will happen later. I have tested all my hardwares without finding any problems. The CPU temperature is normal and the memory is occupied by at most 1/3 before rebooting. And my code runs successfully on my old computer with 4-cores based on Windows 10.
Is there anyone having some idea to solve it? Many thanks.

Best Answer

If the mainboard display tells you to check the memory, check the memory exhaustively. I'm using the free version of memtest86 https://www.memtest86.com/ or the Ultimate Boot CD: http://www.ultimatebootcd.com/ . A damaged RAM can cause the observed behavior: The more cores are running, the more likely the failing RAM cells are used.