Skip to content

Commit 92ec707

Browse files
Merge pull request #2277 from easybuilders/4.3.x
release EasyBuild v4.3.2
2 parents ff6e0f2 + 7e1c795 commit 92ec707

31 files changed

+843
-114
lines changed

RELEASE_NOTES

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,49 @@ For more detailed information, please see the git log.
33

44
These release notes can also be consulted at http://easybuild.readthedocs.org/en/latest/Release_notes.html.
55

6-
The latest version of easybuild-easyblocks provides 225 software-specific easyblocks and 37 generic easyblocks.
6+
The latest version of easybuild-easyblocks provides 227 software-specific easyblocks and 37 generic easyblocks.
7+
8+
v4.3.2 (December 10th 2020)
9+
---------------------------
10+
11+
update/bugfix release
12+
13+
- 2 new software-specific easyblocks:
14+
- code-server (#2255), Metagenome-Atlas (#2219)
15+
- minor enhancements, including:
16+
- add -fallow-argument-mismatch option when building CP2K 7.1 or older with GCC 10.x (#2223)
17+
- update TensorFlow easyblock for upcoming TensorFlow 2.4 (#2225)
18+
- add support for building Clang with OpenMP offload support (#2229)
19+
- enhance OpenMPI easyblock to catch any --with-ucx* configure options (#2230)
20+
- take into account preinstallopts and installopts in custom easyblock for NCL (#2234)
21+
- add support for withnvptx easyconfig parameter, to enable GPU offloading, in GCC easyblock (#2235)
22+
- take into account versions like '4.x' in OpenFOAM easyblock (#2239)
23+
- also add 'bin' subdir to $PATH when installing a Python package (#2244)
24+
- various bug fixes, including:
25+
- fix two bugs in GROMACS easyblock when using GCC & MKL for FFT and BLAS/LAPACK (#2212)
26+
- fix version check in Qt5 easyblock w.r.t. disabling features on old Linux kernel versions (#2220)
27+
- always define $FCCPP in QuantumESPRESSO easyblock (not just when using Intel compilers) (#2221)
28+
- allow wxPython to be installed as an extension (#2227, #2275)
29+
- only configure Python with --enable-optimizations when compiling Python with (recent) GCC compiler (#2228)
30+
- fix sanity check for Boost MT libraries (#2231)
31+
- fix hardcoded path in NVHPC easyblock to support multiple architectures (#2233)
32+
- fix CPASSERT test faults on RHEL8 in CP2K easyblock (#2236)
33+
- stop silently ignoring failing numpy tests, but include support for ignoring (failing) numpy tests (#2238, #2271)
34+
- append to module guesses in easyblocks for Chapel, icc, imkl and impi (rather than overwriting guesses from parent easyblock) (#2242)
35+
- weed out duplicates when determining paths to include-fixed subdirectory in GCC easyblock (#2245)
36+
- prepend all hardcoded /usr/* paths with sysroot in Python's setup.py installation script (#2246)
37+
- don't try to patch newer versions of Bazel where the patches won't apply (#2249)
38+
- fix setting of $RUNPARALLEL in HDF5 easyblock (#2250)
39+
- move --build and --host logic to run_configure_cmd in GCC easyblock (#2252)
40+
- set $UCX_TLS in module for impi installation on top of UCX, and allow it to be overwritten in impi easyconfig file (#2253, #2258)
41+
- enhance PyTorch easyblock to ensure it finds MKL (via $MKLROOT) (#2257)
42+
- use integer division to determine number MPI ranks to use in WRF test step (#2266)
43+
- also specify locincpth and glibpth configure options for Perl based on --sysroot (#2268)
44+
- other changes, including:
45+
- add link to GCC mailing list thread confirming that binutils should not be configured with --with-sysroot=$EASYBUILD_SYSROOT when GCC is being configured like that (#2215)
46+
- pass paths to patch one by one to apply_regex_substitutions in GCC easyblock when --sysroot is set (#2217)
47+
- workaround for regression in apply_regex_substitutions introduced in EasyBuild v4.3.1 (which was fixed for v4.3.2)
48+
749

850
v4.3.1 (October 29th 2020)
951
--------------------------

easybuild/easyblocks/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# recent setuptools versions will *TRANSFORM* something like 'X.Y.Zdev' into 'X.Y.Z.dev0', with a warning like
4444
# UserWarning: Normalizing '2.4.0dev' to '2.4.0.dev0'
4545
# This causes problems further up the dependency chain...
46-
VERSION = LooseVersion('4.3.1')
46+
VERSION = LooseVersion('4.3.2')
4747
UNKNOWN = 'UNKNOWN'
4848

4949

easybuild/easyblocks/b/bazel.py

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,32 @@
4040
class EB_Bazel(EasyBlock):
4141
"""Support for building/installing Bazel."""
4242

43-
def configure_step(self):
44-
"""Custom configuration procedure for Bazel."""
45-
43+
def fixup_hardcoded_paths(self):
44+
"""Patch out hard coded paths to compiler and binutils tools"""
4645
binutils_root = get_software_root('binutils')
4746
gcc_root = get_software_root('GCCcore') or get_software_root('GCC')
4847
gcc_ver = get_software_version('GCCcore') or get_software_version('GCC')
4948

5049
# only patch Bazel scripts if binutils & GCC installation prefix could be determined
51-
if binutils_root and gcc_root:
50+
if not binutils_root or not gcc_root:
51+
self.log.info("Not patching Bazel build scripts, installation prefix for binutils/GCC not found")
52+
return
53+
54+
# replace hardcoded paths in (unix_)cc_configure.bzl
55+
# hard-coded paths in (unix_)cc_configure.bzl were removed in 0.19.0
56+
if LooseVersion(self.version) < LooseVersion('0.19.0'):
57+
regex_subs = [
58+
(r'-B/usr/bin', '-B%s' % os.path.join(binutils_root, 'bin')),
59+
(r'"/usr/bin', '"' + os.path.join(binutils_root, 'bin')),
60+
]
61+
for conf_bzl in ['cc_configure.bzl', 'unix_cc_configure.bzl']:
62+
filepath = os.path.join('tools', 'cpp', conf_bzl)
63+
if os.path.exists(filepath):
64+
apply_regex_substitutions(filepath, regex_subs)
5265

66+
# replace hardcoded paths in CROSSTOOL
67+
# CROSSTOOL script is no longer there in Bazel 0.24.0
68+
if LooseVersion(self.version) < LooseVersion('0.24.0'):
5369
res = glob.glob(os.path.join(gcc_root, 'lib', 'gcc', '*', gcc_ver, 'include'))
5470
if res and len(res) == 1:
5571
gcc_lib_inc = res[0]
@@ -65,36 +81,27 @@ def configure_step(self):
6581
if not os.path.exists(gcc_cplusplus_inc):
6682
raise EasyBuildError("Derived directory %s does not exist", gcc_cplusplus_inc)
6783

68-
# replace hardcoded paths in CROSSTOOL
69-
70-
# CROSSTOOL script is no longer there in Bazel 0.24.0
71-
if LooseVersion(self.version) < LooseVersion('0.24.0'):
72-
regex_subs = [
73-
(r'-B/usr/bin', '-B%s' % os.path.join(binutils_root, 'bin')),
74-
(r'(cxx_builtin_include_directory:.*)/usr/lib/gcc', r'\1%s' % gcc_lib_inc),
75-
(r'(cxx_builtin_include_directory:.*)/usr/local/include', r'\1%s' % gcc_lib_inc_bis),
76-
(r'(cxx_builtin_include_directory:.*)/usr/include', r'\1%s' % gcc_cplusplus_inc),
77-
]
78-
for tool in ['ar', 'cpp', 'dwp', 'gcc', 'ld']:
79-
path = which(tool)
80-
if path:
81-
regex_subs.append((os.path.join('/usr', 'bin', tool), path))
82-
else:
83-
raise EasyBuildError("Failed to determine path to '%s'", tool)
84-
85-
apply_regex_substitutions(os.path.join('tools', 'cpp', 'CROSSTOOL'), regex_subs)
86-
87-
# replace hardcoded paths in (unix_)cc_configure.bzl
8884
regex_subs = [
8985
(r'-B/usr/bin', '-B%s' % os.path.join(binutils_root, 'bin')),
90-
(r'"/usr/bin', '"' + os.path.join(binutils_root, 'bin')),
86+
(r'(cxx_builtin_include_directory:.*)/usr/lib/gcc', r'\1%s' % gcc_lib_inc),
87+
(r'(cxx_builtin_include_directory:.*)/usr/local/include', r'\1%s' % gcc_lib_inc_bis),
88+
(r'(cxx_builtin_include_directory:.*)/usr/include', r'\1%s' % gcc_cplusplus_inc),
9189
]
92-
for conf_bzl in ['cc_configure.bzl', 'unix_cc_configure.bzl']:
93-
filepath = os.path.join('tools', 'cpp', conf_bzl)
94-
if os.path.exists(filepath):
95-
apply_regex_substitutions(filepath, regex_subs)
96-
else:
97-
self.log.info("Not patching Bazel build scripts, installation prefix for binutils/GCC not found")
90+
for tool in ['ar', 'cpp', 'dwp', 'gcc', 'ld']:
91+
path = which(tool)
92+
if path:
93+
regex_subs.append((os.path.join('/usr', 'bin', tool), path))
94+
else:
95+
raise EasyBuildError("Failed to determine path to '%s'", tool)
96+
97+
apply_regex_substitutions(os.path.join('tools', 'cpp', 'CROSSTOOL'), regex_subs)
98+
99+
def configure_step(self):
100+
"""Custom configuration procedure for Bazel."""
101+
102+
# Last instance of hardcoded paths was removed in 0.24.0
103+
if LooseVersion(self.version) < LooseVersion('0.24.0'):
104+
self.fixup_hardcoded_paths()
98105

99106
# enable building in parallel
100107
bazel_args = '--jobs=%d' % self.cfg['parallel']

easybuild/easyblocks/b/binutils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ def configure_step(self):
125125
# we should *not* use the value of the EasyBuild --sysroot configuration option here,
126126
# since that leads to weird errors where the sysroot path is duplicated, like:
127127
# /bin/ld.gold: error: cannot open /<sysroot>/<sysroot>/lib64/libc.so.6: No such file or directory
128+
# (see also https://gcc.gnu.org/legacy-ml/gcc-help/2006-08/msg00212.html)
128129
self.cfg.update('configopts', '--with-sysroot=/')
129130

130131
# build both static and shared libraries for recent binutils versions (default is only static)

easybuild/easyblocks/b/boost.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,16 @@ def sanity_check_step(self):
276276
suffix = ''
277277
custom_paths['files'].append(os.path.join('lib', 'libboost_python%s.%s' % (suffix, shlib_ext)))
278278

279+
lib_mt_suffix = '-mt'
280+
# MT libraries gained an extra suffix from v1.69.0 onwards
281+
if LooseVersion(self.version) >= LooseVersion("1.69.0"):
282+
lib_mt_suffix += '-x64'
283+
279284
if self.cfg['boost_multi_thread']:
280-
custom_paths['files'].append(os.path.join('lib', 'libboost_thread-mt.%s' % shlib_ext))
285+
custom_paths['files'].append(os.path.join('lib', 'libboost_thread%s.%s' % (lib_mt_suffix, shlib_ext)))
281286

282287
if self.cfg['boost_mpi'] and self.cfg['boost_multi_thread']:
283-
custom_paths['files'].append(os.path.join('lib', 'libboost_mpi-mt.%s' % shlib_ext))
288+
custom_paths['files'].append(os.path.join('lib', 'libboost_mpi%s.%s' % (lib_mt_suffix, shlib_ext)))
284289

285290
super(EB_Boost, self).sanity_check_step(custom_paths=custom_paths)
286291

easybuild/easyblocks/c/chapel.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ def make_module_req_guess(self):
5555
"""
5656
A dictionary of possible directories to look for; this is needed since bin/linux64 of chapel is non standard
5757
"""
58-
return {
58+
guesses = super(EB_Chapel, self).make_module_req_guess()
59+
lib_paths = ['lib', 'lib/linux64', 'lib64']
60+
guesses.update({
5961
'PATH': ['bin', 'bin/linux64', 'bin64'],
60-
'LD_LIBRARY_PATH': ['lib', 'lib/linux64', 'lib64'],
61-
}
62+
'LD_LIBRARY_PATH': lib_paths,
63+
'LIBRARY_PATH': lib_paths,
64+
})
65+
return guesses

easybuild/easyblocks/c/chimera.py

100755100644
File mode changed.

easybuild/easyblocks/c/clang.py

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ def extra_options():
8585
'skip_all_tests': [False, "Skip running of tests", CUSTOM],
8686
# The sanitizer tests often fail on HPC systems due to the 'weird' environment.
8787
'skip_sanitizer_tests': [True, "Do not run the sanitizer tests", CUSTOM],
88+
'default_cuda_capability': [None, "Default CUDA capability specified for clang, e.g. '7.5'", CUSTOM],
89+
'cuda_compute_capabilities': [[], "List of CUDA compute capabilities to build with", CUSTOM],
8890
})
8991
# disable regular out-of-source build, too simplistic for Clang to work
9092
extra_vars['separate_build_dir'][0] = False
@@ -282,9 +284,28 @@ def configure_step(self):
282284
if self.cfg['parallel']:
283285
self.make_parallel_opts = "-j %s" % self.cfg['parallel']
284286

285-
# If we don't want to build with CUDA (not in dependencies) trick CMakes FindCUDA module into
286-
# not finding it by using the environment variable which is used as-is and later checked
287-
# for a falsy value when determining wether CUDA was found
287+
# If 'NVPTX' is in the build targets we assume the user would like OpenMP offload support as well
288+
if 'NVPTX' in build_targets:
289+
# list of CUDA compute capabilities to use can be specifed in two ways (where (2) overrules (1)):
290+
# (1) in the easyconfig file, via the custom cuda_compute_capabilities;
291+
# (2) in the EasyBuild configuration, via --cuda-compute-capabilities configuration option;
292+
ec_cuda_cc = self.cfg['cuda_compute_capabilities']
293+
cfg_cuda_cc = build_option('cuda_compute_capabilities')
294+
cuda_cc = cfg_cuda_cc or ec_cuda_cc or []
295+
if not cuda_cc:
296+
raise EasyBuildError("Can't build Clang with CUDA support "
297+
"without specifying 'cuda-compute-capabilities'")
298+
default_cc = self.cfg['default_cuda_capability'] or min(cuda_cc)
299+
if not self.cfg['default_cuda_capability']:
300+
print_warning("No default CUDA capability defined! "
301+
"Using '%s' taken as minimum from 'cuda_compute_capabilities'" % default_cc)
302+
cuda_cc = [cc.replace('.', '') for cc in cuda_cc]
303+
default_cc = default_cc.replace('.', '')
304+
self.cfg.update('configopts', '-DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_%s' % default_cc)
305+
self.cfg.update('configopts', '-DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES=%s' % ','.join(cuda_cc))
306+
# If we don't want to build with CUDA (not in dependencies) trick CMakes FindCUDA module into not finding it by
307+
# using the environment variable which is used as-is and later checked for a falsy value when determining
308+
# whether CUDA was found
288309
if not get_software_root('CUDA'):
289310
setvar('CUDA_NVCC_EXECUTABLE', 'IGNORE')
290311

easybuild/easyblocks/c/code_server.py

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
##
2+
# Copyright 2012-2020 Ghent University
3+
#
4+
# This file is part of EasyBuild,
5+
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
6+
# with support of Ghent University (http://ugent.be/hpc),
7+
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
8+
# Flemish Research Foundation (FWO) (http://www.fwo.be/en)
9+
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
10+
#
11+
# https://github.com/easybuilders/easybuild
12+
#
13+
# EasyBuild is free software: you can redistribute it and/or modify
14+
# it under the terms of the GNU General Public License as published by
15+
# the Free Software Foundation v2.
16+
#
17+
# EasyBuild is distributed in the hope that it will be useful,
18+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
# GNU General Public License for more details.
21+
#
22+
# You should have received a copy of the GNU General Public License
23+
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
24+
##
25+
"""
26+
EasyBlock for installing code-server, implemented as an easyblock
27+
@author: Alan O'Cais (Juelich Supercomputing Centre)
28+
"""
29+
30+
from easybuild.framework.easyblock import EasyBlock
31+
from easybuild.easyblocks.generic.packedbinary import PackedBinary
32+
from easybuild.tools.build_log import EasyBuildError
33+
from easybuild.tools.systemtools import AARCH64, X86_64, get_cpu_architecture
34+
35+
36+
class EB_code_minus_server(PackedBinary, EasyBlock):
37+
"""
38+
Support for installing code-server.
39+
"""
40+
41+
def __init__(self, *args, **kwargs):
42+
""" Init the easyblock adding a new mapped_arch template var """
43+
myarch = get_cpu_architecture()
44+
if myarch == X86_64:
45+
self.mapped_arch = 'amd64'
46+
elif myarch == AARCH64:
47+
self.mapped_arch = 'arm64'
48+
else:
49+
raise EasyBuildError("Architecture %s is not supported for code-server on EasyBuild", myarch)
50+
51+
super(EB_code_minus_server, self).__init__(*args, **kwargs)
52+
53+
self.cfg.template_values['mapped_arch'] = self.mapped_arch
54+
self.cfg.generate_template_values()
55+
56+
def install_step(self):
57+
"""Custom install step for code-server."""
58+
install_cmd = self.cfg.get('install_cmd', None)
59+
if install_cmd is None:
60+
cmd = 'cp -a code-server-%s-linux-%s/* %s' % (self.version, self.mapped_arch, self.installdir)
61+
# set the install command to a default
62+
self.log.info("For %s, using default installation command '%s'..." % (self.name, cmd))
63+
self.cfg['install_cmd'] = cmd
64+
super(EB_code_minus_server, self).install_step()
65+
66+
def sanity_check_step(self):
67+
"""Custom sanity check for code-server."""
68+
custom_paths = {
69+
'files': ['bin/code-server'],
70+
'dirs': ['bin', 'lib', 'node_modules'],
71+
}
72+
73+
custom_commands = ["code-server --help"]
74+
75+
res = super(EB_code_minus_server, self).sanity_check_step(
76+
custom_paths=custom_paths,
77+
custom_commands=custom_commands
78+
)
79+
80+
return res
81+
82+
def make_module_extra(self):
83+
"""Add the default directories to the PATH."""
84+
txt = EasyBlock.make_module_extra(self)
85+
return txt

easybuild/easyblocks/c/cp2k.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,17 @@ def configure_intel_based(self):
476476

477477
ifortver = LooseVersion(get_software_version('ifort'))
478478

479+
# Required due to memory leak that occurs if high optimizations are used (from CP2K 7.1 intel-popt-makefile)
480+
if ifortver >= LooseVersion("2018.5"):
481+
self.make_instructions += "mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F\n" \
482+
"\t$(FC) -c $(subst O2,O0,$(FCFLAGSOPT)) $<\n"
483+
self.log.info("Optimization level of mp2_optimize_ri_basis.F was decreased to '-O0'")
484+
485+
# RHEL8 intel/2020a lots of CPASSERT failed (due to high optimization in cholesky decomposition)
486+
if ifortver >= LooseVersion("2019"):
487+
self.make_instructions += "cp_fm_cholesky.o: cp_fm_cholesky.F\n\t$(FC) -c $(FCFLAGS2) $<\n"
488+
self.log.info("Optimization flags for cp_fm_cholesky.F is set to '%s'", options['FCFLAGSOPT2'])
489+
479490
# -i-static has been deprecated prior to 2013, but was still usable. From 2015 it is not.
480491
if ifortver < LooseVersion("2013"):
481492
options['LDFLAGS'] += ' -i-static '
@@ -528,6 +539,15 @@ def configure_GCC_based(self):
528539
options['FCFLAGSOPT'] += ' $(DFLAGS) $(CFLAGS) -fmax-stack-var-size=32768'
529540
options['FCFLAGSOPT2'] += ' $(DFLAGS) $(CFLAGS)'
530541

542+
gcc_version = get_software_version('GCCcore') or get_software_version('GCC')
543+
if LooseVersion(gcc_version) >= LooseVersion('10.0') and LooseVersion(self.version) <= LooseVersion('7.1'):
544+
# -fallow-argument-mismatch is required for CP2K 7.1 (and older) when compiling with GCC 10.x & more recent,
545+
# see https://github.com/cp2k/cp2k/issues/1157, https://github.com/cp2k/dbcsr/issues/351,
546+
# https://github.com/cp2k/dbcsr/commit/58ee9709545deda8524cab804bf1f88a61a864ac and
547+
# https://gcc.gnu.org/legacy-ml/gcc-patches/2019-10/msg01861.html
548+
options['FCFLAGSOPT'] += ' -fallow-argument-mismatch'
549+
options['FCFLAGSOPT2'] += ' -fallow-argument-mismatch'
550+
531551
return options
532552

533553
def configure_ACML(self, options):

0 commit comments

Comments
 (0)