NAME
MMPPIICCaarrttccrreeaattee - Makes a new communicator to which Cartesian topology
information has been attached. SSYYNNTTAAXX CC SSyynnttaaxx#include
int MPICartcreate(MPIComm commold, int ndims, int *dims, int *periods, int reorder, MPIComm *commcart) FFoorrttrraann SSyynnttaaxx INCLUDE 'mpif.h' MPICARTCREATE(COMMOLD, NDIMS, DIMS, PERIODS, REORDER,COMMCART, IERROR)
INTEGER COMMOLD, NDIMS, DIMS(*), COMMCART, IERROR
LOGICAL PERIODS(*), REORDER CC++++ SSyynnttaaxx#include
Cartcomm Intracomm::Createcart(int ndims, const int dims[], const bool periods[], bool reorder) const IINNPPUUTT PPAARRAAMMEETTEERRSS commold Input communicator (handle). ndims Number of dimensions of Cartesian grid (integer).dims Integer array of size ndims specifying the number of pro-
cesses in each dimension. periods Logical array of size ndims specifying whether the grid is periodic (true) or not (false) in each dimension. reorder Ranking may be reordered (true) or not (false) (logical). OOUUTTPPUUTT PPAARRAAMMEETTEERRSS commcart Communicator with new Cartesian topology (handle).IERROR Fortran only: Error status (integer).
DESCRIPTION
MPICartcreate returns a handle to a new communicator to which the Cartesian topology information is attached. If reorder = false then the rank of each process in the new group is identical to its rank in the old group. Otherwise, the function may reorder the processes (possiblyso as to choose a good embedding of the virtual topology onto the phys-
ical machine). If the total size of the Cartesian grid is smaller than the size of the group of comm, then some processes are returned MPICOMMNULL, in analogy to MPICommsplit. The call is erroneous if it specifies a grid that is larger than the group size. EERRRROORRSS Almost all MPI routines return an error value; C routines as the valueof the function and Fortran routines in the last argument. C++ func-
tions do not return errors. If the default error handler is set toMPI::ERRORSTHROWEXCEPTIONS, then on error the C++ exception mechanism
will be used to throw an MPI:Exception object. Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed withMPICommseterrhandler; the predefined error handler MPIERRORSRETURN
may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. Open MPI 1.2 September 2006 MPICartcreate(3OpenMPI)