Problem with FreeFem installation (


I’m trying to install FreeFem on a virtual machine running Pop!_OS 22.04 LTS. I have succesfully compiled both the real and complex versions of PETSc extarnally using these configurations:

./configure --download-mumps --download-parmetis --download-metis --download-hypre --download-superlu --download-slepc --download-hpddm --download-ptscotch --download-suitesparse --download-scalapack --download-tetgen --with-fortran-bindings=no --with-scalar-type=real --with-debugging=no 


./configure --with-mumps-dir=arch-FreeFem --with-parmetis-dir=arch-FreeFem --with-metis-dir=arch-FreeFem --with-superlu-dir=arch-FreeFem --download-slepc --download-hpddm --with-ptscotch-dir=arch-FreeFem --with-suitesparse-dir=arch-FreeFem --with-scalapack-dir=arch-FreeFem --with-tetgen-dir=arch-FreeFem --with-fortran-bindings=no --with-scalar-type=complex --with-debugging=no 

Both of them run the “make” and after that the “make check” commands without errors.

Next I’m trying to configure and compile FreeFem but ran into some issues.
The configuration:

git checkout develop
autoreconf -i
./configure --without-hdf5 --enable-download_metis --enable-download_parmetis --enable-download_mmg --enable-download_mmg3d  --enable-download_parmmg --enable-download_mshmet --enable-download_nlopt --enable-optim --with-petsc=${PETSC_VAR}/lib --with-petsc_complex=${PETSC_VAR}-complex/lib 

The config.log. If I run the make command after this, it fails with this error at the end:

make[3]: *** [Makefile:663:] Error 1
make[3]: Leaving directory '/home/km_freefem/FreeFem/FreeFem-sources/plugin/mpi'
make[2]: *** [Makefile:669: all-recursive] Error 1
make[2]: Leaving directory '/home/km_freefem/FreeFem/FreeFem-sources/plugin'
make[1]: *** [Makefile:806: all-recursive] Error 1
make[1]: Leaving directory '/home/km_freefem/FreeFem/FreeFem-sources'
make: *** [Makefile:756: all] Error 2

I didn’t find the either the make.log or the error.log file, but here is the whole terminal output.

I have MPICH 4.0 installed and both “mpiexec --version” and “mpirun --version” give back the same result.

Does anybody have any ideas?

Thanks in advance!

You are mixing the main branch of PETSc, with the develop branch of FreeFEM. These are not compatible at this point in time. You either need to switch to the release branch of PETSc (reconfigure, recompile both PETSc and FreeFEM), or switch to the petsc-v3.19.0 branch of FreeFEM and just reconfigure and recompile FreeFEM (no need to touch the PETSc installation). Sorry for the inconvenience.

1 Like

This should be fixed via Trailing or leading underscore in HPDDM. · FreeFem/FreeFem-sources@7c3c6e4 · GitHub in the develop branch of FreeFEM, so you can just forget about what I wrote and simply git pull in the FreeFEM sources. BTW, @cmd, I remember you had a similar issue, feel free to switch back to the develop branch and you should be good to go.


Thank your for your quick answer and the fix, the method mentioned in your first reply works, I changed PETSc to release branch and I could compile FreeFEM, I’m just runnning the make check now, no errors so far. I will probably switch back to the main branch of PETSc and recompile FreeFEM just to be on the safe side. Thanks again!

Both ways should work indeed. The main branch of PETSc is still extremely stable, so you shouldn’t be afraid to use it (but release is fine as well). Thanks for the feedback and sorry for the trouble.

1 Like