Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Communication of lammps errors #28

Open
srmnitc opened this issue Mar 15, 2020 · 3 comments
Open

[Feature] Communication of lammps errors #28

srmnitc opened this issue Mar 15, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@srmnitc
Copy link
Member

srmnitc commented Mar 15, 2020

@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?

@jan-janssen
Copy link
Member

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.

@srmnitc
Copy link
Member Author

srmnitc commented May 1, 2020

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.

@jan-janssen jan-janssen added the enhancement New feature or request label May 6, 2020
@jan-janssen
Copy link
Member

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 jan-janssen changed the title Communication of lammps errors {Feature] Communication of lammps errors Jul 13, 2023
@jan-janssen jan-janssen changed the title {Feature] Communication of lammps errors [Feature] Communication of lammps errors Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants