HX_CU_CALL_CHECK error when using OpenMP offloading with scheduling


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.


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.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

Hi Alok,

Engineer determined that there’s currently no efficient way to support dynamic or guided scheduling on a GPU so it’s not something we’ll be able to add at this time. Though, in 21.11 we did add runtime error message if a schedule other than static is used.

% nvc -mp=gpu omp.c -V21.11; a.out
NVC++-F-1196-OpenMP - Only static schedule kind is supported for GPU  (omp.c: 6)
NVC++/x86-64 Linux 21.11-0: compilation aborted