sem
sem copied to clipboard
Try to identify out of memory errors and print corresponding error message
This PR aims to identify simulation crashes due to out of memory errors. Indeed, in these cases the simulation script is terminated by the kernel with signal SIGKILL
(on POSIX systems), and no errors are shown in either stdout
or stderr
. Instead, with these changes the user will be informed of the likely cause of the crash.
P.S. I could not find a definition of the SIGKILL
return code in any Python module, so I not-so-elegantly defined it myself. The syntax is taken from this PEP "guideline". Feel free to propose a different approach if a more elegant solutions comes to mind :)