Skip to content
zacharyburnett edited this page Apr 25, 2022 · 1 revision

Building ADCIRC

1. get a copy of ADCIRC source code adcirc-cg-54.01

copy adcirc-cg-54.01 to remote, using rsync or an FTP client such as WinSCP

2. log onto HPC system and load modules

module load cmake intel impi netcdf

if on a local machine, you can try sudo apt-get install libnetcdf-dev libnetcdff-dev libopenmpi-dev

3. setup build directory

cd adcirc-cg-54.01
mkdir build && cd build

4. run Cmake to generate a Makefile with the correct libaries

cmake .. \
-DBUILD_ADCIRC=ON \
-DBUILD_ADCPREP=ON \
-DBUILD_ADCSWAN=ON \
-DBUILD_ASWIP=ON \
-DBUILD_LIBADCIRC_SHARED=ON \
-DBUILD_LIBADCIRC_STATIC=ON \
-DBUILD_PADCIRC=ON \
-DBUILD_PADCSWAN=ON \
-DBUILD_PUNSWAN=ON \
-DBUILD_SWAN=ON \
-DBUILD_UTILITIES=ON \
-DCMAKE_CXX_COMPILER=mpiicc \
-DCMAKE_C_COMPILER=mpiicc \
-DCMAKE_Fortran_COMPILER=mpiifort \
-DENABLE_OUTPUT_NETCDF=ON \
-DNETCDFHOME=$(nc-config --prefix)

also run the following on Hera, Orion, or Jet:

cmake .. -DMPI_FORTRAN_INCLUDE_PATH=$(dirname $(dirname $(which mpiifort)))/include

5. build and install ADCIRC

to install to an environment, first run cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/environment

run make within the build/ directory, using the optional -j flag to specify the number of cores

to build ADCIRC:

make install compiler=intel NETCDF4=enable

to build Parallel ADCIRC:

make padcirc compiler=intel NETCDF4=enable