Purpose
Defines a cartesian grid to balance tasks.
C synopsis
#include <mpi.h> MPI_Dims_create(int nnodes,int ndims,int *dims);
C++ synopsis
#include mpi.h void MPI::Compute_dims(int nnodes, int ndims, int dims[]);
FORTRAN synopsis
include 'mpif.h' or use mpi
MPI_DIMS_CREATE(INTEGER NNODES,INTEGER NDIMS,INTEGER DIMS(*),
INTEGER IERROR)
Parameters
Description
This subroutine creates a cartesian grid with a given number of dimensions and a given number of nodes. The dimensions are constrained to be as close to each other as possible.
If dims[i] is a positive number when MPI_DIMS_CREATE is called, the routine will not modify the number of nodes in dimension i. Only those entries where dims[i]=0 are modified by the call.
Notes
MPI_DIMS_CREATE chooses dimensions so that the resulting grid is as close as possible to being an ndims-dimensional cube.
Errors
Related information