Skip to main content
`Ctrl`+`K`

# DSSynchronize

Make sure that all processes have the same data, performing communication if necessary.

## Synopsis

    #include "slepcds.h"
    PetscErrorCode DSSynchronize(DS ds,PetscScalar eigr[],PetscScalar eigi[])

Collective

## Input Parameter

- ds - the direct solver context

## Input/Output Parameters

- eigr - (optional) array with the computed eigenvalues (real part)

- eigi - (optional) array with the computed eigenvalues (imaginary part)

## Notes

When the `DS` has been created with a communicator with more than one process, the internal data, especially the computed matrices, may diverge in the different processes. This happens when using multithreaded BLAS and may cause numerical issues in some ill-conditioned problems. This function performs the necessary communication among the processes so that the internal data is exactly equal in all of them.

Depending on the parallel mode as set with `DSSetParallel()`, this function will either do nothing or synchronize the matrices computed by `DSSolve()` and `DSSort()`. The arguments `eigr` and `eigi` are typically those used in the calls to `DSSolve()` and `DSSort()`.

## See Also

DS: Direct Solver (or Dense System), `DSSetParallel()`, `DSSolve()`, `DSSort()`

## Level

developer

## Location

src/sys/classes/ds/interface/dsops.c

## Implementations

DSSynchronize_GHEP() in src/sys/classes/ds/impls/ghep/dsghep.c
DSSynchronize_GHIEP() in src/sys/classes/ds/impls/ghiep/dsghiep.c
DSSynchronize_GNHEP() in src/sys/classes/ds/impls/gnhep/dsgnhep.c
DSSynchronize_GSVD() in src/sys/classes/ds/impls/gsvd/dsgsvd.c
DSSynchronize_HEP() in src/sys/classes/ds/impls/hep/dshep.c
DSSynchronize_HSVD() in src/sys/classes/ds/impls/hsvd/dshsvd.c
DSSynchronize_NEP() in src/sys/classes/ds/impls/nep/dsnep.c
DSSynchronize_NHEP() in src/sys/classes/ds/impls/nhep/dsnhep.c
DSSynchronize_NHEPTS() in src/sys/classes/ds/impls/nhepts/dsnhepts.c
DSSynchronize_PEP() in src/sys/classes/ds/impls/pep/dspep.c
DSSynchronize_SVD() in src/sys/classes/ds/impls/svd/dssvd.c

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