fix WRFDA stand-alone da_rad_diags.exe build with GNU Fortran 11#1605
Merged
jamiebresch merged 1 commit intowrf-model:developfrom Dec 18, 2021
Merged
fix WRFDA stand-alone da_rad_diags.exe build with GNU Fortran 11#1605jamiebresch merged 1 commit intowrf-model:developfrom
jamiebresch merged 1 commit intowrf-model:developfrom
Conversation
liujake
approved these changes
Dec 17, 2021
davegill
approved these changes
Dec 17, 2021
vlakshmanan-scala
pushed a commit
to scala-computing/WRF
that referenced
this pull request
Apr 4, 2024
…-model#1605) TYPE: bug fix KEYWORDS: WRFDA, da_rad_diags.exe, gfortran-11 SOURCE: Jamie Bresch (NCAR) DESCRIPTION OF CHANGES: Problem: On MacOS with GNU Fortran (Homebrew GCC 11.1.0_1) 11.1.0, the stand-alone utility da_rad_diags.exe does not build. The error messages: ``` gfortran -c -O2 -ftree-vectorize -funroll-loops -w -ffree-form -ffree-line-length-none -fconvert=big-endian -frecord-marker=4 -fallow-argument-mismatch -fallow-invalid-boz -fdefault-real-8 -I/usr/local/include da_rad_diags.f da_rad_diags.f:1804:28: 1804 | namelist /record1/ nproc, instid, file_prefix, start_date, end_date, cycle_period | 1 Error: Symbol 'nproc' in namelist 'record1' at (1) must be declared before the namelist is declared. da_rad_diags.f:1804:36: 1804 | namelist /record1/ nproc, instid, file_prefix, start_date, end_date, cycle_period | 1 Error: Symbol 'instid' in namelist 'record1' at (1) must be declared before the namelist is declared. da_rad_diags.f:1804:49: 1804 | namelist /record1/ nproc, instid, file_prefix, start_date, end_date, cycle_period | 1 Error: Symbol 'file_prefix' in namelist 'record1' at (1) must be declared before the namelist is declared. da_rad_diags.f:1804:61: 1804 | namelist /record1/ nproc, instid, file_prefix, start_date, end_date, cycle_period | 1 Error: Symbol 'start_date' in namelist 'record1' at (1) must be declared before the namelist is declared. da_rad_diags.f:1804:71: 1804 | namelist /record1/ nproc, instid, file_prefix, start_date, end_date, cycle_period | 1 Error: Symbol 'end_date' in namelist 'record1' at (1) must be declared before the namelist is declared. da_rad_diags.f:1804:84: 1804 | namelist /record1/ nproc, instid, file_prefix, start_date, end_date, cycle_period | 1 Error: Symbol 'cycle_period' in namelist 'record1' at (1) must be declared before the namelist is declared. make[1]: [da_rad_diags.o] Error 1 (ignored) ``` Solution: Move the namelist statement after variable declarations, then the code builds. LIST OF MODIFIED FILES: M var/da/da_monitor/da_rad_diags.f90 TESTS CONDUCTED: 1. da_rad_diags.exe is generated after the fix. RELEASE NOTE: N/A (it is probably not worth mentioning)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TYPE: bug fix
KEYWORDS: WRFDA, da_rad_diags.exe, gfortran-11
SOURCE: Jamie Bresch (NCAR)
DESCRIPTION OF CHANGES:
Problem:
On MacOS with GNU Fortran (Homebrew GCC 11.1.0_1) 11.1.0, the stand-alone utility da_rad_diags.exe does not build.
The error messages:
Solution:
Move the namelist statement after variable declarations, then the code builds.
LIST OF MODIFIED FILES:
M var/da/da_monitor/da_rad_diags.f90
TESTS CONDUCTED:
RELEASE NOTE: N/A (it is probably not worth mentioning)