[gmx-developers] exit codes

Rodrigo faccioli rodrigo_faccioli at uol.com.br
Tue Jul 21 03:47:55 CEST 2009


I had the same problem, but I had success when I read the error file.

I'm using Python and subprocess.call. This method has some parameters and
one is a file that receives the error message when the program fails.
Furthermore the python official documentation (
http://docs.python.org/library/subprocess.html) there is the link
http://developer.spikesource.com/wiki/index.php/How_to_invoke_subprocesses_from_Python

However, it's necessary look for the words fatal or error in this file.

Unfortunately, my Python script has some classes and if I send to you, the
code will be enormous, because I use these classes to manager the execution
of others programs. Moreover, I can help you, if necessary.

I hope that this email helped you.

Cheers,

--
Rodrigo Antonio Faccioli
Ph.D Student in Electrical Engineering
University of Sao Paulo - USP
Engineering School of Sao Carlos - EESC
Department of Electrical Engineering - SEL
Intelligent System in Structure Bioinformatics
http://laips.sel.eesc.usp.br
Phone: 55 (16) 3373-9366 Ext 229
Curriculum Lattes - http://lattes.cnpq.br/1025157978990218


On Mon, Jul 20, 2009 at 7:32 PM, Justin MacCallum
<justin.maccallum at me.com>wrote:

> Hi All,
>
> 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.
>
> Cheers,
> Justin
> ----
>
> Justin MacCallum
> Post Doctoral Fellow
> Department of Pharmaceutical Chemistry
> University of California San Francisco
>
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use thewww interface
> or send it to gmx-developers-request at gromacs.org.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20090720/1b171c59/attachment.html>


More information about the gromacs.org_gmx-developers mailing list