HX_CU_CALL_CHECK error when using OpenMP offloading with scheduling

Hi,

When using dynamic or guided scheduling in OpenMP Offloading, I get the following error:

$ cat omp.c 
#include <omp.h>

int main()
{
  #pragma omp target teams distribute parallel for schedule(guided)
  for(int i=0; i<1000; i++)
  { }
  return 0;
}
$
$ nvc -mp=gpu -gpu=cc75 omp.c 
$ ./a.out 
Fatal error: expression 'HX_CU_CALL_CHECK(p_cuStreamSynchronize(stream[dev]))' (value 1) is not equal to expression 'HX_SUCCESS' (value 0)
Aborted (core dumped)
$ 

The program works as expected when using static scheduling while offloading.

I’ve tried it with nvc 21.7 on my local machine and nvc 21.9 on the Summit Supercomputer, with same result.
The above program runs without error when compiled with LLVM/clang or GNU/gcc compiler.

Regards,
Alok

Hi Alok,

Guided and dynamic scheduling aren’t supported yet with GPU offload. Though while not expected to work, we should be giving a compile time error rather than runtime error. I added a problem report, TPR #30816.

Thanks,
Mat