Newsgroups: comp.parallel.mpi
From: dds@flavors.com (David D. Smith)
Subject: Re: Hypercube topology
Organization: Flavors Technology, Inc.
Date: Wed, 01 Apr 1998 13:27:11 -0500
Message-ID: <dds-0104981327120001@p99.bit-net.com>

In article <6ftd2h$45q$1@fu-berlin.de>, dahm@inf.fu-berlin.de (Markus
Dahm) wrote:

> has anyone a short example at hands that uses MPI_Graph_create and
> the like to order processors in a hypercube topology? I'd need this
> for demonstration purposes.

I don't know anything about MPI, but I was one of the authors of CCLisp
for the Intel iPSC long ago.

To enumerate the neighbors of a node in a Dx hypercube, simply invert each
of the x bits of the nodes Number.

i.e. In a D5 Hypercube

Node 0 has neighbors: 1 2 4 8 16.

00000

00001
00010
00100
01000
10000

Node 1 has neighbors: 0 3 5 9 17, etc.

00001

00000
00011
00101
01001
10001

Other enumerations are possible, but ...

d

