Skip to content

Commit

Permalink
Merge pull request #2382 from easybuilders/4.3.x
Browse files Browse the repository at this point in the history
release EasyBuild v4.3.4
  • Loading branch information
migueldiascosta authored Apr 9, 2021
2 parents dd2cbce + d01835e commit e6da59f
Show file tree
Hide file tree
Showing 23 changed files with 343 additions and 121 deletions.
32 changes: 31 additions & 1 deletion RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,36 @@ These release notes can also be consulted at http://easybuild.readthedocs.org/en
The latest version of easybuild-easyblocks provides 229 software-specific easyblocks and 37 generic easyblocks.


v4.3.4 (April 9th 2021)
-----------------------

update/bugfix release

- minor enhancements, including:
- make OpenCV easyblock aware of protobuf, libwebp and OpenEXR dependencies provided via EasyBuild (#2346)
- update CP2K easyblock w.r.t. running regtest for CP2K v8.1 (#2350)
- update GROMACS easyblock for GROMACS/2021 with CUDA (#2353)
- adjust call to python-config for Python >= 3.8 in VMD easyblock (#2355)
- enhance cuDNN and CUDA easyblocks to support aarch64 (#2356)
- pass down compiler flags provided by EasyBuild in g2clib easyblock (#2357)
- update VTune easyblock for version 2020 (#2359)
- make WRF and WPS easyblocks aware of (pre)configopts (#2361)
- add Clang version 12.0.0 for AOCC 3.0.0 to mapping in custom easyblock for AOCC (#2362)
- use PYPI_SOURCE as the default for source_urls of PythonPackage (#2364, #2370)
- enhance PythonPackage easyblock to catch faulty version (0.0.0) for installed Python packages (#2367, #2377)
- enhance BWA easyblock: pass compiler flags + use filetools functions (#2368)
- various bug fixes, including:
- set $R_LIBS_SITE rather than $R_LIBS when installing R packages (#2326)
- update PETSc easyblock to take into account that ScaLAPACK installation may not have header files + fix building in parallel (#2348)
- disable CMake user package repository in CMakeMake generic easyblock (#2351)
- update LAPACK easyblock to keep control of compiler options for versions >= 3.9.0 (#2358)
- also set $TORCH_CUDA_ARCH_LIST for PyTorch tests (#2363)
- enhance Hadoop easyblock to avoid copying same native library twice (#2371)
- fix pip extension download pattern for PythonPackage easyblock (#2372)
- make the CUDA stub libs take preference over system libs when linking (#2373)
- improve Python package version check and add unversioned_packages easyconfig parameter (#2377)


v4.3.3 (February 23rd 2021)
---------------------------

Expand All @@ -17,6 +47,7 @@ update/bugfix release
- run motorBike tutorial case as sanity check for recent (community) OpenFOAM versions (#2201)
- add foamMonitor to sanity checks of OpenFOAM (#2256)
- create versioned symlinks for CMake commands + create symlink for 'cmake3' in PyTorch easyblock if cmake3 command is not found (#2259)
- improve Bazel easyblock: add support for running tests, enable static linking, use build dir rather than tmpdir, verbose output (#2285)
- add support for skipping steps in Python packages installed as extension + print progress on individual steps for installing Python packages as extensions (#2290)
- update BerkeleyGW easyblock to support GCC 10 and fftlib (#2297)
- update QuantumESPRESSO easyblock to support GCC 10 (#2298)
Expand All @@ -31,7 +62,6 @@ update/bugfix release
- filter out user packages in LAMMPS easyblock if corresponding dependency isn't included + only set -DUSER-INTEL on x86_64 systems (#2254)
- unify handling of pylibdirs and don't add duplicated $PYTHONPATH in PythonBundle (#2281)
- enhance Amber easyblock to fix running of update_amber script when 'python' command is not available in OS (#2282)
- improve Bazel easyblock: add support for running tests, enable static linking, use build dir rather than tmpdir, verbose output (#2285)
- guard 'module unload' statements in modules for Cray* toolchains (#2286)
- set $PYTHONNOUSERSITE in PythonBundle.extensions_step to avoid picking up on Python packages installed in $HOME (#2289)
- create less temporary directories for TensorFlow by (only) using --output_user_root (#2293)
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
# recent setuptools versions will *TRANSFORM* something like 'X.Y.Zdev' into 'X.Y.Z.dev0', with a warning like
# UserWarning: Normalizing '2.4.0dev' to '2.4.0.dev0'
# This causes problems further up the dependency chain...
VERSION = LooseVersion('4.3.3')
VERSION = LooseVersion('4.3.4')
UNKNOWN = 'UNKNOWN'


Expand Down
3 changes: 2 additions & 1 deletion easybuild/easyblocks/a/aocc.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def __init__(self, *args, **kwargs):
def _aocc_guess_clang_version(self):
map_aocc_to_clang_ver = {
'2.3.0': '11.0.0',
'3.0.0': '12.0.0',
}

if self.version in map_aocc_to_clang_ver:
Expand All @@ -74,7 +75,7 @@ def _aocc_guess_clang_version(self):
raise EasyBuildError('\n'.join(error_lines))

def install_step(self):
# EULA for AOCC must be accepted via --accept-eula EasyBuild configuration option,
# EULA for AOCC must be accepted via --accept-eula-for EasyBuild configuration option,
# or via 'accept_eula = True' in easyconfig file
self.check_accepted_eula(more_info='http://developer.amd.com/wordpress/media/files/AOCC_EULA.pdf')

Expand Down
60 changes: 34 additions & 26 deletions easybuild/easyblocks/b/bwa.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@
@author: Kenneth Hoste (Ghent University)
@author: George Tsouloupas <[email protected]>
"""

import os
import shutil
from distutils.version import LooseVersion

from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.filetools import copy_file, mkdir


class EB_BWA(ConfigureMake):
Expand All @@ -35,45 +33,55 @@ class EB_BWA(ConfigureMake):
def __init__(self, *args, **kwargs):
"""Add extra config options specific to BWA."""
super(EB_BWA, self).__init__(*args, **kwargs)
self.files = []

def configure_step(self):
"""
Empty function as bwa comes with _no_ configure script
"""
self.files = ["bwa", "qualfa2fq.pl", "xa2multi.pl"]
if LooseVersion(self.version) < LooseVersion("0.7.0"):
self.files = ['bwa', 'qualfa2fq.pl', 'xa2multi.pl']
if LooseVersion(self.version) < LooseVersion('0.7.0'):
# solid2fastq was dropped in recent versions because the same functionality
# is covered by other tools already
# cfr. http://osdir.com/ml/general/2010-10/msg26205.html
self.files.append("solid2fastq.pl")
self.files.append('solid2fastq.pl')

def configure_step(self):
"""
Empty function as BWA comes with _no_ configure script
"""
pass

def build_step(self):
"""Custom build procedure: pass down compiler command and options as arguments to 'make'."""

for env_var in ('CC', 'CFLAGS'):
if env_var + '=' not in self.cfg['buildopts']:
self.cfg.update('buildopts', env_var + '="$' + env_var + '"')

super(EB_BWA, self).build_step()

def install_step(self):
"""
Install by copying files to install dir
"""
srcdir = self.cfg['start_dir']
destdir = os.path.join(self.installdir, 'bin')
mandir = os.path.join(self.installdir, 'man')
manman1dir = os.path.join(self.installdir, 'man/man1')
mkdir(destdir)
for filename in self.files:
srcfile = os.path.join(srcdir, filename)
copy_file(srcfile, destdir)

manfile = os.path.join(srcdir, 'bwa.1')
srcfile = None
try:
os.makedirs(destdir)
os.makedirs(mandir)
os.makedirs(manman1dir)
for filename in self.files:
srcfile = os.path.join(srcdir, filename)
shutil.copy2(srcfile, destdir)
shutil.copy2(manfile, manman1dir)
except OSError as err:
raise EasyBuildError("Copying %s to installation dir %s failed: %s", srcfile, destdir, err)
manman1dir = os.path.join(self.installdir, 'man', 'man1')
mkdir(manman1dir, parents=True)
copy_file(manfile, manman1dir)

def sanity_check_step(self):
"""Custom sanity check for BWA."""

custom_paths = {
'files': ["bin/%s" % x for x in self.files],
'files': [os.path.join('bin', x) for x in self.files],
'dirs': []
}

super(EB_BWA, self).sanity_check_step(custom_paths=custom_paths)
# 'bwa' command doesn't have a --help option, but it does print help-like information to stderr
# when run without arguments (and exits with exit code 1)
custom_commands = ["bwa 2>&1 | grep 'index sequences in the FASTA format'"]

super(EB_BWA, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands)
21 changes: 15 additions & 6 deletions easybuild/easyblocks/c/cp2k.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,13 +701,20 @@ def test_step(self):
break

# location of do_regtest script
cfg_fn = "cp2k_regtest.cfg"
cfg_fn = 'cp2k_regtest.cfg'

regtest_script = os.path.join(self.cfg['start_dir'], 'tools', 'regtesting', 'do_regtest')
regtest_cmd = "%s -nosvn -nobuild -config %s" % (regtest_script, cfg_fn)
regtest_cmd = [regtest_script, '-nobuild', '-config', cfg_fn]
if LooseVersion(self.version) < LooseVersion('7.1'):
# -nosvn option was removed in CP2K 7.1
regtest_cmd.insert(1, '-nosvn')

# older version of CP2K
if not os.path.exists(regtest_script):
regtest_script = os.path.join(self.cfg['start_dir'], 'tools', 'do_regtest')
regtest_cmd = "%s -nocvs -quick -nocompile -config %s" % (regtest_script, cfg_fn)
regtest_cmd = [regtest_script, '-nocvs', '-quick', '-nocompile', '-config', cfg_fn]

regtest_cmd = ' '.join(regtest_cmd)

# patch do_regtest so that reference output is used
if regtest_refdir:
Expand Down Expand Up @@ -812,9 +819,11 @@ def test_report(test_result):
self.postmsg += test_report("FAILED")
self.postmsg += test_report("WRONG")

# number of new tests, will be high if a non-suitable regtest reference was used
# will report error if count is positive (is that what we want?)
self.postmsg += test_report("NEW")
# there are no more 'new' tests from CP2K 8.1 onwards
if LooseVersion(self.version) < LooseVersion('8.0'):
# number of new tests, will be high if a non-suitable regtest reference was used
# will report error if count is positive (is that what we want?)
self.postmsg += test_report("NEW")

# number of correct tests: just report
test_report("CORRECT")
Expand Down
64 changes: 42 additions & 22 deletions easybuild/easyblocks/c/cuda.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
##
# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild
# Copyright 2012-2021 Ghent University
#
# Copyright:: Copyright 2012-2019 Cyprus Institute / CaSToRC, Uni.Lu, NTUA, Ghent University,
# Forschungszentrum Juelich GmbH
# Authors:: George Tsouloupas <[email protected]>, Fotis Georgatos <[email protected]>, Kenneth Hoste, Damian Alvarez
# License:: MIT/GPL
# $Id$
# 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).
#
# This work implements a part of the HPCBIOS project and is a component of the policy:
# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-99.html
# 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 CUDA, implemented as an easyblock
Expand All @@ -20,6 +32,7 @@
@author: Kenneth Hoste (Ghent University)
@author: Damian Alvarez (Forschungszentrum Juelich)
@author: Ward Poelmans (Free University of Brussels)
@author: Robert Mijakovic (LuxProvide S.A.)
"""
import os
import stat
Expand All @@ -29,10 +42,10 @@
from easybuild.easyblocks.generic.binary import Binary
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.filetools import adjust_permissions, patch_perl_script_autoflush
from easybuild.tools.filetools import remove_file, which, write_file
from easybuild.tools.filetools import adjust_permissions, copy_dir, patch_perl_script_autoflush
from easybuild.tools.filetools import remove_file, symlink, which, write_file
from easybuild.tools.run import run_cmd, run_cmd_qa
from easybuild.tools.systemtools import POWER, X86_64, get_cpu_architecture, get_shared_lib_ext
from easybuild.tools.systemtools import AARCH64, POWER, X86_64, get_cpu_architecture, get_shared_lib_ext

# Wrapper script definition
WRAPPER_TEMPLATE = """#!/bin/sh
Expand Down Expand Up @@ -62,10 +75,12 @@ def extra_options():
def __init__(self, *args, **kwargs):
""" Init the cuda easyblock adding a new cudaarch template var """
myarch = get_cpu_architecture()
if myarch == X86_64:
cudaarch = ''
if myarch == AARCH64:
cudaarch = '_sbsa'
elif myarch == POWER:
cudaarch = '_ppc64le'
elif myarch == X86_64:
cudaarch = ''
else:
raise EasyBuildError("Architecture %s is not supported for CUDA on EasyBuild", myarch)

Expand Down Expand Up @@ -179,7 +194,7 @@ def create_wrapper(wrapper_name, wrapper_comp):
for comp in (self.cfg['host_compilers'] or []):
create_wrapper('nvcc_%s' % comp, comp)

ldconfig = which('ldconfig')
ldconfig = which('ldconfig', log_ok=False, log_error=False)
sbin_dirs = ['/sbin', '/usr/sbin']
if not ldconfig:
# ldconfig is usually in /sbin or /usr/sbin
Expand All @@ -195,23 +210,28 @@ def create_wrapper(wrapper_name, wrapper_comp):
path = os.environ.get('PATH', '')
raise EasyBuildError("Unable to find 'ldconfig' in $PATH (%s), nor in any of %s", path, sbin_dirs)

stubs_dir = os.path.join(self.installdir, 'lib64', 'stubs')
# Run ldconfig to create missing symlinks in the stubs directory (libcuda.so.1, etc)
cmd = ' '.join([ldconfig, '-N', os.path.join(self.installdir, 'lib64', 'stubs')])
cmd = ' '.join([ldconfig, '-N', stubs_dir])
run_cmd(cmd)

# GCC searches paths in LIBRARY_PATH and the system paths suffixed with ../lib64 or ../lib first
# This means stubs/../lib64 is searched before the system /lib64 folder containing a potentially older libcuda.
# See e.g. https://github.com/easybuilders/easybuild-easyconfigs/issues/12348
# Workaround: Create a copy that matches this pattern
new_stubs_dir = os.path.join(self.installdir, 'stubs')
copy_dir(stubs_dir, os.path.join(new_stubs_dir, 'lib64'))
# Also create the lib dir as a symlink
symlink('lib64', os.path.join(new_stubs_dir, 'lib'), use_abspath_source=False)

super(EB_CUDA, self).post_install_step()

def sanity_check_step(self):
"""Custom sanity check for CUDA."""

shlib_ext = get_shared_lib_ext()

chk_libdir = ["lib64"]

# Versions higher than 6 do not provide 32 bit libraries
if LooseVersion(self.version) < LooseVersion("6"):
chk_libdir += ["lib"]

chk_libdir = ["lib64", "lib"]
culibs = ["cublas", "cudart", "cufft", "curand", "cusparse"]
custom_paths = {
'files': [os.path.join("bin", x) for x in ["fatbinary", "nvcc", "nvlink", "ptxas"]] +
Expand Down Expand Up @@ -259,7 +279,7 @@ def make_module_req_guess(self):
guesses.update({
'PATH': bin_path,
'LD_LIBRARY_PATH': lib_path,
'LIBRARY_PATH': ['lib64', os.path.join('lib64', 'stubs')],
'LIBRARY_PATH': ['lib64', os.path.join('stubs', 'lib64')],
'CPATH': inc_path,
})

Expand Down
36 changes: 26 additions & 10 deletions easybuild/easyblocks/c/cudnn.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@
##
# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild
# Copyright 2012-2021 Ghent University
#
# Copyright:: Copyright 2012-2019 Uni.Lu/LCSB, NTUA
# Authors:: Simon Branford
# License:: MIT/GPL
# $Id$
# 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).
#
# This work implements a part of the HPCBIOS project and is a component of the policy:
# http://hpcbios.readthedocs.org/en/latest/
# 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 cuDNN, implemented as an easyblock
@author: Simon Branford (University of Birmingham)
@author: Robert Mijakovic (LuxProvide)
"""
from easybuild.easyblocks.generic.tarball import Tarball
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.systemtools import POWER, X86_64, get_cpu_architecture
from easybuild.tools.systemtools import AARCH64, POWER, X86_64, get_cpu_architecture


class EB_cuDNN(Tarball):
Expand All @@ -25,10 +39,12 @@ class EB_cuDNN(Tarball):
def __init__(self, *args, **kwargs):
""" Init the cuDNN easyblock adding a new cudnnarch template var """
myarch = get_cpu_architecture()
if myarch == X86_64:
cudnnarch = 'x64'
if myarch == AARCH64:
cudnnarch = 'aarch64sbsa'
elif myarch == POWER:
cudnnarch = 'ppc64le'
elif myarch == X86_64:
cudnnarch = 'x64'
else:
raise EasyBuildError("Architecture %s is not supported for cuDNN on EasyBuild", myarch)

Expand Down
Loading

0 comments on commit e6da59f

Please sign in to comment.