Skip to content

Commit b64c496

Browse files
author
ocaisa
authored
Merge pull request #3776 from Flamefire/intel_fftw
Improve warning about missing intel fftw libs
2 parents 3cc608b + 78f609f commit b64c496

File tree

13 files changed

+24
-23
lines changed

13 files changed

+24
-23
lines changed

.github/workflows/bootstrap_script.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
EB_BOOTSTRAP_VERSION=$(grep '^EB_BOOTSTRAP_VERSION' easybuild/scripts/bootstrap_eb.py | sed 's/[^0-9.]//g')
108108
EB_BOOTSTRAP_SHA256SUM=$(sha256sum easybuild/scripts/bootstrap_eb.py | cut -f1 -d' ')
109109
EB_BOOTSTRAP_FOUND="$EB_BOOTSTRAP_VERSION $EB_BOOTSTRAP_SHA256SUM"
110-
EB_BOOTSTRAP_EXPECTED="20210618.01 e5d477d717c6d3648ba2027ab735713ba5804fbf52f4b4adcca0bc1379b44618"
110+
EB_BOOTSTRAP_EXPECTED="20210715.01 784dd29063d941be2d8b70e4c2eec12a9afe360f3ef8f753dcb518abf43ca7de"
111111
test "$EB_BOOTSTRAP_FOUND" = "$EB_BOOTSTRAP_EXPECTED" || (echo "Version check on bootstrap script failed $EB_BOOTSTRAP_FOUND" && exit 1)
112112
113113
# test bootstrap script

easybuild/framework/easyconfig/easyconfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ def validate_os_deps(self):
881881
raise EasyBuildError("Non-tuple value type for OS dependency specification: %s (type %s)",
882882
dep, type(dep))
883883

884-
if not any([check_os_dependency(cand_dep) for cand_dep in dep]):
884+
if not any(check_os_dependency(cand_dep) for cand_dep in dep):
885885
not_found.append(dep)
886886

887887
if not_found:

easybuild/framework/easyconfig/format/format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ def get_version_toolchain(self, version=None, tcname=None, tcversion=None):
577577
self.log.debug("No toolchain version specified, using default %s" % tcversion)
578578
else:
579579
raise EasyBuildError("No toolchain version specified, no default found.")
580-
elif any([tc.test(tcname, tcversion) for tc in tcs]):
580+
elif any(tc.test(tcname, tcversion) for tc in tcs):
581581
self.log.debug("Toolchain '%s' version '%s' is supported in easyconfig" % (tcname, tcversion))
582582
else:
583583
raise EasyBuildError("Toolchain '%s' version '%s' not supported in easyconfig (only %s)",

easybuild/scripts/bootstrap_eb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
import urllib.request as std_urllib
6363

6464

65-
EB_BOOTSTRAP_VERSION = '20210618.01'
65+
EB_BOOTSTRAP_VERSION = '20210715.01'
6666

6767
# argparse preferrred, optparse deprecated >=2.7
6868
HAVE_ARGPARSE = False
@@ -925,7 +925,7 @@ def main():
925925
for path in orig_sys_path:
926926
include_path = True
927927
# exclude path if it's potentially an EasyBuild/VSC package, providing the 'easybuild'/'vsc' namespace, resp.
928-
if any([os.path.exists(os.path.join(path, pkg, '__init__.py')) for pkg in ['easyblocks', 'easybuild', 'vsc']]):
928+
if any(os.path.exists(os.path.join(path, pkg, '__init__.py')) for pkg in ['easyblocks', 'easybuild', 'vsc']):
929929
include_path = False
930930
# exclude any .egg paths
931931
if path.endswith('.egg'):

easybuild/toolchains/fft/intelfftw.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _set_fftw_variables(self):
9898

9999
def fftw_lib_exists(libname):
100100
"""Helper function to check whether FFTW library with specified name exists."""
101-
return any([os.path.exists(os.path.join(d, "lib%s.a" % libname)) for d in fft_lib_dirs])
101+
return any(os.path.exists(os.path.join(d, "lib%s.a" % libname)) for d in fft_lib_dirs)
102102

103103
if not fftw_lib_exists(interface_lib) and LooseVersion(imklver) >= LooseVersion("10.2"):
104104
# interface libs can be optional:
@@ -112,14 +112,15 @@ def fftw_lib_exists(libname):
112112
# filter out libraries from list of FFTW libraries to check for if they are not provided by Intel MKL
113113
check_fftw_libs = [lib for lib in fftw_libs if lib not in ['dl', 'gfortran']]
114114

115-
if all([fftw_lib_exists(lib) for lib in check_fftw_libs]):
116-
self.FFT_LIB = fftw_libs
117-
else:
115+
missing_fftw_libs = [lib for lib in check_fftw_libs if not fftw_lib_exists(lib)]
116+
if missing_fftw_libs:
118117
msg = "Not all FFTW interface libraries %s are found in %s" % (check_fftw_libs, fft_lib_dirs)
119-
msg += ", can't set $FFT_LIB."
118+
msg += ", can't set $FFT_LIB. Missing: %s" % (missing_fftw_libs)
120119
if self.dry_run:
121120
dry_run_warning(msg, silent=build_option('silent'))
122121
else:
123122
raise EasyBuildError(msg)
123+
else:
124+
self.FFT_LIB = fftw_libs
124125

125126
self.FFT_LIB_MT = fftw_mt_libs

easybuild/tools/filetools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ def det_common_path_prefix(paths):
528528
found_common = False
529529
while not found_common and prefix != os.path.dirname(prefix):
530530
prefix = os.path.dirname(prefix)
531-
found_common = all([p.startswith(prefix) for p in paths])
531+
found_common = all(p.startswith(prefix) for p in paths)
532532

533533
if found_common:
534534
# prefix may be empty string for relative paths with a non-common prefix

easybuild/tools/github.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,7 @@ def reasons_for_closing(pr_data):
12751275
if uses_archived_tc:
12761276
possible_reasons.append('archived')
12771277

1278-
if any([e['name'] in pr_data['title'] for e in obsoleted]):
1278+
if any(e['name'] in pr_data['title'] for e in obsoleted):
12791279
possible_reasons.append('obsolete')
12801280

12811281
return possible_reasons
@@ -1804,7 +1804,7 @@ def det_pr_target_repo(paths):
18041804

18051805
# if all Python files are easyblocks, target repo should be easyblocks;
18061806
# otherwise, target repo is assumed to be framework
1807-
if all([get_easyblock_class_name(path) for path in py_files]):
1807+
if all(get_easyblock_class_name(path) for path in py_files):
18081808
pr_target_repo = GITHUB_EASYBLOCKS_REPO
18091809
_log.info("All Python files are easyblocks, target repository is assumed to be %s", pr_target_repo)
18101810
else:

easybuild/tools/options.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -883,14 +883,14 @@ def postprocess(self):
883883
self._postprocess_include()
884884

885885
# prepare for --list/--avail
886-
if any([self.options.avail_easyconfig_params, self.options.avail_easyconfig_templates,
886+
if any((self.options.avail_easyconfig_params, self.options.avail_easyconfig_templates,
887887
self.options.list_easyblocks, self.options.list_toolchains, self.options.avail_cfgfile_constants,
888888
self.options.avail_easyconfig_constants, self.options.avail_easyconfig_licenses,
889889
self.options.avail_repositories, self.options.show_default_moduleclasses,
890890
self.options.avail_modules_tools, self.options.avail_module_naming_schemes,
891891
self.options.show_default_configfiles, self.options.avail_toolchain_opts,
892892
self.options.avail_hooks, self.options.show_system_info,
893-
]):
893+
)):
894894
build_easyconfig_constants_dict() # runs the easyconfig constants sanity check
895895
self._postprocess_list_avail()
896896

test/framework/docs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def test_list_software(self):
260260
]
261261
txt = list_software(output_format='txt', detailed=True)
262262
lines = txt.split('\n')
263-
expected_found = any([lines[i:i + len(expected)] == expected for i in range(len(lines))])
263+
expected_found = any(lines[i:i + len(expected)] == expected for i in range(len(lines)))
264264
self.assertTrue(expected_found, "%s found in: %s" % (expected, lines))
265265

266266
expected = [
@@ -283,7 +283,7 @@ def test_list_software(self):
283283
]
284284
txt = list_software(output_format='rst', detailed=True)
285285
lines = txt.split('\n')
286-
expected_found = any([lines[i:i + len(expected)] == expected for i in range(len(lines))])
286+
expected_found = any(lines[i:i + len(expected)] == expected for i in range(len(lines)))
287287
self.assertTrue(expected_found, "%s found in: %s" % (expected, lines))
288288

289289

test/framework/filetools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ def test_multidiff(self):
10091009

10101010
# no postinstallcmds in toy-0.0-deps.eb
10111011
expected = "29 %s+ postinstallcmds = " % green
1012-
self.assertTrue(any([line.startswith(expected) for line in lines]))
1012+
self.assertTrue(any(line.startswith(expected) for line in lines))
10131013
expected = "30 %s+%s (1/2) toy-0.0" % (green, endcol)
10141014
self.assertTrue(any(line.startswith(expected) for line in lines), "Found '%s' in: %s" % (expected, lines))
10151015
self.assertEqual(lines[-1], "=====")

0 commit comments

Comments
 (0)