Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions easybuild/toolchains/fft/intelfftw.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,18 @@ def _set_fftw_variables(self):
# so make sure libraries are there before FFT_LIB is set
imklroot = get_software_root(self.FFT_MODULE_NAME[0])
fft_lib_dirs = [os.path.join(imklroot, d) for d in self.FFT_LIB_DIR]
# filter out libraries from list of FFTW libraries to check for if they are not provided by Intel MKL
check_fftw_libs = [lib for lib in fftw_libs if lib not in ['dl', 'gfortran']]
fftw_lib_exists = lambda x: any([os.path.exists(os.path.join(d, "lib%s.a" % x)) for d in fft_lib_dirs])
if not fftw_lib_exists(interface_lib) and LooseVersion(imklver) >= LooseVersion("10.2"):
# interface libs can be optional:
# MKL >= 10.2 include fftw3xc and fftw3xf interfaces in LIBBLAS=libmkl_gf/libmkl_intel
# See https://software.intel.com/en-us/articles/intel-mkl-main-libraries-contain-fftw3-interfaces
# The cluster interface libs (libfftw3x_cdft*) can be omitted if the toolchain does not provide MPI-FFTW
# interfaces.
check_fftw_libs = [l for l in check_fftw_libs if l not in [interface_lib, cluster_interface_lib]]
fftw_libs = [l for l in fftw_libs if l not in [interface_lib, cluster_interface_lib]]

# filter out libraries from list of FFTW libraries to check for if they are not provided by Intel MKL
check_fftw_libs = [lib for lib in fftw_libs if lib not in ['dl', 'gfortran']]

if all([fftw_lib_exists(lib) for lib in check_fftw_libs]):
self.FFT_LIB = fftw_libs
else:
Expand Down