petsc-3.7.1 2016-05-15
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 Many br

Input Arguments

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

Output Arguments

win -window Many br

Many br

Developer Notes

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

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