Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## A simple mpi program which outputs the rank and size of the MPI pool.
- Save the following program as say `test.py`.
- ```
- #!/usr/bin/env python
- from mpi4py import MPI
- from subprocess import call
- comm = MPI.COMM_WORLD
- print comm.rank, comm.size
- #cmd = "processCcd.py DATA --rerun processCcdOutputs --id visit=%d ccd=%d" % (visit, ccd)
- cmd = "sleep 120"
- call(cmd, shell=1)
- ```
- Run the program using:
- ```
- mpirun python test.py
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement