Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.

Cluster programming

minal_c_
Beginner
756 Views

Hello everyone    I am new to cluster programming in MPI. I have a master-slave program structure. Can anyone tell me, how to execute my MPI program on thi type of setup?
 

0 Kudos
1 Reply
James_T_Intel
Moderator
756 Views

The answer depends on how you have your program set up.  If you are using a single program that recognizes based on rank number whether it is a master or slave, then you simply run as normal.  For example, if you are running 64 total ranks, using the hostfile ./hosts, you would run:

[plain]mpirun -f ./hosts -n 64 ./a.out <args>[/plain]

If you have one binary for the master and a different binary for the slave, you can use an argument set to run.  So if you have 1 master rank and 63 slave ranks, you'd use:

[plain]mpirun -f ./hosts -n 1 ./master <master args> : -n 63 ./slave <slave args>[/plain]

Sincerely,
James Tullos
Technical Consulting Engineer
Intel® Cluster Tools

0 Kudos
Reply