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

Fix knint #532

Merged
merged 30 commits into from
Nov 17, 2021
Merged

Fix knint #532

merged 30 commits into from
Nov 17, 2021

Conversation

aliabdolali
Copy link
Contributor

@aliabdolali aliabdolali commented Nov 15, 2021

Pull Request Summary

replace KNINT with NINT to be compatible with all compiler options.

Description

The knint in model/src/ww3_grib.F90 routine is an Intel extension and does not work with GNU compilers.
Replacing it with nint makes it generic, compatible with GNU and INTEL.
Is a change of answers expected from this PR? NO

Issue(s) addressed

  • Is there an issue associated with this development (bug fix, enhancement, new feature)?

Check list

Commit Message

  • Portability fix for all compiler options in ww3_grib (KNINT > NINT)

Testing

  • How were these changes tested? regression test
  • 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? Yes
  • Which compiler / HPC you used to run the regression tests in the PR? Intel/Hera
  • Please provide the summary output of matrix.comp (matrix.Diff.txt, matrixCompFull.txt and matrixCompSummary.txt):
**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR2_UQ_MPI_d2                     (8 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2                     (6 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (8 files differ)
mww3_test_03/./work_PR1_MPI_d2                     (7 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (6 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2                     (6 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                     (5 files differ)
ww3_ufs1.3/./work_a                     (2 files differ)

matrixCompFull.txt
matrixCompSummary.txt
matrixDiff.txt

UKMO-lsampson and others added 29 commits July 22, 2020 11:44
to ensure they comply with the limits of the nameslist.
Changes to add support to 360-day and 365-day (no leap year) calendar - see ticket #209
  * Additional CALTYPE namelist parameter in MISC section
  * New ww3_tc1 regtest.
* Updated ww3_bound and ww3_bounc to handle model grids formulated on a rotated pole.
* Manual and nml/inp files to updated clarify that ww3_bound/ww3_bounc only accept input spectra formulated on a standard pole grid.
Updates to allow a coupling time step that is different from the model time step. 
* Includes new regtest (in ww3_tp2.14) for non-default oasis time step.
* ww3_tp2.14 regtest added to matrix.base.
@aliabdolali
Copy link
Contributor Author

Hi @kgerheiser
Have you been able to comple ww3_grib with gnu with the fix? Could you tell me which machine you did it?

@kgerheiser
Copy link
Contributor

kgerheiser commented Nov 15, 2021

Yep, I was able to compile with this change using GCC 9.4.0 on my local macOS machine.

@kgerheiser
Copy link
Contributor

kgerheiser commented Nov 15, 2021

I don't really know how WW3 tests work, but is your test log showing differences in output? I wouldn't expect this change to affect results.

@aliabdolali
Copy link
Contributor Author

Hi @ukmo-ccbunney
could you check ./bin/run_test -c ukmo_cray_gnu -S -s MPI -s NO_PDLIB -w work_a -g a -f -p mpiexec -n 16 -o all ../model ww3_tp2.17 with GNU compiler to make sure it fixes the problem?

@ukmo-ccbunney
Copy link
Collaborator

ukmo-ccbunney commented Nov 17, 2021

Hi @ukmo-ccbunney could you check ./bin/run_test -c ukmo_cray_gnu -S -s MPI -s NO_PDLIB -w work_a -g a -f -p mpiexec -n 16 -o all ../model ww3_tp2.17 with GNU compiler to make sure it fixes the problem?

Hi @aliabdolali - so, this now compiles for me (the KNINT -> NINT fix works for me), but it fails to link.
This is because this test now enables the NCEP2 switch which hardcodes the following compiler options in the link file

opt="$opt -convert big_endian -assume byterecl -prec-div -prec-sqrt -ip"

I believe these options are Intel IFORT specific, so I needed to modify these for the GNU compiler. Additionally, I need to compile the relevant grib/bacio/g2lib libraries to get this regtest to actually compile (link) for me (we don't routinely use grib with the wave model).

However, I am going to approve this PR as the fix for KNINT looks to be working OK.

Copy link
Collaborator

@ukmo-ccbunney ukmo-ccbunney left a comment

Choose a reason for hiding this comment

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

KNINT fix worked for me.
I am struggling to test the ww3_tp2.17 regtest at the moment though due to other issues described in this PR's comments.

@aliabdolali aliabdolali merged commit 46b0d18 into NOAA-EMC:develop Nov 17, 2021
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.

KNINT is an Intel extension and not portable Regtest tp2.17 failing to compile since #350
6 participants