Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

OpenMP-Stack overflow

ali_z_
Beginner
126 Views

Hi,
I'm trying to compare the cpu time when using the !$ open mp in nested loops compared to the one without it. 
I'm using MVS2012 with intel composer xe.
Problem is when i disable the process openmp directives in Language the code runs fine but the !$ open mp loop takes the same cpu time compared to normal loop and slightly higher. When switching the process openMP directives to Generate parallel code i get the stack overflow. The code is attached to this post. I'll be thankful if you can guide me to how to use the open mp properly with mvs/intel composer xe. 
 

Thanks in advance !

0 Kudos
1 Solution
Xiaoping_D_Intel
Employee
126 Views

After enlarge the stack size to 20MB by setting "Project Properties -> Linker -> System -> Stack Reserve Size" to 20000000 the program can run without error. Detail info about stack size on Windows can be found at https://msdn.microsoft.com/en-us/library/8cxs58a6.aspx

Setting the number of bytes to allocate for each OpenMP* thread to use as the private stack for the thread can use environment variable "OMP_STACKSIZE". Detail about it can be found under the compiler user's guide and reference "Supported Environment Variables" topic.

Thanks,

Xiaoping Duan

Intel Customer Support

View solution in original post

2 Replies
Xiaoping_D_Intel
Employee
127 Views

After enlarge the stack size to 20MB by setting "Project Properties -> Linker -> System -> Stack Reserve Size" to 20000000 the program can run without error. Detail info about stack size on Windows can be found at https://msdn.microsoft.com/en-us/library/8cxs58a6.aspx

Setting the number of bytes to allocate for each OpenMP* thread to use as the private stack for the thread can use environment variable "OMP_STACKSIZE". Detail about it can be found under the compiler user's guide and reference "Supported Environment Variables" topic.

Thanks,

Xiaoping Duan

Intel Customer Support

View solution in original post

ali_z_
Beginner
126 Views

Many thanks, i appreciate it ! 

Reply