MPI_CART_CREATE(3)MPI_CART_CREATE(3)NAMEMPI_Cart_create - Makes a new communicator to which topology information
has been attached
SYNOPSIS
C:
#include <mpi.h>
int MPI_Cart_create ( comm_old, ndims, dims, periods,
reorder, comm_cart )
MPI_Comm comm_old;
int ndims;
int *dims;
int *periods;
int reorder;
MPI_Comm *comm_cart;
C++:
#include <mpi.h>
Cartcomm Intracomm::Create_cart(
int ndims,
const int dims[],
const bool periods[],
bool reorder) const
Fortran:
INCLUDE "mpif.h" (or USE MPI)
INTEGER comm_old, ndims, dims(*), comm_cart,
ierror
LOGICAL periods(*), reorder
CALL MPI_CART_CREATE(comm_old, ndims, dims(*),
periods(*), reorder, comm_cart, ierror)
STANDARDS
This release implements the MPI 1.2 standard, as documented by the MPI
Forum in the spring 1997 release of MPI: A Message Passing Interface
Standard.
DESCRIPTION
The MPI_Cart_create routine makes a new communicator to which topology
information has been attached. This routine accepts the following
parameters:
Page 1
MPI_CART_CREATE(3)MPI_CART_CREATE(3)
comm_old Specifies the input communicator (handle)
ndims Specifies the number of dimensions of the Cartesian grid
(integer)
dims Specifies the integer array of size ndims, which specifies
the number of processes in each dimension
periods Specifies a logical array of size ndims, which specifies
whether the grid is periodic (true) or not (false) in each
dimension
reorder Specifies that ranking can be reordered (true) or not
(false) (logical)
comm_cart Returns a communicator with new Cartesian topology
(handle)
ierror Specifies the return code value for successful completion,
which is in MPI_SUCCESS. MPI_SUCCESS is defined in the
mpif.h file.
NOTES
Currently, the periods are ignored and information is reordered.
Page 2