OMPT thread static data

OMPT thread static data

Posting on behalf of John Mellor-Curmmey who has had some hassle with accounts. Please include him in any replies.

I am interested in extending Intel's OpenMP runtime implementation with support for the emerging OMPT performance tool API. How would you recommend maintaining persistent OMPT state for threads in the Intel OpenMP runtime? Originally, I tried putting state into kmp_base_info_t, but found that this gets reinitialized and overwritten, so it isn't suitable for persistent state. Would it be acceptable to declare a thread local variable using the __thread keyword?

__thread struct ompt_thread_info_t *ompt_thread_info;

I don't want to pursue an approach that compromises portability of the runtime system.

John Mellor-Crummey                       Professor
Dept of Computer Science                                Rice University
email: johnmc@rice.edu                   phone: 713-348-5179

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

Hi John,

I haven't got your point on the "kmp_base_info_t gets reinitialized and overwritten".  We do have persistent data in this structure, e.g. global thread ID which is assigned once and lives unchanged for the thread's lifetime.

Regarding the __thread keyword, it should work on Unix-like systems, but definitely won't work on Windows.

Regards,
Andrey

Leave a Comment

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