Install FreeFEM++ in MacOS Big Sur Version 11.6

Dear all,

I want to install FreeFEM++ in MacOS Big Sur Version 11.6.

I tried to install OpenMPI. When I input " ./configure CC=gcc-9 CXX=g+±9 FC=gfortran-9 F77=gfortran-9 --prefix=$HOME/opt/usr/local " in terminal, then the following information follows:

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

== Configuring Open MPI

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

*** Startup tests

checking build system type… arm-apple-darwin20.6.0

checking host system type… arm-apple-darwin20.6.0

checking target system type… arm-apple-darwin20.6.0

checking for gcc… gcc-9

checking whether the C compiler works… no

configure: error: in `/Users/x/openmpi-4.0.1’:

configure: error: C compiler cannot create executables

See `config.log’ for more details

x@Ligas-Mac-mini openmpi-4.0.1 % ./configure CC=clang CXX=clang++ FC=gfortran-9 F77=gfortran-9 --prefix=$HOME/opt/usr/local

checking for perl… perl

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

== Configuring Open MPI

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

*** Startup tests

checking build system type… arm-apple-darwin20.6.0

checking host system type… arm-apple-darwin20.6.0

checking target system type… arm-apple-darwin20.6.0

checking for gcc… clang

checking whether the C compiler works… yes

checking for C compiler default output file name… a.out

checking for suffix of executables…

checking whether we are cross compiling… no

checking for suffix of object files… o

checking whether we are using the GNU C compiler… yes

checking whether clang accepts -g… yes

checking for clang option to accept ISO C89… none needed

checking whether clang understands -c and -o together… yes

checking how to run the C preprocessor… clang -E

checking for grep that handles long lines and -e… /usr/bin/grep

checking for egrep… /usr/bin/grep -E

checking for ANSI C header files… yes

checking for sys/types.h… yes

checking for sys/stat.h… yes

checking for stdlib.h… yes

checking for string.h… yes

checking for memory.h… yes

checking for strings.h… yes

checking for inttypes.h… yes

checking for stdint.h… yes

checking for unistd.h… yes

checking minix/config.h usability… no

checking minix/config.h presence… no

checking for minix/config.h… no

checking whether it is safe to define EXTENSIONS… yes

checking for a BSD-compatible install… /usr/bin/install -c

checking whether build environment is sane… yes

checking for a thread-safe mkdir -p… config/install-sh -c -d

checking for gawk… no

checking for mawk… no

checking for nawk… no

checking for awk… awk

checking whether make sets $(MAKE)… yes

checking for style of include used by make… GNU

checking whether make supports nested variables… yes

checking whether UID ‘501’ is supported by ustar format… yes

checking whether GID ‘20’ is supported by ustar format… yes

checking how to create a ustar tar archive… gnutar

checking dependency style of clang… gcc3

checking whether make supports nested variables… (cached) yes

*** Checking versions

checking for repo version… v4.0.1

checking Open MPI version… 4.0.1

checking Open MPI release date… Mar 26, 2019

checking Open MPI repository version… v4.0.1

checking for repo version… v4.0.1

checking Open MPI Run-Time Environment version… 4.0.1

checking Open MPI Run-Time Environment release date… Mar 26, 2019

checking Open MPI Run-Time Environment repository version… v4.0.1

checking for repo version… v4.0.1

checking Open SHMEM version… 4.0.1

checking Open SHMEM release date… Mar 26, 2019

checking Open SHMEM repository version… v4.0.1

checking for repo version… v4.0.1

checking Open Portable Access Layer version… 4.0.1

checking Open Portable Access Layer release date… Mar 26, 2019

checking Open Portable Access Layer repository version… v4.0.1

checking for bootstrap Autoconf version… 2.69

checking for bootstrap Automake version… 1.15

checking for boostrap Libtool version… 2.4.6

*** Initialization, setup

configure: builddir: /Users/x/openmpi-4.0.1

configure: srcdir: /Users/x/openmpi-4.0.1

installing to directory “/Users/x/opt/usr/local”

*** OPAL Configuration options

checking if want to run code coverage… no

checking if want to compile with branch probabilities… no

checking if want to debug memory usage… no

checking if want to profile memory usage… no

checking if want developer-level compiler pickyness… no

checking if want developer-level debugging code… no

checking if want to developer-level timing framework… no

checking if want to install project-internal header files… no

checking if want pretty-print stacktrace… yes

checking if want pty support… yes

checking if want weak symbol support… yes

checking if want dlopen support… yes

checking for default value of mca_base_component_show_load_errors… enabled by default

checking if want heterogeneous support… no

checking if word-sized integers must be word-size aligned… no

checking if want IPv6 support… no

checking if want package/brand string… Open MPI x@Ligas-Mac-mini.local Distribution

checking if want ident string… 4.0.1

checking if want to use an alternative checksum algo for messages… no

checking maximum length of processor name… 256

checking maximum length of error string… 256

checking maximum length of object name… 64

checking maximum length of info key… 36

checking maximum length of info val… 256

checking maximum length of port name… 1024

checking maximum length of datarep string… 128

checking if want getpwuid support… yes

checking for zlib in… (default search paths)

checking zlib.h usability… yes

checking zlib.h presence… yes

checking for zlib.h… yes

looking for library without search path

checking for library containing deflate… -lz

checking will zlib support be built… yes

checking NetBSD… no

checking FreeBSD… no

checking OpenBSD… no

checking DragonFly… no

checking 386BSD… no

checking bsdi… no

checking APPLE… yes

checking linux… no

checking sun… no

checking __sun… no

checking netdb.h usability… yes

checking netdb.h presence… yes

checking for netdb.h… yes

checking netinet/in.h usability… yes

checking netinet/in.h presence… yes

checking for netinet/in.h… yes

checking netinet/tcp.h usability… yes

checking netinet/tcp.h presence… yes

checking for netinet/tcp.h… yes

checking for struct sockaddr_in… yes

checking if --with-cuda is set… not set (–with-cuda=)

checking whether CU_POINTER_ATTRIBUTE_SYNC_MEMOPS is declared… no

checking whether cuPointerGetAttributes is declared… no

checking if have cuda support… no

checking if user requested PMI support… no

checking if user requested internal PMIx support()… no

checking for pmix.h in /usr… not found

checking for pmix.h in /usr/include… not found

configure: WARNING: discovered external PMIx version is less than internal version 3.x

configure: WARNING: using internal PMIx

*** ORTE Configuration options

checking if want orterun “–prefix” behavior to be enabled by default… no

*** OMPI Configuration options

checking if want compile-time warnings inside of mpi.h… yes

checking if want sparse process groups… no

checking if want peruse support… no

checking if want Fortran MPI bindings… (try)

checking if want C++ bindings… no

checking if want MPI::SEEK_SET support… yes

checking if want run-time MPI parameter checking… runtime

*** OSHMEM Configuration options

checking if want oshmem… not supported on this platform

checking if want SGI/Quadrics compatibility mode… yes

checking if want OSHMEM API parameter checking… always

checking for on_exit… no

checking if want pshmem… yes

checking if want to build OSHMEM fortran bindings… yes

no

checking if want custom libmpi(_FOO) name… mpi

checking if want wrapper compiler rpath support… yes

checking if want wrapper compiler runpath support… yes

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

== Compiler and preprocessor tests

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

*** C compiler and preprocessor

checking for gcc… (cached) clang

checking whether we are using the GNU C compiler… (cached) yes

checking whether clang accepts -g… (cached) yes

checking for clang option to accept ISO C89… (cached) none needed

checking whether clang understands -c and -o together… (cached) yes

checking if clang requires a flag for C11… no

configure: verifying clang supports C11 without a flag

checking if clang supports C11 _Thread_local… yes

checking if clang supports C11 atomic variables… yes

checking if clang supports C11 _Atomic keyword… yes

checking if clang supports C11 _Generic keyword… yes

checking if clang supports C11 _Static_assert… yes

checking if clang supports C11 atomic_fetch_xor_explicit… yes

configure: no flag required for C11 support

checking if clang supports __thread… yes

checking if clang supports C11 _Thread_local… yes

checking for the C compiler vendor… gnu

checking for ANSI C header files… (cached) yes

checking if clang supports -finline-functions… yes

checking if clang supports -fno-strict-aliasing… yes

configure: WARNING: -fno-strict-aliasing has been added to CFLAGS

checking if clang supports __builtin_expect… yes

checking if clang supports __builtin_prefetch… yes

checking if clang supports __builtin_clz… yes

checking for C optimization flags… -O3 -DNDEBUG -finline-functions -fno-strict-aliasing

checking for Interix environment… no

checking for C ident string support… static const char

checking for int8_t… yes

checking for uint8_t… yes

checking for int16_t… yes

checking for uint16_t… yes

checking for int32_t… yes

checking for uint32_t… yes

checking for int64_t… yes

checking for uint64_t… yes

checking for int128_t… no

checking for __int128… yes

checking for uint128_t… no

checking for long long… yes

checking for __float128… no

checking for long double… yes

checking complex.h usability… yes

checking complex.h presence… yes

checking for complex.h… yes

checking for float _Complex… yes

checking for double _Complex… yes

checking for long double _Complex… yes

checking for intptr_t… yes

checking for uintptr_t… yes

checking for mode_t… yes

checking for ssize_t… yes

checking for ptrdiff_t… yes

checking size of _Bool… 1

checking size of char… 1

checking size of short… 2

checking size of int… 4

checking size of long… 8

checking size of long long… 8

checking size of float… 4

checking size of double… 8

checking size of long double… 8

checking size of float _Complex… 8

checking size of double _Complex… 16

checking size of long double _Complex… 16

checking size of void *… 8

checking size of size_t… 8

checking size of ssize_t… 8

checking size of ptrdiff_t… 8

checking size of wchar_t… 4

checking size of pid_t… 4

checking size of atomic_short… 2

checking size of atomic_int… 4

checking size of atomic_long… 8

checking size of atomic_llong… 8

checking alignment of bool… 1

checking alignment of int8_t… 1

checking alignment of int16_t… 2

checking alignment of int32_t… 4

checking alignment of int64_t… 8

checking alignment of char… 1

checking alignment of short… 2

checking alignment of wchar_t… 4

checking alignment of int… 4

checking alignment of long… 8

checking alignment of long long… 8

checking alignment of float… 4

checking alignment of double… 8

checking alignment of long double… 8

checking alignment of float _Complex… 4

checking alignment of double _Complex… 8

checking alignment of long double _Complex… 8

checking alignment of void *… 8

checking alignment of size_t… 8

checking for weak symbol support… no

checking for macro weak symbol support… no

checking for functional offsetof macro… yes

*** C++ compiler and preprocessor

checking whether we are using the GNU C++ compiler… yes

checking whether clang++ accepts -g… yes

checking dependency style of clang++… gcc3

checking how to run the C++ preprocessor… clang++ -E

checking for the C++ compiler vendor… gnu

checking if clang++ supports -finline-functions… yes

configure: WARNING: -finline-functions has been added to CXXFLAGS

checking if C and C++ are link compatible… yes

checking for C++ optimization flags… -O3 -DNDEBUG -finline-functions

checking size of bool… 1

checking alignment of bool… (cached) 1

*** C++ compiler and preprocessor

checking whether we are using the GNU C++ compiler… (cached) yes

checking whether clang++ accepts -g… (cached) yes

checking dependency style of clang++… (cached) gcc3

checking how to run the C++ preprocessor… clang++ -E

checking if C++ compiler works… yes

checking if clang++ supports -finline-functions… yes

configure: WARNING: -finline-functions has been added to CXXFLAGS

checking if C and C++ are link compatible… (cached) yes

checking for C++ optimization flags… -O3 -DNDEBUG -finline-functions

checking size of bool… (cached) 1

checking alignment of bool… (cached) 1

checking if able to build the MPI C++ bindings… no

checking if want C++ exception handling… skipped

*** Compiler characteristics

checking for attribute… yes

checking for attribute(aligned)… yes

checking for attribute(always_inline)… yes

checking for attribute(cold)… yes

checking for attribute(const)… yes

checking for attribute(deprecated)… yes

checking for attribute(deprecated_argument)… yes

checking for attribute(error)… no

checking for attribute(format)… yes

checking for attribute(format_funcptr)… no

checking for attribute(hot)… yes

checking for attribute(malloc)… yes

checking for attribute(may_alias)… yes

checking for attribute(no_instrument_function)… yes

checking for attribute(noinline)… yes

checking for attribute(nonnull)… yes

checking for attribute(noreturn)… yes

checking for attribute(noreturn_funcptr)… yes

checking for attribute(packed)… yes

checking for attribute(pure)… yes

checking for attribute(sentinel)… yes

checking for attribute(unused)… yes

checking for attribute(visibility)… yes

checking for attribute(warn_unused_result)… yes

checking for attribute(weak_alias)… no

checking for attribute(destructor)… yes

checking for attribute(optnone)… yes

checking for attribute(extension)… yes

checking for compiler familyid… 1

checking for compiler familyname… GNU

checking for compiler version… 262657

checking for compiler version_str… 4.2.1

*** Java MPI bindings

checking if want Java bindings… no

*** OpenSHMEM profiling

checking if pshmem will be enabled… no (OpenSHMEM disabled)

*** Assembler

checking dependency style of clang… gcc3

checking for BSD- or MS-compatible name lister (nm)… /usr/bin/nm -B

checking the name lister (/usr/bin/nm -B) interface… BSD nm

checking for fgrep… /usr/bin/grep -F

checking for __atomic builtin atomics… yes

checking for __atomic_compare_exchange_n… yes

checking if __atomic_compare_exchange_n() gives correct results… yes

checking if __int128 atomic compare-and-swap is always lock-free… yes

checking if .proc/endp is needed… no

checking directive for setting text section… .text

checking directive for exporting symbols… .globl

checking for objdump… objdump

checking if .note.GNU-stack is needed… /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: error: ‘conftest.o’: Invalid/Unsupported object file format

no

checking suffix for labels… :

checking prefix for global symbol labels… _

checking prefix for lsym labels… L

checking prefix for function in .type…

checking if .size is needed… no

checking if .align directive takes logarithmic value… yes

checking for __sync builtin atomics… yes

checking for 64-bit __sync builtin atomics… yes

checking for __sync_bool_compare_and_swap… yes

checking if __sync_bool_compare_and_swap() gives correct results… yes

checking for assembly architecture… UNSUPPORTED

checking for builtin atomics… BUILTIN_SYNC

*** Fortran compiler

checking whether we are using the GNU Fortran compiler… no

checking whether gfortran-9 accepts -g… no

configure: WARNING: Open MPI now ignores the F77 and FFLAGS environment variables; only the FC and FCFLAGS environment variables are used.

checking whether ln -s works… yes

checking if Fortran compiler works… no


  • It appears that your Fortran compiler is unable to produce working

  • executables. A simple test application failed to properly

  • execute. Note that this is likely not a problem with Open MPI,

  • but a problem with the local compiler installation. More

  • information (including exactly what command was given to the

  • compiler and what error resulted when the command was executed) is

  • available in the config.log file in the Open MPI build directory.


configure: error: Could not run a simple Fortran program. Aborting.

Would you please tell me what I should do? Thanks!

This is not an OpenMPI support board, you should get in touch with OpenMPI people. If you compile FreeFEM with PETSc support, it will automatically detect you don’t have MPI installed and install MPICH for you. I’d recommend you to do that.

Thank you for your reply. By the way, would you please tell me whether FreeFem++ can work in MacOS Big Sur 11.6 with Apple M1 chips?

It should, but if you face additional issues, please let us know.

Thank you for your prompt reply! Is the installation guide of Version 4.5 still feasible to MacOS Big Sur 11.6 with Apple M1 chips? If not, does there exists the updated version? Thank you!

I don’t know about this installation guide. If you follow these steps and something fails, I’ll help you out: http://jolivet.perso.enseeiht.fr/FreeFem-tutorial/main.pdf#page=26.

Thank you so much. It does work in MacOS Big Sur 11.6 with Apple M1 chips.

Sorry to bother you again. There is another question. I can now run my program in Atom by atom-runner package. If I want to run it directly in Terminal, what should I do?

> FreeFem++ program.edp

or

> ${PREFIX}/bin/FreeFem++ program.edp

if you used the parameter --prefix=${PREFIX} during FreeFEM configuration.

Thank you so much!It works.

Hi, we tested it on Big Sur and Monterey. It works properly. Also, we tested on the M1 chip, it works as well.

Thank you for your reply!