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

cmplr.env: err_pattern fix for scrip_errormod false positive #555

Merged

Conversation

MatthewMasarik-NOAA
Copy link
Collaborator

Pull Request Summary

During building, in addition to error messages, remarks and warning outputs, along with the file name, can appear in the files' .err output. In the case of scrip_errormod.f90, this can lead to termination of the build due to comp greping for the word 'error', and finding it as a substring of the file name.

Description

This PR addresses a potential bug in the build scripts where .err files are greped for the word 'error'. If the name of the file contains the word error, it could unnecessarily trigger a compile to abort based only on finding it as a substring in the name. I used potential because this error was discovered while using non-WW3 (UFS) debug flags to compile, though that does not mean it can't occur otherwise. This fix works by adding to the err_pattern the requirement of whitespace (space, tab, newline, carriage return) on either side of the word error. This means that the use of error in a variable name, file name, etc. will not be flagged as a problem by comp. This is not expected to change answers.

Please also include the following information:

  • Add any suggestions for a reviewer
    • N/A
  • Mention any labels that should be added:
    • bug
  • Are answer changes expected from this PR?
    • No answers are expected to change.
  • Co-author

Issue(s) addressed

  • Please list any issues associated with this PR, including those the PR will fix/close.
    • fixes noaa-emc/ww3/issues/554

Commit Message

scrip_errormod.f90: fixes build failure due to 'error' substring in file name

Check list

Testing

  • How were these changes tested?

    • (1) The fix was run in debug mode with the UFS flags that cause the build error. In this case the compile succeeded and the run completed successfully. The current develop branch was run in the same way, but without the fix. In this case the compile failed as documented in the issue: #554.
    • (2) Both the fix and develop branches were run for the full matrix, with the normal (WW3) debug flags present, though using the standard Intel compiler (vs. intel_debug). Then running matrix.comp the only differences were those of the known issues.
  • Are the changes covered by regression tests? (If not, why? Do new tests need to be added?)

    • No. WW3 is not normally run in debug mode.
  • Have the matrix regression tests been run (if yes, please note HPC and compiler)?

    • Yes. hera.intel.
  • Please provide the summary output of matrix.comp (matrix.Diff.txt, matrixCompFull.txt and matrixCompSummary.txt):
    matrixCompSummary.txt
    matrixCompFull.txt
    matrixDiff.txt

  • Please indicate the expected changes in the regression test output (Note the known list of non-identical tests).

    • Only files in the known list are present.
**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR2_UQ_MPI_d2                     (7 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2                     (7 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (8 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2                     (8 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (10 files differ)
mww3_test_03/./work_PR1_MPI_d2                     (11 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2                     (8 files differ)
mww3_test_07/./work_PR3_UQ                     (3 files differ)
ww3_tp2.10/./work_MPI_OMPH                     (7 files differ)
ww3_tp2.16/./work_MPI_OMPH                     (4 files differ)
ww3_ufs1.1/./work_d                     (0 files differ)
ww3_ufs1.2/./work_b                     (0 files differ)
ww3_ufs1.3/./work_a                     (1 files differ)
 
**********************************************************************
************************ identical cases *****************************
**********************************************************************

@aliabdolali aliabdolali self-requested a review December 8, 2021 16:39
@aliabdolali
Copy link
Contributor

The regtests ran successfully with pre-known different cases

**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR2_UQ_MPI_d2                     (8 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2                     (8 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (8 files differ)
mww3_test_03/./work_PR1_MPI_d2                     (10 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (6 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2                     (7 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2                     (8 files differ)
mww3_test_07/./work_PR3_UQ                     (3 files differ)
ww3_tp2.10/./work_MPI_OMPH                     (7 files differ)
ww3_tp2.16/./work_MPI_OMPH                     (7 files differ)
ww3_ufs1.3/./work_a                     (1 files differ)

matrixCompFull.txt
matrixCompSummary.txt
matrixDiff.txt

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

Successfully merging this pull request may close these issues.

2 participants