wiki:Documentation/UserGuide/SegmentationFault

How to find a segmentation error or a floating invalid error

Author: D. Solyga
Last revision: D. Goll 2020/04/20

Segmentation errors

What is it?: Segmentation errors indicate issues with the memory which are often caused by ill-defined array dimensions.

How to address it: The dimension of your arrays can be checked by changing the settings of the compiler. Segmentation faults can be trapped directly by the compiler. Check carefully the error messages written by the compiler.

See here how to compile in debug mode. Note that running the code will take a lot longer! Run the code on a single point test-case (ADD LINK TO HOW TO RUN SINGLE PIXEL) to avoid wasting computing resources.: wiki:Documentation/UserGuide/CompileMethods

Several cases where you might have a segmentation error: (1) An array is defined as ALLOCATABLE but you try to access its member before you allocate it. (added by Chao Yue)

Floating invalid

What is it?: During an arithmetic operation, the floating-point values used in a calculation were invalid for the type of operation requested or invalid exceptional values. For example, the error can occur if you request a log of the floating-point values 0.0 or a negative number.

How to address it: If during run time, you got an error saying floating invalid..., compiling with debug options might give more information while running the model again. Hopefully, when you run the model again, you'll get the line number where the model crashed.

Note that the line number given by the compiler corresponds to the preprocessed file. For ORCHIDEE, these files are found in modipsl/modeles/ORCHIDEE/build/ppsrc/. Check these files to know which is the corresponding line.

See here how to compile in debug mode. Note that running the code will take a lot longer! Run the code on a single point test-case (ADD LINK TO HOW TO RUN SINGLE PIXEL) to avoid wasting computing resources: wiki:Documentation/UserGuide/CompileMethods

Last modified 4 years ago Last modified on 2020-09-03T09:20:43+02:00