More than seven dimensions specified for array

I’m trying to compile some code using pgf90 that had previously compiled and run with ifort. When defining an array with 8 dimensions I am getting the error: Sarkari Result Pnr Status Showbox

PGF90-S-0047-More than seven dimensions specified for array

I know Intel increased the max number of dimensions to 31, has PGI done anything similar and if so how do I get this to compile?

PGI v16.10
Scientific Linux release 6.9

Hi Johnlarry,

For Fortran 2003 and earlier, the maximum number of dimensions is 7 with this being extended to 15 in Fortran 2008.

While we’ve added some F2008 features, extending the number of dimensions isn’t one of them that we’ve done as of yet.

We are working on a Fortran 2018 compiler (GitHub - flang-compiler/f18: F18 is a front-end for Fortran intended to replace the existing front-end in the Flang compiler) that will have this support. Currently F18 can only parse Fortran programs but we expect to able to compile serial codes (i.e. no OpenMP, and Co-arrays, DO Concurrent are serial) sometime later this year.



I also ran into this problem trying to compile an MPI code using the new Mellenox HPC-X MPI library:

PGF90-S-0047-More than seven dimensions specified for array (/nasa/hpcx/2.4.0/ompi-icc/include/mpif-sizeof.h: 66)

Is there a work-around?

  • Ron

Hi Ron,

Not sure. I know we’ve had issues building UCX and had to work with the Mellenox folks to get them resolved, but I don’t think this is one of them. (Note we’re planning on providing UCX build version of OpenMPI sometime next year).

Also, in looking at the 2.4.0 “mpif-sizeof.h” header, I don’t see any interfaces that use more than 7 dimensions and line 66 corresponds to “MPI_Sizeof_complex128_scalar” which doesn’t use any dimensions.

Though, the header mentions that “mpif-sizeof.h” gets auto-generated so if you built UCX with a compiler that does support 15 dimensions, your header may be different than mine. Did you build UCX with PGI?



I think the version I was linking to was compiled with Intel so maybe that was the problem.

I got NASA to build a version with PGI that I am trying out now.


  • Ron