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