# PetscMapCreateMPI

Creates a map object.

### Synopsis

    #include "petscvec.h"
    PetscErrorCode PETSCVEC_DLLEXPORT PetscMapCreateMPI(MPI_Comm comm,PetscInt n,PetscInt N,PetscMap *m)

Collective on MPI_Comm

### Input Parameters

| comm | - the MPI communicator to use
| n | - local vector length (or PETSC_DECIDE to have calculated if N is given)
| N | - global vector length (or PETSC_DECIDE to have calculated if n is given)

### Output Parameter

mm -the map object

### Suggested by

Robert Clay and Alan Williams, developers of ISIS++, Sandia National Laboratories.

### C++ variants

| PetscMap PetscMapCreateMPI(MPI_Comm comm,PetscInt l,PetscInt g) |  | -> |  | PetscMapCreateMPI(comm,l,g,&m); return m;

### See Also

PetscMapDestroy(), PetscMapGetLocalSize(), PetscMapGetSize(), PetscMapGetGlobalRange(),
PetscMapGetLocalRange()

Level:developer
Location:src/vec/impls/mpi/pmap.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages