How to install FFTW-3.3.10 on an M2 MacBook Pro?

I'm trying to install fftw to run my MPI code which also requires the use of fftw3-MPI header file (#include <fftw3-mpi.h>). I have no problem running the code on other systems such as Linux, but I cannot install fftw on M2 MacBook pro.

I got the following error:

# **checking build system type... Invalid configuration arm64-apple-darwin20.0.0': machine arm64-apple' not recognized
configure: error: /bin/sh ./config.sub arm64-apple-darwin20.0.0 failed

I downloaded the latest version of the FFTW from the website www.fftw.org. I did following steps:

  1. ./configure
  2. make
  3. make install


However, I am getting error at the configure step. I also tried to install fftw using Homebrew. I got the following error:

aad.c:2:10: fatal error: 'fftw3-mpi.h' file not found
#include <fftw3-mpi.h>
^~~~~~~~~~~~~
1 error generated.
--------------------------------------------------------------------------
mpirun was unable to find the specified executable file, and therefore
did not launch the job. This error was first reported for process
rank 0; it may have occurred for other processes as well.
NOTE: A common cause for this error is misspelling a mpirun command
line parameter option (remember that mpirun interprets the first
unrecognized command line token as the executable).


MacBook Pro 14″, macOS 13.3

Posted on Jun 15, 2023 11:43 PM

Reply

Similar questions

2 replies

Jun 16, 2023 4:02 AM in response to shrikant224

Does any of that even run on Apple Silicon? At a bare minimum, you would need to download and install the whole LLVM toolchain directly. Maybe you could get some form of MPI running on that. Maybe fftw could be make to work with that. But in no case would you ever be able to just run "./configure". The first thing you'll have to do is made modifications to those autoconf source files to detect everything. Welcome to open source!


Another option would be to just use Apple's built-in Accelerate framework.

Jun 16, 2023 5:20 AM in response to etresoft

Looks like the configuration error (not recognizing platform 'arm64-apple-darwin20.0.0') is the cause of the rest of it (not installing the header file, and therefore not being able to compile the C file). I don't know how much toolchain work would be involved in getting the platform recognized in every place that matters, but what you're seeing appears to be a classic example of cascading build failures.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to install FFTW-3.3.10 on an M2 MacBook Pro?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.