E3SM-Project / E3SM-Project/E3SM

Out of bounds error with PGI 19.9 on Compy

Open
#3,752 30 comments 0 reactions 1 assignee Claimed by @singhbalwinder View on GitHub
Dominant language
Fortran
Stars
440
Forks
481
Avg merge
4d 6h
Merged PRs (30d)
36

Description

With PGI 19.9, I get the following error:
```
Subscript out of range for array zvirv (/qfs/people/sing201/delete/2nd_e3sm_pgi_down/E3SM/components/cam/src/physics/cam/physics_types.F90: 423)
0: subscript=1, lower bound=140722428184144, upper bound=140722428184171, dimension=1
```
`zvirv` id declared as follows:
`real(r8) :: zvirv(state%psetcols,pver) ! Local zvir array pointer`

As there is nothing which is obviously wrong here, I tried a few things to see if it works with these ad-hoc fixes. There is another instance where the same named variable is used in this file, I tried renaming this variable (PGI sometimes confuses scope for variables) and that didn't fix this issue. After that I hardwired a number instead of `state%psetcols`, that worked but then the model crashes in another subroutine with a very similar error.

To reproduce this, simply switch PGI to 19.9 in the machine file for Compy and run the following test:
`cd cime/scripts`
`./create_test SMS_D.ne4_ne4.FC5AV1C-L.compy_pgi -t -p `

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.