Ashley Pittman wrote:

> For a much simpler approach you could also use these two environment
variables, this is on my current system which is 1.5 based, YMMV of course.
> 
> OMPI_COMM_WORLD_LOCAL_RANK
> OMPI_COMM_WORLD_LOCAL_SIZE

That is simpler.  It works on OMPI 1.4.3 too:

cat >/usr/common/bin/dumpev.sh <<EOD
#!/bin/bash
set
EOD
mpirun -np 4 --host monkey01 --mca plm_rsh_agent rsh
/usr/common/bin/dumpenv.sh | grep LOCAL_RANK
OMPI_COMM_WORLD_LOCAL_RANK=0
OMPI_COMM_WORLD_LOCAL_RANK=1
OMPI_COMM_WORLD_LOCAL_RANK=2
OMPI_COMM_WORLD_LOCAL_RANK=3

Thanks,

David Mathog
mat...@caltech.edu
Manager, Sequence Analysis Facility, Biology Division, Caltech

Reply via email to