Community
cancel
Showing results for
Did you mean:
Beginner
218 Views

## The problem of " libiomp5md.dll!__kmp_suspend_64() " with Intel C++ Compiler XE 15.0 Update 4

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.

8 Replies
Black Belt
218 Views

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

Beginner
218 Views

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

Employee
218 Views

thanks for the report, OpenMP team is working on a fix.

Beginner
218 Views

Thank a lot for the fixing.  I am looking forward to a solution of the problem.

--John

thanks for the report, OpenMP team is working on a fix.

Employee
218 Views

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

Beginner
218 Views

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

Employee
218 Views

John L.,

This issue is fixed in compiler version 16.0 update 1. Can you please verify that it resolves the problem?

Thanks,

--Amanda

Beginner
218 Views

Amanda,

The problem is resolved now in compiler version 16.0 update 1.

Thank you very much.

--John