|
[Sponsors] |
July 4, 2013, 09:04 |
Avoid abort after "FOAM FATAL IO ERROR"
|
#1 |
New Member
thomas
Join Date: Jul 2013
Posts: 1
Rep Power: 0 |
Hello,
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? Thomas |
|
July 9, 2013, 09:30 |
|
#2 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
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: Code:
gamma gamma 1.250 [0 0 0 0 0 0 0]; Hope that helps!
__________________
~~~ Follow me on twitter @DavidGaden |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error "FLUENT has recieved fatal error" | yys88 | FLUENT | 0 | January 22, 2013 14:58 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 15:16 |