- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After running several hours, the code with OpenMP or MKL would lock at
libiomp5md.dll!__kmp_suspend_64()
libiomp5md.dll!__kmp_barrier()
libiomp5md.dll!__kmp_join_barrier()
libiomp5md.dll!__kmp_join_call()
libiomp5md.dll!_vcomp_fork()
The code example with OpenMP could be:
for (long long n = 0; n < N; n++) // N=2^50
{
#pragma omp parallel for
for (int i = 0; i < Z; i++)
{
y = a * b;
}
}
Who can solve this problem completely?
Thank you very much.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you certain it is not the encompassing for loop?
In the provided loop, if the runtime of the inner loop is small, and/or the thread count high. The probability is high that any time you stop the program threads will be at the barrier at the end of the inner loop.
Note, if your code use "=2^50" you will not get the number you want. Use something like
const long long N = ((long long)2)^50;
I would suggest you use int64 (or the __int64 or int64_t variant that you customarily use). You cannot be assured that long long is an int64.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. Apparently, it is impossible for me using something like: const long long N = ((long long)2)^50; I know that the language used by me is C++, not Matlab. What I wanted to express is that it is a very big number.
2. In fact, my code is somewhat like:
for (int n = 0; n < 2000; n++)
{
some_fuction_else();
for(int m = 0; m < 1000; n++)
{
some_fuction_else();
for(int m = 0; m < 40000; n++)
{
some_fuction_else();
#pragma omp parallel for
for (int i = 0; i < 60000; i++)
{
y = a * b;
}
some_fuction_else();
}
some_fuction_else();
}
}
jimdempseyatthecove wrote:
Are you certain it is not the encompassing for loop?
In the provided loop, if the runtime of the inner loop is small, and/or the thread count high. The probability is high that any time you stop the program threads will be at the barrier at the end of the inner loop.
Note, if your code use "=2^50" you will not get the number you want. Use something like
const long long N = ((long long)2)^50;
I would suggest you use int64 (or the __int64 or int64_t variant that you customarily use). You cannot be assured that long long is an int64.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for the report, OpenMP team is working on a fix.
--Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank a lot for the fixing. I am looking forward to a solution of the problem.
--John
Vladimir Polin (Intel) wrote:
thanks for the report, OpenMP team is working on a fix.
--Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem was partially fixed in 15.0 update 5 and 16.0 compilers. if the code still hang please use the environemnt variable:
KMP_BLOCKTIME=infinite
--Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank Vladimir very much!
In my work, the problem is still unsolved in 15.0 update 5 compilers.
And I am using Visual Studio 2013 now, and could you please tell me how to set KMP_BLOCKTIME=infinite ?
Thank you very much!
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
John L.,
This issue is fixed in compiler version 16.0 update 1. Can you please verify that it resolves the problem?
Thanks,
--Amanda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Amanda,
The problem is resolved now in compiler version 16.0 update 1.
Thank you very much.
--John

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page