slepc-3.21.0 2024-03-30
Report Typos and Errors

FNSetParallel

Selects the mode of operation in parallel runs.

Synopsis

#include "slepcfn.h" 
PetscErrorCode FNSetParallel(FN fn,FNParallelType pmode)
Logically Collective

Input Parameters

fn  - the math function context
pmode  - the parallel mode

Options Database Key

-fn_parallel <mode>  - Sets the parallel mode, either 'redundant' or 'synchronized'

Notes

This is relevant only when the function is evaluated on a matrix, with either FNEvaluateFunctionMat() or FNEvaluateFunctionMatVec().

In the 'redundant' parallel mode, all processes will make the computation redundantly, starting from the same data, and producing the same result. This result may be slightly different in the different processes if using a multithreaded BLAS library, which may cause issues in ill-conditioned problems.

In the 'synchronized' parallel mode, only the first MPI process performs the computation and then the computed matrix is broadcast to the other processes in the communicator. This communication is done automatically at the end of FNEvaluateFunctionMat() or FNEvaluateFunctionMatVec().

See Also

FNEvaluateFunctionMat() or FNEvaluateFunctionMatVec(), FNGetParallel()

Level

advanced

Location

src/sys/classes/fn/interface/fnbasic.c

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