# Issue with loading MUMPS plugin in FreeFEM (develop branch) on macOS Apple Silicon after PETSc build

**URL:** <https://community.freefem.org/t/issue-with-loading-mumps-plugin-in-freefem-develop-branch-on-macos-apple-silicon-after-petsc-build/3918>\
**Category:** General Discussion\
**Created:** [May 15, 2025, 12:40pm UTC](https://community.freefem.org/t/issue-with-loading-mumps-plugin-in-freefem-develop-branch-on-macos-apple-silicon-after-petsc-build/3918 "2025-05-15T12:40:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruiruibeauty](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/ruiruibeauty/32/3226_2.png) [@ruiruibeauty](https://community.freefem.org/u/ruiruibeauty)\
**Post date:** [May 15, 2025, 12:40pm UTC](https://community.freefem.org/t/issue-with-loading-mumps-plugin-in-freefem-develop-branch-on-macos-apple-silicon-after-petsc-build/3918/1 "2025-05-15T12:40:41Z")

</div>

Dear FreeFEM Development Team,  
I am writing to report an issue I’m encountering with loading the MUMPS plugin in FreeFEM on my macOS Apple Silicon system.  
I have followed the official compilation guide and, per previous advice (from Pierre Jolivet regarding CMake compatibility), I switched to the `develop` branch of FreeFEM to use PETSc 3.23.2, which should be compatible with my CMake 4.0.2.  
**Summary of my installation process:**

1. Cleaned previous attempts.
2. Cloned `FreeFem-sources`, checked out the `develop` branch, and ran `autoreconf -i`.
3. Ran a basic FreeFEM `./configure` for the main program.
4. Successfully ran `make petsc-slepc` in the `3rdparty/ff-petsc/` directory. This step downloaded and compiled PETSc 3.23.2 and its dependencies (including MUMPS, METIS, ParMETIS, SLEPc, HPDDM, etc.). The PETSc `make check` within its own build directory (`petsc-3.23.2/ARCH_NAME/`) passed successfully.
5. Returned to the FreeFEM root directory, ran `./configure` (or `./reconfigure`) for FreeFEM, which seemed to complete.
6. Ran `make -j8` and `sudo make install` for FreeFEM, which also seemed to complete, installing files to `/Users/zhangpingrui/my_freefem_install/`.
7. I can successfully run `FreeFem++-mpi` and it reports version 4.15 (git v4.15-66-gf2864243).

**The Issue:**  
When I try to run example scripts that explicitly load the MUMPS plugin, such as `testsolver_MUMPS.edp` (which contains `load "MUMPS_mpi"` or `load "MUMPS_FreeFem"`), the script fails with a load error.  
Here is the terminal output when trying to run `testsolver_MUMPS.edp` (this specific example tries to `load "MUMPS_mpi"`):  
`zhangpingrui@zhangpingruideMacBook-Air mpi % ff-mpirun -np 4 testsolver\_MUMPS.edp  
‘/opt/homebrew/bin/mpiexec’ -np 4 /Users/zhangpingrui/my\_freefem\_install/bin/FreeFem+±mpi -nw ‘testsolver\_MUMPS.edp’  
– FreeFem++ v4.15 (2025年 5月15日 星期四 15时29分56秒 CST - git v4.15-66-gf2864243)  
file : testsolver\_MUMPS.edp  
Load: lg\_fem lg\_mesh lg\_mesh3 eigenvalue parallelempi  
1 : // run with MPI: ff-mpirun -np 4 script.edp  
2 : // NBPROC 4  
3 :  
4 : load “MUMPS\_mpi” current line = 4 mpirank 1 / 4  
current line = 4 mpirank 3 / 4  
current line = 4 mpirank 2 / 4

Load error: MUMPS\_mpi  
fail:  
dlerror : dlopen(../../plugin/seq/MUMPS\_mpi.dylib, 0x0002): tried: ‘../../plugin/seq/MUMPS\_mpi.dylib’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS../../plugin/seq/MUMPS\_mpi.dylib’ (no such file), ‘/Users/zhangpingrui/my\_freefem\_install/ff-petsc/r/lib/../../plugin/seq/MUMPS\_mpi.dylib’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/Users/zhangpingrui/my\_freefem\_install/ff-petsc/r/lib/../../plugin/seq/MUMPS\_mpi.dylib’ (no such file), ‘/Users/zhangpingrui/my\_freefem\_install/ff-petsc/r/lib/../../plugin/seq/MUMPS\_mpi.dylib’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/Users/zhangpingrui/my\_freefem\_install/ff-petsc/r/lib/../../plugin/seq/MUMPS\_mpi.dylib’ (no such file), ‘/usr/lib/../../plugin/seq/MUMPS\_mpi.dylib’ (no such file, not in dyld cache), ‘../../plugin/seq/MUMPS\_mpi.dylib’ (no such file), ‘/Users/zhangpingrui/FreeFem-sources/plugin/seq/MUMPS\_mpi.dylib’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/Users/zhangpingrui/FreeFem-sources/plugin/seq/MUMPS\_mpi.dylib’ (no such file), ‘/Users/zhangpingrui/FreeFem-sources/plugin/seq/MUMPS\_mpi.dylib’ (no such file)  
list prefix: ‘../../plugin/mpi/’ ‘’ ‘../../plugin/seq/’ list suffix: ‘’ , ‘.dylib’  
current line = 4 mpirank 0 / 4  
Load error : MUMPS\_mpi  
line number :4, MUMPS\_mpi  
error Load error : MUMPS\_mpi  
line number :4, MUMPS\_mpi  
code = 2 mpirank: 0`Another example script using`load "MUMPS\_FreeFem"`shows a similar`dlopen`error for`MUMPS\_FreeFem.dylib`.)\*

This suggests that the `MUMPS_mpi.dylib` (or `MUMPS_FreeFem.dylib`) plugin was not correctly built or installed by FreeFEM, or it cannot be found at runtime, despite PETSc (which should provide MUMPS via the `--download-mumps` option used during its configuration) appearing to build and check successfully.

I have checked my PETSc `configure.log` and it indicates that MUMPS was configured for download. I also have the `make all` log for PETSc.

**My System Environment Details:**

- **OS:** macOS Apple Silicon (arm64), version appears to be macOS 15.4.1.
- **FreeFEM:** `develop` branch (git v4.15-66-gf2864243 as of May 15, 2025).
- **PETSc:** 3.23.2 (built by FreeFEM’s `make petsc-slepc`).
- **MPI:** MPICH 4.3.0 (from Homebrew).
- **Compilers:** Apple Clang 17.0.0 (for C/C++ via MPICH wrappers), GNU Fortran 14.2.0\_1 (for Fortran via MPICH wrapper).
- **CMake:** 4.0.2 (from Homebrew).
- **FreeFEM Installation Prefix:** `/Users/zhangpingrui/my_freefem_install/`
- **Environment Variables:** `PATH` and `DYLD_LIBRARY_PATH` have been updated to include `/Users/zhangpingrui/my_freefem_install/bin` and `/Users/zhangpingrui/my_freefem_install/lib/ff++/4.15/lib` (and `/mpi` subfolder) respectively.

Could you please provide some guidance on why the MUMPS plugin might not be loading correctly and what steps I can take to resolve this? Is there a specific way to check if PETSc’s MUMPS was successfully built and made available to FreeFEM, and how to ensure FreeFEM builds its MUMPS interface plugin? I also noticed some warnings about “missing mpi plugin” and “MISSING lib fftw3” during the main FreeFEM `make install`, which I can provide more details on if they are relevant.

Thank you for your continued support.

Sincerely,  
Pingrui

---

<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:** [May 16, 2025, 9:00am UTC](https://community.freefem.org/t/issue-with-loading-mumps-plugin-in-freefem-develop-branch-on-macos-apple-silicon-after-petsc-build/3918/2 "2025-05-16T09:00:32Z")

</div>

If you do `make check` in the `FreeFem-sources/examples/hpddm` folder, what is the output, please?

---

<div class="post-metadata">

**Author:** ![ruiruibeauty](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/ruiruibeauty/32/3226_2.png) [@ruiruibeauty](https://community.freefem.org/u/ruiruibeauty)\
**Post date:** [May 16, 2025, 9:50am UTC](https://community.freefem.org/t/issue-with-loading-mumps-plugin-in-freefem-develop-branch-on-macos-apple-silicon-after-petsc-build/3918/3 "2025-05-16T09:50:09Z")

</div>

Hi Pierre,  
Thanks again for your guidance! As you suggested, I ran `make check` in the `FreeFem-sources/examples/hpddm` directory after successfully completing the `make petsc-slepc` step on the `develop` branch.  
The results are very positive:

 ![截屏2025-05-16 17.25.21](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/b/b5167d1e5d09b5b2bd3c4fd3f080d5ff4c2d26d7.jpeg)  
 ![截屏2025-05-16 17.25.46](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/4/4aabdb9c3a82492416d0f5cdc7d010fb3f5a6dd7.jpeg)  
 ![截屏2025-05-16 17.25.58](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/c/c0b6d5f2298e71e0457f4ca9fbce7ff5e6a5d47b.png)

---

<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:** [May 17, 2025, 5:03am UTC](https://community.freefem.org/t/issue-with-loading-mumps-plugin-in-freefem-develop-branch-on-macos-apple-silicon-after-petsc-build/3918/4 "2025-05-17T05:03:04Z")

</div>

What if you launch `testsolver_MUMPS.edp` from within that folder?
