geoschem / HEMCO

The Harmonized Emissions Component (HEMCO), developed by the GEOS-Chem Support Team.
https://hemco.readthedocs.io
Other
15 stars 31 forks source link

Error of "Source line too long" when compiling HEMCO code in CAM with nvhpc/23.1 compiler #233

Closed sjsprecious closed 11 months ago

sjsprecious commented 11 months ago

Name and Institution (Required)

Name: Jian Sun Institution: NCAR

Confirm you have reviewed the following documentation

Description of your issue or question

When I tried to build cam6_3_119 (with HEMCO tag: hemco-cesm1_2_0_hemco3_6_2_cesm) on Derecho with the nvhpc/23.1 compiler, the compilation failed with the error message below:

NVFORTRAN-S-0285-Source line too long (/glade/derecho/scratch/sunjian/CESM/components/cam/src/hemco/HEMCO/src/Core/hcoio_read_std_mod.F90: 65)
NVFORTRAN-S-0023-Syntax error - unbalanced parentheses (/glade/derecho/scratch/sunjian/CESM/components/cam/src/hemco/HEMCO/src/Core/hcoio_read_std_mod.F90: 65)

The culprit is that the GC_72_EDGE_SIGMA array in the hcoio_read_std_mod.F90 code (indicated by the line number above) is too long. The solution is to break the GC_72_EDGE_SIGMA array into multiple lines and use the continuation character.

More details could be found at https://github.com/ESCOMP/CAM/issues/871.

jimmielin commented 11 months ago

Hi @sjsprecious, thanks for reporting it here. I will make a PR to fix this over here and once it is tagged I'll make a pull request at CAM.

jimmielin commented 11 months ago

Pull request submitted to https://github.com/geoschem/HEMCO/pull/234

yantosca commented 11 months ago

PR #234 has been merged into the dev/3.7.1 branch. We can now close this issue.