![]() Home
|
To run a WMPI program it is necessary
to set two configuration files first. Since WMPI is able to use any number
of devices simultaneously it is necessary to indicate which device is used
to communicate with each computer, hence a Cluster
Configuration file is needed.
As in the former versions of WMPI
a Process Group file is necessary to identify
which machines will participate in the computation, which programs are
to be executed and the number of processes that are to run on that computer.
This new version adds the possibility to introduce independent arguments
to each executable.
In order to better adapt WMPI to your environment two environment variables are available. As in previous versions, to actually run a parallel program using WMPI you only have to execute the first process (aka Big Master), which will read the configuration files and start all the other processes. Note: The WMPI DLL must be present
in the current directory of the executables or in the system PATH environment
variable.
Cluster
Configuration
The configuration file has two different parts: the definition of the machines and the devices that these use, and; the definition of how the processes of each machine contacts all the others. The section of how the machines are defined has to start with the string “/Machines” and ends when the string “/Devices” is found. This last string indicates that the rest of the configuration file contains the definition of how the processes communicate. Definition of the machines:
Each entry starts with the identification of a machine, which is its Windows Computer Name (Start->Settings->Control Panel->Network->Identification). After the name of each machine the user has to specify the devices that the machine uses to communicate with the other machines. For each device the machine has an identifier which is unique within that device (e.g. in the TCP device it is the IP number of the machine). An example of an entry to specify
the machine mountain, which has the devices tcp and shmem,
is:
Definition of the communication device between processes: After defining all the machines it
is necessary to indicate how the processes of every machine communicate
with all other processes. Default communication devices can be introduced
for communication between processes that are running in the same machine
(internal) and for processes that are running in other machines (external).
The user may also specify different devices to connect specific machines.
An example of a configuration file
is:
This configuration file specifies three (3) different machines. Two of them have devices tcp and shared memory. The third one (pacific) only uses the device tcp. When configuring the devices it is specified that, by default, to communicate with a process that runs in the same machine, shared memory is used. When communicating with a processes in a remote machine, tcp is used. A special situation is the third machine, which does not have a shared memory device and so it is specified that the processes running within it should use the device tcp to communicate with each other. The hash mark (#) may be used to place comments in the configuration file. It is advised to build a configuration file with a superset of machines that are normally used. This file can then be used for all the different computations Note: The default configuration file name is wmpi.clusterconf and must be in the same directory as the first executed program. Unless the WMPI_CLUSTER_CONF_FILE environment variable is specified. Process
Group File
The Windows Computer Name (the same as in the Cluster Configuration file) identifies each machine. Then the user has to specify the number of processes to run on that machine, the executable is specified afterwards. The executable path must be inserted from the point of view of the machine where the program is located. Finally, user may insert arguments for the processes that will run the executable. An example of a Process Description file is:
A computation that uses this file has five (5) processes, even though only 4 are specified in the process description file. The fifth process is the process started by the user and which will read this configuration file. The first executable is chosen by the user and the arguments are introduced in the command line to start the process. The MPI ranks of the processes are derived from the order in which the processes entries are introduced in the configuration file. The process that the user starts is the process with rank 0 (zero), the other processes are ranked as they are listed in the configuration file. In this case the process with rank 1 (one) and 2 (two) run in mountain with arguments “1000” and “256”. Process with rank 3 (three) runs in squirrel executing (an executable that is in a shared directory of mountain) with arguments “1000” and “512”. Finally process number 4 (four) runs in pacific with arguments "2000" and "256". The hash mark (#) may be used to place comments in the configuration file. Note: The Process Group file must have the same filename has the first executed process and must be in the same directory (e.g. myprogram.pg). Environment
Variables
WMPI_PATH - When starting a
new process the WMPI will try to find the exe in the path contained in
this environment variable. If it is not found uses the normal Windows NT
algorithm to find the executable.
Note: Oppositte to the devices' DLLs, the WMPI DLL is loaded implicitly to memory, hence we have no control to where the system should find it. This DLL must be present in the same directory of the executable or in the system PATH environment variable. |