Instructions for running a SWAN model ------------------------------------- Windows 2000/NT/XP (single-core or dual-core) --------------------------------------------- *) Before running, first adapt the environment variable PATH by including the pathname of the directory where swan.exe can be found. This pathname can be specified through the category System of Control Panel (on the Advanced tab, click Environment Variables) or by adding it in the AUTOEXEC.BAT file. *) You may also need to add the directory path where bin of MPICH is resided to PATH to have access to the command mpirun. *) Open a command prompt and change to the directory where your model can be found. *) Execute the batch-file swanrun.bat as follows: swanrun SWAN-inputfile [nprocs] where SWAN-inputfile is the name of your inputfile without extension (it is assumed that the extension is '.swn') and 'nprocs' indicates how many processes need to be launched for a parallel MPI run (do not type the brackets; they just indicate that nprocs is optional). By default, nprocs=1. This script is also suited when no MPICH is available (of course, nprocs must be 1). This script is also suited for dual-core PC provided that SWAN source code with OpenMP directives is compiled. The parameter 'nprocs' must be set to 1. *) For a parallel MPI run, you may also need a machinefile that contains the names of the nodes in your parallel environment. Put one node per line in the file. You can specify a number after the node name to indicate how many processes to launch on the node. This is useful e.g., for dual-processors. The run procedure will cycle through this list until all the requested processes are launched. Example file: node1 node2 2 node3 node4 2 UNIX or Linux ------------- *) The name of the SWAN-executable must be swan.exe. Furthermore, adapt the environment variable PATH by including the pathname of the directory where this executable can be found. *) Use the script swanrun. To execute this script, it will need to be executable first, so chmod +rx ./swanrun *) This script can be used as follows: ./swanrun -input SWAN-inputfile [-omp n | -mpi n] [> swanout &] where SWAN-inputfile is the name of your inputfile without extension (it is assumed that the extension is '.swn') and n is the number of processors. The parameter '-omp n' specifies a parallel run on n processors using OpenMP. The parameter '-mpi n' specifies a parallel run on n processors using MPI. The parameter '-input' is obliged, whereas the parameters '-omp n' or '-mpi n' can be omitted (default: n=1). This script is also suited when no MPI is available (of course, n must be 1). You may redirect the output of swanrun to the file swanout (in this case). It is also possible to run your model in the background as indicated by the ampersand. *) For a parallel MPI run, you may also need a machinefile that contains the names of the nodes in your parallel environment. Put one node per line in the file. You can specify a number followed by a colon after the node name to indicate how many processes to launch on the node. This is useful e.g., for dual-processors. The run procedure will cycle through this list until all the requested processes are launched. Example file: node1 node2:2 node4 node7:4