How to Run MPICH-1 Programs Interactively
MPICH-1 mpirun command starts up MPI programs
where do the processes run:
- SMP computer - any processors that are available
- Distributed Computer
- (default) nodes in file /MPICH_DIR/share/machines.ARCH (for example: machines.LINUX)
- use the machinefile option to mpirun to specify nodes to run on
- always runs one process on node where mpirun comand was executed (unless -nolocal mpirun option used)
On SMP computer line andes:
andes:~> mpirun -np 4 hello_world_c
Hello world from process 1 of 4
Hello world from process 2 of 4
Hello world from process 3 of 4
Hello world from process 0 of 4
On Discovery cluster interactive nodes t01,t02,t03:
[sas@t01]$ cat machine.file
t01
t01
t01
t01
t02
t02
t02
t02[sas@t01]$ mpirun -np 4 -machinefile machine.file hello_world_c
Hello world from process 0 of 4
Hello world from process 1 of 4
Hello world from process 3 of 4
Hello world from process 2 of 4[sas@t01]$ mpirun -np 8 -t hello_world_c
Procgroup file:
t01.bw01.dartmouth.edu 0 /home/sas/Classes/intro_mpi/hello_world_c
t01 1 /home/sas/Classes/intro_mpi/hello_world_c
t01 1 /home/sas/Classes/intro_mpi/hello_world_c
t01 1 /home/sas/Classes/intro_mpi/hello_world_c
t01 1 /home/sas/Classes/intro_mpi/hello_world_c
t02 1 /home/sas/Classes/intro_mpi/hello_world_c
t02 1 /home/sas/Classes/intro_mpi/hello_world_c
t02 1 /home/sas/Classes/intro_mpi/hello_world_c
t02 1 /home/sas/Classes/intro_mpi/hello_world_c
/home/sas/Classes/intro_mpi/hello_world_c -p4pg /home/sas/Classes/intro_mpi/PI11653 \
-p4wd /home/sas/Classes/intro_mpi