Compilation error when using gmm++: 'MUMPS_solve' is not a member of 'gmm'

Hello,

I followed the installation instructions for gmm++. After installing the library, I tried to compile a simple test file with the following code:

#include "gmm/gmm.h"

int main()
{
  gmm::dense_matrix<double> d(3, 3);
  return 0;
}

However, I encountered the following compilation error:

$ gcc main.cpp -o test_gmm -I /home/aeart/gmm/include
In file included from D:/msys64/home/aeart/gmm/include/gmm/gmm_iter_solvers.h:100,
                 from D:/msys64/home/aeart/gmm/include/gmm/gmm.h:44,
                 from main.cpp:1:
D:/msys64/home/aeart/gmm/include/gmm/gmm_solver_Schwarz_additive.h: In function 'void gmm::mult(const AS_exact_gradient<Matrixt, MatrixBi>&, const Vector2&, Vector3&)':
D:/msys64/home/aeart/gmm/include/gmm/gmm_solver_Schwarz_additive.h:579:12: error: 'MUMPS_solve' is not a member of 'gmm' [-Wtemplate-body]
  579 |       gmm::MUMPS_solve(M.vMloc[i], x, w);
      |            ^~~~~~~~~~~

After looking into the source code, I noticed that this part of the library depends on either SuperLU or MUMPS.

Are SuperLU or MUMPS required dependencies to use gmm++? Or is it possible to use the library without them, for example, just for basic dense or sparse matrix operations?

Any clarification would be appreciated. Thanks!

Is this in the released GetFEM 5.4.4 or in the development version from git? I have recently been applying changes related to MUMPS in gmm.

in the /home/aeart/gmm/include folder there should be a file called gmm_arch_config.h

In this file, one of the macros GMM_USES_SUPERLU or GMM_USES_MUMPS should be defined.

I downloaded the archive gmm-5.4.4.tar.gz from the download page.
The contents of my gmm_arch_config.h file:

#  ifndef _SRC_GMM_GMM_ARCH_CONFIG_H
#define _SRC_GMM_GMM_ARCH_CONFIG_H 1
// enable the following line for OpenMP support
// #define GMM_HAVE_OPENMP
//
/* once: _SRC_GMM_GMM_ARCH_CONFIG_H */
#endif

Is there any way to clone a repository that contains only gmm++, without getfem?

yes, gmm is supposed to be standalone, downloaded from the link you provided.

It seems we have broken this release. We normally only test GetFEM thoroughly before releasing, because gmm is header only, but apparently here we should have been more careful.

In any case, this is not so tragic, just add either the line

#define GMM_USES_SUPERLU

or the line

#define GMM_USES_MUMPS

to your gmm_arch_config.h file and make sure that the header files and the libraries for either solver are available on your system.

For other configuration options for gmm check this file: