Runtime error with NVHPC compiler for CAM6_3_125
- Dominant language
- No language data
- Stars
- 91
- Forks
- 183
- Avg merge
- 6d 2m
- Merged PRs (30d)
- 9
Description
### What happened?
After Rich Loft pointed out the issue of complex number accessors in the NVHPC compiler (https://github.com/ESCOMP/CAM/issues/881), I was able to build `cam6_3_125` with the `nvhpc/23.7` compiler on Derecho and his temporary workaround. However, the simulation failed with an unclear error message.
According to my debugging, the issue comes from these lines: https://github.com/ESCOMP/CAM/blob/cam_development/src/physics/cam/aerosol_optics_cam.F90#L38-L43.
If I change the current implementation from:
```
type aero_props_t
class(aerosol_properties), pointer :: obj => null()
end type aero_props_t
type aero_state_t
class(aerosol_state), pointer :: obj => null()
end type aero_state_t
```
to:
```
type aero_props_t
type(modal_aerosol_properties), pointer :: obj => null()
end type aero_props_t
type aero_state_t
type(modal_aerosol_state), pointer :: obj => null()
end type aero_state_t
```
Then the simulation built by the NVHPC compiler finishes successfully on Derecho.
I am not familiar with the modern Fortran features, so I do not know whether the issue here is a code bug or again a lack of support of modern Fortran standard by the NVHPC compiler. Maybe @fvitt could help provide more information here.
### What are the steps to reproduce the bug?
- git clone https://github.com/ESCOMP/CAM
- cd CAM
- git checkout cam6_3_125
- ./manage_externals/checkout_externals
- Manually replace the "aerosol_optics_cam.F90" code with Rich's and my revisions
- cd cime/scripts
- ./create_test SMS_Ln9.f19_f19_mg17.F2000dev.derecho_nvhpc.cam-outfrq9s
### What CAM tag were you using?
cam6_3_125
### What machine were you running CAM on?
CISL machine (e.g. cheyenne)
### What compiler were you using?
NVHPC
### Path to a case directory, if applicable
/glade/derecho/scratch/sunjian/SMS_Ln9.f09_f09_mg17.F2000dev.derecho_nvhpc.cam-outfrq9s.20231227_132550_dfpib6
### Will you be addressing this bug yourself?
No
### Extra info
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.