MPI Subroutine Reference
Purpose
Retrieves cartesian topology information from a communicator.
C synopsis
#include <mpi.h>
MPI_Cart_get(MPI_Comm comm,int maxdims,int *dims,int *periods,int *coords);
C++ synopsis
#include mpi.h
void MPI::Cartcomm::Get_topo(int maxdims, int dims[],
bool periods[], int coords[]) const;
FORTRAN synopsis
include 'mpif.h' or use mpi
MPI_CART_GET(INTEGER COMM,INTEGER MAXDIMS,INTEGER DIMS(*),
INTEGER PERIODS(*),INTEGER COORDS(*),INTEGER IERROR)
Parameters
- comm
- is a communicator with cartesian topology (handle) (IN)
- maxdims
- is the length of dims, periods, and coords in the
calling program (integer) (IN)
- dims
- is the number of tasks for each cartesian dimension (array of integer)
(OUT)
- periods
- is a logical array specifying if each cartesian dimension is periodic or
not. (OUT)
- coords
- is the coordinates of the calling task in the cartesian structure (array
of integer) (OUT)
- IERROR
- is the FORTRAN return code. It is always the last argument.
Description
This subroutine retrieves the cartesian topology information associated
with a communicator in dims, periods and coords.
Errors
- MPI not initialized
-
- MPI already finalized
-
- Invalid communicator
-
- No topology
-
- Invalid topology type
- must be cartesian
- Invalid array size
- maxdims < 0
Related information
- MPI_CART_CREATE
- MPI_CARTDIM_GET
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]