Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Allen_Barnett
Beginner
77 Views

Set OpenMP attributes within code

Hi: I have discovered that setting KMP_BLOCKTIME=0 results in the best performance of my Fortran code. (Not by much, really, but it is measurable over our entire test suite.) Is it possible to set this attribute through an API call? I don't want to depend on the end user having to set environment variables.

Also related, there are some loops for which the GCC GOMP library gives the best results when the scheduling is declared as "guided". When compiled with the Intel compiler, however, it appears best to not declare the schedule as guided. Is there an API function which can control the schedule for a given loop?

Thanks,
Allen
 

Tags (1)
0 Kudos
2 Replies
TimP
Black Belt
77 Views

Do you find these missing in your favorite docs?

https://software.intel.com/sites/products/documentation/doclib/iss/2013/compiler/cpp-lin/GUID-BD9B39...

http://openmp.org/mp-documents/OpenMP3.1-CCard.pdf

What is difficult to find documented is how schedule guided and auto may be related for a given implementation.

https://software.intel.com/en-us/articles/openmp-loop-scheduling

As you hint that you want to change it according to which library is running, it seems you might be interested in schedule(runtime).

On linux, Intel libiomp5 supports the libgomp internal function calls.

Allen_Barnett
Beginner
77 Views

Thanks for the pointers. I was able to add kmp_set_blocktime to my code. That works well.

The schedule has a smaller impact so I guess I will just let that be.

Is this exactly what's in my Composer XE installation: https://www.openmprtl.org/

Thanks,
Allen

Reply