|
[Sponsors] |
May 8, 2012, 05:55 |
Why no non-zero return codes?
|
#1 |
Member
Florian
Join Date: Nov 2009
Posts: 59
Rep Power: 17 |
Hello,
I'm wondering why some (all?) pyFoam tools do not return a non-zero return code if the openfoam tool fails. For example: pyFoamRunner.py --autosense-parallel potentialFoam -noFunctionObjects fails because there is some dictionary entry missing, the return code is 0. mpirun -n 2 potentialFoam -noFunctionObjects fails too, but with a return code of 1. Same for pyFoamRunner.py. Returning non-zero exit code to indicate an error makes it much easier for scripts to use pyFoam. Any reason for this design decision or just not implemented yet? Regards, Florian |
|
May 8, 2012, 07:49 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
- I didn't need it yet (I don't check return codes in shell-scripts. If that is necessary I use Python) - there was no feature-request on the Mantis yet So this is NO design decision |
||
May 8, 2012, 11:05 |
|
#3 |
Member
Florian
Join Date: Nov 2009
Posts: 59
Rep Power: 17 |
Ok, the bugtracker is offline at the moment, I will file a request later and will also have a look at the code and see if I can produce a patch.
|
|
May 8, 2012, 11:25 |
|
#4 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
|
|||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
undefined reference to a C++'s class member function | linyanx | OpenFOAM Programming & Development | 5 | May 12, 2017 13:44 |
error adding void fraction into the solver & Error when chemistry is on | cmigueis | OpenFOAM Programming & Development | 23 | August 14, 2016 15:53 |
Help! Delete the UDM codes in the UDF | Messi | Fluent UDF and Scheme Programming | 2 | January 28, 2014 10:01 |
Return Codes in CFX | fayaazhussain | CFX | 1 | June 16, 2011 19:56 |
Missing math.h header | Travis | FLUENT | 4 | January 15, 2009 12:48 |