Open dev-zero opened 3 years ago
Thanks for reporting this.
The issue of linking to libfftw3f
, when it is not required, should now be fixed by b27601a in the develop branch.
I don't see anything within SpFFT to cause linking to libfftw3_threads
and libfftw3_mpi
, so I think that might be caused by setting CMake linking flags externally. On my local machine with macOS, I could not observe this issue (manual build and with Spack).
@AdhocMan thanks for the fix, I'll test it. Depending on your default linker flags (distros nowadays often carry an implicit -Wl,--as-needed
) it might be automatically removed when no symbols were used from a library afaik. At least within the Spack package I couldn't find a hint that the FFTW libraries were set explicitly, but I'll check the CMake log when rebuilding.
The consequence of the current logic
https://github.com/eth-cscs/SpFFT/blob/473cf7552088bfb6a41e5da5ac984dbc1d89050c/cmake/modules/FindFFTW.cmake#L97-L102
is that
libspfft.so
is always linked againstlibfftw3f.so
if found even when single precision is not requested.Furthermore I see
libfftw3_threads
to be linked despitespfft
not calling fftw with threads (just a quick glance, I may be wrong):