# Problem with FreeFem installation (hpddm.so)

**URL:** <https://community.freefem.org/t/problem-with-freefem-installation-hpddm-so/2251>\
**Category:** FreeFEM installation\
**Created:** [January 27, 2023, 5:24pm UTC](https://community.freefem.org/t/problem-with-freefem-installation-hpddm-so/2251 "2023-01-27T17:24:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kulcsarm](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/kulcsarm/32/1530_2.png) [@kulcsarm](https://community.freefem.org/u/kulcsarm)\
**Post date:** [January 27, 2023, 5:24pm UTC](https://community.freefem.org/t/problem-with-freefem-installation-hpddm-so/2251/1 "2023-01-27T17:24:43Z")

</div>

Hello,

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:

```auto
./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 

```

and

```auto
./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:

```auto
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](https://pastebin.com/xtAWra64). If I run the make command after this, it fails with this error at the end:

```auto
make[3]: *** [Makefile:663: hpddm.so] 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](https://pastebin.com/3mgtxyXa) 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!

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [January 27, 2023, 5:32pm UTC](https://community.freefem.org/t/problem-with-freefem-installation-hpddm-so/2251/2 "2023-01-27T17:32:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [January 27, 2023, 7:44pm UTC](https://community.freefem.org/t/problem-with-freefem-installation-hpddm-so/2251/3 "2023-01-27T19:44:28Z")

</div>

This should be fixed via [Trailing or leading underscore in HPDDM. · FreeFem/FreeFem-sources@7c3c6e4 · GitHub](https://github.com/FreeFem/FreeFem-sources/commit/7c3c6e4ff538ccb5d6f4080063edec6c7a1e1b0a) 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.

---

<div class="post-metadata">

**Author:** ![kulcsarm](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/kulcsarm/32/1530_2.png) [@kulcsarm](https://community.freefem.org/u/kulcsarm)\
**Post date:** [January 27, 2023, 8:37pm UTC](https://community.freefem.org/t/problem-with-freefem-installation-hpddm-so/2251/4 "2023-01-27T20:37:14Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [January 27, 2023, 9:01pm UTC](https://community.freefem.org/t/problem-with-freefem-installation-hpddm-so/2251/5 "2023-01-27T21:01:52Z")

</div>

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.
