#include "slepcfn.h" PetscErrorCode FNSetParallel(FN fn,FNParallelType pmode)Logically Collective
fn | - the math function context | |
pmode | - the parallel mode |
-fn_parallel <mode> | - Sets the parallel mode, either 'redundant' or 'synchronized' |
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().