Subject: Re: [OMPI docs] reorder mpi rank
From: e83aw6t02_at_[hidden]
Date: 2008-01-09 21:14:36


Hi. I don't think that this is a support emailing list. That's
definitely better suited for users_at_open-mpi.org.
But, to answer your question, the fastest way I can think of is
something along the lines of

MPI_Comm myNewComm;
MPI_Comm_split(MPI_COMM_WORLD,0,myNewRank,&myNewComm);

(see docs: http://www-unix.mcs.anl.gov/mpi/www/www3/MPI_Comm_split.html)
That won't change the existing rank inside of MPI_COMM_WORLD (I don't
think that's possible), but it will create a new comm object (myNewComm)
you can use instead (where each node has a new rank that you helped
specify (though if two nodes specified the same key (myNewRank) then
there will be some tie-breaking and you'll have to lookup the new rank
using MPI_Comm_rank)).

Sean Ross-Ross srossross-at-gmail.com |openmpi/Allow| wrote:
> Is there a way to reorder the mpi rank at runtime or otherwise?
>
> I have a program that makes files on each local node in somewhat of a
> random fashion. I want to these files to correspond to a part of a
> PETSc Distributed array used in another software package. My problem
> is that PETSc expects these windows of data to be on a certain
> ranking node. It seems that an easy solution may be to change the
> rank of the nodes to correspond with the PETc array.
>
> Thank you for your help
> ~Sean
>
> _______________________________________________
> docs mailing list
> docs_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/docs

-- 
--Kris
叶ってしまう瘢雹夢は本当の夢と言えん。
[A dream that comes true can't really be called a dream.]