Projet MYX - Maison de la Simulation - France

Scalable Matrix Generator with Given Spectrum

What is SMG2S ?

SMG2S (Scalable Matrix Generator with Given Spectrum) is a software which provides to generator the non-Hermitian Matrices with User-customized eigenvalues. SMG2S is implemented in parallel based on MPI (Message Passing Interface) and C++11 to support efficiently the generation of test matrices on distributed memory platforms.


Iterative linear algebra methods are important for the applications in various fields. The analysis of the iterative method behaviors is complex, and it is necessary to evaluate their convergence to solve extremely large non-Hermitian eigenvalue and linear problems on parallel and/or distributed machines. This convergence depends on the properties of spectra. Thus, we propse SMG2S to generate large matrices with known spectra to benchmark these methods. The generated matrices are non-Hermitian and non-trivial, with very high dimension.


SMG2S can generate the non-Hermitian matrices with user-custormized eigenvalues. The details of methologies can be found [1].

Parallel Implementation

SMG2S is implemented in parallel based on MPI. This implementation allows SMG2S to efficiently generate very large dimension matrix on top of distributed memory clusters/supercomputers.


The ability of SMG2S to keep the accuracy of given spectrum can be verified by the functionality proposed inside SMG2S. This function is based the shift inverse power method. SMG2S gives also an graphic user interface to compare the given and final spectral distribution for the verification.


SMG2S provides:

  • A collection of c++ header files;
  • A functionality implemented based on PETSc/SLPEc to verify the ability of SMG2S to keep given spectrum;
  • A User-friendly graphic interface to support the comparison of initial and final spectral distributions.
  • The interfaces to different programming languages and scientific computional libraries, including C, Python, PETSc and Trilinos/Teptra.


The manual of SMG2S can be found SMG2S_Manual.


SMG2S is a open source software published under the GNU Lesser General Public License v3.0. SMG2S can be redistributed and modified under the terms of this license.


Xinzhe Wu

Scientific Researcher @ Juelich Supercomputing Centre

Serge Petiton


Quentin Petit

Internship Student (GUI Implementation)


  1. HerveĢ Galicher, France Boillod-Cerneux, Serge Petiton, and Christophe Calvin. Generate very large sparse matrices starting from a given spectrum. in lecture notes in computer science, 8969, springer (2014).
  2. Xinzhe Wu, Serge G. Petiton, Yutong Lu, A parallel generator of non-hermitian matrices computed from given spectra, in: VECPAR 2018: 13th International Meeting on High Performance Computing for Computational Science (2018). [pdf]
  3. Xinzhe Wu, SMG2S Manual v1.0, Technical report, Maison de la Simulation (Sep. 2018). [pdf]