next up previous
Next: Skeleton code for migration Up: Particle migration Previous: The problem

Creating a 3D topology


Creating a 3D Topology

int dims[3]={0,0,0}, periods[3]={0,1,1};
int reorder=0, nprocs, ierr;
MPI_Comm comm, comm3d;

ierr = MPI_Comm_size (comm, &nprocs);
ierr = MPI_Dims_create (nprocs, ndims, dims);
ierr = MPI_Cart_create (comm, ndims, dims,
                        periods, reorder, comm3d);



David W Walker
Mon Jan 20 11:10:22 GMT 1997