# **Frequency domain runs**
In frequency domain modeling, the time dimention is wrap in order to resolve a wave-like system using complexe formulation of the equations. Taking into account all the tidal forcings (gravitational potential for global runs or boundary condition for regional runs), the matrix system is build and resolved using various solvers.
## Computing optimisations
### Open MPI parallel implementation
Latest implementation includes HIPS solver. It proved to be more scalable than the MUMPS’s one.
Status: available for the time stepping simulation only (real-valued implicit systems)
### Open MP parallel implementation:
As most recent computers offer multiple cores, Open MP parallel implementation is considered as really worthy. Contrary to MPI implementation, it keeps most of the code unchanged if one except parallel directives.
## Spectral linear solvers implementations
Two types of numercial solvers can be used to resolved the run matrix. The *direct* solvers, like MUMPS (Amestoy et al., 2006) and PasTiX (Hénon et al., 2002), provide fast soving but need large need for RAM memory. The *iterative* solvers, like PETSC-GMRES (Balay et al., 2021), estimate the solution until it properly converge, which can be a longer computation and highly dependent on the pre-conditioning of the matrix.
*Direct* solvers:
- MUMPS: https://mumps-solver.org/
- PasTiX: https://solverstack.gitlabpages.inria.fr/pastix/
- UMFPACK (from SuiteSparse): http://www.SuiteSparse.com
- SpDomestic (native)
*Iterative* solvers:
- PETSC-GMRES: https://www.mcs.anl.gov/petsc/
*Comments:*
UMFPACK solver tends to get unstable as the number of dof increases (1 500 000 complex unknowns and above). The SpDomestic solver (T-UGOm embarked solver) does not show such vulnerability, but is considerably slower than UMFPACK. In consequence, a new solver is being tested (PASTIX), that is naturally multi-threads optimised (contrary to UMFPACK that is multi-threads capable only through BLAS muti-threading).
Thanks to the great work of Cyril Nguyen (POC computer engineer), PASTIX is now operational in T-UGOm. Latest benchmarks show improved numerical performances (compared to UMFPACK) and no failure were evidenced yet (29/12/2011).
> *Forthcoming actions: more testing is needed to optimize PASTIX performances (compilation options, BLAS library etc…). Also use of additional memory during system resolution has been detected (rising use up to 13 Go with FES2012 configuration). A full proofing should be done ASAP.*
---
Below, the solver impact (MUMPS, PasTiX and PETSC-GMRES) on S2 internal tides propagation in an academical simulation ([Barbot, 2021](https://theses.hal.science/tel-03683133v1)).

*Figure:* Comparision and differences on zonal velocity ($m.s^{-1}$) between solvers on internal tides runs with uniform stratification and 30 levels.