I’m stuck in trying to convert my code to openACC, previously openMP. When I compile with this:

```
pgfortran -Mpreprocess -Mnosecond_underscore -O0 -g -c -Minfo -Mneginfo -acc -ta=tesla:cc50,managed,lineinfo -o "$@" "$<"
```

where the make arguments are

```
appletonMod.o: ../appletonMod.f90 coordMod.o genParamsMod.o interpMod.o ionParamsMod.o typeSizes.o
```

I get the following errors:

PGF90-S-1000-Call in OpenACC region to procedure ‘pgf90_copy_f90_argl’ which has no acc routine information (…/appletonMod.f90: 944)

PGF90-S-0155-Compiler failed to translate accelerator region (see -Minfo messages): Missing branch target block (…/appletonMod.f90: 1)

What is “pgf90_copy_f90_argl”? My uneducated guess is that it has to do with the assumed dimension scalar arrays being passed in/out of the subroutine.

This is the current offending line (module compiled when I commented it out, but obviously code won’t run correctly.):

```
call gridCoeff(iono%x,iono%y,iono%z,iono%Ne,&
iono%xd,iono%yd,iono%zd,iono%xdp,iono%ixRow,iono%iyRow,iono%izRow, &
p,fxyz,pf)
```

The subroutine gridCoeff is part of a 3D spline interpolation.

Here’s how it’s set up:

```
pure subroutine gridCoeff (xi,yi,zi,fi,&
xd,yd,zd,xdp, ixrow,iyrow,izrow,pi,fxyz,pf)
!$acc routine seq
real(kind=dp), dimension(:), intent(in) :: xi, yi, zi
real(kind=dp), dimension(:,:,:), intent(in) :: fi, xdp
real(kind=dp), dimension(:,:), intent(in) :: xd, yd, zd
integer, dimension(:), intent(in) :: ixrow, iyrow, izrow
real(kind=dp), dimension(3), intent(in) :: pi
real(kind=dp), intent(out) :: fxyz
real(kind=dp), dimension(3), intent(out) :: pf
real(kind=dp), dimension(size(zi,dim=1)) :: zdp, fxy !, &
real(kind=dp), dimension(size(yi,dim=1),size(zi,dim=1)) :: ydp, fx
integer :: nrx, nry, nrz, ii, jj, kk, ll, i1, i2, j1, j2, &
k1, k2, xflag, yflag, zflag
real(kind=dp) :: eps, px, py, pz, hx, tx, dx1, dx2, hz, dz1, dz2, tz, &
hy, dy1, dy2, ty, c1, c2, dfdx, dfdy, dfdz, &
dc1dz, dc2dz, dc1dy, dc2dy, dc1dx, dc2dx
real(kind=dp) :: yb(size(yi,dim=1)-2), ys(size(yi,dim=1)-2), zb(size(zi,dim=1)-2), zs(size(zi,dim=1)-2)
```

The “iono” defined type contains both assumed dimension and allocatable scalar arrays (x,y,z, and Ne are passed in with their dimensions, xd, yd, zd, and others are allocated based on those sizes.) The subroutine gridCoeff calls one other subroutine, which is pretty scanadal-proof, just linear equation integrator with scalar array arguments, assumed dimensions. I’ve peppered acc routine directives almost everywhere.

I came across a post about C++ code that was getting a similar error (“Call in OpenACC region to procedure”) but could not infer enough from that to help me here, likely because I’m still a bit of a noob. https://forums.developer.nvidia.com/t/pgcc-s-1000-call-in-openacc-region-to-procedure-cxa-vec-c/135226/1

Any thoughts? No doubt I have not provided enough info here, but I’m not even sure what else to post. Any guidance is appreciated.

Thank you!

UPDATE (progress?):

i modified the above call to gridCoeff:

```
call gridCoeff(iono%x(1:nx),iono%y(1:ny),iono%z(1:nz),iono%Ne(1:nx,1:ny,1:nz), &
iono%xd(1:nx-2,1:nx-2), iono%yd(1:ny-2,1:ny-2), iono%zd(1:nz-2,1:nz-2), &
iono%xdp(1:nx,1:ny,1:nz+1), &
iono%ixRow(1:nx-2), iono%iyRow(1:ny-2), iono%izRow(1:nz-2), &
p(1:3),fxyz,pf(1:3))
```

And the compile error changed to:

PGF90-S-1000-Call in OpenACC region to procedure ‘pgf90_sect1’ which has no acc routine information (…/appletonMod.f90: 938)

PGF90-S-0155-Compiler failed to translate accelerator region (see -Minfo messages): Missing branch target block (…/appletonMod.f90: 1)

Which is perhaps more mystifying to me.