|
There are two ways to start a csWMPI II computation, either by executing your csWMPI II application
directly from command line or by using mpiexec.
You can start the first process in the local machine by running a csWMPI II application
directly, either by double-clicking on the application in Explorer (in MS Windows) or by running it from
command-line. The application will read the configuration files and start the processes specified
in the process group file. Notice
that the initial process started by the user is not counted when the process group file is read.
E.g. if the process group file specifies 4 processes, then the computation will have 5 process, the
one started by the user and the 4 that specified in the configuration file.
mpiexec is a MPI-2 standard tool start MPI applications (See page 37 of the MPI-2
specification).
Usage:
| mpiexec |
-configfile <pg file name> [-cluster <cluster conf file>]
[-input <inputfile>] |
| mpiexec |
-n <number of procs> [-cluster <clusterconf file>]
[-host <target machines>] [-input <inputfile>]
[-wdir <working-dir>] [-noprefix]
[-path <path-list>] [-env <var1=value1;var2=value2;...>]
[-map <drive1=share1;drive2=share2;...>] [-nompi|-nompiperm]
executable [arguments] |
| mpiexec |
-help |
| Option: |
Description: |
| -configfile <pg file> |
Sets the name of the process group file. |
| -cluster <cluster conf file> |
Specifies the name of the cluster configuration file. If no name is given,
mpiexec will use the file specified in the csWMPI II_CLUSTER_CONF_FILE environment
variable. If the environment variable is not set, it will try to use the
default file called csWMPI II.clusterconf. The default file must be in the working
directory.
|
| -n <number of procs> |
Number of processes to start. |
| -host <target machines> |
Hosts that will run the processes. It can be a single
host or a list of hosts separated by ';'. The processes will be
distributed evenly by all hosts. The "." wildcard can be used to
specify localhost. Example: -host ideafix;asterix |
| -input <inputfile> |
The contents of <inputfile> will be forwarded to
rank 0's standard input.
|
| -wdir <working-dir> |
The working directory of the created process(es). |
| -noprefix |
By default, mpiexec adds "Rank <n>: " for each process
output line. This option disables that prefix.
|
| -path <path-list> |
A list of paths separated by ':' or ';' to search for
the executable. This list may contain all the different
paths for the different nodes. If path contains spaces
please use quotes at the beginning and end of the list.
A '.' wildcard will be expanded to current directory.
Example: -path "C:\my apps;/home/apps" |
| -env <var1=value1;var2=value2;...> |
A list of environment variables to be set on
processes. The variables separator can be either ';' or '|'
In case a PATH variable is defined here, it will be added, rather overwriting, to the PATH environment
variable of each csWMPI II Service/Daemon when starting the processes. Notice this PATH will not be
set when looking for the mpi executable. For that you should use the -path
option.
Example: -env "VAR1=value1;VAR2=value2" |
| -map <drive1=share1;drive2=share2;...> |
A list of network drive maps when creating the
processes. The drive maps separator is ';'
Example: -map "X:=\\ideafix\tests;Y:=\\asterix\outputs" |
| -nompi |
The created process is not an mpi process, but it will
create a child mpi process. Common behavior when using
some debuggers or schedulers. In case MPI computation
aborts, this process will also be terminated.
|
| -nompiperm |
The created process is not an mpi process, but it will
create a child mpi process. Common behavior when using
some debuggers or schedulers.In case MPI computation
aborts, this process will not be terminated.
|
| executable |
The name csWMPI II application to run, optionally including the full path,
which has to be valid on all machines. If a fully qualified executable
name is not specified, csWMPI II attempts to locate the executable
in the paths specified and in the PATH
environment variable of each system.
|
| arguments |
List of arguments to be passed to the processes. |
| -help |
Displays the extended usage. |
Examples
mpiexec -configfile pi_calc.pg -cluster my_cluster.clusterconf
|
This command starts an execution using the cluster configuration specified in the my_cluster.clusterconf
file and process group configuration specified in pi_calc.pg.
If the cluster configuration file is not specified the default will be used (named
csWMPI II.clusterconf).
To learn more about the
Cluster Configuration and
Process Group files see section
Configuring csWMPI II.
mpiexec -n 5 -cluster my_cluster.clusterconf pi_calc.exe
|
This command starts 5 processes running the pi_calc.exe executable in
the machines specified in the my_cluster.clusterconf file.
The number of processes is evenly distributed among all the machines specified in the
cluster configuration file. If the number of processes is not a multiple of the number
of machines, then the remainder is distributed to machines by the order in which the
machines are specified in the cluster configuration file. The executable is searched in
the PATH of each machine. No arguments are passed to the
processes.
mpiexec -n 4 -host pacific c:\csWMPI II_II\pi_calc.exe 1000
|
This command starts 4 processes on the machine pacific, which has to be specified
in the default cluster configuration file since no -cluster argument is given. All
processes are passed the argument with value "1000".
Input and Output
When using mpiexec, the standard output (stdout) and standard error (stderr) of each process
is redirected to the mpiexec console window. It is recommended to execute
a flush after the printf (or similar) and to end the line with a \n.
The input of the mpiexec console window is redirected to the process ranked 0.
|