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

Segmentation fault on mac os with -qopenmp

Polk__Jay
Beginner
992 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
912 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

0 Kudos
3 Replies
Ron_Green
Moderator
963 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
930 Views

Hi Ronald,

any luck with the stack size issue?

Thanks--Jay

0 Kudos
Ron_Green
Moderator
913 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.

0 Kudos
Reply