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

PetscSFGetWindow

Get a window for use with a given data type

Synopsis

#include "petscsf.h" 
static PetscErrorCode PetscSFGetWindow(PetscSF sf,MPI_Datatype unit,void *array,PetscBool epoch,PetscMPIInt fenceassert,PetscMPIInt postassert,PetscMPIInt startassert,MPI_Win *win)
Collective on PetscSF

Input Arguments

sf - star forest
unit - data type
array - array to be sent
epoch - PETSC_TRUE to acquire the window and start an epoch, PETSC_FALSE to just acquire the window
fenceassert - assert parameter for call to MPI_Win_fence(), if PETSCSF_WINDOW_SYNC_FENCE
postassert - assert parameter for call to MPI_Win_post(), if PETSCSF_WINDOW_SYNC_ACTIVE
startassert - assert parameter for call to MPI_Win_start(), if PETSCSF_WINDOW_SYNC_ACTIVE

Output Arguments

win -window

Developer Notes

This currently always creates a new window. This is more synchronous than necessary. An alternative is to try to reuse an existing window created with the same array. Another alternative is to maintain a cache of windows and reuse whichever one is available, by copying the array into it if necessary.

See Also

PetscSFGetRanks(), PetscSFWindowGetDataTypes()

Level

developer

Location

src/vec/is/sf/impls/window/sfwindow.c
Index of all PetscSF routines
Table of Contents for all manual pages
Index of all manual pages