Open MPI logo

Open MPI User's Mailing List Archives

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

From: Sefa Arslan (sefa_at_[hidden])
Date: 2007-05-12 05:25:12


Hi,

I need to use rank of the mpi processes in my sub functions ( c
language). which one has more cost?;
    creating a new variable& and finding the rank in each sub function by:
        int mpi_rank;
        MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank);

    or finding the rank in main function once, and every time sending
this information to the functions in function arguments like
    foo(a,b,c,mpi_rank);