mpip / pfft

Parallel fast Fourier transforms
GNU General Public License v3.0
54 stars 23 forks source link

pfft on Android #38

Open YSDC opened 1 year ago

YSDC commented 1 year ago

Hello, I try to compile PFFT for Android. I was expecting to build it for the multiple architecture that I have to support (armeabi-v7a and arm64-v8a) by adding first parameters to the configure command like this:

./configure CXX="/Users/XXX/Library/Android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -target aarch64-linux-android" --prefix=/Users/XXX/Downloads/pfft-master/arm64-v8a

This command will replace gcc by clang as gcc is not able to compile for the two architectures that I need. the configure command works well but when I try to execute make, it complaines that symbol(s) not found for architecture x86_64.

I looked into the generated makefile and other files and it seems that gcc is used anyway, even if I pass clang in the CC parameters of the configure command.

Any idea on how I could generate the library for the two mentioned architectures?

mpip commented 1 year ago

Hi,

do you have good reasons to use PFFT on mobile phones? I do not think that they are made for massively parallel computing via MPI. Do your already have FFTW with enabled MPI support for Android (since this is mandantory for PFFT).

Regarding your question: I never built PFFT with Android or llvm and I can not test it on my own but here are some hints: Try to adapt the install script from https://www-user.tu-chemnitz.de/~potts/workgroup/pippig/software/install_pfft-1.0.8-alpha_gcc.sh at your needs -- or at least use the call of configure from this file. Note that you have to set the MPICC variable to make sure that the correct C-compiler is used. You also have to add the path to FFTW headers to CPPFLAGS and the path to the FFTW-MPI libs to LDFLAGS.