uaf-arctic-eco-modeling / dvm-dos-tem

A process based Dynamic Vegetation, Dynamic Organic Soil, Terrestrial Ecosystem Model.
MIT License
22 stars 24 forks source link

Diagnose segfault in OSX with OpenMP enabled #301

Open rarutter opened 7 years ago

rarutter commented 7 years ago

See PR #300 for details.

ThomasThelen commented 6 years ago

Segmentation faults in general are complaints about accessing something in memory that doesn't exist. I see that increasing the stack size didn't work, so I would put my money on either a non thread safe function is getting called in in the #pragma block, or a resource that is shared between thread 2 and another is getting destroyed, and then accessed again in this thread 2 (referring to https://user-images.githubusercontent.com/838735/27499395-16992eda-5810-11e7-8ec0-3ee4cf6a525d.png).

Worst case scenario is that you put log statements after each line and walk the log file to see the last executed instruction.