OpenMP stack problem @ Erwin | 2022-10-28T12:10:55+01:00 | 1 minute read | Update at 2023-12-06T00:27:08Z

OpenMP program cause the segmentation fault, because OpenMP program need much more stack resourses then normal C apps.

Compiling with OpenMP flag forces all local variables to be stack allocated and not heap allocated

Check the stack size:

ulimit -a # check all resources size
ulimit -s # check only stack size

Change the stack size:

ulimit -s <stack size> # unit is kbytess

Enlarge it until the program can run normally.

© 2020 - 2024 Li Yuanhao's Blog

Powered by Hugo with theme Dream.

avatar

Li Yuanhao's BlogJust do it

Social Links