[OMPT] Fix interoperability test with GCC

We have to ensure that the runtime is initialized _before_ waiting
for the two started threads to guarantee that the master threads
post their ompt_event_thread_begin before the worker threads. This
is not guaranteed in the parallel region where one worker thread
could start before the other master thread has invoked the callback.

The problem did not happen with Clang becauses the generated code
calls __kmpc_global_thread_num() and cashes its result for functions
that contain OpenMP pragmas.

Differential Revision: https://reviews.llvm.org/D43882

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@326435 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed