Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

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

John_L_8
Beginner
918 Views

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.

 

 

0 Kudos
8 Replies
jimdempseyatthecove
Honored Contributor III
918 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

0 Kudos
John_L_8
Beginner
918 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

0 Kudos
Vladimir_P_1234567890
918 Views

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

--Vladimir

0 Kudos
John_L_8
Beginner
918 Views

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

0 Kudos
Vladimir_P_1234567890
918 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

--Vladimir

0 Kudos
John_L_8
Beginner
918 Views

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

 

0 Kudos
Amanda_S_Intel
Employee
918 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

0 Kudos
John_L_8
Beginner
918 Views

Amanda,

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

Thank you very much.

 

--John

 

0 Kudos
Reply