We are trying to run an OpenACC code on a Power8 machine. The code is perfectly working when targeting Intel CPU and NVIDIA GPUs, but when compiling for Power8 with PGI 18.1 we see this compilation error:
/opt/pgi/linuxpower/18.1/share/llvm/bin/opt -O2 -disable-slp-vectorization /tmp/pgccWdMpq5Zfxj3r.ll -S -o /tmp/pgccWdMpqDRgEKUC.llvm
/opt/pgi/linuxpower/18.1/share/llvm/bin/opt:
/tmp/pgccWdMpq5Zfxj3r.ll:2483:29: error: use of undefined value '%res_I_p.addr'
%54 = load double, double* %res_I_p.addr, align 8, !tbaa !86, !dbg !108
^
pgcc-Fatal-llvmopt completed with exit code 1
The piece of code generating this error seems to be this one, performing a reduction over the real part of complex double precision values:
double res_R_p = 0.0;
double res_I_p = 0.0;
double resR = 0.0;
int t;
#pragma acc kernels present(tr_local_plaqs)
#pragma acc loop reduction(+:res_R_p) reduction(+:res_I_p)
for(t=(LNH_SIZEH-LOC_SIZEH)/2; t < (LNH_SIZEH+LOC_SIZEH)/2; t++) {
res_R_p += creal(tr_local_plaqs[0].c[t]);
res_R_p += creal(tr_local_plaqs[1].c[t]);
}
return res_R_p;
Do you have some hints about what could be causing this problem? And possibly how to avoid it?
Regards,
Enrico