Open srmnitc opened 4 years ago
I guess the easiest way is to write the progress log file - or we could try to read the error out of the popen, but my feeling was that the Lammps library simply crashes, without reporting any details, once the Library crashes it also kills the connected python process, but this might be different with MPI.
If logging is enabled, lammps writes the crash reason to the log file, so this is not too difficult to debug. Maybe we should not spend time on this, but rather give a warning somewhere to write to log or use the log file of lammps.
This can be fixed by compiling LAMMPS with https://docs.lammps.org/Build_settings.html#exception-handling-when-using-lammps-as-a-library and then use a try/except
statement. At least this works for the C++ interface, so I hope it also works for the Python interface.
@jan-janssen If lammps throws an error due to a wrong command or so, it is not communicated back to the main process. Is there a good way to do this?