-
Notifications
You must be signed in to change notification settings - Fork 9
FAQs‐page
This page is a collection of frequently asked questions from WW3 users and developers.
General:
Develop Branch (CMAKE build):
- How to avoid common cmake error with Intel IMPI 2018.1.163? Main Branch/Public Release (GNU Make build):
- How to debug error messages?
- How to install netcdf
- How to install Metis/Parmetis
- How to install SCOTCH
- How to compile with PDLIB
- For MACOSX with gfortran
- How to compile WW3 using NOAA hpc-stack
- ww3_grib compilation
The WAVEWATCH III® Development Group (WW3DG), 2019: User manual and system documentation of WAVEWATCH III® version 6.07. Tech. Note 333, NOAA/NWS/NCEP/MMAB, College Park, MD, USA, 326 pp. + Appendices.
BibTex Format:
@article{wavewatch6.07,
title="{User Manual and System Documentation of WAVEWATCH III version 6.07, The {WAVEWATCH III} Development Group}",
author={WW3DG},
journal={Tech. Note 326 pp. + Appendices, NOAA/NWS/NCEP/MMAB},
year={2019}}
Please note that "WAVEWATCH III" should be in all capital letters and that the preferred way to shorten WAVEWATCH III is to use WW3.
There are 4 timesteps for WW3 with explicit scheme:
1- Global time step (Should be a multiple of spatial time step).
2- Spatial time step (Should satisfy CFL).
3- Spectral time step (Should be a multiple of spatial time step).
4- Minimum source term time step.
The maximum allowable time step for spatial propagation is given by:
Δt=123766 * Δx * cosd(max(latitude))*f
where Δx is the resolution in degrees,cosd(max(latitude)) is the cosine of the maximum latitude in degrees and f is the first frequency from ww3_grid.inp(nml).
The spatial time step should be chosen as an integer close to this number (no fraction of seconds).
Users might need to allocate a larger memory if a segmentation fault occurs at model definition preparation step (ww3_grid) due to a large grid, preprocessing of field inputs (i.e. ww3_prnc), or postprocessing of model outputs (i.e. ww3_ounf/outf) due to a heavy out_grd.ww3. In this case, it is recommended to use compute nodes instead of login nodes on HPC environments for serial executables.
A common error when using Intel IMPI 2018.1.163 is the following:
b47f:edada740: 683 us(683 us): open_hca: device mlx5_0 not found
[0] MPI startup(): dapl fabric is not available and fallback fabric is
not enabled
to avoid this error, the workaround is to disable the environment variable I_MPI_DEVICE by doing either :
unsetenv I_MPI_DEVICE
export -n I_MPI_DEVICE
A common question is: I got the following error
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
ww3_shel 00000000006C1E45 Unknown Unknown Unknown
ww3_shel 00000000006BFC07 Unknown Unknown Unknown
ww3_shel 0000000000661A64 Unknown Unknown Unknown
ww3_shel 0000000000661876 Unknown Unknown Unknown
ww3_shel 00000000005F1976 Unknown Unknown Unknown
ww3_shel 00000000005F7440 Unknown Unknown Unknown
libpthread.so.0 00002AAAABC71850 Unknown Unknown Unknown
ww3_shel 00000000004F042D Unknown Unknown Unknown
ww3_shel 00000000004E91D3 Unknown Unknown Unknown
ww3_shel 00000000004936C3 Unknown Unknown Unknown
ww3_shel 0000000000415929 Unknown Unknown Unknown
ww3_shel 0000000000404E5E Unknown Unknown Unknown
libc.so.6 00002AAAAC117C36 Unknown Unknown Unknown
ww3_shel 0000000000404D69 Unknown Unknown Unknown
what do I do?
First, add traceback flags in the comp. (This will either be comp. or in cmplr.env depending on which you are using). Then you should get a line number of the program so that you can then traceback the error to.
Here gx_outp was not compiling and giving the following error:
The error was:
ad3 : processing w3triamd
ad3 : processing w3iopomd
ad3 : processing w3flx2md
ad3 : processing wmmdatmd
ad3 : processing w3sic3md
ad3 : processing gx_outp
Linking gx_outp
*** error in linking ***
gx_outp.o: In function gxoutp_IP_gxexpo_': gx_outp.F90:(.text+0x390a): undefined reference to
w3flx2md_mp_w3flx2_'
If you look in the makefile for the line of what all in linked and is set as a dependency, look at:
$(aPe)/gx_outp : $(aPo)/w3odatmd.o
$(aPe)/gx_outp : $(aPo)/wmmdatmd.o
$(aPe)/gx_outp : $(aPo)/w3parall.o
$(aPe)/gx_outp : $(aPo)/w3triamd.o
$(aPe)/gx_outp : $(aPo)/w3flx2md.o
$(aPe)/gx_outp : $(aPo)/w3sic3md.o
$(aPe)/gx_outp : $(aPo)/w3iogrmd.o
$(aPe)/gx_outp : $(aPo)/w3iopomd.o
$(aPe)/gx_outp : $(aPo)/gx_outp.o
@$(aPb)/link gx_outp w3gdatmd w3wdatmd w3adatmd w3idatmd w3odatmd wmmdatmd w3parall w3triamd w3flx2md w3sic3md w3iogrmd w3iopomd constants w3servmd w3timemd w3arrymd w3dispmd w3gsrumd
in the original makefile the w3flx2md was not included, but needed to be there.
To fix this, go into make_makefile and search for w3flx2md you will find:
FLX2) str_st1='OK' ; str_st2='OK' ; str_st3='no' ; str_st6='OK'
flx='w3flx2md'
flxx=$NULL ;;
So you need to add the variable flx into the make_makefile for the appropriate program:
gx_outp) IDstring='GrADS input file generation for point output'
core=
data="$memcode w3gdatmd w3wdatmd w3adatmd w3idatmd w3odatmd"
prop=
source="$pdlibcode $pdlibyow $db $bt $setupcode wmmdatmd w3parall w3triamd $ln $flx $stx $nlx $btx $tr $bs $xx $is $ic"
IO='w3iogrmd w3iopomd'
aux='constants w3servmd w3timemd w3arrymd w3dispmd w3gsrumd' ;;
Method 1 (aptitude)
- prerequisites
apt install gcc g++ gfortran build-essential
- netcdf4 library
apt install libhdf5-serial-dev libnetcdff-dev libnetcdf-dev
- netcdf tool (ncview, nco)
apt install netcdf-bin netcdf-doc ncview libudunits2-0 libgsl0-dev nco
Method 2 (scripts - recommended - no support available) The following scripts provide guidelines to install netcdf4 on hpc environment properly for use with WAVEWATCH III® with given FORTRAN compilers (Ifremer):
netcdf installer (Download only) Method 3 (scripts - not recommended - no support available) The following scripts provide guidelines to install netcdf4 properly for use with WAVEWATCH III® with given FORTRAN compilers (NCEP):
- GNU netcdf installer (Download only)
- Intel netcdf installer (Download only)
Follow these instructions to download the Parmetis-4.3.0 tarball, which includes both Metis and Parmetis. Then build Metis, followed by Parmetis, as shown below
PARMETIS_INSTALL=<path-to-install> # User sets location for where to install
# Dependencies
# * cmake
# * Fortran90 compiler
# * MPI
#
export CFLAGS=-fPIC
wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/parmetis/4.0.3-4/parmetis_4.0.3.orig.tar.gz
tar xvfz parmetis_4.0.3.orig.tar.gz
cd parmetis-4.0.3
# Build: Metis
cd metis
make config cc=mpiicc \
CXX=mpiixx \
prefix=$PARMETIS_INSTALL |& tee metis-make-config.out
make VERBOSE=1 |& tee metis-make.out
make install
# Build: ParMetis
cd ..
make config cc=mpiicc \
CXX=mpiixx \
prefix=$PARMETIS_INSTALL |& tee parmetis-make-config.out
make VERBOSE=1 |& tee parmetis-make.out
make install
After a successful install the files libmetis.a libparmetis.a, will be located at $PARMETIS_INSTALL/lib. To reference Metis/Parmetis from a bash script use
export METIS_PATH=$PARMETIS_INSTALL
A recent version GNU is needed for part of the SCOTCH build, even if your Fortran90 compiler is not GNU (ex, Intel). So in this case both compilers need to be available. In the instructions below the user needs to fill in the SCOTCH_PATH variable to your desired path, as well as replace the placeholders in the cmake
command <C-compiler>
, and <F90-compiler>
SCOTCH_INSTALL=<path-to-install> # User sets location for where to install
# Dependencies:
# - cmake
# - Fortran90 compiler
# - MPI
# - GNU
#
git clone https://gitlab.inria.fr/scotch/scotch.git
cd scotch
git checkout v7.0.3
mkdir build && cd build
cmake -DCMAKE_Fortran_COMPILER=<F90-compiler> \
-DCMAKE_C_COMPILER=<C-compiler> \
-DCMAKE_INSTALL_PREFIX=$SCOTCH_INSTALL \
-DCMAKE_BUILD_TYPE=Release .. |& tee cmake.out
make VERBOSE=1 |& tee make.out
make install
i.e.
module purge
module load cmake/3.20.1
module load intel
module load impi
module load gnu
mkdir build
cd build
cmake VERBOSE=1 -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_C_COMPILER=icc -DCMAKE_INSTALL_PREFIX=<path to scotch>/install -DTHREADS=OFF -DCMAKE_BUILD_TYPE=Release .. | & tee cmake.out-rr
make VERBOSE=1 | & tee make.out-rr
make install
make scotch
make ptscotch
SCOTCH has the ability to make use of pthreads which are set to"ON"
by default. If this functionality is not desired, the options to turn off threads (-DTHREADS="OFF"
) and MPI multiple threads (-DMPI_THREAD_MULTIPLE="OFF"
), can be added to the SCOTCH cmake build command above.
After a successful install the files libptscotch.a
and libscotch.a
among others, will be located at $SCOTCH_INSTALL/lib
. To reference SCOTCH from a bash script use
export SCOTCH_PATH=$SCOTCH_INSTALL
- Compile metis and parmetis libraries following link.
- Set the path to
METIS_PATH
in the environment. - Compile all the required serial executable without PDLIB in the switch:
cd WW3/model/bin
./w3_make ww3_grid ww3_prnc ww3_bounc ...
- Add PDLIB to the switch and compile ww3_shel and ww3_multi
./w3_make ww3_shel ww3_multi
Compile gfortran
brew install gcc
brew install gnu-getopt
clone WW3
git clone -b develop https://github.com/NOAA-EMC/WW3.git WW3
cd WW3/model
Set environmetal variables (model/bin/wwatch3.env)
./bin/w3_setup ./
WW3 Compilation
cd bin
ln -s comp.Gnu comp
ln -s link.Gnu link
cp switch<user_defined> switch
./w3_make
In order to compile ww3_grib, the following modules are required:
netcdf, bacio, w3nco, g2, jasper, png, zlib, hdf5, w3nco
and
setenv PNG_LIB $PNG_ROOT/lib64/libpng.a
setenv Z_LIB $ZLIB_ROOT/lib/libz.a
setenv JASPER_LIB $JASPER_ROOT/lib64/libjasper.a
setenv NETCDF_CONFIG $NETCDF/bin/nc-config