next up previous contents
Next: Creating or Reading in Up: SUNTANS User Guide Stanford Previous: Keeping up to date   Contents


Before running SUNTANS, you must have a valid triangulation and a valid parameter file suntans.dat. For details on the triangulation, see Section 3, and for details on the suntans.dat parameter file, see Section 7. If you have a valid grid and parameter file in the same directory as the sun executable, SUNTANS can be executed as a single processor job by running the main executable sun with

mpirun sun -t -g -s
Running with the input and output data files in the same directory as the source and executable is in general not a good idea because SUNTANS creates many input and output files that will clutter up the local directory. It is best to create a new directory and specify that directory as the working data directory on the command line and place the grid and parameter files in that directory. For example, if the input files are in the local data directory, then SUNTANS would be run with
mpirun sun -t -g -s --datadir=./data
To run SUNTANS on multiple processors, use the -np flag with mpirun. For example, to run SUNTANS on 64 processors, use
mpirun -np 64 sun -t -g -s --datadir=./data
The following is a list of flags that determine the behavior of the sun executable upon running: A typical SUNTANS run with, for example, 4 processors, will proceed as follows:
  1. Place the parameter file suntans.dat and planar straight line graph file in a directory, say the data directory.
  2. Create the triangulation and grid information with
    mpirun -np 4 sun -t -g --datadir=./data
    This stores the grid information in files (see Section 3) for later reading later. Since this process may take some time it is a good idea to run this once for large grids and read in the grid data from a file.
  3. Read the grid data from the files and run the solver and output information about the run with
    mpirun -np 4 sun -s -vv --datadir=./data
  4. Once this run is finished it is possible to restart the run (for details see Section 5) with the data in data using
    mpirun -np 4 sun -s -r -vv --datadir=./data

Note that the reason behind being able to specify the data directory at the command line is that it enables the executable to be run from the same directory but to use data from different directories that may contain different parameters. For example, if the data1 directory and data2 directory contain different grid data (from previous calls to SUNTANS with the -t and -g flags), then SUNTANS can be run either with

mpirun -np 4 sun -s --datadir=./data1
or with
mpirun -np 4 sun -s --datadir=./data2

next up previous contents
Next: Creating or Reading in Up: SUNTANS User Guide Stanford Previous: Keeping up to date   Contents