Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This tutorial teaches you how to get to your first test case in DGSWEM, the experimental discontinous galerkin method counterpart for ADCIRC, on TACC systems.

Obtaining DGSWEM

There is a C version of DGSWEM and a Fortran version. We will focus on DGSWEM-Fortran, which can be obtained from a github repo (it’s private so you have to ask around).

Building DGSWEM

DGSWEM comes with its own makefile.

  • make sure you have intel compilers on

  • cd into the /work directory and run “make all”. This will automatically compile and link your program based on your runtime environment.

  • You should get a adcprep, adcpost, dgswem, and dgswem_serial binary

Building on Frontera

Load the necessary modules:

module load TACC intel/23.1.0 impi

This loads the Intel compilers for Fortran and C: ifort and icx, as well as MPI. Then run make all as above.

Building on Vista

On the new machine Vista, we will instead use NVIDIA compilers. Here we can choose between the regular CPU version and a GPU-accelerated version (still in development). First, load the necessary modules by running

module load TACC

The Fortran compiler is now nvfortran and the C and C++ compilers nvc and nvc++.

CPU version

This is the default version. To compile, run

cd work
make compiler=nvhpc all

GPU version

This code is maintained in a separate branch gpu. Run

git fetch --all
git checkout gpu

to sync this branch. Then compile:

cd work
make all

Build a test case

Zach from the water institute has graciously lended us a program to build a test case, which we will adapt for DGSWEM: . This code will generate us a rectangular beach with some incoming waves, with a specified amount of elements. Let’s create a 1000 element case for now.

  • python slopingbeach.py 1000 sb1000

  • output: sb1000 (mesh file), sb1000.15 (control file), sb1000.info (metadata)

Adapting the Test Case

The control file will have two options that are not valid in DGSWEM currently:

  • IM = 511112 Change this to 0.

  • NOUTGE = -3 (DGSWEM does not read NETCDF output yet). Change this to 1.

Prepping the Test Case

Make sure to have the fort.dg file in your directory, which contains some dgswem-specific options for it to read. Run ./adcprep. It will ask for the number of MPI ranks you want to run on, and the names of the input files.

Running the Test Case

Run ./padcirc (it doesn’t have write cores like adcirc). Afterwards run ./adcpost to grab and agglomerate the partitioned output files into one file.

Congrats! You have just run your first test case of dgswem!

  • No labels