Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with GEARSHIFFT_BACKEND_FFTW_THREADS #140

Open
emmenlau opened this issue Mar 9, 2019 · 3 comments
Open

Problems with GEARSHIFFT_BACKEND_FFTW_THREADS #140

emmenlau opened this issue Mar 9, 2019 · 3 comments

Comments

@emmenlau
Copy link
Contributor

emmenlau commented Mar 9, 2019

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
Copy link
Contributor

  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
Copy link
Contributor

... 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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants