Skip to content

Commit 7753aa1

Browse files
author
SebastianAchilles
authored
Merge pull request #2740 from easybuilders/4.5.x
release EasyBuild v4.5.5
2 parents fc8b116 + d40a5f6 commit 7753aa1

File tree

22 files changed

+543
-126
lines changed

22 files changed

+543
-126
lines changed

RELEASE_NOTES

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,37 @@ 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 244 software-specific easyblocks and 37 generic easyblocks.
6+
The latest version of easybuild-easyblocks provides 245 software-specific easyblocks and 37 generic easyblocks.
7+
8+
9+
v4.5.5 (June 8th 2022)
10+
----------------------
11+
12+
update/bugfix release
13+
14+
- new software-specific easyblock for FFTW.MPI (#2724)
15+
- minor enhancements and updates, including:
16+
- update NEURON easyblock to use CMakeMake for recent versions (#2304)
17+
- enhance Clang easyblock to add support for building with AMDGPU offload (#2684, #2729)
18+
- update sanity check in OpenMPI easyblock to support OpenMPI v5.0.0 (#2709)
19+
- don't use gold linker by default for GCC >= 11.3 (#2711)
20+
- update sanity check in R easyblock for versions >= 4.2.0, since S.h is not included anymore (#2713)
21+
- update ABAQUS easyblock for ABAQUS 2022 (#2716)
22+
- update LLVM easyblock for LLVM v14.0.x (#2718)
23+
- update Mesa easyblock to remove swr driver configopts for versions 22+ (#2719)
24+
- enhance Clang easyblock to support also installing Python bindings (#2721, #2725)
25+
- enhance SuperLU easyblock to support building on top of FlexiBLAS and be compatible with SuperLU v5.3 (#2722)
26+
- update TensorFlow easyblock for version 2.8.0 (#2723)
27+
- modify FFTW's sanity check step to allow checking only for MPI parts of FFTW installation (#2724)
28+
- add support to ConfigureMake for tweaking (first part of) test command via 'test_cmd' (#2726, #2737)
29+
- enhance MrBayes easyblock with custom sanity check command (#2727)
30+
- update cudnnarch string templates used to compose source tarball names from cuDNN 8.3.3 onwards (#2728)
31+
- add sanity check command to OpenSSL wrapper easyblock to verify that system certificates are available to OpenSSL (#2735)
32+
- ignore exit code of pkg-config command in OpenSSL wrapper easyblock, since with pkgconf they exit with a non-zero exit code if the OS package is not installed (#2736)
33+
- various bug fixes, including:
34+
- remove system-compiled binutils dirs from $LDFLAGS in binutils easyblock (#2712)
35+
- fix for FreeSurfer easyblock: define $FREESURFER needed by recon_all (#2717)
36+
- also symlink cert.pem in from-source OpenSSL installation (if it exists) (#2735)
737

838

939
v4.5.4 (March 31st 2022)

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.5.4')
46+
VERSION = LooseVersion('4.5.5')
4747
UNKNOWN = 'UNKNOWN'
4848

4949

easybuild/easyblocks/a/abaqus.py

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
from easybuild.framework.easyconfig import CUSTOM
4242
from easybuild.tools.build_log import EasyBuildError
4343
from easybuild.tools.environment import setvar
44-
from easybuild.tools.filetools import change_dir, write_file
44+
from easybuild.tools.filetools import change_dir, symlink, write_file
45+
from easybuild.tools.modules import get_software_root
4546
from easybuild.tools.run import run_cmd_qa
4647
from easybuild.tools.py2vs3 import OrderedDict
4748

@@ -109,6 +110,7 @@ def install_step(self):
109110
no_qa = [
110111
'___',
111112
r"\(\d+\s*[KM]B\)",
113+
r'\.\.\.$',
112114
]
113115

114116
# Match string for continuing on with the selected items
@@ -148,6 +150,17 @@ def install_step(self):
148150
else:
149151
std_qa[selectionstr % (r"\[\*\]", "Tosca")] = "%(nr)s"
150152

153+
# disable CloudView
154+
std_qa[r"(?P<cloudview>[0-9]+) \[X\] Search using CloudView\nEnter selection:"] = '%(cloudview)s\n\n'
155+
# accept default port for documentation server
156+
std_qa[r"Check that the port is free.\nDefault \[[0-9]+\]:"] = '\n'
157+
158+
# disable feedback by users
159+
std_qa[r"(?P<feedback>[0-9]+) \[X\] Allow users to send feedback.\nEnter selection:"] = '%(feedback)s\n\n'
160+
161+
# disable reverse proxy
162+
std_qa[r"(?P<proxy>[0-9]+) \[X\] Use a reverse proxy.\nEnter selection:"] = '%(proxy)s\n\n'
163+
151164
# Disable Isight
152165
std_qa[selectionstr % (r"\[\*\]", "Isight")] = "%(nr)s"
153166
# Disable Search using EXALEAD
@@ -184,10 +197,18 @@ def install_step(self):
184197

185198
std_qa[r"Please choose an action:"] = '1'
186199

200+
if LooseVersion(self.version) >= LooseVersion('2022'):
201+
java_root = get_software_root('Java')
202+
if java_root:
203+
std_qa[r"Please enter .*Java Runtime Environment.* path.(\n.*)+Default \[\]:"] = java_root
204+
std_qa[r"Please enter .*Java Runtime Environment.* path.(\n.*)+Default \[.+\]:"] = ''
205+
else:
206+
raise EasyBuildError("Java is a required dependency for ABAQUS versions >= 2022, but it is missing")
207+
187208
# Continue
188209
std_qa[nextstr] = ''
189210

190-
run_cmd_qa('./StartTUI.sh', qa, no_qa=no_qa, std_qa=std_qa, log_all=True, simple=True, maxhits=100)
211+
run_cmd_qa('./StartTUI.sh', qa, no_qa=no_qa, std_qa=std_qa, log_all=True, simple=True, maxhits=1000)
191212
else:
192213
change_dir(self.builddir)
193214
if self.cfg['install_cmd'] is None:
@@ -284,6 +305,22 @@ def install_step(self):
284305
run_cmd_qa('./StartTUI.sh', {}, no_qa=no_qa, std_qa=std_qa, log_all=True, simple=True, maxhits=100)
285306
change_dir(cwd)
286307

308+
# create 'abaqus' symlink for main command, which is not there anymore starting with ABAQUS 2022
309+
if LooseVersion(self.version) >= LooseVersion('2022'):
310+
commands_dir = os.path.join(self.installdir, 'Commands')
311+
abaqus_cmd = os.path.join(commands_dir, 'abaqus')
312+
if os.path.exists(abaqus_cmd):
313+
self.log.info("Main 'abaqus' command already found at %s, no need to create symbolic link", abaqus_cmd)
314+
else:
315+
abq_ver_cmd = os.path.join(commands_dir, 'abq%s' % self.version)
316+
self.log.info("Creating symbolic link 'abaqus' for main command %s", abq_ver_cmd)
317+
if os.path.exists(abq_ver_cmd):
318+
cwd = change_dir(commands_dir)
319+
symlink(os.path.basename(abq_ver_cmd), os.path.basename(abaqus_cmd))
320+
change_dir(cwd)
321+
else:
322+
raise EasyBuildError("Path to main command %s does not exist!", abq_ver_cmd)
323+
287324
def sanity_check_step(self):
288325
"""Custom sanity check for ABAQUS."""
289326
custom_paths = {

easybuild/easyblocks/b/binutils.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ def configure_step(self):
108108
else:
109109
libs = []
110110

111+
binutilsroot = get_software_root('binutils')
112+
if binutilsroot:
113+
# Remove LDFLAGS that start with '-L' + binutilsroot, since we don't
114+
# want to link libraries from binutils compiled with the system toolchain
115+
# into binutils binaries compiled with a compiler toolchain.
116+
ldflags = os.getenv('LDFLAGS').split(' ')
117+
ldflags = [p for p in ldflags if not p.startswith('-L' + binutilsroot)]
118+
env.setvar('LDFLAGS', ' '.join(ldflags))
119+
111120
# configure using `--with-system-zlib` if zlib is a (build) dependency
112121
zlibroot = get_software_root('zlib')
113122
if zlibroot:

easybuild/easyblocks/c/clang.py

Lines changed: 102 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
from easybuild.tools.environment import setvar
5353

5454
# List of all possible build targets for Clang
55-
CLANG_TARGETS = ["all", "AArch64", "ARM", "CppBackend", "Hexagon", "Mips",
55+
CLANG_TARGETS = ["all", "AArch64", "AMDGPU", "ARM", "CppBackend", "Hexagon", "Mips",
5656
"MBlaze", "MSP430", "NVPTX", "PowerPC", "R600", "Sparc",
5757
"SystemZ", "X86", "XCore"]
5858

@@ -64,6 +64,14 @@
6464
X86_64: ['X86'],
6565
}
6666

67+
# List of all possible AMDGPU gfx targets supported by LLVM
68+
AMDGPU_GFX_SUPPORT = ['gfx700', 'gfx701', 'gfx801', 'gfx803', 'gfx900',
69+
'gfx902', 'gfx906', 'gfx908', 'gfx90a', 'gfx90c',
70+
'gfx1010', 'gfx1030', 'gfx1031']
71+
72+
# List of all supported CUDA toolkit versions supported by LLVM
73+
CUDA_TOOLKIT_SUPPORT = ['80', '90', '91', '92', '100', '101', '102', '110', '111', '112']
74+
6775

6876
class EB_Clang(CMakeMake):
6977
"""Support for bootstrapping Clang."""
@@ -72,21 +80,24 @@ class EB_Clang(CMakeMake):
7280
def extra_options():
7381
extra_vars = CMakeMake.extra_options()
7482
extra_vars.update({
83+
'amd_gfx_list': [None, "List of AMDGPU targets to build for. Possible values: " +
84+
', '.join(AMDGPU_GFX_SUPPORT), CUSTOM],
7585
'assertions': [True, "Enable assertions. Helps to catch bugs in Clang.", CUSTOM],
76-
'build_targets': [None, "Build targets for LLVM (host architecture if None). Possible values: " +
77-
', '.join(CLANG_TARGETS), CUSTOM],
7886
'bootstrap': [True, "Bootstrap Clang using GCC", CUSTOM],
79-
'usepolly': [False, "Build Clang with polly", CUSTOM],
87+
'build_extra_clang_tools': [False, "Build extra Clang tools", CUSTOM],
8088
'build_lld': [False, "Build the LLVM lld linker", CUSTOM],
89+
'build_targets': [None, "Build targets for LLVM (host architecture if None). Possible values: " +
90+
', '.join(CLANG_TARGETS), CUSTOM],
91+
'default_cuda_capability': [None, "Default CUDA capability specified for clang, e.g. '7.5'", CUSTOM],
8192
'default_openmp_runtime': [None, "Default OpenMP runtime for clang (for example, 'libomp')", CUSTOM],
8293
'enable_rtti': [False, "Enable Clang RTTI", CUSTOM],
94+
'python_bindings': [False, "Install python bindings", CUSTOM],
8395
'libcxx': [False, "Build the LLVM C++ standard library", CUSTOM],
84-
'static_analyzer': [True, "Install the static analyser of Clang", CUSTOM],
8596
'skip_all_tests': [False, "Skip running of tests", CUSTOM],
97+
'static_analyzer': [True, "Install the static analyser of Clang", CUSTOM],
8698
# The sanitizer tests often fail on HPC systems due to the 'weird' environment.
8799
'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-
'build_extra_clang_tools': [False, "Build extra Clang tools", CUSTOM],
100+
'usepolly': [False, "Build Clang with polly", CUSTOM],
90101
})
91102
# disable regular out-of-source build, too simplistic for Clang to work
92103
extra_vars['separate_build_dir'][0] = False
@@ -195,9 +206,15 @@ def prepare_step(self, *args, **kwargs):
195206
arch = get_cpu_architecture()
196207
try:
197208
default_targets = DEFAULT_TARGETS_MAP[arch][:]
198-
# If CUDA is included as a dep, add NVPTX as a target (could also support AMDGPU if we knew how)
209+
# If CUDA is included as a dep, add NVPTX as a target
199210
if get_software_root("CUDA"):
200211
default_targets += ["NVPTX"]
212+
# For AMDGPU support we need ROCR-Runtime and
213+
# ROCT-Thunk-Interface, however, since ROCT is a dependency of
214+
# ROCR we only check for the ROCR-Runtime here
215+
# https://openmp.llvm.org/SupportAndFAQ.html#q-how-to-build-an-openmp-amdgpu-offload-capable-compiler
216+
if get_software_root("ROCR-Runtime"):
217+
default_targets += ["AMDGPU"]
201218
self.cfg['build_targets'] = build_targets = default_targets
202219
self.log.debug("Using %s as default build targets for CPU/GPU architecture %s.", default_targets, arch)
203220
except KeyError:
@@ -339,6 +356,16 @@ def configure_step(self):
339356
# whether CUDA was found
340357
if not get_software_root('CUDA'):
341358
setvar('CUDA_NVCC_EXECUTABLE', 'IGNORE')
359+
# If 'AMDGPU' is in the build targets we assume the user would like OpenMP offload support for AMD
360+
if 'AMDGPU' in build_targets:
361+
if not get_software_root('ROCR-Runtime'):
362+
raise EasyBuildError("Can't build Clang with AMDGPU support "
363+
"without dependency 'ROCR-Runtime'")
364+
ec_amdgfx = self.cfg['amd_gfx_list']
365+
if not ec_amdgfx:
366+
raise EasyBuildError("Can't build Clang with AMDGPU support "
367+
"without specifying 'amd_gfx_list'")
368+
self.cfg.update('configopts', '-DLIBOMPTARGET_AMDGCN_GFXLIST=%s' % ' '.join(ec_amdgfx))
342369

343370
self.log.info("Configuring")
344371
super(EB_Clang, self).configure_step(srcdir=self.llvm_src_dir)
@@ -460,6 +487,17 @@ def install_step(self):
460487
except OSError as err:
461488
raise EasyBuildError("Failed to copy static analyzer dirs to install dir: %s", err)
462489

490+
def post_install_step(self):
491+
"""Install python bindings."""
492+
super(EB_Clang, self).post_install_step()
493+
494+
# copy Python bindings here in post-install step so that it is not done more than once in multi_deps context
495+
if self.cfg['python_bindings']:
496+
python_bindings_source_dir = os.path.join(self.llvm_src_dir, "tools", "clang", "bindings", "python")
497+
python_bindins_target_dir = os.path.join(self.installdir, 'lib', 'python')
498+
499+
shutil.copytree(python_bindings_source_dir, python_bindins_target_dir)
500+
463501
def sanity_check_step(self):
464502
"""Custom sanity check for Clang."""
465503
shlib_ext = get_shared_lib_ext()
@@ -491,24 +529,64 @@ def sanity_check_step(self):
491529
if LooseVersion(self.version) >= LooseVersion('3.8'):
492530
custom_paths['files'].extend(["lib/libomp.%s" % shlib_ext, "lib/clang/%s/include/omp.h" % self.version])
493531

532+
# Detect OpenMP support for CPU architecture
533+
arch = get_cpu_architecture()
534+
# Check architecture explicitly since Clang uses potentially
535+
# different names
536+
if arch == X86_64:
537+
arch = 'x86_64'
538+
elif arch == POWER:
539+
arch = 'ppc64'
540+
elif arch == AARCH64:
541+
arch = 'aarch64'
542+
else:
543+
print_warning("Unknown CPU architecture (%s) for OpenMP library check!" % arch)
544+
custom_paths['files'].extend(["lib/libomptarget.%s" % shlib_ext,
545+
"lib/libomptarget.rtl.%s.%s" % (arch, shlib_ext)])
546+
# If building for CUDA check that OpenMP target library was created
494547
if 'NVPTX' in self.cfg['build_targets']:
495-
arch = get_cpu_architecture()
496-
# Check architecture explicitly since Clang uses potentially
497-
# different names
498-
if arch == X86_64:
499-
arch = 'x86_64'
500-
elif arch == POWER:
501-
arch = 'ppc64'
502-
elif arch == AARCH64:
503-
arch = 'aarch64'
548+
custom_paths['files'].append("lib/libomptarget.rtl.cuda.%s" % shlib_ext)
549+
# The static 'nvptx.a' library is not built from version 12 onwards
550+
if LooseVersion(self.version) < LooseVersion('12.0'):
551+
custom_paths['files'].append("lib/libomptarget-nvptx.a")
552+
ec_cuda_cc = self.cfg['cuda_compute_capabilities']
553+
cfg_cuda_cc = build_option('cuda_compute_capabilities')
554+
cuda_cc = cfg_cuda_cc or ec_cuda_cc or []
555+
# We need the CUDA capability in the form of '75' and not '7.5'
556+
cuda_cc = [cc.replace('.', '') for cc in cuda_cc]
557+
if LooseVersion('11.0') < LooseVersion(self.version) < LooseVersion('13.0'):
558+
custom_paths['files'].extend(["lib/libomptarget-nvptx-cuda_%s-sm_%s.bc" % (x, y)
559+
for x in CUDA_TOOLKIT_SUPPORT for y in cuda_cc])
504560
else:
505-
print_warning("Unknown CPU architecture (%s) for OpenMP offloading!" % arch)
506-
custom_paths['files'].extend(["lib/libomptarget.%s" % shlib_ext,
507-
"lib/libomptarget-nvptx.a",
508-
"lib/libomptarget.rtl.cuda.%s" % shlib_ext,
509-
"lib/libomptarget.rtl.%s.%s" % (arch, shlib_ext)])
561+
custom_paths['files'].extend(["lib/libomptarget-nvptx-sm_%s.bc" % cc
562+
for cc in cuda_cc])
563+
# From version 13, and hopefully onwards, the naming of the CUDA
564+
# '.bc' files became a bit simpler and now we don't need to take
565+
# into account the CUDA version Clang was compiled with, making it
566+
# easier to check for the bitcode files we expect
567+
if LooseVersion(self.version) >= LooseVersion('13.0'):
568+
custom_paths['files'].extend(["lib/libomptarget-new-nvptx-sm_%s.bc" % cc
569+
for cc in cuda_cc])
570+
# If building for AMDGPU check that OpenMP target library was created
571+
if 'AMDGPU' in self.cfg['build_targets']:
572+
custom_paths['files'].append("lib/libLLVMAMDGPUCodeGen.a")
573+
# OpenMP offloading support to AMDGPU was not added until version
574+
# 13, however, building for the AMDGPU target predates this and so
575+
# doesn't necessarily mean that the AMDGPU target failed
576+
if LooseVersion(self.version) >= LooseVersion('13.0'):
577+
custom_paths['files'].append("lib/libomptarget.rtl.amdgpu.%s" % shlib_ext)
578+
custom_paths['files'].extend(["lib/libomptarget-amdgcn-%s.bc" % gfx
579+
for gfx in self.cfg['amd_gfx_list']])
580+
custom_paths['files'].append("bin/amdgpu-arch")
581+
if LooseVersion(self.version) >= LooseVersion('14.0'):
582+
custom_paths['files'].extend(["lib/libomptarget-new-amdgpu-%s.bc" % gfx
583+
for gfx in self.cfg['amd_gfx_list']])
510584

511585
custom_commands = ['clang --help', 'clang++ --help', 'llvm-config --cxxflags']
586+
if self.cfg['python_bindings']:
587+
custom_paths['files'].extend([os.path.join("lib", "python", "clang", "cindex.py")])
588+
custom_commands.extend(["python -c 'import clang'"])
589+
512590
super(EB_Clang, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands)
513591

514592
def make_module_extra(self):
@@ -517,4 +595,6 @@ def make_module_extra(self):
517595
# we set the symbolizer path so that asan/tsan give meanfull output by default
518596
asan_symbolizer_path = os.path.join(self.installdir, 'bin', 'llvm-symbolizer')
519597
txt += self.module_generator.set_environment('ASAN_SYMBOLIZER_PATH', asan_symbolizer_path)
598+
if self.cfg['python_bindings']:
599+
txt += self.module_generator.prepend_paths('PYTHONPATH', os.path.join("lib", "python"))
520600
return txt

0 commit comments

Comments
 (0)