petsc-3.10.5 2019-03-28
Report Typos and Errors

# PetscShmCommGlobalToLocal

Given a global rank returns the local rank in the shared memory communicator

### Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscShmCommGlobalToLocal(PetscShmComm pshmcomm,PetscMPIInt grank,PetscMPIInt *lrank)

### Input Parameters

| pshmcomm | - the shared memory communicator object
| grank | - the global rank

### Output Parameter

lrank -the local rank, or MPI_PROC_NULL if it does not exist

### Developer Notes

Assumes the pshmcomm->globranks[] is sorted

It may be better to rewrite this to map multiple global ranks to local in the same function call

### Level

developer

### Location

src/sys/utils/mpishm.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages