Newsgroups: comp.parallel.mpi,cs.questions
From: A Gordon Smith <smith>
Subject: Re: MPI & trees
Organization: Department of Computer Science, Edinburgh University
Date: Mon, 5 Feb 1996 11:42:00 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <DMAwI1.Jy7.0.staffin.dcs.ed.ac.uk@dcs.ed.ac.uk>

nxm@dcs.ed.ac.uk (Nikos Massios) wrote:
>
>I am currently trying to implement a tree like topology for one of
>my programs. I found out about MPI_GRAPH in the MPI standard. I was wondering
>if there is a way to make a neighbors of a node the parent and some of them
>the children. The only idea I have is to keep a different data structure to
>keep this parent - children information inside it. It looks though like
>too much hassle. Any alternative ideas?
>
>Nikos.


Maybe an easier way to do this would be to have two communicators
containing the same processes, and both having GRAPH topology. One
could express the parent relationship, the other the child. Eg.


       0           Parent: nnodes=4, index={ 0,1,1,1 }, edges={ 0,0,2 }
      / \
     1   2         Child: nnodes=4, index={ 2,0,1,0 }, edges={ 1,2,3 }
          \
           3

You could "couple" the communicators by retaining the counterpart's
handle in the cache of each communicator. Even if you decide to
use your own data structure instead, it's useful to cache it within
the communicator, see MPI Standard sec 5.7.

Just a quick Monday morning thought..

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 -=-=- A. Gordon Smith -=- Edinburgh Parallel Computing Centre -=-=-
 =-=  mailto:smith@epcc.ed.ac.uk -=- Phone {+44 (0)131 650 6712} =-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


