Skip to content
Snippets Groups Projects
Commit f260bd91 authored by Stephan Schulz's avatar Stephan Schulz
Browse files

set procGridLoc, procGridDim for cartesian communicator

parent aabd2ada
No related branches found
No related tags found
1 merge request!8Refactor
This commit is part of merge request !12. Comments created here will be created in the context of that merge request.
...@@ -204,6 +204,15 @@ public: ...@@ -204,6 +204,15 @@ public:
if ( comm_type == MPI_CART) { if ( comm_type == MPI_CART) {
communicator = comm; communicator = comm;
balancer->setCommunicator(communicator); balancer->setCommunicator(communicator);
// set procGridLoc and procGridDim
const int dimension = balancer->getDimension();
int location[dimension];
int size[dimension];
int periodicity[dimension];
MPI_Cart_get(communicator, dimension, size, periodicity, location);
procGridLoc.assign(location, location+dimension);
procGridDim.assign(size, size+dimension);
procGridSet = true;
} else { } else {
int rank; int rank;
MPI_Comm_rank(comm, &rank); MPI_Comm_rank(comm, &rank);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment