Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
27429 Discussions

Segmentation fault on mac os with -qopenmp

Polk__Jay
Beginner
402 Views

I am using intel fortran on a mac with catalina.  My program compiles and runs fine as long as I don't include -qopenmp.  When i include that option, I get a segmentation fault. Increasing the stack size from the shell doesn't fix it.  Older posts suggest that it can be increased using -stack_size, but it doesn't seem to recognize that in my version. Is there another way to increase stack size, or other potential causes?

Thanks--Jay

0 Kudos
1 Solution
Ron_Green
Moderator
322 Views

stacksize is set by the linker.  The syntax is to pass -stack_size to the linker.  you use -Wl, for passing args to the linker like this

 

ifort -Wl,-stack_size -Wl,0x1000000 -o hello hello.f90

 

sorry it took so long to get back to this.  Let me know if this works.

View solution in original post

3 Replies
Ron_Green
Moderator
373 Views

I will investigate this. I also am surprised that the compiler does not have the -stack_size option. At least I don't see it in -help.


Polk__Jay
Beginner
340 Views

Hi Ronald,

any luck with the stack size issue?

Thanks--Jay

Ron_Green
Moderator
323 Views

stacksize is set by the linker.  The syntax is to pass -stack_size to the linker.  you use -Wl, for passing args to the linker like this

 

ifort -Wl,-stack_size -Wl,0x1000000 -o hello hello.f90

 

sorry it took so long to get back to this.  Let me know if this works.

Reply