Hi,
I wanted to port some code to nvc++ with the intent to speedup some hot loops. I decided to simply switch the compiler I inputted to CMake. Most of it went fine modulo some minor changes (tests OK, no significant perf regression).
I then enabled the OpenACC switch, everything went fine. Later when I enabled LTO using the -Mipa=fast,inline
/-Mipa=fast/-Mipa=inline and faced a compiler error triggered in the presence of atomic variables (std::atomic).
NVC+±S-0000-Internal compiler error. accel.c::acc_remove_atomics: ILI_ALT is missing for atomicrmw opcode 326 (dummy.cc: 326)
NVC++/x86-64 Linux 22.1-0: compilation completed with severe errors
Here is an example code that triggers the “crash”.
#include <atomic>
int main() {
std::atomic<unsigned> an_atomic_;
++an_atomic_;
return 0;
}
Compiled using:
nvc++ dummy.cc -acc -Mipa=fast
Note:
the following commands do not trigger the error.
nvc++ dummy.cc -acc
nvc++ dummy.cc -Mipa=fast
I get the error only when acc and ipa are enabled together .
I’m looking for a workaround else than disabling ipa.
Thanks