Text-only Table of Contents (frame/ no frame)
(11) How to Run MPI Programs Interactively Previous Top Next

How to Run MPI Programs Interactively


MPICH mpirun command starts up MPI programs

where do the processes run:
Use mpirun -help to see command line options

On andes SMP computer:


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]$ mpirun -np 4  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 4 -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
/home/sas/Classes/intro_mpi/hello_world_c -p4pg /home/sas/Classes/intro_mpi/PI11653 \
 -p4wd /home/sas/Classes/intro_mpi

[sas@t01]$ cat machine.file
t01
t01
t01
t01
t02
t02
t02
t02

[sas@t01]$ mpirun -np 8 -t -machinefile machine.file 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
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


Previous Top Next


running_mpi_ex.src  last modified Apr 25, 2007 Introduction Table of Contents
(frame/no frame)
Printable
(single file)
© Dartmouth College