petsc-3.3-p7 2013-05-11

PetscSFGetWindow

Get a window for use with a given data type

Synopsis

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_SYNCHRONIZATION_FENCE
postassert - assert parameter for call to MPI_Win_post(), if PETSCSF_SYNCHRONIZATION_ACTIVE
startassert - assert parameter for call to MPI_Win_start(), if PETSCSF_SYNCHRONIZATION_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(), PetscSFGetDataTypes()

Level:developer
Location:
src/sys/sf/sf.c
Index of all PetscSF routines
Table of Contents for all manual pages
Index of all manual pages