Hello,
I’ve tried to compile to following code using PGI compiler from SDK/22.7
It seems that PGI is trying to implicitly convert user-defined type to pointer type.
The relevant definition is:
typedef struct complextype
{
float real, imag;
} Compl;
Which produces the following error message:
$ pgcc -mp -acc -Minfo=accel mandelbrot_openacc5.c
main:
48, Generating create(res[:][:]) [if not already present]
54, Generating implicit private(j)
Generating NVIDIA GPU code
54, #pragma acc loop gang, vector(128) /* blockIdx.x threadIdx.x */
55, #pragma acc loop seq
54, Local memory used for z,c
55, Complex loop carried dependence of __nv_main_F1L44_2_3->->,res prevents parallelization
Loop carried scalar dependence for j at line 59,72,73,75
Generating implicit private(j)
Complex loop carried dependence of __nv_main_F1L44_2_3->-> prevents parallelization
64, Loop carried scalar dependence for k at line 68
Scalar last value needed after loop for k at line 72
79, Generating update self(res[start:block_size][:])
nvvmCompileProgram error 9: NVVM_ERROR_COMPILATION.
Error: /tmp/pgaccXDWmtiOa2yOg.gpu (123, 23): parse invalid cast opcode for cast from '%struct.DT1_284 = type <{ float, float }>' to 'float*'
NVC++-F-0155-Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code (mandelbrot_openacc5.c: 1)
NVC++/x86-64 Linux 22.7-0: compilation aborted
I do not observe this issue with PGI/19.1.
Perhaps treatment of typedef variable has been changed with recent version of PGI.
Some clarification regarding this issue is much appreciated.
mandelbrot_openacc5.c (2.2 KB)