mpicbg-scicomp / gearshifft

Benchmark Suite for Heterogenuous FFT Implementations
Apache License 2.0
34 stars 9 forks source link

Problems with GEARSHIFFT_BACKEND_FFTW_THREADS #140

Open emmenlau opened 5 years ago

emmenlau commented 5 years ago

I'm having a bit of trouble with the MacOSX build and GEARSHIFFT_BACKEND_FFTW_THREADS. There are two things that may be suboptimal:

  1. There is only a single flag GEARSHIFFT_BACKEND_FFTW_THREADS that seems to be triggered for FFTW and FFTWWrappers. Is this intentionally? I would assume that the libraries require separate flags since they do not necessarily share any properties, or am I on the wrong track(?)
  2. The build uses
    #if defined(GEARSHIFFT_BACKEND_FFTW_THREADS) && GEARSHIFFT_BACKEND_FFTW_THREADS==1

    in inc/libraries/fftw/fftw.hpp:381. Since I have GEARSHIFFT_BACKEND_FFTW_THREADS not set on MacOSX, cmake creates the compiler define as -DGEARSHIFFT_BACKEND_FFTW_THREADS="". Apple Clang does not seem like this combination, it complains about error: invalid token at start of a preprocessor expression. I guess this needs some sort of resolution. I could think of several simple workarounds, like defining GEARSHIFFT_BACKEND_FFTW_THREADS as 0 or 1 instead of empty, or other similar solutions. Do you have a specific preference?

tdd11235813 commented 5 years ago
  1. FFTWWrappers backend just uses the FFTW backend code. CMake invokes different include and lib paths for FFTWWrappers, but it does not change the backend code itself, thus the same flag is applied here. So it is intentional, because the FFTW backend code is not supposed to contain FFTWWrappers' logic (as FFTWWrappers just wraps FFTW).
  2. Ah ok, yes, the FFTWWrappers part in cmake is incomplete, I'll gonna fix it.
tdd11235813 commented 5 years ago

... ok, well, I will provide a separate FFTWWrappers cmake options set though. I do not like the current mixed FFTW and FFTWWrappers cmake code.

emmenlau commented 5 years ago

Great, thanks a lot! I'm curious to test FFTWWrappers on MacOS X, looking forward!