Skip to content

Commit

Permalink
Merge branch 'develop' into 5.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
boegel committed Dec 31, 2023
2 parents 87762e2 + ba3635f commit c1ec39b
Show file tree
Hide file tree
Showing 26 changed files with 719 additions and 322 deletions.
32 changes: 31 additions & 1 deletion RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,37 @@ For more detailed information, please see the git log.

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

The latest version of easybuild-easyblocks provides 251 software-specific easyblocks and 42 generic easyblocks.
The latest version of easybuild-easyblocks provides 254 software-specific easyblocks and 43 generic easyblocks.


v4.9.0 (30 December 2023)
-------------------------

feature release

- add generic `CargoPythonBundle` easyblock (#2964)
- 3 new software-specific easyblocks: flook (#3034), HPCC (#3009), PALM (#3020)
- minor enhancements and updates, including:
- add custom easyconfig parameter `cmake_options` to SuiteSparse easyblock (#3031)
- update custom intel-compilers easyblock for versions >= 2024 (#3037)
- update custom easyblock for Intel MPI easyblock for v2021.11 (#3039)
- update numpy easyblock for v1.26+ (#3041)
- update custom easyblock for Intel MKL for v2024.x (#3042)
- update Ferret easyblock to be compatible with v7.6.0 (#3052)
- various bug fixes, including:
- add support for allowing version mismatch + consider versionsuffix when creating `.modulerc` in `ModuleRC` easyblock (#3028)
- update error detection for PyTorch tests (#3033)
- disable LLVM build downloads from CI in Rust (#3038)
- add requirement for EULA acceptance to CUDA easyblock (#3045)
- make various fixes and enhancements to NWChem easyblock (#3049)
- add binutils symlinks when building TensorFlow with `--rpath` (#3054, #3058)
- fix specifying path to SuiteSparse header files and libraries in numpy, Trilinos, PETSc easyblocks (#3056)
- fix `det_pylibdir` provided by `PythonPackage` easyblock for Python 3.12+ (#3057)
- fix nvptx sanity check for Clang >= 14.x (#3059)
- other changes:
- update SuiteSparse easyblock to only install SuiteSparse libraries with `make install` (#3004)
- also consider `$EB_COMSOL_LICENSE_FILE` environment variable in custom easyblock for COMSOL (#3044)
- import `LooseVersion` from `easybuild.tools` instead of `distutils.version` in easyblocks (#3048)


v4.8.2 (29 October 2023)
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/a/abaqus.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
import glob
import os
from collections import OrderedDict
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.binary import Binary
from easybuild.framework.easyblock import EasyBlock
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools import LooseVersion
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.environment import setvar
from easybuild.tools.filetools import change_dir, symlink, write_file
Expand Down
30 changes: 17 additions & 13 deletions easybuild/easyblocks/c/clang.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,11 @@ def sanity_check_step(self):
custom_commands = ['clang --help', 'clang++ --help', 'llvm-config --cxxflags']
shlib_ext = get_shared_lib_ext()

version = LooseVersion(self.version)

# Clang v16+ only use the major version number for the resource dir
resdir_version = self.version
if LooseVersion(self.version) >= LooseVersion('16'):
if version >= '16':
resdir_version = self.version.split('.')[0]

# Detect OpenMP support for CPU architecture
Expand All @@ -640,7 +642,7 @@ def sanity_check_step(self):
else:
print_warning("Unknown CPU architecture (%s) for OpenMP and runtime libraries check!" % arch)

if LooseVersion(self.version) >= LooseVersion('14'):
if version >= '14':
glob_pattern = os.path.join(self.installdir, 'lib', '%s-*' % arch)
matches = glob.glob(glob_pattern)
if matches:
Expand All @@ -663,7 +665,7 @@ def sanity_check_step(self):
if self.cfg['static_analyzer']:
custom_paths['files'].extend(["bin/scan-build", "bin/scan-view"])

if 'clang-tools-extra' in self.cfg['llvm_projects'] and LooseVersion(self.version) >= LooseVersion('3.4'):
if 'clang-tools-extra' in self.cfg['llvm_projects'] and version >= '3.4':
custom_paths['files'].extend(["bin/clang-tidy"])

if 'polly' in self.cfg['llvm_projects']:
Expand All @@ -685,15 +687,15 @@ def sanity_check_step(self):
if 'libcxxabi' in self.cfg['llvm_runtimes']:
custom_paths['files'].extend([os.path.join(self.runtime_lib_path, "libc++abi.%s" % shlib_ext)])

if 'flang' in self.cfg['llvm_projects'] and LooseVersion(self.version) >= LooseVersion('15'):
if 'flang' in self.cfg['llvm_projects'] and version >= '15':
flang_compiler = 'flang-new'
custom_paths['files'].extend(["bin/%s" % flang_compiler])
custom_commands.extend(["%s --help" % flang_compiler])

if LooseVersion(self.version) >= LooseVersion('3.8'):
if version >= '3.8':
custom_paths['files'].extend(["lib/libomp.%s" % shlib_ext, "lib/clang/%s/include/omp.h" % resdir_version])

if LooseVersion(self.version) >= LooseVersion('12'):
if version >= '12':
omp_target_libs = ["lib/libomptarget.%s" % shlib_ext, "lib/libomptarget.rtl.%s.%s" % (arch, shlib_ext)]
else:
omp_target_libs = ["lib/libomptarget.%s" % shlib_ext]
Expand All @@ -703,24 +705,26 @@ def sanity_check_step(self):
if 'NVPTX' in self.cfg['build_targets']:
custom_paths['files'].append("lib/libomptarget.rtl.cuda.%s" % shlib_ext)
# The static 'nvptx.a' library is not built from version 12 onwards
if LooseVersion(self.version) < LooseVersion('12.0'):
if version < '12.0':
custom_paths['files'].append("lib/libomptarget-nvptx.a")
ec_cuda_cc = self.cfg['cuda_compute_capabilities']
cfg_cuda_cc = build_option('cuda_compute_capabilities')
cuda_cc = cfg_cuda_cc or ec_cuda_cc or []
# We need the CUDA capability in the form of '75' and not '7.5'
cuda_cc = [cc.replace('.', '') for cc in cuda_cc]
if LooseVersion('12.0') < LooseVersion(self.version) < LooseVersion('13.0'):
if '12.0' < version < '13.0':
custom_paths['files'].extend(["lib/libomptarget-nvptx-cuda_%s-sm_%s.bc" % (x, y)
for x in CUDA_TOOLKIT_SUPPORT for y in cuda_cc])
else:
# libomptarget-nvptx-sm*.bc is not there for Clang 14.x;
elif version < '14.0' or version >= '15.0':
custom_paths['files'].extend(["lib/libomptarget-nvptx-sm_%s.bc" % cc
for cc in cuda_cc])
# From version 13, and hopefully onwards, the naming of the CUDA
# '.bc' files became a bit simpler and now we don't need to take
# into account the CUDA version Clang was compiled with, making it
# easier to check for the bitcode files we expect
if LooseVersion(self.version) >= LooseVersion('13.0'):
# easier to check for the bitcode files we expect;
# libomptarget-new-nvptx-sm*.bc is only there in Clang 13.x and 14.x;
if version >= '13.0' and version < '15.0':
custom_paths['files'].extend(["lib/libomptarget-new-nvptx-sm_%s.bc" % cc
for cc in cuda_cc])
# If building for AMDGPU check that OpenMP target library was created
Expand All @@ -729,12 +733,12 @@ def sanity_check_step(self):
# OpenMP offloading support to AMDGPU was not added until version
# 13, however, building for the AMDGPU target predates this and so
# doesn't necessarily mean that the AMDGPU target failed
if LooseVersion(self.version) >= LooseVersion('13.0'):
if version >= '13.0':
custom_paths['files'].append("lib/libomptarget.rtl.amdgpu.%s" % shlib_ext)
custom_paths['files'].extend(["lib/libomptarget-amdgcn-%s.bc" % gfx
for gfx in self.cfg['amd_gfx_list']])
custom_paths['files'].append("bin/amdgpu-arch")
if LooseVersion(self.version) >= LooseVersion('14.0'):
if version >= '14.0':
custom_paths['files'].extend(["lib/libomptarget-new-amdgpu-%s.bc" % gfx
for gfx in self.cfg['amd_gfx_list']])

Expand Down
8 changes: 4 additions & 4 deletions easybuild/easyblocks/c/comsol.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,22 @@ def extract_step(self):
def configure_step(self):
"""Configure COMSOL installation: create license file."""

default_lic_env_var = 'LMCOMSOL_LICENSE_FILE'
lic_specs, self.license_env_var = find_flexlm_license(custom_env_vars=[default_lic_env_var],
comsol_lic_env_vars = ['EB_COMSOL_LICENSE_FILE', 'LMCOMSOL_LICENSE_FILE']
lic_specs, self.license_env_var = find_flexlm_license(custom_env_vars=comsol_lic_env_vars,
lic_specs=[self.cfg['license_file']])

if lic_specs:
if self.license_env_var is None:
self.log.info("Using COMSOL license specifications from 'license_file': %s", lic_specs)
self.license_env_var = default_lic_env_var
self.license_env_var = comsol_lic_env_vars[0]
else:
self.log.info("Using COMSOL license specifications from $%s: %s", self.license_env_var, lic_specs)

self.license_file = os.pathsep.join(lic_specs)
env.setvar(self.license_env_var, self.license_file)
else:
msg = "No viable license specifications found; "
msg += "specify 'license_file', or define $%s" % default_lic_env_var
msg += "specify 'license_file', or define %s" % (', '.join('$%s' % x for x in comsol_lic_env_vars))
raise EasyBuildError(msg)

copy_file(os.path.join(self.start_dir, 'setupconfig.ini'), self.configfile)
Expand Down
10 changes: 10 additions & 0 deletions easybuild/easyblocks/c/cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@ def __init__(self, *args, **kwargs):
self.cfg.template_values['cudaarch'] = cudaarch
self.cfg.generate_template_values()

def fetch_step(self, *args, **kwargs):
"""Check for EULA acceptance prior to getting sources."""
# EULA for CUDA must be accepted via --accept-eula-for EasyBuild configuration option,
# or via 'accept_eula = True' in easyconfig file
self.check_accepted_eula(
name='CUDA',
more_info='https://docs.nvidia.com/cuda/eula/index.html'
)
return super(EB_CUDA, self).fetch_step(*args, **kwargs)

def extract_step(self):
"""Extract installer to have more control, e.g. options, patching Perl scripts, etc."""
execpath = self.src[0]['path']
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/e/easybuildmeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
import re
import sys
from collections import OrderedDict
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.pythonpackage import PythonPackage, det_pip_version
from easybuild.tools import LooseVersion
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.filetools import apply_regex_substitutions, change_dir, read_file
from easybuild.tools.modules import get_software_root_env_var_name
Expand Down
13 changes: 11 additions & 2 deletions easybuild/easyblocks/f/ferret.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@ def configure_step(self):
regex_subs.append((r"^(\s*%s\s*)=.*" % key, r"\1 = %s" % os.getenv(value)))

if LooseVersion(self.version) >= LooseVersion("7.3"):
flag_vars = {
"CFLAGS": "CFLAGS",
"FFLAGS": "FFLAGS",
"PPLUS_FFLAGS": "FFLAGS",
}
for key, value in flag_vars.items():
regex_subs.append((r"^(\s*%s\s*=).*-m64 (.*)" % key, r"\1%s \2" % os.getenv(value)))

regex_subs.extend([
(r"^(\s*LDFLAGS\s*=).*", r"\1 -fPIC %s -lnetcdff -lnetcdf -lhdf5_hl -lhdf5" % os.getenv("LDFLAGS")),
(r"^(\s*)CDFLIB", r"\1NONEED"),
Expand All @@ -182,8 +190,6 @@ def configure_step(self):
for x in ["CFLAGS", "FFLAGS"]:
regex_subs.append((r"^(\s*%s\s*=\s*\$\(CPP_FLAGS\)).*\\" % x, r"\1 %s \\" % os.getenv(x)))
if LooseVersion(self.version) >= LooseVersion("7.3"):
for x in ["CFLAGS", "FFLAGS"]:
regex_subs.append((r"^(\s*%s\s*=).*-m64 (.*)" % x, r"\1%s \2" % os.getenv(x)))
regex_subs.extend(sorted(gfort2ifort.items()))

regex_subs.append((r"^(\s*MYDEFINES\s*=.*)\\", r"\1-DF90_SYSTEM_ERROR_CALLS \\"))
Expand All @@ -208,6 +214,9 @@ def sanity_check_step(self):
"""Custom sanity check for Ferret."""

major_minor_version = '.'.join(self.version.split('.')[:2])
if LooseVersion(self.version) >= LooseVersion("7.6"):
major_minor_version += self.version.split('.')[2]

custom_paths = {
'files': ["bin/ferret_v%s" % major_minor_version],
'dirs': [],
Expand Down
75 changes: 75 additions & 0 deletions easybuild/easyblocks/f/flook.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
##
# Copyright 2023 Utrecht University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (FWO) (http://www.fwo.be/en)
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
#
# https://github.com/easybuilders/easybuild
#
# EasyBuild is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation v2.
#
# EasyBuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
##
"""
EasyBuild support for building and installing flook, implemented as an easyblock
@author: Arnold Kole (Utrecht University)
"""

from easybuild.easyblocks.generic.configuremake import ConfigureMake


class EB_flook(ConfigureMake):
"""Support for building/installing flook."""

def __init__(self, *args, **kwargs):
# call out to original constructor first, so 'self' (i.e. the class instance) is initialised
super(EB_flook, self).__init__(*args, **kwargs)

# Determine vendor
vendor = None
if self.toolchain.COMPILER_FAMILY == 'Clang':
vendor = 'clang'
elif self.toolchain.COMPILER_FAMILY == 'GCC':
vendor = 'gnu'
elif self.toolchain.COMPILER_FAMILY == 'Intel':
vendor = 'intel'
elif self.toolchain.COMPILER_FAMILY == 'PGI':
vendor = 'pgi'

# Set some default options
if vendor is not None:
local_comp_flags = 'VENDOR="%s" FFLAGS="$FFLAGS" CFLAGS="$CFLAGS"' % vendor
else:
local_comp_flags = 'FFLAGS="$FFLAGS" CFLAGS="$CFLAGS"'
self.cfg.update('buildopts', 'liball %s' % local_comp_flags)
self.cfg['parallel'] = 1

def configure_step(self):
# flook has no configure step
pass

def install_step(self):
self.cfg.update('install_cmd', 'PREFIX=%s' % self.installdir)
super(EB_flook, self).install_step()

def sanity_check_step(self):
custom_paths = {
'files': ['include/flook.mod', 'lib/libflook.a', 'lib/libflookall.a', 'lib/pkgconfig/flook.pc'],
'dirs': [],
}

# call out to parent to do the actual sanity checking, pass through custom paths
super(EB_flook, self).sanity_check_step(custom_paths=custom_paths)
12 changes: 7 additions & 5 deletions easybuild/easyblocks/generic/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,13 @@ def __init__(self, *args, **kwargs):
# list of EasyConfig instances of components for which to run sanity checks
self.comp_cfgs_sanity_check = []

# list of sources for bundle itself *must* be empty
if self.cfg['sources']:
raise EasyBuildError("List of sources for bundle itself must be empty, found %s", self.cfg['sources'])
if self.cfg['patches']:
raise EasyBuildError("List of patches for bundle itself must be empty, found %s", self.cfg['patches'])
check_for_sources = getattr(self, 'check_for_sources', True)
# list of sources for bundle itself *must* be empty (unless overridden by subclass)
if check_for_sources:
if self.cfg['sources']:
raise EasyBuildError("List of sources for bundle itself must be empty, found %s", self.cfg['sources'])
if self.cfg['patches']:
raise EasyBuildError("List of patches for bundle itself must be empty, found %s", self.cfg['patches'])

# disable templating to avoid premature resolving of template values
self.cfg.enable_templating = False
Expand Down
58 changes: 58 additions & 0 deletions easybuild/easyblocks/generic/cargopythonbundle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
##
# Copyright 2018-2023 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (FWO) (http://www.fwo.be/en)
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
#
# https://github.com/easybuilders/easybuild
#
# EasyBuild is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation v2.
#
# EasyBuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
##
"""
EasyBuild support for installing a bundle of Python packages, where some are built with Rust
@author: Mikael Oehman (Chalmers University of Technology)
"""

from easybuild.easyblocks.generic.cargo import Cargo
from easybuild.easyblocks.generic.pythonbundle import PythonBundle


class CargoPythonBundle(PythonBundle, Cargo): # PythonBundle must come first to take precedence
"""
Builds just like PythonBundle with setup for Rust and crates from Cargo easyblock
The cargo init step will set up the environment variables for rustc and vendor sources
but all the build steps are triggered like normal.
"""

@staticmethod
def extra_options(extra_vars=None):
"""Define extra easyconfig parameters specific to Cargo"""
extra_vars = PythonBundle.extra_options(extra_vars)
extra_vars = Cargo.extra_options(extra_vars) # not all extra options here will used here

return extra_vars

def __init__(self, *args, **kwargs):
"""Constructor for CargoPythonBundle easyblock."""
self.check_for_sources = False # make Bundle allow sources (as crates are treated as sources)
super(CargoPythonBundle, self).__init__(*args, **kwargs)

def extract_step(self):
"""Specifically use the overloaded variant from Cargo as is populates vendored sources with checksums."""
return Cargo.extract_step(self)
Loading

0 comments on commit c1ec39b

Please sign in to comment.