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

Update NetCDF comp/link #336

Merged
merged 7 commits into from
Mar 25, 2021

Conversation

JessicaMeixner-NOAA
Copy link
Collaborator

Pull Request Summary

This is a more general way of including the WW3 libraries.

Description

Updated the way NetCDF libraries are including in the comp/link (thanks to @aerorahul help). In addition the matrix_ncep is updated to use the NOAA hpc-stack libraries.

Issue(s) addressed

Check list

  • Is your feature branch up to date with the authoritative repository (NOAA/develop)? yes
  • Reviewers: @aliabdolali

Testing

  • How were these changes tested? Tested with hera.intel and orion.intel
  • Are the changes covered by regression tests? yes
  • If a new feature was added, was a new regression test added? no
  • Have regression tests been run? Re-running after merge with develop (will attach summary output when finished). No differences (other than the normal diffs) are expected.

@aliabdolali
Copy link
Contributor

@JessicaMeixner-NOAA i reviewed it, all look ok to me. Why did you revert 8 to 24 again? are we going to do it in a separate PR?

Copy link
Contributor

@aliabdolali aliabdolali left a comment

Choose a reason for hiding this comment

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

I approve it, but please merge it once the matrix is done. Thanks.

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@mickaelaccensi I had to update the makefile in regtests/ww3_tp2.14/input/oasis3-mct/util/make_dir/cmplr.tmpl to get this to work. This should work for you too, but thought maybe I should double check?

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@aliabdolali the regtests now all run, I'll compare with the develop branch when I started and then will re-do this with the top of develop as well. Are there other PRs coming in soon that I should wait before I run these again?

@aliabdolali
Copy link
Contributor

@aliabdolali the regtests now all run, I'll compare with the develop branch when I started and then will re-do this with the top of develop as well. Are there other PRs coming in soon that I should wait before I run these again?

The divider is going in before this one. I will add the regression test comparison in a few minutes.

@JessicaMeixner-NOAA
Copy link
Collaborator Author

Awesome! I will gladly wait for that as it will make this 10000000x easier! Thanks @aliabdolali

@JessicaMeixner-NOAA
Copy link
Collaborator Author

regtests are running now

@JessicaMeixner-NOAA
Copy link
Collaborator Author

Regtests have finished, running matrix.comp now.

ufs-weather-model WW3 tests on hera.intel also passed.

@JessicaMeixner-NOAA
Copy link
Collaborator Author

The wind.ww3 binary file is different for test case: ww3_tp2.15 both work_5km and work_MPI_5km

Otherwise the differences are as usual on NCEP machines:


********************* non-identical cases ****************************


mww3_test_03/./work_PR2_UQ_MPI_d2 (7 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c (10 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2 (8 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2 (6 files differ)
mww3_test_03/./work_PR1_MPI_d2 (8 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_07/./work_PR3_UQ (3 files differ)
ww3_tp2.10/./work_MPI_OMPH (7 files differ)
ww3_tp2.15/./work_5km (1 files differ)
ww3_tp2.15/./work_MPI_5km (1 files differ)
ww3_tp2.18/./work_TIDE_MPI (1 files differ)

regtests.tar.gz

@JessicaMeixner-NOAA
Copy link
Collaborator Author

@aliabdolali I'm going to run the ww3_tp2.15 test again from the develop and this branch to see if this difference was introduced in this PR or before.

@aliabdolali
Copy link
Contributor

@JessicaMeixner-NOAA This is introduced in a PR from UKMET and in these cases, we expected changes, but do not expect them to remain. So I'll go ahead and merge your work if you agree and will coordinate with them in that regard.
AA

@JessicaMeixner-NOAA
Copy link
Collaborator Author

So the differences are from comparing my branch commit hash: 8b1d62e and the top of develop 78b0148

If those diffs are expected in 2.15, please go ahead and merge. If they are not then ?

@aliabdolali aliabdolali merged commit 64a27d6 into NOAA-EMC:develop Mar 25, 2021
Copy link
Collaborator

@mickaelaccensi mickaelaccensi left a comment

Choose a reason for hiding this comment

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

I'm not able to compile WW3 anymore and it is related to this PR. I've detailed the problems below

NETCDF_INCLUDE = $(shell $(NETCDF_CONFIG) --includedir)
NETCDF_LIBRARY = $(shell $(NETCDF_CONFIG) --flibs)
NETCDF_INCLUDE = $(shell $(NETCDF_CONFIG) --cflags)
NETCDF_LIBRARY = $(shell $(NETCDF_CONFIG) --flibs) $(shell $(NETCDF_CONFIG) --libs)
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the netcdf-fortran library is correctly compiled, all the needed dependencies are defined in --flibs.
the option --libs does not exist for all netcdf libraries (like version 4.5.2) so it crashes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mickaelaccensi we have an issue now to make the manual specifically say nc-config consistently: #392 and any other checks to make sure things are working for everyone are welcome. Sorry this got pushed through while you were out and is now causing issues.

@@ -30,8 +30,8 @@ COUPLE = $(WWATCH3_DIR)/../regtests/ww3_tp2.14/input/oasis3-mct
ARCHDIR = $(WWATCH3_DIR)/../regtests/ww3_tp2.14/work_oasis3-mct
#
# NetCDF library
NETCDF_INCLUDE = $(shell $(NETCDF_CONFIG) --includedir)
NETCDF_LIBRARY = $(shell $(NETCDF_CONFIG) --flibs)
NETCDF_INCLUDE = $(shell $(NETCDF_CONFIG) --cflags)
Copy link
Collaborator

Choose a reason for hiding this comment

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

--cflags is for c-compiler
for fortran-compiler, it must be --fflags to be used

@@ -116,7 +116,7 @@
case $WWATCH3_NETCDF in
NC3) libs="$libs -L$NETCDF_LIBDIR -lnetcdf" ;;
NC4) if [ "$mpi_mod" = 'no' ]; then comp="`$NETCDF_CONFIG --fc`"; fi
libs="$libs `$NETCDF_CONFIG --flibs`" ;;
libs="$libs `$NETCDF_CONFIG --flibs` `$NETCDF_CONFIG --libs`" ;;
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the netcdf-fortran library is correctly compiled, all the needed dependencies are defined in --flibs.
the option --libs does not exist for all netcdf libraries (like version 4.5.2) so it crashes.

@@ -82,7 +82,8 @@
case $WWATCH3_NETCDF in
NC3) opt="$opt -I$NETCDF_INCDIR" ;;
NC4) if [ "$mpi_mod" = 'no' ]; then comp="`$NETCDF_CONFIG --fc`"; fi
opt="$opt -I`$NETCDF_CONFIG --includedir`" ;;
#opt="$opt -I`$NETCDF_CONFIG --includedir`" ;;
opt="$opt `$NETCDF_CONFIG --cflags`" ;;
Copy link
Collaborator

Choose a reason for hiding this comment

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

--cflags is for c-compiler
for fortran-compiler, it must be --fflags to be used

mickaelaccensi added a commit to umr-lops/WW3 that referenced this pull request Jun 1, 2021
store nodes status for tidal analysis
 to output the list by NAPOUT
@JessicaMeixner-NOAA JessicaMeixner-NOAA deleted the NetCDFcomplink branch November 13, 2021 12:39
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.

Update to NetCDF libraries linked for use with NOAA hpc-stack
3 participants