MPICH Database Server
The database server, mpichdbs.exe, is a program which manages a database to be used by mpich applications.
Usage:
Running as a database server:
mpichdbs
When run without any arguments, mpchdbs acquires a port and becomes a database server, waiting in a loop for incoming tcp connection requests. Remote clients can then connect and issue commands to the database.
mpichdbs -port portnumber
This option forces the server to use a specific port. This is useful if you want to stop and start the database server without having to change the mpirun configuration files or scripts.
Running as a database client:
mpichdbs -feed filename host port
With this option the program does the following:
mpichdbs -connect host port id
With this option the program does the following:
MPICH Job configuration file formats:
1)
id shortuniquestring
[env var1=val1|var2=val2...]
nproc numberofprocesses
2)
id shortuniquestring
[env var1=val1|var2=val2...]
hosts
hostA nprocesses
hostB nprocesses
...
The bracketed lines are optional. The second format is similar to the configuration files used by MPIRun. In fact the same file can be used by both programs because they ignore lines that they don't understand (mpirun ignores the 'id' line and mpichdbs ignores the 'exe', 'arg', etc lines).
Using the database server to launch mpich applications:
If you have a launcher for your cluster that can provide only a single environment for all processes launched then you can use the database server in conjunction with your launcher to start mpich applications:
mpichdbs.exe -port 1234
This process will hang around until "exit" or "quit" is entered.
id
job1
nproc 3
mpichdbs.exe -feed job.txt HostA 1234
MPICH_JOBID=job1
MPICH_DBS_HOST=HostA
MPICH_DBS_PORT=1234
or
MPICH_JOBID=job1
MPICH_DBS=HostA:1234
Steps 1 and 7 need only occur once because the database server can be used repeatedly for multiple jobs.