I am using PGI 14.1 to compile a plain C program using OpenACC directives, to be run on an NVIDIA GPU.
The main program calls several subroutines and most of them have been correctly parallelized, apart from one which let the compiler complains with the error reported in the subject of this post.
The full output for this subroutine is the following:
PGC-S-0053-Illegal use of void type (main.c: 141) PGC-S-0155-Compiler failed to translate accelerator region (see -Minfo messages): Earlier block does not dominate later block (main.c: 181) bc: 181, Generating present(prv[0:]) Generating present(nxt[0:]) Generating present(param[0:1]) 183, Loop is parallelizable 185, Loop is parallelizable Accelerator kernel generated 183, #pragma acc loop gang /* blockIdx.y */ 185, #pragma acc loop gang, vector(128) /* blockIdx.x threadIdx.x */ PGC/x86-64 Linux 14.1-0: compilation completed with severe errors pgcc-Fatal-ccompile completed with exit code 1
I could not find any use of “void type” which could be considered “illegal”, thus I guess the first error may be related to the second one: “Earlier block does not dominate later block”, which on its turn, to my knowledge, is quite cryptic.
Commenting out parts of the code I discovered the “offending” code line is a read to a “global” array, where the index is computed given the loop iteration index.
As an additional information, the same subroutine was successfully run using OpenCL using as kernel the body of the loop I am trying to parallelize with OpenACC; thus it has to be parallelizable.
Does someone knows what could be generating this kind of error?
Or what does it actually means?
Thanks in advance,