NVC++-F-0000-Internal compiler error. must have operand

Hello,

I have been running into some problems when trying to compile my application using nvc++.
It can compile succesfully using other compilers.
Basically, in an “inoffensive” while loop it fails to compile, showing:

NVC++-F-0000-Internal compiler error. must have operand       0  (/scratch/isaacaa/tmp/pkdgrav3/mdl2/mpi/mdl.cxx: 1806)
NVC++/x86-64 Linux 22.2-0: compilation aborted

In that file location:

   7 extern "C" void mdlCompleteAllWork(MDL mdl) { static_cast<mdlClass *>(mdl)->CompleteAllWork(); }
   6 void mdlClass::CompleteAllWork() {
   5     while (DoSomeWork()) {}
   4 #ifdef USE_CL
   3     while (CL_flushDone(clCtx)) {}
   2 #endif
   1 #ifdef USE_CUDA
1806     while (flushCompletedCUDA()) {}
   1 #endif
   2 #ifdef USE_METAL
   3     while (flushCompletedMETAL()) {}
   4 #endif
   5 }

Sadly, I have not been able to isolate this problem in a smaller scenario… but the code is public so that the problem can be replicated:

git clone git@bitbucket.org:dpotter/pkdgrav3.git
cd pkdgrav3; git checkout develop
mkdir build; cd build; cmake .. && make

The compilation is halted at the beggining.

I’m using nvhpc/22.2, and in older versions the problem is also present.
Thanks,
Isaac

Hi Isaac,

It was a bit of challenge but was able to recreate the error here. It reproduces in 22.2 and 22.3 but seems to have gone away in 22.5. Can you please update your compiler and see if it fixes the issue for you as well?

-Mat

Hello,

I confirm that with 22.5 the code successfully compiles.
There seem to be some problems when running our test suite, but that may be caused by some problem or bug on our side.

Thanks,
Isaac