Skip to content

Various syntax fixes found by FPT tool (static Fortran analysis mode)#1253

Merged
davegill merged 4 commits intowrf-model:release-v4.2.1from
JCollinsSimCon:fpt_mod_2
Jul 22, 2020
Merged

Various syntax fixes found by FPT tool (static Fortran analysis mode)#1253
davegill merged 4 commits intowrf-model:release-v4.2.1from
JCollinsSimCon:fpt_mod_2

Conversation

@JCollinsSimCon
Copy link
Contributor

@JCollinsSimCon JCollinsSimCon commented Jul 13, 2020

TYPE: New feature

KEYWORDS: Static analysis, regression testing

SOURCE: John Collins (SimCon / Edge Hill University)

CHANGES:
The WRF code has a large number of nonstandard constructs that have been in the code for a while. Part of the capability
of the FPT static analysis tool is to discover noncompliant Fortran syntax and usage.

  1. A few issues in the existing WRF code preclude the FPT utility from running on WRF, including outright Fortran bugs.
    The bugs are removed.
  2. Additionally, the temporary files in the frame directory associated with the automatic code generation of namelist
    configuration processing are no longer removed by the Makefile. This was not a bug, but the static analyzer needs
    the cpp manufactured code to continue to exist.

This PR represents an initial step. Once the WRF code is suitable for automatic use by FPT, then a second PR will
introduce the required exemplar files for comparison. That step, which insures no additional nonstandard Fortran
constructs or usages are introduced, will eventually be part of the jenkins testing.

MODIFIED FILES:
dyn_em/module_first_rk_step_part1.F

  • Inserted missing continuation
  • The leading "&" character in column 6 on the following line was sufficient for GNU, Intel, PGI

external/io_grib2/bacio-1.3/bacio.F

  • Inserted missing "::" delimiters
  • a declaration with an assignment requires the "::" delimeters

frame/Makefile

  • Commented-out deletion of xx*.f90 and yy*.f90.
  • These are needed for the regression test and are deleted by the clean script

phys/module_bl_mynn.F

  • Additional + sign deleted at line 3030

TESTS CONDUCTED:

  1. fpt regression tests
  2. Jenkins is all PASS.

RELEASE NOTE: Changes to implement static analysis regression testing of WRF. Please see:
http://simconglobal.com/WRF_Workshop_June_2011_Poster_Automatic_Detection_of_Software_Errors_in_WRF.pdf
http://simconglobal.com/WRF_Workshop_June_2012_Poster_QA_Analysis_of_the_WRF_Program.pdf
http://simconglobal.com/collins_et_al_2013_automated_quality_assurance_analysis_wrf_a_case_study.pdf

@JCollinsSimCon JCollinsSimCon requested a review from a team as a code owner July 13, 2020 17:29
@JCollinsSimCon
Copy link
Contributor Author

@davegill
@brianfarrimond
@ellagrp
@nikosspanakis
2 more files to go for WRF_fpt_regression

@davegill
Copy link
Contributor

@JCollinsSimCon
John,
Likely you received an email from "jenkins" (it might be in your spam folder). Would you please copy the text of that email into one of the comment blocks at the bottom of the PR: #1253

This validates that your code did no irreparable harm to the repository, as far as we can tell.

@JCollinsSimCon
Copy link
Contributor Author

Please find result of the WRF regression test cases in the attachment. This build is for Commit ID: 6cf16be, requested by: JCollinsSimCon for PR: #1253. For any query please send e-mail to David Gill.

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 19           18
Number of Builds       : 48           46
Number of Simulations  : 166           164        0
Number of Comparisons  : 105           104        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None

@JCollinsSimCon
Copy link
Contributor Author

@davegill
Assuming that module_fr_fire_phys.F has already been taken care of, I believe we have all of the files we need for WRF_fpt_regression - dyn_em/module_first_rk_step_part1.F, frame/Makefile, external/io_grib2/bacio-1.3/bacio.F, phys/module_bl_mynn.F. Am I right?

@davegill
Copy link
Contributor

davegill commented Jul 14, 2020 via email

@davegill davegill changed the title Starting changes for WRF_fpt_regression Various syntax fixes found by FPT tool (static Fortran analysis mode) Jul 14, 2020
@davegill
Copy link
Contributor

@joeolson42 @weiwangncar @dudhia
Joe,
Would you please give your approval to this mod to your code. There is a syntax error with a double plus sign. I know that GNU, PGI, and Intel allow this, but it is a nonstandard coding. The fix makes no changes to the results.

@davegill
Copy link
Contributor

@JCollinsSimCon
John,
I am good with the PR now (I eliminated the commented-out "rm" commands). We are waiting for a developer to chime in on his thumbs up to the scheme.

You may now stand down.

Copy link
Collaborator

@dudhia dudhia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MYNN part looks fine

@davegill davegill merged commit 6502d5d into wrf-model:release-v4.2.1 Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants