Can't use ffddm Silicon mac

Hello,

I can’t get FreeFEM++ to work on macOS Sequoia 15.4.1 (M2 Pro chip).
I’ve tried several methods: downloading the “FreeFEM-v4.15-Apple-Silicon-O-a.dmg” file, and also compiling it from source — first by following the official installation guide, then using the compilation method found in this document: https://joliv.et/FreeFem-tutorial/main.pdf#198, which I found while browsing the forum.
None of these methods allowed me to run the first test file from the ffddm documentation succesfully.

With the .dmg file, I get the following error:

'/Applications/FreeFem++.app/Contents/ff-4.15/ff-petsc/r/bin/mpiexec' -np 2 /Applications/FreeFem++.app/Contents/ff-4.15/bin/FreeFem++-mpi -nw './demo.edp' -wg
dyld[53583]: Library not loaded: /Applications/FreeFem++.app/Contents/ff-4.15/ff-petsc/r/lib/libscalapack.2.2.dylib
  Referenced from: <C5B9599A-6694-3692-907D-057587EFC838> /Applications/FreeFem++.app/Contents/ff-4.15/bin/FreeFem++-mpi
  Reason: tried: '/Applications/FreeFem++.app/Contents/ff-4.15/ff-petsc/r/lib/libscalapack.2.2.dylib' (duplicate LC_RPATH '/Applications/FreeFem++.app/Contents/ff-4.15/ff-petsc/r/lib'), '/System/Volumes/Preboot/Cryptexes/OS/Applications/FreeFem++.app/Contents/ff-4.15/ff-petsc/r/lib/libscalapack.2.2.dylib' (no such file), '/Applications/FreeFem++.app/Contents/ff-4.15/ff-petsc/r/lib/libscalapack.2.2.dylib' (duplicate LC_RPATH '/Applications/FreeFem++.app/Contents/ff-4.15/ff-petdyld[53582]: Library not loaded: /Applications/FreeFem++.app/Contents/ff-4.15/ff-petsc/r/lib/libscalapack.2.2.dylib
  Referenced from: <C5B9599A-6694-3692-907D-057587EFC838> /Applications/FreeFem++.app/Contents/ff-4.15/bin/FreeFem++-mpi
  Reason: tried: '/Applications/FreeFem++.app/Contents/ff-4.15/ff-petsc/r/lib/libscalapack.2.2.dylib' (duplicate LC_RPATH '/Applications/FreeFem++.app/Contents/ff-4.15/ff-petsc/r/lib'), '/System/Volumes/Preboot/Cryptexes/OS/Applications/FreeFem++.app/Contents/ff-4.15/ff-petsc/r/lib/libscalapack.2.2.dylib' (no such file), '/Applications/FreeFem++.app/Contents/ff-4.15/ff-petsc/r/lib/libscalapack.2.2.dylib' (duplicate LC_RPATH '/Applications/FreeFem++.app/Contents/ff-4.15/ff-petsc/r/lib'), '/usr/local/lib/libscalapack.2.2.dylib' (no such file), '/usr/lib/libscalapack.2.2.dylib' (no such file, not in dyld cache)
sc/r/lib'), '/usr/local/lib/libscalapack.2.2.dylib' (no such file), '/usr/lib/libscalapack.2.2.dylib' (no such file, not in dyld cache)

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   PID 53582 RUNNING AT 
=   EXIT CODE: 6
=   CLEANING UP REMAINING PROCESSES
=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================
YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Abort trap: 6 (signal 6)
This typically refers to a problem with your application.

However, the file /Applications/FreeFem++.app/Contents/ff-4.15/ff-petsc/r/lib/libscalapack.2.2.dylib does exist.

When compiling Freefem from source following the documentation, I’m unable to run sudo make petsc-slepc because there’s a configuration issue with CMake — see below:
configure.log (3.8 MB)

In the end, when I compile and install PETSc separately, it does work — but the make check tests don’t pass properly: about half of the tests in ffddm and hpddm result in XFAILs.

I’m sorry to bother you with that, do you know what am i doing wrong ?
Thank you in advance,
Lucien.

The CMake business will be fixed in PETSc 3.23.1 (scheduled for release later this month). I’ve back-ported the required patch (CMake: add necessary flags for deprecated packages and update ScaLAPACK/muparser to avoid errors with CMake 4.0.0 (!8291) · Merge requests · PETSc / petsc · GitLab) in the develop branch of FreeFEM. Just do a git pull on the develop branch, rm -rf petsc-3.23-0 and try make petsc-slepc again.

You are also using a bottled version of Open MPI, this likely won’t work.

Thank you very much for your response. I’ve managed to compile the whole program now, but indeed, I’m getting xfails on all the examples that require MPI. What’s the issue with the bottled version of Open MPI ?

I don’t know what is the issue, but I know it doesn’t work, and here it looks like we have another example. If you launch one of the .edp by hand, what is the error?

Sorry, I just rebuild open-MPI from source and re-compiling Freefem to see if this solve the problem, i can’t give you the error anymore.

You could just let FreeFEM install MPICH through PETSc.

In the end, I did that.
It works fine now, it passed all test.

Thank you very much for your help!