How to install on M2 Mac?

I installed Freefemv4.12 on my m2 mac and got the following error.
Are there any libraries that need to be pre-installed?

filerc : .zprofile
./Install-app.sh: line 48: 1446 Killed: 9 /Applications/FreeFem++.app/Contents/ff-$ver/bin/FreeFem++ /Applications/FreeFem++.app/Contents/ff-$ver/share/FreeFEM/$ver/examples/tutorial/Laplace.edp
Create Link of example and Doc

/Users/iberico
Error missing install missing lib ??

You should compile from the sources: GitHub - FreeFem/FreeFem-sources: FreeFEM source code. The success rate is higher.

I have tried compiling from source code.
However, the Automatic configuration part did not work.
It says to enter “autoreconf -i” but I could not figure out how to install autoconf.
Is it different from autoconf?

If you are using Homebrew, you could use brew install automake.

I was able to install automake from homebrew.
In addition, the installation was performed including PETSc.
Sudo make install has also been executed.

However, when I ran “test.edp”, I got a segmentation fault and could not calculate.

I typed “FreeFem++ test.edp” and ran it.

If there are any additional options please let me know.

If you go into examples/hpddm and type make check, what do you get?

EXAMPLE was executed.
The result was that all 106 files were SKIP.
Since this is not an error, does this mean that the installation is working correctly?

No, they should not be skipped, they should pass. Did you properly followed all steps from README.md that I sent earlier?

I understand.
What is the address to send it to?

I’m sorry, I don’t understand your question.

I’m sorry.
I want to send you the README.md file, please let me know the email address to send it to.

I’m not sure I understand why you’d want me to send this file, it’s available on GitHub for everyone.

The command was executed again from the beginning.
As a result, I ran “make check” on “examples/hpddm” and got “XFAIL” on all 106 files.

Should I erase all files and start over?
I have done up to make install, but how do I uninstall if necessary?

Sorry for all the trouble, I think this is not specific to your machine.
For good measure, could you please try the following.

$ cd examples/tutorial
$ ../../src/nw/FreeFem++-nw Laplace.edp -v

Do you have a segmentation fault running this?
If so, could you please try to start from scratch and do the following.

$ rm -rf FreeFem-sources
$ git clone -b develop https://github.com/FreeFem/FreeFem-sources
$ cd FreeFem-sources
$ autoreconf -i
$ ./configure  --disable-optim
$ make
$ cd examples/tutorial
$ ../../src/nw/FreeFem++-nw Laplace.edp -v

If you don’t have a segmentation fault anymore, do the following.

$ cd ../../
$ cd 3rdparty/ff-petsc
$ make petsc-slepc
$ cd ../../
$ ./reconfigure
$ make
$ cd examples/hpddm
$ make check

Do you still get either XFAIL or SKIP then?

An error occurred at the following location.


       UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):

                              Error running make on  MMG

PETSc installation has failed.
The preceding “Laplace.edp” was executed successfully.

Could you please rm -rf 3rdparty/ff-petsc/petsc-3* and also delete the previous ff-petsc folder (presumably in /usr/local/ if you didn’t configure with a --prefix) and try again? If it still fails, please send 3rdparty/ff-petsc/petsc-3*/configure.log).

I send you the contents of “configure.log” because of the error.
The following is the result.

Executing: uname -s

stdout: Darwin

=============================================================================================

Configuring PETSc to compile on your system

=============================================================================================

================================================================================

================================================================================

Starting configure run at Wed, 12 Apr 2023 14:20:35 +0900

Configure Options: --configModules=PETSc.Configure --optionsModule=config.compilerOptions --prefix=/usr/local/ff-petsc/r --with-debugging=0 COPTFLAGS=“-O3 -mtune=native” CXXOPTFLAGS=“-O3 -mtune=native” FOPTFLAGS=“-O3 -mtune=native” --with-ssl=0 --with-x=0 --with-fortran-bindings=0 --with-cudac=0 --with-tau-perfstubs=0 --download-slepc --download-hpddm --download-slepc-commit=4aa7bc16b5f5adead49296eedfacc504ccc5cb71 --with-cc=/usr/local/ff-petsc/r/bin/mpicc --with-cxx=/usr/local/ff-petsc/r/bin/mpicxx --with-fc=/usr/local/ff-petsc/r/bin/mpif90 --with-scalar-type=real --with-blaslapack-include= --with-blaslapack-lib=“-framework Accelerate” --download-metis --download-ptscotch --download-hypre --download-parmetis --download-superlu --download-suitesparse --download-tetgen --download-mmg --download-parmmg --download-slepc-configure-arguments=–download-arpack --download-scalapack --download-mumps PETSC_ARCH=fr

Working directory: /Users/iberico/my_program/02_Freefem/FreeFem-sources/3rdparty/ff-petsc/petsc-3.19.0

Machine platform:

uname_result(system=‘Darwin’, node=‘ibericonoMac-mini.local’, release=‘22.4.0’, version=‘Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:58 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6020’, machine=‘arm64’)

Python version:

3.9.6 (default, Mar 10 2023, 20:16:38)

[Clang 14.0.3 (clang-1403.0.22.14.1)]

================================================================================

Environmental variables

MANPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/share/man:/Library/Developer/CommandLineTools/usr/share/man:/Library/Developer/CommandLineTools/Toolchains/XcodeDefault.xctoolchain/usr/share/man:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/share/man:/Library/Developer/CommandLineTools/usr/share/man:/Library/Developer/CommandLineTools/Toolchains/XcodeDefault.xctoolchain/usr/share/man:

TERM=xterm-256color

SHELL=/bin/sh

USER=root

SUDO_USER=iberico

SUDO_UID=501

SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.2taFNXOxvG/Listeners

__CF_USER_TEXT_ENCODING=0x0:1:14

MAKELEVEL=1

MFLAGS=

MAIL=/var/mail/root

PATH=/Applications/FreeFem++.app/Contents/ff-4.12/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin

PWD=/Users/iberico/my_program/02_Freefem/FreeFem-sources/3rdparty/ff-petsc/petsc-3.19.0

LANG=en_US.UTF-8

SHLVL=1

HOME=/Users/iberico

SUDO_COMMAND=/usr/bin/make petsc-slepc

LOGNAME=root

SUDO_GID=20

OLDPWD=/Users/iberico/my_program/02_Freefem/FreeFem-sources/3rdparty/ff-petsc

_=./configure

SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

CPATH=/usr/local/include

LIBRARY_PATH=/usr/local/lib

Files in path provided by default path

Warning accessing /Applications/FreeFem++.app/Contents/ff-4.12/bin gives errors: [Errno 2] No such file or directory: ‘/Applications/FreeFem++.app/Contents/ff-4.12/bin’

You need to attach the file. But first, please, try to tidy up your machine.

  1. Why is there a reference to /Applications/FreeFem++.app? Remove that.
  2. Remove /Users/iberico/my_program/02_Freefem/FreeFem-sources.
  3. Remove /usr/local/ff-petsc.

Then, restart from scratch.

$ git clone -b develop https://github.com/FreeFem/FreeFem-sources
$ cd FreeFem-sources
$ autoreconf -i
$ ./configure  --disable-optim
$ cd 3rdparty/ff-petsc
$ make petsc-slepc
$ cd ../../
$ ./reconfigure
$ make
$ cd examples/hpddm
$ make check

It was as follows.
PASS: 94
SKIP: 9
XFAIL: 4

XFAIL:
stokes-fieldsplit-2d-PETSc.edp
laplace-adapt-3d-PETSc.edp
transfer.edp
helmholtz-mg-2d-PETSc-complex.edp

SKIP:
Schur-complement-PETSc.edp
distributed-parmmg.edp
laplace-adapt-dist-3d-PETSc.edp
maxwell-mg-3d-PETSc-complex.edp
helmholtz-3d-surf-PETSc-complex.edp
helmholtz-3d-line-PETSc-complex.edp
helmholtz-coupled-2d-PETSc-complex.edp
helmholtz-dense-3d-line-PETSc-complex.edp
maxwell-3d-surf-PETSc-complex.edp

Much better! I wouldn’t worry too much about those failures.