Hi,
I’m trying to compile an OpenACC application that makes extensive use of complex.h
. This compiles correctly with pgcc 19.10 community edition, but on pgcc/nvc 20.7 this fails with the error message:
NVC++-S-0155-Procedures called in a compute region must have acc routine information: conj
I’ve put together a minimal failing example:
#include <stdio.h>
#include <complex.h>
int main(void) {
double complex a[100], b[100];
#pragma acc kernels copyout(a[0:100], b[0:100])
for (int i = 0; i < 100; i++) {
a[i] = 1 + 1 * I;
b[i] = conj(a[i]);
}
if (cimag(a[50]) == -cimag(b[50])) {
printf("Conjugation worked!\n");
return 0;
} else {
printf("Conjugation failed! %lf != %lf\n", cimag(a[50]), -cimag(b[50]));
return 1;
}
}
Running with 2019.10:
$ pgcc --version
pgcc 19.10-0 LLVM 64-bit target on x86-64 Linux -tp skylake
PGI Compilers and Tools
Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
$ pgcc -acc -o test test.c
$ ./test
Conjugation worked!
Running with 20.7:
$ pgcc --version
pgcc (aka nvc) 20.7-0 LLVM 64-bit target on x86-64 Linux -tp zen
PGI Compilers and Tools
Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
$ pgcc -acc -o test test.c
NVC++-S-0155-Procedures called in a compute region must have acc routine information: conj (test.c: 10)
NVC++-S-0155-Accelerator region ignored; see -Minfo messages (test.c: 5)
NVC++/x86-64 Linux 20.7-0: compilation completed with severe errors
I’d appreciate any advice on how to get this working. I have benchmarking access to a DGX-A100 for the next couple of days and would like to test this software, but no older PGI compiler versions are installed, and I can’t access the download links for the community editions any more, so I need to get this working with the new version (or find an installer for the 19.10 community edition).
Many thanks
Ed