Dear all,

I’m a total newbie with openacc… I have this code snippet:

void compute_component_vcell_TL ( real* restrict vptr,

const real* restrict szptr,

const real* restrict sxptr,

const real* restrict syptr,

const real* restrict rho,

const real dt,

const real dzi,

const real dxi,

const real dyi,

const integer nz0,

const integer nzf,

const integer nx0,

const integer nxf,

const integer ny0,

const integer nyf,

const offset_t _SZ,

const offset_t _SX,

const offset_t _SY,

const integer dimmz,

const integer dimmx,

const phase_t phase)

{

#pragma acc kernels

{

#pragma acc loop independent

for(integer y=ny0; y < nyf; y++)

{

#pragma acc loop independent

for(integer x=nx0; x < nxf; x++)

{

#pragma acc loop independent

for(integer z=nz0; z < nzf; z++)

{

const real lrho = rho_TL(rho, z, x, y, dimmz, dimmx);

const real stx = stencil_X( _SX, sxptr, dxi, z, x, y, dimmz, dimmx);

const real sty = stencil_Y( _SY, syptr, dyi, z, x, y, dimmz, dimmx);

const real stz = stencil_Z( _SZ, szptr, dzi, z, x, y, dimmz, dimmx);

vptr[IDX(z,x,y,dimmz,dimmx)] += (stx + sty + stz) * dt * lrho;

}

}

}

}

};

The command :

cmake -DCMAKE_C_COMPILER=/opt/pgi/linux86-64/17.4/bin/pgcc -DCMAKE_BUILD_TYPE=Debug -DUSE_OPENMP=OFF -DUSE_OPENACC=ON …

doesn’t return any error. However when I make, it gives the error:

PGC-S-0155-Unsupported nested compute construct in compute construct or acc routine (/home/fwirtm/FWI-gtc2017/src/fwi_propagator.c: 609)

PGC-S-0155-Accelerator region ignored; see -Minfo messages (/home/fwirtm/FWI-gtc2017/src/fwi_propagator.c)

compute_component_scell_TR:

0, Accelerator region ignored

609, Accelerator restriction: invalid loop

At the end it gives :

PGC/x86-64 Linux 17.4-0: compilation completed with severe errors

src/CMakeFiles/fwi-core.dir/build.make:134: recipe for target ‘src/CMakeFiles/fwi-core.dir/fwi_propagator.c.o’ failed

make[3]: *** [src/CMakeFiles/fwi-core.dir/fwi_propagator.c.o] Error 2

CMakeFiles/Makefile2:87: recipe for target ‘src/CMakeFiles/fwi-core.dir/all’ failed

make[2]: *** [src/CMakeFiles/fwi-core.dir/all] Error 2

CMakeFiles/Makefile2:245: recipe for target ‘main/CMakeFiles/irun.dir/rule’ failed

make[1]: *** [main/CMakeFiles/irun.dir/rule] Error 2

Makefile:157: recipe for target ‘irun’ failed

make: *** [irun] Error 2

I would be grateful for any guidance and assistance. Thank you.