(Copy-pasted-adjusted the "Troubleshooting" section of the new FAQ) |
(Added FAQ "I'm unable to reproduce a crash. What's going on?") |
||
Line 18: | Line 18: | ||
You encountered a program error. Upon hitting that error OpenFOAM produced a stack trace (a list of the functions that were called) which is very useful to find the location at which the problem occured. It is possible to get that stack-trace with the source files and the line numbers of the functions which might help to find out what the problem is. To do so you have to [http://openfoamwiki.net/index.php/Howto_compile_OpenFOAM#Modifications_for_a_debug_version_of_OpenFOAM compile a debug version of OpenFOAM]. (see also the ''segmentation fault''-question above) | You encountered a program error. Upon hitting that error OpenFOAM produced a stack trace (a list of the functions that were called) which is very useful to find the location at which the problem occured. It is possible to get that stack-trace with the source files and the line numbers of the functions which might help to find out what the problem is. To do so you have to [http://openfoamwiki.net/index.php/Howto_compile_OpenFOAM#Modifications_for_a_debug_version_of_OpenFOAM compile a debug version of OpenFOAM]. (see also the ''segmentation fault''-question above) | ||
+ | |||
+ | === I'm unable to reproduce a crash. What's going on? === | ||
+ | If you run the same exact simulation twice or more times, but there is an occasional crash in different places, then there are a few possibilities: | ||
+ | * There could be a numerical instability in the calculations. This could be due to the compiler options used (such as {{tt|--fast-math}}). | ||
+ | * There could be some randomness introduced somewhere by a pseudo-random number generator. This is common in the particle/chemical type solvers in OpenFOAM. | ||
+ | * There could be a hardware problem. In this case, check this page: [[HowTo Check if RAM and CPU are OK|How to Check if RAM and CPU are OK]] |
Revision as of 18:32, 6 October 2013
Contents
1 FAQ Section 8: Troubleshooting
Figuring out what went wrong
1.1 An application ends with a segmentation fault. What is wrong?
A segmentation fault usually occurs when a program trys to access memory outside its bounds (see Segmentation Fault on Wikipedia). In OpenFOAM this usually occurs when a List<> or similar is accessed with an index outside of the allocated domain. To find out where this occurs make a separate copy of the OF-sources, recompile them with the swich WM_COMPILE_OPTION set to Debug (just uncomment the right lines in the bashrc/cshrc files). This makes OF run slower, but accesses to List<> etc are checked for ranges and the program aborts if you access outside of a range (plus you get a stack trace). This won't solve your problem, but it will help you find out where it occurs.
See also General debugging tips. For recompiling OpenFOAM look at Howto_compile_OpenFOAM
1.2 My program stops with an output that starts with #0 Foam::error::printStack(Foam::Ostream&)
You encountered a program error. Upon hitting that error OpenFOAM produced a stack trace (a list of the functions that were called) which is very useful to find the location at which the problem occured. It is possible to get that stack-trace with the source files and the line numbers of the functions which might help to find out what the problem is. To do so you have to compile a debug version of OpenFOAM. (see also the segmentation fault-question above)
1.3 I'm unable to reproduce a crash. What's going on?
If you run the same exact simulation twice or more times, but there is an occasional crash in different places, then there are a few possibilities:
- There could be a numerical instability in the calculations. This could be due to the compiler options used (such as --fast-math).
- There could be some randomness introduced somewhere by a pseudo-random number generator. This is common in the particle/chemical type solvers in OpenFOAM.
- There could be a hardware problem. In this case, check this page: How to Check if RAM and CPU are OK
Faqdescription | Figuring out what went wrong + |
Faqname | Troubleshooting + |
Faqnumber | 8 + |