Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
SamuelTrahanNOAA opened this issue Sep 8, 2023 · 0 comments · Fixed by ufs-community/ufs-weather-model#1893

Comments

@SamuelTrahanNOAA
Copy link

SamuelTrahanNOAA commented Sep 8, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants