petsc-3.13.6 2020-09-29
Report Typos and Errors

PetscSFWindowSetFlavorType

Set flavor type for MPI_Win creation

Synopsis

#include "petscsf.h" 
PetscErrorCode PetscSFWindowSetFlavorType(PetscSF sf,PetscSFWindowFlavorType flavor)
Logically Collective

Input Arguments

sf - star forest for communication
flavor - flavor type

Options Database Key

-sf_window_flavor <flavor> -sets the flavor type CREATE, DYNAMIC, ALLOCATE or SHARED (see PetscSFWindowFlavorType)

Notes: Windows reusage follow this rules

PETSCSF_WINDOW_FLAVOR_CREATE: creates a new window every time, uses MPI_Win_create

PETSCSF_WINDOW_FLAVOR_DYNAMIC: uses MPI_Win_create_dynamic/MPI_Win_attach and tries to reuse windows by comparing the root array. Intended to be used on repeated applications of the same SF, e.g. for i=1 to K PetscSFOperationBegin(rootdata1,leafdata_whatever); PetscSFOperationEnd(rootdata1,leafdata_whatever); ... PetscSFOperationBegin(rootdataN,leafdata_whatever); PetscSFOperationEnd(rootdataN,leafdata_whatever); endfor The following pattern will instead raise an error PetscSFOperationBegin(rootdata1,leafdata_whatever); PetscSFOperationEnd(rootdata1,leafdata_whatever); PetscSFOperationBegin(rank ? rootdata1 : rootdata2,leafdata_whatever); PetscSFOperationEnd(rank ? rootdata1 : rootdata2,leafdata_whatever);

PETSCSF_WINDOW_FLAVOR_ALLOCATE: uses MPI_Win_allocate, reuses any pre-existing window which fits the data and it is not in use

PETSCSF_WINDOW_FLAVOR_SHARED: uses MPI_Win_allocate_shared, reusage policy as for PETSCSF_WINDOW_FLAVOR_ALLOCATE

See Also

PetscSFSetFromOptions(), PetscSFWindowGetFlavorType()

Level

advanced

Location

src/vec/is/sf/impls/window/sfwindow.c

Implementations

PetscSFWindowSetFlavorType_Window in 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