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

Add PIO switch #1324

Open
wants to merge 4 commits into
base: dev/ufs-weather-model
Choose a base branch
from

Conversation

JessicaMeixner-NOAA
Copy link
Collaborator

Pull Request Summary

This PR adds a PIO switch, which is one way to address compile time issues when not building the mesh cap.

Description

This PR adds a PIO switch to create barriers around the section of ftn_source code to avoid compiling issues when building other WW3 executables. The compile time issues were described in the issue here: ufs-community/ufs-weather-model#2502

Alternative solutions will be continued to be explored, however this removes a blocking issue from the global-workflow.

Please also include the following information:

  • Add any suggestions for a reviewer
  • Mention any labels that should be added: bug / new feature
  • Are answer changes expected from this PR? Please describe the changes and the reason why in addition to which of the following labels would apply:no answer chages

Issue(s) addressed

Commit Message

Add PIO switch

Check list

Testing

  • How were these changes tested? These were tested using matrix compared against a baseline from dev/ufs-weather-model 2 commits ago, in the ufs-weather-model regression tests, and in the global-workflow (however, with out enabling pio yet).
  • 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)? hera, intel
  • Please indicate the expected changes in the regression test output, (Note the list of known non-identical tests.)
    no changes expected.
  • Please provide the summary output of matrix.comp (matrix.Diff.txt, matrixCompFull.txt and matrixCompSummary.txt):
**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR3_UQ_MPI_e_c                     (1 files differ)
mww3_test_03/./work_PR2_UQ_MPI_e                     (1 files differ)
mww3_test_03/./work_PR2_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2                     (17 files differ)
mww3_test_03/./work_PR1_MPI_d2                     (11 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (16 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (15 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2                     (17 files differ)
mww3_test_03/./work_PR2_UQ_MPI_d2                     (12 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e_c                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2                     (15 files differ)
ww3_tp2.10/./work_MPI_OMPH                     (7 files differ)
ww3_tp2.16/./work_MPI_OMPH                     (4 files differ)
ww3_ufs1.3/./work_a                     (3 files differ)

matrixCompFull.txt
matrixCompSummary.txt
matrixDiff.txt

@DeniseWorthen
Copy link
Contributor

@JessicaMeixner-NOAA I think the block of code in the use_restartnc in w3init should also be entirely under an PIO ifdef. For example, the restart_from_binary setting will only be read from config if restartnc is also true. And there will be no ability to use a custom ww3 restart file name, which would break the various lines which set the filename.

In short, I think it better to have that entire use_restartnc block in w3initmd under a W3_PIO flag also

diff --git a/model/src/w3initmd.F90 b/model/src/w3initmd.F90
index 0f136227..a496ec2c 100644
--- a/model/src/w3initmd.F90
+++ b/model/src/w3initmd.F90
@@ -959,6 +959,7 @@ CONTAINS
     ! 3.a Read restart file
     !
     VA(:,:) = 0.
+#ifdef W3_PIO
     if (use_restartnc) then
       if (runtype == 'continue' )then
         call set_user_timestring(time,user_timestring)
@@ -983,6 +984,7 @@ CONTAINS
         flcold = .true.
       end if
     else
+#endif
 #ifdef W3_DEBUGCOH
       CALL ALL_VA_INTEGRAL_PRINT(IMOD, "Before W3IORS call", 1)
 #endif
@@ -1016,7 +1018,9 @@ CONTAINS
 #ifdef W3_TIMINGS
       CALL PRINT_MY_TIME("After restart inits")
 #endif
+#ifdef W3_PIO
     end if ! if (use_restartnc)
+#endif

@JessicaMeixner-NOAA
Copy link
Collaborator Author

Thanks for your super fast feedback @DeniseWorthen - I'll implement that update now.

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@DeniseWorthen - Updates are there.

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