FVCOM setup notes
- The FVCOM source code can be downloaded from https://github.com/FVCOM-GitHub
- Triton has the Intel compiler pre-installed which can be activated using the command:
module load intel/2016/2016.3.210
- Before compiling FVCOM, the required packages netcdf-c, netcdf-fortran, and their dependencies: curl, hdf5, zlib need to be downloadad and compiled with the same Intel compiler. The following commands may be helpful:
export CC=icc
export CXX=icpc
export CFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export CXXFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export F77=ifort
export FC=ifort
export F90=ifort
export FFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export CPP='icc -E'
export CXXCPP='icpc -E'
cd netcdf-c-4.7.0
./configure --prefix=/d1/cliu/netcdf_4_intel --disable-netcdf-4
make
make check
make install
cd netcdf-fortran-4.4.5
export CPPFLAGS=-I/d1/cliu/netcdf_4_intel/include
export LDFLAGS=-L/d1/cliu/netcdf_4_intel/lib
export LD_LIBRARY_PATH=/d1/cliu/netcdf_4_intel/lib:${LD_LIBRARY_PATH}
./configure --prefix=/d1/cliu/netcdf_4_intel
make
make check
make install
- When compiling FVCOM with SWAVE enabled, make sure to turn off the double precision flag in the
make.inc
file, otherwize SWAVE would not work. - In addition to the FVCOM User Manual, the (now defunct) UK FVCOM wiki website provides useful tutorials and tips, and can be accessed via The Internet Archive here.
- Example slurm script
run.slurm
for running FVCOM:
#!/bin/bash
#SBATCH --job-name=fvcom-MYS_Sandy
#SBATCH --output=test-%j.out
#SBATCH --error=test-%j.err
#SBATCH --partition=defq
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=56
#SBATCH --nodelist=node004
# . /etc/profile.d/modules.sh
# after initializiation you can load a module
# module load openmpi/gcc/64/1.6.4-mlnx-ofed
date
module load intel/2016/2016.3.210
if [[ -z $SLURM_NTASKS ]]; then
NTASKS=10
else
NTASKS=$SLURM_NTASKS
fi
echo Number of workers: $NTASKS
# job commands:
mpiexec.hydra ./fvcom-swave_442_intel --casename=MYS
date