swan

Simulating WAves Nearshore

SWAN is a third-generation wave model that computes random, short-crested wind-generated waves in coastal regions and inland waters. http://swanmodel.sourceforge.net/

Official SWAN site http://www.swan.tudelft.nl/
Usage Manual: http://swanmodel.sourceforge.net/online_doc/swanuse/swanuse.html

SWAN installation manual : http://swanmodel.sourceforge.net/online_doc/swanimp/node7.html

swan-gnu

swan-gnu - MPI version

install dir

 /sw/swan/mpi/4085-gnu 

usage

 module load swan/mpi/4085-gnu

Installation Notes

mkdir /sw/swan/mpi
cd /sw/swan/mpi
tar -xvf /data1/swan4085.tar.gz
mv swan4085 4085-gnu
cd /sw/swan/mpi/4085-gnu
module load mpi/openMPI/1.4.3-gnu
make clobber;make clean;make config
make mpi
chmod +x swanrun

swan-serial

install dir

 /sw/swan/serial/4085-gnu 

usage

 module load swan/serial/4085-gnu

Installation Notes

mkdir /sw/swan/serial
cd /sw/swan/serial
tar -xvf /data1/swan4085.tar.gz
mv swan4085 4085-gnu
cd /sw/swan/serial/4085-gnu
make clobber;make clean;make config
make ser
chmod +x swanrun

swan-gnu - OpenMP version

install dir

 /sw/swan/omp/4085-gnu 

usage

 module load swan/omp/4085-gnu

Installation Notes

mkdir /sw/swan/omp
cd /sw/swan/omp
tar -xvf /data1/swan4085.tar.gz
mv swan4085 4085-gnu
cd /sw/swan/omp/4085-gnu
make clobber;make clean;make config
make mpi
chmod +x swanrun

swan-intel

swan-intel - MPI version

mkdir /sw/swan/mpi/
cd /sw/swan/mpi/
tar -xvf /data1/swan4085.tar.gz
mv swan4085 4085-intelmpi
cd sw/swan/intel/mpi/4085-intelmpi

module load intel-cmkl-11/11.2.137 intel-cc-11/11.1.072 intel-fc-11/12.0.2.137 intel-tools-11/11.2.137 intel-mpi/4.0.0.027

module list
Currently Loaded Modulefiles:
  1) intel-cmkl-11/11.2.137    2) intel-cc-11/11.1.072      3) intel-fc-11/12.0.2.137    4) intel-tools-11/11.2.137   5) intel-mpi/4.0.0.027

edit the  platform.pl file and change this
From:
 print OUTFILE "F90_MPI = mpif90\n";
To
 print OUTFILE "F90_MPI = mpiifort\n";
(Line 166)



make clobber;make clean;
make config
perl switch.pl -unix -f95 -mpi *.ftn *.ftn90

 make mpi 2>&1 |tee make_swan_intelmpi.txt
chmod +x swanrun

install dir

usage

 module load swan/mpi/4085-intel

Installation Notes

 

PBS and swan

mpi jobs

more swanrun_openMPI.pbs00

#PBS -m e
#PBS -M <youremail>@griffith.edu.au
#PBS -N swanOpenMPI
#PBS -l select=3:ncpus=4:mem=12g:mpiprocs=4

source $HOME/.bashrc
module load swan/mpi/4085-gnu
SWAN_DIR=/export/home/snumber/modelling/swan
SWAN_FORECAST_WORK=/export/home/snumber/modelling/swan/forecast/work
SWAN_EXEC=/export/home/snumber/modelling/swan/swan4085
HOME_DIR=/export/home/snumber/
echo "Starting job"

## The number of nodes is given by the select =<NUM > above
NODES=3

###$PBS_NODEFILE is a node-list file created with select and mpiprocs options by PBS
###### The number of MPI processes available is mpiprocs * nodes (=NPROCS)
NPROCS=12

cd $SWAN_FORECAST_WORK
cat $PBS_NODEFILE >machinefile
mpirun --prefix /sw/openMPI/1.4.3-gnu/ -machinefile $PBS_NODEFILE -np $NPROCS env PATH=$PATH:$SWAN_EXEC:$SWAN_FORECAST_WORK env LD_LIBRARY_PATH=$LD_LIBRARY_PATH swanrun -input ${SWAN_FORECAST_WORK}/swan_eau_forecast.swn -mpi $NPROCS

cd $SWAN_DIR/pbs/jobs

echo "Done with job"


openMP job

#PBS -m e
#PBS -M MyEmail@griffith.edu.au
#PBS -N swanrun_omp
#PBS -l select=1:ncpus=3:mem=24g

source $HOME/.bashrc
##module load NetCDF/3.6.3
module load swan/omp/4085-gnu
SWAN_DIR=/export/home/snumber/modelling/swan
SWAN_FORECAST_WORK=/export/home/snumber/modelling/swan/forecast/work
SWAN_EXEC=/export/home/snumber/modelling/swan/swan4085
HOME_DIR=/export/home/snumber/
echo "Starting job"

OMP_NUM_THREADS=3
export OMP_NUM_THREADS

cd /export/home/snumber/modelling/swan/forecast/20110808/scripts
/export/home/snumber/modelling/swan/forecast/work env LD_LIBRARY_PATH=$LD_LIBRARY_PATH ${SWAN_EXEC}/swanrun -input swan_eau_forecast swanrun -input ${SWAN_FORECAST_WORK}/swan_eau_forecast.swn  -omp $OMP_NUM_THREADS

cd /export/home/snumber/modelling/swan/pbs/jobs

echo "Done with job"

swan - serial job

#PBS -m e
#PBS -M myEmail@griffith.edu.au
#PBS -N swanrun_serial
#PBS -l select=1:ncpus=3:mem=24g

source $HOME/.bashrc
module load swan/serial/4085-gnu
SWAN_DIR=/export/home/snumber/modelling/swan
SWAN_FORECAST_WORK=/export/home/snumber/modelling/swan/forecast/work
SWAN_EXEC=/export/home/snumber/modelling/swan/swan4085
HOME_DIR=/export/home/snumber/
echo "Starting job"

cd /export/home/snumber/modelling/swan/forecast/20110808/scripts
swanrun -input ${SWAN_FORECAST_WORK}/swan_eau_forecast.swn

cd /export/home/snumber/modelling/swan/pbs/jobs
echo "Done with job"