compiler errors


If I want to compile the following loop section

#pragma acc region

#pragma acc for parallel private(ip,ir)
      dtw_0[ip][ir] += 	0.5*hval[ir]*(visc_w_2d[ip  ][ir+1] - visc_w_2d[ip  ][ir-1])*0.5*hval[ir]*(w_0[ip  ][ir+1] - w_0[ip  ][ir-1]);


pgcc tells me

pgcc -mp  -O3 -Mnoopenmp -ta=nvidia -Minfo=accel -fast -Msafeptr  ...


PGC-F-0000-Internal compiler error. Generating a negative offset into dimension of target array       1 (c/esel.c: 1383)
PGC/x86-64 Linux 9.0-4: compilation aborted

But pgcc compiles fine without -ta=nvidia -Minfo=accel, I tried also #pragma acc for host without an effect. What are my options?

Secondly, I would ask why pgcc doesn’t show the correct line number of the source code where the problem was detected?

Thank you!

With kind regards,

Futher information

#define FORALL  for(ip = 0; ip <  ny; ip++) for(ir = 0; ir <  nx; ir++)


/* allocate the matrix */
  double   	**field;

  sizey = (size_t)(ny  + 2*offy);
  sizex = (size_t)(nx  + 2*offx );

  field 	   = (double **)CALLOC(sizey,      sizeof(double *))+offy;
  field[-offy] = (double  *)CALLOC(sizex*sizey,sizeof(double)  )+offx;

  for(i = 1-offy;i<ny+offy;i++) field[i]=field[i-1]+sizex;

  return field;


Can you please send a report to PGI customer service and include an example of the error? Internal compiler errors are basically assertions in the compiler itself and occur when the compiler enters an unexpected state. We’ll need to have one of our engineers look at the issue to determine what we’re doing wrong.