next up previous
Next: Running the model Up: Compiling and running unstructured Previous: Compiling and running unstructured

Code compilation

The parallel version of the unstructured SWAN model utilizes the parallel infrastructure from parallel ADCIRC. Specifically, it needs the MKDIR, SIZES, GLOBAL and MESSENGER object files. So those need to be compiled before the parallel, unstructured mesh SWAN model is compiled. Also, for mesh partition a program called adcprep need to be compiled as well. These compilations are performed typically by navigating to the directory work and typing

make adcprep padcirc SWAN=enable
You probably need to specify the appropriate compiler available on your machine by setting compiler=... on the make command line. For instance, if you are using the Intel compilers (e.g. ifort and icc) then type
make adcprep padcirc compiler=intel SWAN=enable
Note that you must add the SWAN=enable string to the make command line.


To compile the parallel version of the unstructured mesh SWAN model, you probably first need to remove the files that were created during the compilation of the commonly used SWAN model. You can do this by typing
make clobber
to remove the stray files. If necessary, type
make config
to have SWAN attempt to create a file macros.inc with compiler flags for your system. Be sure to complete the line
O_DIR = ../work/odir4/
where the abovementioned object files are resided. Then type
make punswan
to make the parallel, unstructured mesh version of SWAN. It will follow the SWAN convention of assigning the name swan.exe to the executable.


next up previous
Next: Running the model Up: Compiling and running unstructured Previous: Compiling and running unstructured
The SWAN team 2017-10-26