petsc-3.9.4 2018-09-11
Report Typos and Errors

PetscCommSharedGlobalToLocal

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

Synopsis

#include "petscsys.h"   
PetscErrorCode  PetscCommSharedGlobalToLocal(PetscCommShared scomm,PetscMPIInt grank,PetscMPIInt *lrank)

Collective on comm.

Input Parameters

scomm - the shared memory communicator object
grank - the global rank

Output Parameter

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

Notes

When used with MPICH, MPICH must be configured with --download-mpich-device=ch3:nemesis

Developer Notes: Assumes the scomm->ranks[] 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/objects/tagm.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages