Skip to content

Commit b6db1fc

Browse files
Merge pull request #1534
Address compilation warnings and merge develop into dev/ufs-weather-model
2 parents af7ecf2 + eba8ccf commit b6db1fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+764
-759
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ concurrency:
88

99
env:
1010
cache_key: gnu11
11-
CC: gcc-10
12-
FC: gfortran-10
13-
CXX: g++-10
11+
CC: gcc-14
12+
FC: gfortran-14
13+
CXX: g++-14
1414

1515

1616
# Split into a steup step, and a WW3 build step which
@@ -45,7 +45,8 @@ jobs:
4545
run: |
4646
# Install NetCDF, ESMF, g2, etc using Spack
4747
sudo apt install cmake
48-
git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
48+
#git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
49+
git clone -c feature.manyFiles=true --depth=2 --branch=spack-stack-1.9.3 https://github.com/JCSDA/spack.git
4950
source spack/share/spack/setup-env.sh
5051
spack env create ww3-gnu ww3/model/ci/spack_gnu.yaml
5152
spack env activate ww3-gnu
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ env:
2626

2727
jobs:
2828
setup:
29-
runs-on: ubuntu-latest
29+
runs-on: ubuntu-22.04
3030

3131
steps:
3232

.github/workflows/regtest_gnu.yml.tempdisable renamed to .github/workflows/regtest_gnu.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ concurrency:
88

99
env:
1010
cache_key: gnu11-1
11-
CC: gcc-10
12-
FC: gfortran-10
13-
CXX: g++-10
11+
CC: gcc-14
12+
FC: gfortran-14
13+
CXX: g++-14
1414

1515

1616
# Split into a steup step, and a WW3 build step which
@@ -45,7 +45,7 @@ jobs:
4545
run: |
4646
# Install NetCDF, ESMF, g2, etc using Spack
4747
sudo apt install cmake
48-
git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
48+
git clone -c feature.manyFiles=true --depth=2 --branch=spack-stack-1.9.3 https://github.com/JCSDA/spack.git
4949
source spack/share/spack/setup-env.sh
5050
spack env create ww3-gnu ww3/model/ci/spack_gnu.yaml
5151
spack env activate ww3-gnu

manual/eqs/output.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ \subsection{~Output parameters} \label{sub:outpars}
128128
\frac{a_1(f)^2+b_1(f)^2}{E(f)^2} \right )^{1/2} \right \} \right ]^{1/2}
129129
\: , \label{eq:sig_th1} \end{equation}
130130
\item \textbf{TH2M} Mean direction from $a_2$ and $b_2$ (degr.)
131-
\begin{equation} \theta_2 (f)= \mbox{atan} \left ( \frac{b_2(f)}{a_2(f)} \right )
131+
\begin{equation} \theta_2 (f)= 0.5 \mbox{atan} \left ( \frac{b_2(f)}{a_2(f)} \right )
132132
\: , \label{eq:theta_2} \end{equation} \begin{equation}
133133
a_2(f) = 2 \pi \int_0^{2\pi} \int_0^\infty \cos(2 \theta) F(\sigma,\theta) \:
134134
\mathrm{d}\theta \: , \end{equation} \begin{equation}

model/bin/switch_NCEP_rwps

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NCO PDLIB SCOTCH NOGRB BIN2NC DIST MPI PR3 UQ FLX0 SEED ST4 STAB0 NL1 BT1 DB1 MLIM TR1 BS0 RWND WNX1 WNT1 CRX1 CRT1 O0 O1 O2 O3 O4 O5 O6 O7 O14 O15 IC0 IS0 REF0

model/ci/spack_gnu.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ spack:
77
88
99
- [email protected]+mpi+metis~shared
10-
- netcdf-c@4.7.4~dap
11-
- netcdf-fortran@4.5.3
10+
- netcdf-c@4.9.2~dap
11+
- netcdf-fortran@4.6.1
1212
1313
1414
15-
- w3emc@2.9.2
15+
- w3emc@2.12.0
1616
- [email protected]+fortran~pnetcdf
1717
- [email protected]~debug~xerces+external-parallelio
1818
view: true

model/ci/spack_intel.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ spack:
55
providers:
66
mpi: [intel-oneapi-mpi]
77
specs:
8-
- netcdf-c@4.7.4~dap
9-
- netcdf-fortran@4.5.3
8+
- netcdf-c@4.9.2~dap
9+
- netcdf-fortran@4.6.1
1010
1111
1212

model/inp/ww3_grid.inp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,11 @@ $ JGS_LIMITER : TRUE: Use total (quasi-steady: limits
358358
$ FALSE: default
359359
$ JGS_LIMITER_FUNC : 1 - old limiter (default)
360360
$ 2 - alternatnive limiter
361-
$ SETUP_APPLY_WLV : Compute wave setup (TRUE/FALSE, default TRUE)
361+
$                           JGS_TRUNK_DIGITS  : [Only with switch TRNK] Number of digits of precision to truncate solution to at the end of iterative solver.
362+
$                                               Can be used to force bit-for-bit reproducibility.
363+
$ SETUP_APPLY_WLV : Compute wave setup (TRUE/FALSE, default TRUE)
362364
$ SOLVERTHR_SETUP : Solver threshold for setup computations (default 1E-6)
363365
$ CRIT_DEP_SETUP : Critical depth for setup computations (default 0.1)
364-
365366
$
366367
$ SMC grid propagation : Namelist PSMC and default values
367368
$ CFLSM : Maximum CFL no. for propagation, 0.7

model/src/CMakeLists.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,17 @@ foreach(program ${programs})
229229
target_link_libraries(${program} PRIVATE ww3_lib)
230230
endforeach()
231231

232-
target_compile_options(ww3_lib PUBLIC "$<$<COMPILE_LANGUAGE:Fortran>:${compile_flags}>")
233-
target_compile_options(ww3_lib PUBLIC "$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:Fortran>>:${compile_flags_debug}>")
234-
target_compile_options(ww3_lib PUBLIC "$<$<AND:$<CONFIG:Release>,$<COMPILE_LANGUAGE:Fortran>>:${compile_flags_release}>")
232+
if (UFS_CAP)
233+
# Building as part of UFS (submodule)
234+
set(WW3_FLAG_SCOPE PRIVATE)
235+
else()
236+
# Standalone WW3 build
237+
set(WW3_FLAG_SCOPE PUBLIC)
238+
endif()
239+
240+
target_compile_options(ww3_lib ${WW3_FLAG_SCOPE} "$<$<COMPILE_LANGUAGE:Fortran>:${compile_flags}>")
241+
target_compile_options(ww3_lib ${WW3_FLAG_SCOPE} "$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:Fortran>>:${compile_flags_debug}>")
242+
target_compile_options(ww3_lib ${WW3_FLAG_SCOPE} "$<$<AND:$<CONFIG:Release>,$<COMPILE_LANGUAGE:Fortran>>:${compile_flags_release}>")
235243

236244
install(
237245
TARGETS ${programs} ww3_lib

model/src/PDLIB/yowpdlibmain.F90

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,44 @@ subroutine runParmetis(MNP)
449449

450450
INTEGER :: np_toSend
451451

452+
#ifdef W3_SCOTCH
453+
interface
454+
#ifdef SCOTCH_707
455+
subroutine SCOTCHFParMETIS_V3_PartGeomKway(vtxdist, xadj, adjncy, &
456+
vwgt, adjwgt, wgtflag, numflag, ndims, xyz, ncon, nparts, &
457+
tpwgts, ubvec, options, edgecut, part, comm, ref)
458+
import :: MPI_Comm
459+
integer, intent(in) :: vtxdist(*), xadj(*), adjncy(*)
460+
integer, intent(in) :: vwgt(*), adjwgt(*)
461+
integer, intent(in) :: wgtflag, numflag, ndims, ncon, nparts
462+
real(4), intent(in) :: xyz(*)
463+
real(4), intent(in) :: tpwgts(*), ubvec(*)
464+
integer, intent(in) :: options(*)
465+
integer, intent(out) :: edgecut
466+
integer, intent(inout) :: part(*)
467+
type(MPI_Comm), intent(in) :: comm
468+
integer, intent(out) :: ref
469+
end subroutine SCOTCHFParMETIS_V3_PartGeomKway
470+
#else
471+
subroutine SCOTCH_ParMETIS_V3_PartGeomKway(vtxdist, xadj, adjncy, &
472+
vwgt, adjwgt, wgtflag, numflag, ndims, xyz, ncon, nparts, &
473+
tpwgts, ubvec, options, edgecut, part, comm, ref)
474+
import :: MPI_Comm
475+
integer, intent(in) :: vtxdist(*), xadj(*), adjncy(*)
476+
integer, intent(in) :: vwgt(*), adjwgt(*)
477+
integer, intent(in) :: wgtflag, numflag, ndims, ncon, nparts
478+
real(4), intent(in) :: xyz(*)
479+
real(4), intent(in) :: tpwgts(*), ubvec(*)
480+
integer, intent(in) :: options(*)
481+
integer, intent(out) :: edgecut
482+
integer, intent(inout) :: part(*)
483+
type(MPI_Comm), intent(in) :: comm
484+
integer, intent(out) :: ref
485+
end subroutine SCOTCH_ParMETIS_V3_PartGeomKway
486+
#endif
487+
end interface
488+
#endif
489+
452490
! CALL REAL_MPI_BARRIER_PDLIB(comm, "runParmetis, step 1")
453491
! Create xadj and adjncy arrays. They holds the nodes neighbors in CSR Format
454492
! Here, the adjacency structure of a graph is represented by two arrays,

0 commit comments

Comments
 (0)