Compiling ADCIRC with CMAKE

When needing to compile on Stampede, Frontera, or Katrina (Clint's desktop) 

Step-by-step guide

  1. Pull the latest adcirc from Github
  2. Make sure you have intel compilers, and MPI loaded (eg. Mvapich on Stampede2/Frontera or openMPI/MPICH2 on Oden computers

  3. If you want to build with netcdf support, Set NETCDFHOME env variable to: 
    1. export NETCDFHOME=/opt/apps/intel18/netcdf/4.6.2/x86_64 on Stampede2/Frontera
    2. export NETCDFHOME=/workspace/Library/NetCDF/install/ on Katrina
  4. Create a build folder, cd to /build and run:

    cmake .. -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc -DCMAKE_Fortran_COMPILER=ifort
    cmake .. -DBUILD_ADCIRC=ON -DBUILD_PADCIRC=ON -DBUILD_ADCPREP=ON -DBUILD_PADCSWAN=ON -DENABLE_OUTPUT_NETCDF=ON

    Alternatively run ccmake .. for a complete list of build options and flags. 

  5. make 

The only Oden computer that has NetCDF (unless you installed it yourself) is Katrina.

If you are using a flavor csh you may need the setenv command.

If you are running into build errors, try double checking the cmake version, as some cmake files require an up-to-date cmake version

Cmake caches its build options into the CMakeLists.txt file. If you are rebuilding something, you may need to delete this. 

Minimal Confirmed Compilation Environments 

adcirc-Precip on Frontera: 

Currently Loaded Modules:
  1) intel/19.1.1   2) mvapich2-x/2.3   3) cmake/3.24.2