Examples

ex1.c: Test star forest communication (PetscSF)
ex10.c: Test PetscSFFCompose against some corner cases
ex11.c: Scatters between parallel vectors.
ex12.c: Scatters from a parallel vector to a sequential vector.
ex13.c: Scatters from a sequential vector to a parallel vector.
ex14.c: Test event log of VecScatter with various block sizes
ex15.c: Test VecScatterRemap() on various vecscatter.
ex16.c: Test PetscSFCreateByMatchingIndices
ex17.c: Test PetscSF with MPI large count (more than 2 billion elements in messages)
ex18.c: Test PetscSFConcatenate()
ex19.c: Test leaf sorting in PetscSFSetGraph()
ex1f.F90:
ex1k.kokkos.cxx: Benchmarking PetscSF Ping-pong latency (similar to osu_latency)
ex2.c: Test SF cuda stream synchronization in device to host communication
ex20.c: Test PetscSFSetGraphFromCoordinates()
ex21.c: Test VecScatterCopy() on an SF with duplicated leaves
ex22.c: Test PetscSFFetchAndOp
ex23.c: Test PetscSF with integers and MPIU_2INT
ex24.c: Test overlapping PetscSF communication with empty roots and leaves";
ex25.c: Test PetscSF with derived data types created with MPI large count
ex3.c: Test PetscSFFetchAndOp on patterned SF graphs. PetscSFFetchAndOp internally uses PetscSFBcastAndOp
ex4.c: Test PetscSFFCompose when the ilocal array is not the identity
ex5.c: Test PetscSFFCompose and PetscSFCreateStridedSF when the ilocal arrays are not identity nor dense
ex6.c: Test VecScatter with x, y on different communicators
ex7.c: Test VecScatter of different block sizes across processes
ex8.c: Test VecScatterCreateToZero, VecScatterCreateToAll
ex9.c: This example shows 1) how to transfer vectors from a parent communicator to vectors on a child communicator and vice versa;