petsc-3.15.0 2021-03-30
Report Typos and Errors

PetscSFCreate

create a star forest communication context

Synopsis

#include "petscsf.h" 
PetscErrorCode PetscSFCreate(MPI_Comm comm,PetscSF *sf)
Collective

Input Arguments

comm - communicator on which the star forest will operate

Output Arguments

sf - new star forest context

Options Database Keys

-sf_type basic - Use MPI persistent Isend/Irecv for communication (Default)
-sf_type window - Use MPI-3 one-sided window for communication
-sf_type neighbor - Use MPI-3 neighborhood collectives for communication

Notes

When one knows the communication graph is one of the predefined graph, such as MPI_Alltoall, MPI_Allgatherv, MPI_Gatherv, one can create a PetscSF and then set its graph with PetscSFSetGraphWithPattern(). These special SFs are optimized and they have better performance than general SFs.

See Also

PetscSFSetGraph(), PetscSFSetGraphWithPattern(), PetscSFDestroy()

Level

intermediate

Location

src/vec/is/sf/interface/sf.c

Examples

src/vec/is/sf/tutorials/ex1.c.html
src/vec/is/sf/tutorials/ex2.c.html
src/vec/is/sf/tutorials/ex1f.F90.html

Index of all PetscSF routines
Table of Contents for all manual pages
Index of all manual pages