Skip to content

Commit a3dbe00

Browse files
committed
Merge branch 'develop' into modules_unit_tests
2 parents f297d32 + 3fb386c commit a3dbe00

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+861
-51
lines changed

.github/workflows/unit_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ jobs:
103103
# and are only run after the PR gets merged
104104
GITHUB_TOKEN: ${{secrets.CI_UNIT_TESTS_GITHUB_TOKEN}}
105105
run: |
106-
# don't install GitHub token when testing with Lmod 7.x or non-Lmod module tools, to avoid hitting GitHub rate limit;
106+
# only install GitHub token when testing with Lmod 8.x + Python 3.6 or 3.9, to avoid hitting GitHub rate limit;
107107
# tests that require a GitHub token are skipped automatically when no GitHub token is available
108-
if [[ ! "${{matrix.modules_tool}}" =~ 'Lmod-7' ]] && [[ ! "${{matrix.modules_tool}}" =~ 'modules-' ]]; then
108+
if [[ "${{matrix.modules_tool}}" =~ 'Lmod-8' ]] && [[ "${{matrix.python}}" =~ 3.[69] ]]; then
109109
if [ ! -z $GITHUB_TOKEN ]; then
110110
SET_KEYRING="import keyrings.alt.file; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring())";
111111
python -c "import keyring; $SET_KEYRING; keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')";

RELEASE_NOTES

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@ For more detailed information, please see the git log.
44
These release notes can also be consulted at https://easybuild.readthedocs.io/en/latest/Release_notes.html.
55

66

7+
v4.8.2 (29 October 2023)
8+
------------------------
9+
10+
update/bugfix release
11+
12+
- various enhancements, including:
13+
- add support for `%(sysroot)s` template value (#4359)
14+
- add `dependency_names` method to `EasyConfig` class to get set of names of (direct) dependencies (#4360)
15+
- various bug fixes, including:
16+
- add CI workflow to run unit tests with Python 2 (again) (#4333)
17+
- fix typo in help message for `--silence-hook-trigger` (#4343)
18+
- include major version (`*majver`) templates in auto-generated documentation (#4347)
19+
- reset `tempfile.tempdir` to `None` to avoid that tmpdir path gets progressively deeper with each easystack item (#4350)
20+
- fix `findPythonDeps.py` script when called with an (absolute or relative) path to an easyconfig instead of a filename (#4365)
21+
- fix broken test for `reasons_for_closing`, which fails because commit status of easyconfigs PR is no longer available (#4366)
22+
- other changes:
23+
- reduce number of CI jobs by testing for Lua and Tcl module syntax in a single CI job (#4192)
24+
25+
726
v4.8.1 (11 September 2023)
827
--------------------------
928

easybuild/framework/easyblock.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,9 +1739,15 @@ def _make_extension_list(self):
17391739
17401740
Each entry should be a (name, version) tuple or just (name, ) if no version exists
17411741
"""
1742-
# We need only name and version, so don't resolve templates
17431742
# Each extension in exts_list is either a string or a list/tuple with name, version as first entries
1744-
return [(ext, ) if isinstance(ext, string_type) else ext[:2] for ext in self.cfg.get_ref('exts_list')]
1743+
# As name can be a templated value we must resolve templates
1744+
exts_list = []
1745+
for ext in self.cfg.get_ref('exts_list'):
1746+
if isinstance(ext, string_type):
1747+
exts_list.append((resolve_template(ext, self.cfg.template_values), ))
1748+
else:
1749+
exts_list.append((resolve_template(ext[0], self.cfg.template_values), ext[1]))
1750+
return exts_list
17451751

17461752
def make_extension_string(self, name_version_sep='-', ext_sep=', ', sort=True):
17471753
"""
@@ -4656,8 +4662,14 @@ def inject_checksums(ecs, checksum_type):
46564662
"""
46574663
def make_list_lines(values, indent_level):
46584664
"""Make lines for list of values."""
4665+
def to_str(s):
4666+
if isinstance(s, string_type):
4667+
return "'%s'" % s
4668+
else:
4669+
return str(s)
4670+
46594671
line_indent = INDENT_4SPACES * indent_level
4660-
return [line_indent + "'%s'," % x for x in values]
4672+
return [line_indent + to_str(x) + ',' for x in values]
46614673

46624674
def make_checksum_lines(checksums, indent_level):
46634675
"""Make lines for list of checksums."""

easybuild/framework/easyconfig/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ def find_related_easyconfigs(path, ec):
472472
if len(parsed_version) >= 2:
473473
version_patterns.append(r'%s\.%s\.\w+' % tuple(parsed_version[:2])) # major/minor version match
474474
if parsed_version != parsed_version[0]:
475-
version_patterns.append(r'%s\.[\d-]+\.\w+' % parsed_version[0]) # major version match
475+
version_patterns.append(r'%s\.[\d-]+(\.\w+)*' % parsed_version[0]) # major version match
476476
version_patterns.append(r'[\w.]+') # any version
477477

478478
regexes = []

easybuild/framework/easyconfig/tweak.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,7 @@ def tweak(easyconfigs, build_specs, modtool, targetdirs=None):
9191
tweaked_ecs_path, tweaked_ecs_deps_path = None, None
9292
if targetdirs is not None:
9393
tweaked_ecs_path, tweaked_ecs_deps_path = targetdirs
94-
# make sure easyconfigs all feature the same toolchain (otherwise we *will* run into trouble)
95-
toolchains = nub(['%(name)s/%(version)s' % ec['ec']['toolchain'] for ec in easyconfigs])
96-
if len(toolchains) > 1:
97-
raise EasyBuildError("Multiple toolchains featured in easyconfigs, --try-X not supported in that case: %s",
98-
toolchains)
99-
# Toolchain is unique, let's store it
100-
source_toolchain = easyconfigs[-1]['ec']['toolchain']
10194
modifying_toolchains_or_deps = False
102-
target_toolchain = {}
10395
src_to_dst_tc_mapping = {}
10496
revert_to_regex = False
10597

@@ -117,6 +109,16 @@ def tweak(easyconfigs, build_specs, modtool, targetdirs=None):
117109
revert_to_regex = True
118110

119111
if not revert_to_regex:
112+
# make sure easyconfigs all feature the same toolchain (otherwise we *will* run into trouble)
113+
toolchains = nub(['%(name)s/%(version)s' % ec['ec']['toolchain'] for ec in easyconfigs])
114+
if len(toolchains) > 1:
115+
raise EasyBuildError("Multiple toolchains featured in easyconfigs, "
116+
"--try-X not supported in that case: %s",
117+
toolchains)
118+
# Toolchain is unique, let's store it
119+
source_toolchain = easyconfigs[-1]['ec']['toolchain']
120+
target_toolchain = {}
121+
120122
# we're doing something that involves the toolchain hierarchy;
121123
# obtain full dependency graph for specified easyconfigs;
122124
# easyconfigs will be ordered 'top-to-bottom' (toolchains and dependencies appearing first)

easybuild/toolchains/compiler/intel_compilers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,9 @@ def set_variables(self):
109109
self.options.options_map['loose'] = ['fp-model fast']
110110
# fp-model fast=2 gives "warning: overriding '-ffp-model=fast=2' option with '-ffp-model=fast'"
111111
self.options.options_map['veryloose'] = ['fp-model fast']
112-
# recommended in porting guide
113-
self.options.options_map['openmp'] = ['fiopenmp']
112+
# recommended in porting guide: qopenmp, unlike fiopenmp, works for both classic and oneapi compilers
113+
# https://www.intel.com/content/www/us/en/developer/articles/guide/porting-guide-for-ifort-to-ifx.html
114+
self.options.options_map['openmp'] = ['qopenmp']
114115

115116
# -xSSE2 is not supported by Intel oneAPI compilers,
116117
# so use -march=x86-64 -mtune=generic when using optarch=GENERIC

easybuild/toolchains/linalg/flexiblas.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class FlexiBLAS(LinAlg):
7070
"""
7171
BLAS_MODULE_NAME = ['FlexiBLAS']
7272
BLAS_LIB = ['flexiblas']
73+
BLAS_LIB_MT = ['flexiblas']
7374
BLAS_INCLUDE_DIR = [os.path.join('include', 'flexiblas')]
7475
BLAS_FAMILY = TC_CONSTANT_FLEXIBLAS
7576

easybuild/tools/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ def mk_full_default_path(name, prefix=DEFAULT_PREFIX):
239239
'job_polling_interval',
240240
'job_target_resource',
241241
'locks_dir',
242+
'module_cache_suffix',
242243
'modules_footer',
243244
'modules_header',
244245
'mpi_cmd_template',

easybuild/tools/loose_version.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ def _cmp(self, other):
8181
def __eq__(self, other):
8282
return self._cmp(other) == 0
8383

84+
def __ne__(self, other):
85+
return self._cmp(other) != 0
86+
8487
def __lt__(self, other):
8588
return self._cmp(other) < 0
8689

easybuild/tools/module_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
from easybuild.tools.filetools import convert_name, mkdir, read_file, remove_file, resolve_path, symlink, write_file
5050
from easybuild.tools.modules import ROOT_ENV_VAR_NAME_PREFIX, EnvironmentModulesC, Lmod, modules_tool
5151
from easybuild.tools.py2vs3 import string_type
52-
from easybuild.tools.utilities import get_subclasses, quote_str
52+
from easybuild.tools.utilities import get_subclasses, nub, quote_str
5353

5454

5555
_log = fancylogger.getLogger('module_generator', fname=False)
@@ -667,7 +667,7 @@ def _generate_help_text(self):
667667
if multi_deps:
668668
compatible_modules_txt = '\n'.join([
669669
"This module is compatible with the following modules, one of each line is required:",
670-
] + ['* %s' % d for d in multi_deps])
670+
] + ['* %s' % d for d in nub(multi_deps)])
671671
lines.extend(self._generate_section("Compatible modules", compatible_modules_txt))
672672

673673
# Extensions (if any)

0 commit comments

Comments
 (0)