how to enable work-stealing

how to enable work-stealing

Dear all,

I want to enable work-stealing in intel OpenMP and thus set the variable KMP_TASKING=1. However, all OpenMP based programs have segmentation fault (core dumped) at the start of the parallel region.

Please, could somebody give me some guidelines in order to enable the work-stealing feature in intel OpenMP? I use the latest icc and ifort to compile the C and fortran programs, respectively.

Thanks a lot for your help.

Best Regards,

Yaqiong Peng

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

work-stealing is enabled by default, as KMP_TASKING=2.  If you set KMP_TASKING=0, then tasks are executed immediately by the encountering thread / i.e. no stealing.  KMP_TASKING=1 is a different mode that uses more expensive barriers that was a workaround until we got KMP_TASKING=2 working...  So the modes are

KMP_TASKING=0 - immediately execute each task by the encountering thread.  do not defer any tasks or steal any tasks.  This is a good env var to set for codes that do not use tasking at all, as it avoids the overhead of the tasking checks at a barrier.

KMP_TASKING=1 - every barrier becomes a double barrier.  Threads enter a special tasking barrier where they spin-wait / execute tasks until all tasks have been completed, which is very expensive - then drop through to the normal barrier.  This was the initial tasking implementation, and is currently broken - as you have discovered - but it is not a recommened setting, anyway.  It is/was mostly there for debugging purposes & as a workaround until we got KMP_TASKING=2 working.

KMP_TASKING=2 - execute tasks at the normal barrier, without a special tasking barrier.  This is the default setting & gives best performance for codes that use tasking, and very little overhead for those that don't.

Leave a Comment

Please sign in to add a comment. Not a member? Join today