Skip to content

Fix Fortran compile flag scope to avoid ifx real-size override warning in WW3 and operational workflow#1522

Merged
JessicaMeixner-NOAA merged 2 commits into
NOAA-EMC:developfrom
mingchen-NOAA:ww3/FixIfxWarning
Nov 5, 2025
Merged

Fix Fortran compile flag scope to avoid ifx real-size override warning in WW3 and operational workflow#1522
JessicaMeixner-NOAA merged 2 commits into
NOAA-EMC:developfrom
mingchen-NOAA:ww3/FixIfxWarning

Conversation

@mingchen-NOAA
Copy link
Copy Markdown
Collaborator

@mingchen-NOAA mingchen-NOAA commented Nov 4, 2025

Pull Request Summary

This PR fixes an Intel Fortran compiler warning:
ifx: command line warning #10121: overriding '-real-size 64' with '-real-size 32'
The issue was caused by conflicting compile flags inherited from public target properties. The fix adjusts the CMake configuration to use PRIVATE instead of PUBLIC for Intel Fortran compile options in the ww3_lib target.

Description

Previously, in model/src/CMakeLists.txt, the ww3_lib target used target_compile_options(... PUBLIC ...), which propagated its compile flags to dependent targets. This caused duplicated or conflicting flags when building the WW3/Operational workflow, triggering the Intel compiler warning #10121.

With the help from @DusanJovic-NOAA, this PR updates the compile option scope from PUBLIC to PRIVATE for Fortran compile flags in CMakeLists.txt to ensure they apply only within ww3_lib and are not inherited by other targets. The modification removes unnecessary flag propagation and eliminates the compiler warning during builds.

To prevent unexpected differences in WW3 standalone regression tests, the build configuration now separates the standalone WW3 build from the operational workflow by applying conditional logic under if (UFS_CAP).

Special thanks to @DusanJovic-NOAA for identifying the issue and suggesting the fix.

Issue(s) addressed

fixes issue #1514

Commit Message

Fix Fortran compile flag scope to avoid ifx real-size override warning in WW3 and operational workflow

Check list

Testing

  • How were these changes tested? Matrix
  • Are the changes covered by regression tests? (If not, why? Do new tests need to be added?) Yes
  • Have the matrix regression tests been run (if yes, please note HPC and compiler)? Ursa Intel
  • Please indicate the expected changes in the regression test output, (Note the list of known non-identical tests.)
  • Please provide the summary output of matrix.comp (matrix.Diff.txt, matrixCompFull.txt and matrixCompSummary.txt):

No errors or unexpected differences were observed.

**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR3_UNO_MPI_d2                     (19 files differ)
mww3_test_03/./work_PR3_UQ_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR1_MPI_d2                     (19 files differ)
mww3_test_03/./work_PR2_UQ_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_e_c                     (1 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2                     (16 files differ)
mww3_test_03/./work_PR2_UQ_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (16 files differ)
mww3_test_03/./work_PR2_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2                     (18 files differ)
mww3_test_03/./work_PR1_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (16 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e_c                     (1 files differ)
mww3_test_09/./work_MPI_ASCII                     (0 files differ)
ww3_tp2.10/./work_MPI_OMPH                     (6 files differ)
ww3_tp2.6/./work_ST4_ASCII                     (0 files differ)
ww3_ufs1.3/./work_a                     (3 files differ)

matrixCompFull.txt
matrixCompSummary.txt
matrixDiff.txt

@mingchen-NOAA
Copy link
Copy Markdown
Collaborator Author

WW3 standalone Ursa GNU is under testing.
UFS-WM RT tests passed on Ursa.
RegressionTests_ursa.log

Copy link
Copy Markdown
Contributor

@DusanJovic-NOAA DusanJovic-NOAA left a comment

Choose a reason for hiding this comment

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

Looks good. Although, I'm not sure if the test whether PIO is in the list of switches is the best way to detect if this library is being built as a part of UFS.

@mingchen-NOAA
Copy link
Copy Markdown
Collaborator Author

WW3 standalone Ursa GNU tests passed.

**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR3_UNO_MPI_d2                     (12 files differ)
mww3_test_03/./work_PR1_MPI_d2                     (8 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2                     (12 files differ)
mww3_test_03/./work_PR2_UQ_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (15 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (12 files differ)
mww3_test_09/./work_MPI_ASCII                     (0 files differ)
ww3_tp2.10/./work_MPI_OMPH                     (6 files differ)
ww3_tp2.16/./work_MPI_OMPH                     (4 files differ)
ww3_tp2.6/./work_ST4_ASCII                     (0 files differ)
ww3_tp2.7/./work_ST0                     (1 files differ)
ww3_ufs1.3/./work_a                     (28 files differ)

matrixCompFull.txt
matrixCompSummary.txt
matrixDiff.txt

@JessicaMeixner-NOAA
Copy link
Copy Markdown
Collaborator

Looks good. Although, I'm not sure if the test whether PIO is in the list of switches is the best way to detect if this library is being built as a part of UFS.

Maybe UFS_CAP? https://github.com/NOAA-EMC/WW3/blob/dev/ufs-weather-model/model/src/CMakeLists.txt#L141 That variable might not exist in the WW3 develop branch - but while PIO is a good for now stand-in for now, UFS_CAP is likely a better trigger. It might require adding in more logic from dev/ufs-wather-model.

@mingchen-NOAA
Copy link
Copy Markdown
Collaborator Author

@DusanJovic-NOAA @JessicaMeixner-NOAA I will switch to ufs_cap and redo the tests.

@mingchen-NOAA
Copy link
Copy Markdown
Collaborator Author

I used UFS_CAP and ran the UFS-WM RT tests.
FAILED: TEST TIMED OUT -- TEST 'conus13km_radar_tten_debug_intel' [, ]( MB)

Note this job does NOT contain wave model.

@mingchen-NOAA
Copy link
Copy Markdown
Collaborator Author

Ursa GNU regression tests passed for the updates

**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR3_UNO_MPI_d2                     (10 files differ)
mww3_test_03/./work_PR1_MPI_d2                     (11 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2                     (12 files differ)
mww3_test_03/./work_PR2_UQ_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (12 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (15 files differ)
mww3_test_09/./work_MPI_ASCII                     (0 files differ)
ww3_tp2.10/./work_MPI_OMPH                     (6 files differ)
ww3_tp2.16/./work_MPI_OMPH                     (5 files differ)
ww3_tp2.6/./work_ST4_ASCII                     (0 files differ)
ww3_tp2.7/./work_ST0                     (1 files differ)
ww3_ufs1.3/./work_a                     (25 files differ)

matrixCompFull.txt
matrixCompSummary.txt
matrixDiff.txt

Note

* test case: ww3_tp2.7; test run: ./work_ST0
*********************************************************
  found 84 files in base directory
  found 84 files in compare directory
  79 files are identical
  4 files skipped
  0 files in base directory only
  0 files in comp directory only
  1 files differ
mod_def.ww3 (binary)

All results are identical.

@mingchen-NOAA
Copy link
Copy Markdown
Collaborator Author

Ursa Intel regtests passed for the update.

**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR3_UNO_MPI_d2                     (19 files differ)
mww3_test_03/./work_PR3_UQ_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR1_MPI_d2                     (20 files differ)
mww3_test_03/./work_PR2_UQ_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_e_c                     (1 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2                     (17 files differ)
mww3_test_03/./work_PR2_UQ_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (17 files differ)
mww3_test_03/./work_PR2_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2                     (17 files differ)
mww3_test_03/./work_PR1_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (18 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e_c                     (1 files differ)
mww3_test_09/./work_MPI_ASCII                     (0 files differ)
ww3_tp2.10/./work_MPI_OMPH                     (6 files differ)
ww3_tp2.6/./work_ST4_ASCII                     (0 files differ)
ww3_ufs1.3/./work_a                     (3 files differ)

Copy link
Copy Markdown
Collaborator

@JessicaMeixner-NOAA JessicaMeixner-NOAA left a comment

Choose a reason for hiding this comment

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

matrixCompFull.txt
matrixCompSummary.txt
matrixDiff.txt

**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR3_UQ_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (16 files differ)
mww3_test_03/./work_PR1_MPI_d2                     (22 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR2_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2                     (17 files differ)
mww3_test_03/./work_PR3_UQ_MPI_e_c                     (1 files differ)
mww3_test_03/./work_PR1_MPI_e                     (1 files differ)
mww3_test_03/./work_PR2_UQ_MPI_e                     (1 files differ)
mww3_test_03/./work_PR2_UQ_MPI_d2                     (16 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (17 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2                     (20 files differ)
mww3_test_09/./work_MPI_ASCII                     (0 files differ)
ww3_tp2.10/./work_MPI_OMPH                     (6 files differ)
ww3_tp2.21/./work_b_metis                     (1 files differ)
ww3_tp2.6/./work_ST4_ASCII                     (0 files differ)
ww3_ufs1.3/./work_a                     (3 files differ)

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.

3 participants