[mpich2-dev] Cartesian space process topology

Rajeev Thakur thakur at mcs.anl.gov
Mon Oct 22 12:11:03 CDT 2012


It should. You can use MPI_Cart_get to verify the coordinates of each process.

Rajeev

On Oct 22, 2012, at 7:37 AM, Lukáš Pavlech wrote:

> Hello,
> 
> As a part of my Master Thesis, I am currently working on some agent simulations in fire buildings using Repast HPC. Repast HPC use MPI inteface for process communication - in my case MPICH2 implementation. At simulation start space is divided to processes using MPI_Cart_create and MPI_Cart_shift commands.
> 
> Specifically:
> 
> boost::mpi::communicator commM;
> int _numDims = 2; (kedže sa jedná o 2D priestor)
> (kde dany priestor je periodicky)
> int* periods = new int[_numDims];
> for (int i = 0; i < _numDims; i++) {
> periods[i] = periodic ? 1 : 0;
> }
> MPI_Comm topology_comm;
> 
> MPI_Cart_create(*commM, _numDims, &procsPerDim[0], periods, 0, &topology_comm);
> 
> int eRank, wRank, nRank, sRank;
> MPI_Cart_shift(topology_comm, 1, 1, &wRank, &eRank);
> MPI_Cart_shift(topology_comm, 0, -1, &sRank, &nRank);
> 
> After successfull run of these commands, will be the topology structure the same as the structure in attached image?
> Thanks in advance
> 
> Best Regards
> Lukas Pavlech
> <Cartesian_topology.gif>



More information about the mpich2-dev mailing list