Compiler warning that subroutine global name is too long, shortened
- Dominant language
- Fortran
- Stars
- 32
- Forks
- 68
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 2
Description
Building CDEPS on gaea.c6 gives a compiler warning, which fails a ufs-weather-model regression test that treats compiler warnings as errors (as part of operational readiness).
compile/err includes:
```
CDEPS/docn/docn_datamode_multilev_cplhist_mod.F90(73): error #5462: Global name too long, shortened from: docn_datamode_multilev_cplhist_mod_mp_DOCN_DATAMODE_MULTILEV_CPLHIST_INIT_POINTERS to: n_datamode_multilev_cplhist_mod_mp_DOCN_DATAMODE_MULTILEV_CPLHIST_INIT_POINTERS
subroutine docn_datamode_multilev_cplhist_init_pointers(exportState, sdat, ocn_fraction, rc)
```
compile/out includes
```
[ 80%] Building Fortran object CDEPS-interface/CMakeFiles/docn.dir/CDEPS/docn/docn_datamode_multilev_cplhist_mod.F90.o
cd /gpfs/f6/infra-cpu/proj-shared/Nick.Szapiro/RT_RUNDIRS/Nick.Szapiro/FV3_RT/rt_1461993/compile_datm_cdeps_land_intel/build_fv3_datm_cdeps_land_intel/CDEPS-interface && /opt/cray/pe/craype/2.7.30/bin/ftn -DDISABLE_FoX -I/gpfs/f6/infra-cpu/proj-shared/Nick.Szapiro/RT_RUNDIRS/Nick.Szapiro/FV3_RT/rt_1461993/compile_datm_cdeps_land_intel/build_fv3_datm_cdeps_land_intel/CDEPS-interface/mod -I/autofs/ncrc-svm1_proj/epic/spack-stack/c6/spack-stack-1.9.2/envs/ue-intel-2023.2.0/install/intel/2023.2.0/esmf-8.8.0-yzvp7jx/include -I/autofs/ncrc-svm1_proj/epic/spack-stack/c6/spack-stack-1.9.2/envs/ue-intel-2023.2.0/install/intel/2023.2.0/netcdf-c-4.9.2-rq4wo2g/include -I/autofs/ncrc-svm1_proj/epic/spack-stack/c6/spack-stack-1.9.2/envs/ue-intel-2023.2.0/install/intel/2023.2.0/netcdf-fortran-4.6.1-62gcckt/include -I/autofs/ncrc-svm1_proj/epic/spack-stack/c6/spack-stack-1.9.2/envs/ue-intel-2023.2.0/install/intel/2023.2.0/parallelio-2.6.2-kokczzl/include -gcc-name=/usr/bin/gcc-12 -g -traceback -fpp -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -sox -align array64byte -qno-opt-dynamic-align -diag-disable 5462 -diag-disable 7712 -diag-disable 8291 -real-size 64 -warn errors -g -traceback -assume realloc_lhs -O3 -fp-model precise -assume buffered_stdout -fno-alias -align all -debug minimal -qoverride-limits -ftz -no-ip -module mod -c /gpfs/f6/infra-cpu/scratch/Nick.Szapiro/cm_cdeps/test_cdeps_396/ufs-weather-model/CDEPS-interface/CDEPS/docn/docn_datamode_multilev_cplhist_mod.F90 -o CMakeFiles/docn.dir/CDEPS/docn/docn_datamode_multilev_cplhist_mod.F90.o
```
Disabling the warning is not a preferred solution.
Since compiler is actually shortening the name, could the names be shorter in the source code?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with CDEPS/docn/docn_datamode_multilev_cplhist_mod.F90 at line 73 and search for references to the module and subroutine names. Reproduce the CDEPS-interface build using the reported compiler settings, then verify that the source-level rename removes warning 5462 without disabling it and that the affected regression test no longer treats the warning as an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fortran
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100