Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] How to Read the Rank from the MPI_TASK
From: Ralph Castain (rhc_at_[hidden])
Date: 2013-05-10 16:44:51

I don't remember back to 1.4.3, but I think it was true even that long ago - we provide an environmental variable OMPI_COMM_WORLD_RANK that holds the rank of the process

On May 10, 2013, at 1:39 PM, deepak mehta <godeepakm_at_[hidden]> wrote:

> Hello All,
> I am new user to this mailing list and am trying to get familiar with mpi.
> I am using open mpi version 1.4.3
> I have a simple shell script that I have written
> The Shell Script that I have is as follows
> <code>
> #!/bin/bash
> echo " Hello World from Rank $rank"
> <code>
> The MPI Command that I am executing is as follows
> mpirun -np 3
> What I want to know how what parameter do I need to pass from the mpirun command line so that I can read the rank for each task within my helloWorld Shell Script.
> Please excuse me if this is a duplicate entry. I have searched through all the forums and did not get the answer to my question.
> Thanks in advance for all your help.
> Regards,
> Deepak
> _______________________________________________
> users mailing list
> users_at_[hidden]