Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Add -debug in the compile command line and solve the 'segmentation fault'. Reason?

After trying many times, finally I can run through CAM if I add a -debug argument in the configure command line.

I make many changes to reproduce the segmentation fault error, and I am sure what makes the model work is the -debug option.

The information about the -debug argument is :
-debug
Switch to turn on building CAM with compiler options for debugging.

Does anyone have any idea about how the -debug will change the executable and cause the run time error 'segmentation error'?

Thank you very much.
 

eaton

CSEG and Liaisons
The most common reason that turning on debug flags will allow code to run is that it changes the optimization level. This points to a bug in the compiler associated with optimization, or sometimes with the OMP threading. Unfortunately we often run into this kind of problem, and not just with PGI, but with all compilers. So typically the best solution is to try using another compiler. The current versions of PGI are 12.x.
 
Top