Hi,
The compiler nvc++ aborts on the following example.
include <stdio.h>
int main (void) {
#pragma omp parallel
{
int sum = 0;
#pragma omp target teams loop reduction(+:sum)
for(int i = 0 ; i < 20000; i++) {
sum += i;
}
printf(“sum2 = %d\n”,sum);
}
return 0;
}
I obtain:
NVC+±F-0000-Internal compiler error. unexpected ILM number operands for reduction pragma 0 (essai.c: 8)
NVC++/x86-64 Linux 25.1-0: compilation aborted
I use the command: “nvc++ -mp=gpu -O3 essai.c -o essai”
If I comment the first line “#pragma omp parallel” , the problem doesnot occur.
“nvc++ --version” returns
"nvc++ 25.1-0 64-bit target on x86-64 Linux -tp cascadelake "
Mickaël