Fix bug in domain decomposition with MPI Cart

This commit is contained in:
Jan Eitzinger 2023-06-18 07:53:01 +02:00
parent a49a31f281
commit 1d99310b2e

View File

@ -333,8 +333,8 @@ void initSolver(Solver* solver, Parameter* params)
&solver->jNeighbours[1]);
MPI_Cart_get(solver->comm, NDIMS, solver->dims, periods, solver->coords);
solver->imaxLocal = sizeOfRank(solver->rank, dims[IDIM], solver->imax);
solver->jmaxLocal = sizeOfRank(solver->rank, dims[JDIM], solver->jmax);
solver->imaxLocal = sizeOfRank(solver->coords[IDIM], dims[IDIM], solver->imax);
solver->jmaxLocal = sizeOfRank(solver->coords[JDIM], dims[JDIM], solver->jmax);
MPI_Datatype jBufferType;
MPI_Type_contiguous(solver->imaxLocal, MPI_DOUBLE, &jBufferType);