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
- Sets the parallel mode, eitherredundantorsynchronized
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#
FN: Mathematical Functions, 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