NOAA-GFDL/GFDL_atmos_cubed_sphere

String length mismatch violates fortran standard; UFS gnu debug builds abort

Closed this issue · 0 comments

Describe the bug

This is not legal fortran:

    attrList=(/trim(axis_name),trim(axis_name)//":cartesian_axis"/)

All strings in the array must have the same length. They don't. Intel's compiler allows it as a language extension. GNU's compiler aborts at runtime when certain runtime checks are enabled. The ufs-weather-model regression tests fail this way, if the code reaches that line.

UFS's regression tests have a gnu debug build which catches errors like this.

To Reproduce
There is a ufs-regression-test called "conus13km_debug_qr" in this branch. When run with the gnu compiler, it aborts if it reaches that line. (Another unknown bug may cause it to abort earlier, which is why the gnu version of the test is presently disabled.)

Expected behavior
Code shouldn't require unnecessary language extensions.

System Environment
Describe the system environment, include:

  • OS: CENTOS or RHEL (Hera and Cheyenne)
  • Compiler(s): gnu compiler; Hera: 9.2.0, Cheyenne: 10.1.0
  • MPI type, and version Hera: OpenMPI 4.1.5; Cheyenne: MPT 2.25
  • netCDF Version: N/A
  • Configure options: These are the debug options enabled for the GNU compiler: -O0 -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check

Additional context
The new regression test that detects this is in:

ufs-community/ufs-weather-model#1893

You must disable this bug fix and enable the conus13km_debug_qr test for the gnu compiler.