-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSWANRUN.README
80 lines (59 loc) · 2.55 KB
/
SWANRUN.README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Instructions for running a SWAN model
-------------------------------------
MS Windows
----------
*) Before running, first adapt the environment
variable PATH by including the pathname of the
directory where swan.exe can be found.
*) You may also need to add the directory path where
bin of MPI is resided to PATH to have access to
the command mpiexec/mpirun.
*) Open a command prompt and change to the directory
where your application is resided.
*) 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 processors
need to be launched for a parallel MPI run.
By default, nprocs=1.
This script is also suited when no MPI is available.
This script is also suited for multi-core PC provided
that SWAN source code with OpenMP directives is
compiled. The parameter 'nprocs' must be set to 1.
Linux/UNIX
----------
*) 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
threads using OpenMP. The parameter '-mpi n' specifies
a parallel run on n cores 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.
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 multi-core processors.
The run procedure will cycle through this list until
all the requested processes are launched. Example file:
node1
node2:2
node4
node7:4