MPI Subroutine Reference
Purpose
Computes placement of tasks on the physical processor.
C synopsis
#include <mpi.h>
MPI_Cart_map(MPI_Comm comm,int ndims,int *dims,int *periods,
int *newrank);
C++ synopsis
#include mpi.h
int MPI::Cartcomm::Map(int ndims, const int dims[],
const bool periods[]) const;
FORTRAN synopsis
include 'mpif.h' or use mpi
MPI_CART_MAP(INTEGER COMM,INTEGER NDIMS,INTEGER DIMS(*),
INTEGER PERIODS(*),INTEGER NEWRANK,INTEGER IERROR)
Parameters
- comm
- is the input communicator (handle) (IN)
- ndims
- is the number of dimensions of the cartesian structure (integer) (IN)
- dims
- is an integer array of size ndims specifying the number of tasks
in each coordinate direction (IN)
- periods
- is a logical array of size ndims specifying the periodicity in
each coordinate direction (IN)
- newrank
- is the reordered rank or MPI_UNDEFINED if the calling task does not belong
to the grid (integer) (OUT)
- IERROR
- is the FORTRAN return code. It is always the last argument.
Description
MPI_CART_MAP allows MPI to compute an optimal placement for the calling
task on the physical processor by reordering the tasks in
comm.
Notes
The rank determined by MPI_CART_MAP depends on the distribution of
task per node. The value may or may not match rank in
MPI_COMM_WORLD.
Errors
- MPI not initialized
-
- MPI already finalized
-
- Invalid communicator
-
- Invalid communicator type
- must be intracommunicator
- Invalid ndims
- ndims < 1 or ndims > groupsize
- Invalid dimension
- ndims[i] <= 0
- Invalid grid size
- n< 0 or n > groupsize, where n
is the product of dims[i]
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]