|July 4, 2013, 09:04||
Avoid abort after "FOAM FATAL IO ERROR"
Join Date: Jul 2013
Posts: 1Rep Power: 0
usually the solvers abort program execution with the message "--> FOAM FATAL IO ERROR" if there is something wrong with the format of the input data (for example giving "value (0 0 0)" instead of "uniformValue (0 0 0)" to a uniform boundary condition).
This is problematic, because I have to run some clean-up code when the solver crashes after wrong user input (I use a modification of the standard solvers).
Is the program abort hard coded in OpenFOAM? Or can I change some switch (in the global controlDict, maybe?) so that a warning is shown or an exception is thrown instead of exiting immediately?
|July 9, 2013, 09:30||
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 436Rep Power: 14
It is a program exit, not an abort. There is no stack after a fatal IO error.
I don't think you can change this behaviour. You could find the source where it throws the error and exits (buried in src/OpenFOAM) but what would you change? Stop it from throwing the error?
The problem is: the program doesn't know how to continue when it gets bad input, the only thing it can do is tell the user and exit. For example, let's say it needs to read a dimensionedScalar "gamma", but encounters:
gamma gamma 1.250 [0 0 0 0 0 0 0];
Hope that helps!
Follow me on twitter @DavidGaden
|Thread||Thread Starter||Forum||Replies||Last Post|
|Error "FLUENT has recieved fatal error"||yys88||FLUENT||0||January 22, 2013 15:58|
|error while compiling the USER Sub routine||CFD user||CFX||3||November 25, 2002 16:16|