[gmx-developers] exit codes
justin.maccallum at me.com
Tue Jul 21 00:32:49 CEST 2009
I'm writing some scripts to automate setting up and running gromacs
simulations and I have run into the minor problem in that sometimes
the gromacs tools do not give a useful exit code. For example, calling
any of the tools with an option that they don't understand (e.g.
"editconf -xxxxx ...") gives a return code of zero. I haven't checked
thoroughly to see in what situations the exit code is set, but ideally
the command line tools should have an exit code of zero if everything
completed successfully and non-zero if something went wrong. Checking
the exit code is much simpler than trying to search for error strings
in the standard output.
I looked at the code, but I'm not very familiar with gromacs internals
and I couldn't figure out why this wasn't working correctly. This is
with the latest git running on OS X 10.5. I'm using subprocess.Popen
in python to execute the gromacs tools.
Post Doctoral Fellow
Department of Pharmaceutical Chemistry
University of California San Francisco
More information about the gromacs.org_gmx-developers