From 04a99c3201abb8a6fcceb228d8a1008d465fad57 Mon Sep 17 00:00:00 2001 From: Stefan Wolfsheimer Date: Thu, 7 Sep 2023 22:45:08 +0200 Subject: [PATCH 01/24] wrf: extract version number --- easybuild/easyblocks/w/wrf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index b232400724..6c8dd16ea3 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -54,7 +54,7 @@ def det_wrf_subdir(wrf_version): """Determine WRF subdirectory for given WRF version.""" - if LooseVersion(wrf_version) < LooseVersion('4.0'): + if LooseVersion(wrf_version) < LooseVersion('4.0') or wrf_version == '4.5.1': wrf_subdir = 'WRFV%s' % wrf_version.split('.')[0] else: wrf_subdir = 'WRF-%s' % wrf_version From 13ff69f5e22ca53d67cd1e207abc097a1df14d5e Mon Sep 17 00:00:00 2001 From: Stefan Wolfsheimer Date: Fri, 8 Sep 2023 09:53:37 +0200 Subject: [PATCH 02/24] determine wrf_subdir for version >= 4.5.1 --- easybuild/easyblocks/w/wrf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 6c8dd16ea3..ddd6387fd8 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -54,8 +54,10 @@ def det_wrf_subdir(wrf_version): """Determine WRF subdirectory for given WRF version.""" - if LooseVersion(wrf_version) < LooseVersion('4.0') or wrf_version == '4.5.1': + if LooseVersion(wrf_version) < LooseVersion('4.0'): wrf_subdir = 'WRFV%s' % wrf_version.split('.')[0] + elif LooseVersion(wrf_version) >= LooseVersion('4.5.1'): + wrf_subdir = 'WRFV%s' % wrf_version else: wrf_subdir = 'WRF-%s' % wrf_version From d5615c9b590acf5084c69854e1444e8555d01106 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 19 Sep 2023 13:12:35 +0200 Subject: [PATCH 03/24] remove stray newline in pytorch error message --- easybuild/easyblocks/p/pytorch.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/easybuild/easyblocks/p/pytorch.py b/easybuild/easyblocks/p/pytorch.py index 40c116b197..ca98844428 100644 --- a/easybuild/easyblocks/p/pytorch.py +++ b/easybuild/easyblocks/p/pytorch.py @@ -318,7 +318,7 @@ def get_count_for_pattern(regex, text): return 0 # Create clear summary report - failure_report = "" + failure_report = [] failure_cnt = 0 error_cnt = 0 failed_test_suites = [] @@ -337,9 +337,9 @@ def get_count_for_pattern(regex, text): # E.g. 'failures=3, errors=10, skipped=190, expected failures=6' failure_summary = m.group('failure_summary') total, test_suite = m.group('test_cnt', 'failed_test_suite_name') - failure_report += "{test_suite} ({total} total tests, {failure_summary})\n".format( + failure_report.append("{test_suite} ({total} total tests, {failure_summary})".format( test_suite=test_suite, total=total, failure_summary=failure_summary - ) + )) failure_cnt += get_count_for_pattern(r"(? Date: Mon, 25 Sep 2023 11:11:41 +0200 Subject: [PATCH 04/24] fix sanity-check-only and module-only for UCX plugins --- easybuild/easyblocks/u/ucx_plugins.py | 36 ++++++++++++++++++--------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/easybuild/easyblocks/u/ucx_plugins.py b/easybuild/easyblocks/u/ucx_plugins.py index 10e5a97e13..0987487ed1 100644 --- a/easybuild/easyblocks/u/ucx_plugins.py +++ b/easybuild/easyblocks/u/ucx_plugins.py @@ -43,16 +43,36 @@ class EB_UCX_Plugins(ConfigureMake): """Support for building additional plugins for a existing UCX module""" def __init__(self, *args, **kwargs): - """Custom initialization for UCX: set correct module name.""" + """Custom initialization for UCX-Plugins.""" super(EB_UCX_Plugins, self).__init__(*args, **kwargs) - self.plugins = {} + self._plugins = None self.makefile_dirs = [] + @property + def plugins(self): + if self._plugins is None: + plugins = defaultdict(list) + + if get_software_root('CUDAcore') or get_software_root('CUDA'): + for key in ('ucm', 'uct', 'ucx_perftest'): + plugins[key].append('cuda') + + if get_software_root('GDRCopy'): + plugins['uct_cuda'].append('gdrcopy') + + # To be supported in the future: + if get_software_root('ROCm'): + for key in ('ucm', 'uct', 'ucx_perftest'): + plugins[key].append('rocm') + + self._plugins = dict(plugins) + print("plugins", plugins) + return self._plugins + def configure_step(self): """Customize configuration for building requested plugins.""" # make sure that required dependencies are loaded - ucxroot = get_software_root('UCX') - if not ucxroot: + if not get_software_root('UCX'): raise EasyBuildError("UCX is a required dependency") self.cfg['configure_cmd'] = 'contrib/configure-release' @@ -62,16 +82,12 @@ def configure_step(self): # omit the lib subdirectory since we are just installing plugins configopts += '--libdir=%(installdir)s ' - plugins = defaultdict(list) cudaroot = get_software_root('CUDAcore') or get_software_root('CUDA') if cudaroot: configopts += '--with-cuda=%s ' % cudaroot - for key in ('ucm', 'uct', 'ucx_perftest'): - plugins[key].append('cuda') gdrcopyroot = get_software_root('GDRCopy') if gdrcopyroot: - plugins['uct_cuda'].append('gdrcopy') configopts += '--with-gdrcopy=%s ' % gdrcopyroot self.makefile_dirs.extend(os.path.join(x, 'cuda') for x in ('uct', 'ucm', 'tools/perf')) @@ -79,13 +95,9 @@ def configure_step(self): # To be supported in the future: rocmroot = get_software_root('ROCm') if rocmroot: - for key in ('ucm', 'uct', 'ucx_perftest'): - plugins[key].append('rocm') configopts += '--with-rocm=%s ' % rocmroot self.makefile_dirs.extend(os.path.join(x, 'rocm') for x in ('uct', 'ucm', 'tools/perf')) - self.plugins = dict(plugins) - self.cfg.update('configopts', configopts) super(EB_UCX_Plugins, self).configure_step() From 7e00cc1f25a31eac78a0de6389d0424ededb2601 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 25 Sep 2023 11:29:14 +0200 Subject: [PATCH 05/24] Replace debug print --- easybuild/easyblocks/u/ucx_plugins.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/u/ucx_plugins.py b/easybuild/easyblocks/u/ucx_plugins.py index 0987487ed1..1523ed8ba4 100644 --- a/easybuild/easyblocks/u/ucx_plugins.py +++ b/easybuild/easyblocks/u/ucx_plugins.py @@ -29,6 +29,7 @@ @author: Mikael Öhman (Chalmers University of Techonology) """ from collections import defaultdict +from itertools import chain import os from easybuild.easyblocks.generic.configuremake import ConfigureMake @@ -66,7 +67,7 @@ def plugins(self): plugins[key].append('rocm') self._plugins = dict(plugins) - print("plugins", plugins) + self.log.info("Creating plugins for %s", ", ".join(sorted(set(chain(*plugins.values()))))) return self._plugins def configure_step(self): From 9949887867ab6c69397ee212cb1331e7009ca0fc Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 25 Sep 2023 12:48:45 +0200 Subject: [PATCH 06/24] replace umlaut in PerlBundle --- easybuild/easyblocks/generic/perlbundle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/generic/perlbundle.py b/easybuild/easyblocks/generic/perlbundle.py index fcb5ce48f8..43cd4545c1 100644 --- a/easybuild/easyblocks/generic/perlbundle.py +++ b/easybuild/easyblocks/generic/perlbundle.py @@ -25,7 +25,7 @@ """ EasyBuild support for installing a bundle of Perl modules, implemented as a generic easyblock -@author: Mikael Öhman (Chalmers University of Technology) +@author: Mikael Oehman (Chalmers University of Technology) """ import os From 8f64d316aaa49f616a9980be432c0a84b5d24886 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 27 Sep 2023 16:17:21 +0200 Subject: [PATCH 07/24] add extra newline above statement that collapsed failure_report from list of strings to a single string value in PyTorch easyblock --- easybuild/easyblocks/p/pytorch.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyblocks/p/pytorch.py b/easybuild/easyblocks/p/pytorch.py index ca98844428..58a5e9bdb8 100644 --- a/easybuild/easyblocks/p/pytorch.py +++ b/easybuild/easyblocks/p/pytorch.py @@ -409,6 +409,7 @@ def get_count_for_pattern(regex, text): failure_report.extend('+ %s' % t for t in sorted(all_failed_test_suites - failed_test_suites)) # Test suites not included in the catch-all regexp but counted. Should be empty. failure_report.extend('? %s' % t for t in sorted(failed_test_suites - all_failed_test_suites)) + failure_report = '\n'.join(failure_report) # Calculate total number of unsuccesful and total tests From c50753b92db2b51ebf910159a2d48ae2e21c2623 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 27 Sep 2023 16:26:35 +0200 Subject: [PATCH 08/24] add docstring for `plugins` property in UCX plugins easyblock --- easybuild/easyblocks/u/ucx_plugins.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyblocks/u/ucx_plugins.py b/easybuild/easyblocks/u/ucx_plugins.py index 1523ed8ba4..2ece31b019 100644 --- a/easybuild/easyblocks/u/ucx_plugins.py +++ b/easybuild/easyblocks/u/ucx_plugins.py @@ -51,6 +51,7 @@ def __init__(self, *args, **kwargs): @property def plugins(self): + """Property to determine list of plugins based on loaded dependencies, or return cached list of plugins.""" if self._plugins is None: plugins = defaultdict(list) From 575d65cb45dd962ce6e2121b2a8cee00b77412ff Mon Sep 17 00:00:00 2001 From: Sebastian Achilles Date: Sat, 30 Sep 2023 16:25:26 +0200 Subject: [PATCH 09/24] add check for `-Dccflags` and add `preconfigopts` in perl easyblock --- easybuild/easyblocks/p/perl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/p/perl.py b/easybuild/easyblocks/p/perl.py index d96505ce7d..11542473cf 100644 --- a/easybuild/easyblocks/p/perl.py +++ b/easybuild/easyblocks/p/perl.py @@ -75,7 +75,7 @@ def configure_step(self): configopts = [ self.cfg['configopts'], '-Dcc="{0}"'.format(os.getenv('CC')), - '-Dccflags="{0}"'.format(os.getenv('CFLAGS')), + '-Dccflags="{0}"'.format(os.getenv('CFLAGS')) if '-Dccflags' not in self.cfg['configopts'] else '', '-Dinc_version_list=none', '-Dprefix=%(installdir)s', # guarantee that scripts are installed in /bin in the installation directory (and not in a guessed path) @@ -116,7 +116,7 @@ def configure_step(self): if os.getenv('COLUMNS', None) == '0': unset_env_vars(['COLUMNS']) - cmd = './Configure -de %s' % configopts + cmd = '%s ./Configure -de %s' % (self.cfg['preconfigopts'], configopts) run_cmd(cmd, log_all=True, simple=True) def test_step(self): From 706970eb05ac970d3435a71a5894d499fdc45ed4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 3 Oct 2023 09:05:40 +0200 Subject: [PATCH 10/24] enhance TensorFlow easyblock to avoid use of -mcpu=native for XNNPACK component when building on aarch64 --- easybuild/easyblocks/t/tensorflow.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/t/tensorflow.py b/easybuild/easyblocks/t/tensorflow.py index de9b97296a..926a1920cf 100644 --- a/easybuild/easyblocks/t/tensorflow.py +++ b/easybuild/easyblocks/t/tensorflow.py @@ -48,7 +48,7 @@ from easybuild.tools.filetools import is_readable, read_file, which, write_file, remove_file from easybuild.tools.modules import get_software_root, get_software_version, get_software_libdir from easybuild.tools.run import run_cmd -from easybuild.tools.systemtools import X86_64, get_cpu_architecture, get_os_name, get_os_version +from easybuild.tools.systemtools import AARCH64, X86_64, get_cpu_architecture, get_os_name, get_os_version CPU_DEVICE = 'cpu' @@ -687,6 +687,19 @@ def configure_step(self): cmd = self.cfg['preconfigopts'] + './configure ' + self.cfg['configopts'] run_cmd(cmd, log_all=True, simple=True) + # when building on Arm 64-bit we can't just use --copt=-mcpu=native (or likewise for any -mcpu=...), + # because it breaks the build of XNNPACK; + # see also https://github.com/easybuilders/easybuild-easyconfigs/issues/18899 + if get_cpu_architecture() == AARCH64: + tf_conf_bazelrc = os.path.join(self.start_dir, '.tf_configure.bazelrc') + regex_subs = [ + # use --per_file_copt instead of --copt to selectively use -mcpu=native (not for XNNPACK), + # the leading '-' ensures that -mcpu=native is *not* used when building XNNPACK; + # see https://github.com/google/XNNPACK/issues/5566 + https://bazel.build/docs/user-manual#per-file-copt + ('--copt=-mcpu=', '--per_file_copt=-.*XNNPACK/.*@-mcpu='), + ] + apply_regex_substitutions(tf_conf_bazelrc, regex_subs) + def patch_crosstool_files(self): """Patches the CROSSTOOL files to include EasyBuild provided compiler paths""" inc_paths, lib_paths = [], [] From 4e265c2618876eadf58da9c335d3f4d8b36c17e5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 4 Oct 2023 09:02:18 +0200 Subject: [PATCH 11/24] only use -DCMAKE_SKIP_RPATH=ON for CMake < 3.5.0 --- easybuild/easyblocks/generic/cmakemake.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/generic/cmakemake.py b/easybuild/easyblocks/generic/cmakemake.py index 79235a644e..0401f872e4 100644 --- a/easybuild/easyblocks/generic/cmakemake.py +++ b/easybuild/easyblocks/generic/cmakemake.py @@ -267,9 +267,10 @@ def configure_step(self, srcdir=None, builddir=None): self.log.info("Using absolute path to compiler command: %s", value) options[option] = value - if build_option('rpath'): + if build_option('rpath') and LooseVersion(self.cmake_version) < LooseVersion('3.5.0'): # instruct CMake not to fiddle with RPATH when --rpath is used, since it will undo stuff on install... - # https://github.com/LLNL/spack/blob/0f6a5cd38538e8969d11bd2167f11060b1f53b43/lib/spack/spack/build_environment.py#L416 + # this is only required for CMake < 3.5.0, since newer version are more careful w.r.t. RPATH, + # see https://github.com/Kitware/CMake/commit/3ec9226779776811240bde88a3f173c29aa935b5 options['CMAKE_SKIP_RPATH'] = 'ON' # show what CMake is doing by default From 9dbb29979f6f48808e1c9df5bcdbcb09caec38b8 Mon Sep 17 00:00:00 2001 From: Sebastian Achilles Date: Sat, 7 Oct 2023 22:47:23 +0200 Subject: [PATCH 12/24] add more test programs to OpenMPI EasyBlock --- easybuild/easyblocks/o/openmpi.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/o/openmpi.py b/easybuild/easyblocks/o/openmpi.py index cf7c73151f..e76dd131bf 100644 --- a/easybuild/easyblocks/o/openmpi.py +++ b/easybuild/easyblocks/o/openmpi.py @@ -211,8 +211,18 @@ def sanity_check_step(self): mpi_cmd_tmpl, params = get_mpi_cmd_template(toolchain.OPENMPI, dict(), mpi_version=self.version) # Limit number of ranks to 8 to avoid it failing due to hyperthreading ranks = min(8, self.cfg['parallel']) - for src, compiler in (('hello_c.c', 'mpicc'), ('hello_mpifh.f', 'mpifort'), ('hello_usempi.f90', 'mpif90')): - src_path = os.path.join(self.cfg['start_dir'], 'examples', src) + for srcdir, src, compiler in ( + ('examples', 'hello_c.c', 'mpicc'), + ('examples', 'hello_mpifh.f', 'mpifort'), + ('examples', 'hello_usempi.f90', 'mpif90'), + ('examples', 'ring_c.c', 'mpicc'), + ('examples', 'ring_mpifh.f', 'mpifort'), + ('examples', 'ring_usempi.f90', 'mpif90'), + ('test/simple', 'thread_init.c', 'mpicc'), + ('test/simple', 'intercomm1.c', 'mpicc'), + ('test/simple', 'mpi_barrier.c', 'mpicc'), + ): + src_path = os.path.join(self.cfg['start_dir'], srcdir, src) if os.path.exists(src_path): test_exe = os.path.join(self.builddir, 'mpi_test_' + os.path.splitext(src)[0]) self.log.info("Adding minimal MPI test program to sanity checks: %s", test_exe) From 78f71dc9a60fc092cf8c5a9a5a65c656c6b2c02f Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 16 Oct 2023 12:42:29 +0200 Subject: [PATCH 13/24] Use dependencies instead of `get_software_root` to determine plugins Allows working with --sanity-check-only where the modules may not be loaded yet --- easybuild/easyblocks/u/ucx_plugins.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/easybuild/easyblocks/u/ucx_plugins.py b/easybuild/easyblocks/u/ucx_plugins.py index 2ece31b019..a80aa379f5 100644 --- a/easybuild/easyblocks/u/ucx_plugins.py +++ b/easybuild/easyblocks/u/ucx_plugins.py @@ -54,16 +54,16 @@ def plugins(self): """Property to determine list of plugins based on loaded dependencies, or return cached list of plugins.""" if self._plugins is None: plugins = defaultdict(list) + dep_names = set(dep['name'] for dep in self.cfg.dependencies()) - if get_software_root('CUDAcore') or get_software_root('CUDA'): + if 'CUDAcore' in dep_names or 'CUDA' in dep_names: for key in ('ucm', 'uct', 'ucx_perftest'): plugins[key].append('cuda') - if get_software_root('GDRCopy'): + if 'GDRCopy' in dep_names: plugins['uct_cuda'].append('gdrcopy') - # To be supported in the future: - if get_software_root('ROCm'): + if 'ROCm' in dep_names: for key in ('ucm', 'uct', 'ucx_perftest'): plugins[key].append('rocm') @@ -94,7 +94,6 @@ def configure_step(self): self.makefile_dirs.extend(os.path.join(x, 'cuda') for x in ('uct', 'ucm', 'tools/perf')) - # To be supported in the future: rocmroot = get_software_root('ROCm') if rocmroot: configopts += '--with-rocm=%s ' % rocmroot From 97a1194c572024515b4bec859b3419f80e8448f0 Mon Sep 17 00:00:00 2001 From: Viktor Rehnberg Date: Tue, 17 Oct 2023 08:40:15 +0200 Subject: [PATCH 14/24] adding easyblocks: palm.py --- easybuild/easyblocks/p/palm.py | 90 ++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 easybuild/easyblocks/p/palm.py diff --git a/easybuild/easyblocks/p/palm.py b/easybuild/easyblocks/p/palm.py new file mode 100644 index 0000000000..213001b1f2 --- /dev/null +++ b/easybuild/easyblocks/p/palm.py @@ -0,0 +1,90 @@ +## +# Copyright 2018-2019 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 . +## +""" +EasyBuild support for building and installing PALM, implemented as an easyblock + +@author: Viktor Rehnberg (Chalmers University of Technology) +""" +import os +import tempfile + +import easybuild.tools.environment as env +from easybuild.framework.easyblock import EasyBlock +from easybuild.tools.config import build_option +from easybuild.tools.filetools import find_glob_pattern +from easybuild.tools.run import run_cmd + + +class EB_PALM(EasyBlock): + """Support for building/installing PALM.""" + + def __init__(self, *args, **kwargs): + """Initialise PALM easyblock.""" + super().__init__(*args, **kwargs) + + def configure_step(self): + """No configuration procedure for PALM.""" + pass + + def build_step(self): + """No build procedure for PALM.""" + pass + + def install_step(self): + """Custom install procedure for PALM.""" + + install_script_pattern = "install" + if self.dry_run: + install_script = install_script_pattern + else: + install_script = find_glob_pattern(install_script_pattern) + + cmd = ' '.join([ + self.cfg['preinstallopts'], + "bash", + install_script, + "-p %s" % self.installdir, + self.cfg['installopts'], + ]) + run_cmd(cmd, log_all=True, simple=True) + + def sanity_check_step(self): + """Custom sanity check for PALM.""" + custom_paths = { + 'files': [os.path.join(self.installdir, 'bin', 'palmrun')], + 'dirs': [], + } + super().sanity_check_step(custom_paths=custom_paths) + + def make_module_extra(self): + """Extra statements specific to PALM to include in generated module file.""" + txt = super().make_module_extra() + + bin_dirs = [ + os.path.join(self.installdir, 'bin'), + ] + txt += self.module_generator.prepend_paths('PATH', bin_dirs) + + return txt From f7ab7bae79f8f1747a1d5122295e5da8fdb3d1e2 Mon Sep 17 00:00:00 2001 From: Viktor Rehnberg Date: Tue, 17 Oct 2023 08:42:16 +0200 Subject: [PATCH 15/24] Remove unused imports --- easybuild/easyblocks/p/palm.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/easybuild/easyblocks/p/palm.py b/easybuild/easyblocks/p/palm.py index 213001b1f2..677aefaa94 100644 --- a/easybuild/easyblocks/p/palm.py +++ b/easybuild/easyblocks/p/palm.py @@ -28,11 +28,8 @@ @author: Viktor Rehnberg (Chalmers University of Technology) """ import os -import tempfile -import easybuild.tools.environment as env from easybuild.framework.easyblock import EasyBlock -from easybuild.tools.config import build_option from easybuild.tools.filetools import find_glob_pattern from easybuild.tools.run import run_cmd From 7599bdea675807dc91f5f49882cc08b459dfb716 Mon Sep 17 00:00:00 2001 From: Sebastian Achilles Date: Wed, 18 Oct 2023 14:59:13 +0200 Subject: [PATCH 16/24] fix CMAKE_PREFIX_PATH in mkl easyblock --- easybuild/easyblocks/i/imkl.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 978b42137c..a342a4686c 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -546,11 +546,13 @@ def make_module_req_guess(self): os.path.join(self.mkl_basedir, 'include'), os.path.join(self.mkl_basedir, 'include', 'fftw'), ] + cmake_prefix_path = [self.mkl_basedir] guesses.update({ 'PATH': [], 'LD_LIBRARY_PATH': library_path, 'LIBRARY_PATH': library_path, 'CPATH': cpath, + 'CMAKE_PREFIX_PATH': cmake_prefix_path, 'PKG_CONFIG_PATH': pkg_config_path, }) if self.cfg['flexiblas']: From 7fc1e6749518f6ffee78a29de62899c98d9e41c3 Mon Sep 17 00:00:00 2001 From: Viktor Rehnberg <35767167+VRehnberg@users.noreply.github.com> Date: Mon, 23 Oct 2023 09:53:18 +0200 Subject: [PATCH 17/24] Simplify make_module_extra Remove self.installdir from bin_dir paths on akesa's suggestion https://github.com/easybuilders/easybuild-easyblocks/pull/3020#discussion_r1368207994 --- easybuild/easyblocks/p/palm.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/easybuild/easyblocks/p/palm.py b/easybuild/easyblocks/p/palm.py index 677aefaa94..f83e9bd2a8 100644 --- a/easybuild/easyblocks/p/palm.py +++ b/easybuild/easyblocks/p/palm.py @@ -79,9 +79,6 @@ def make_module_extra(self): """Extra statements specific to PALM to include in generated module file.""" txt = super().make_module_extra() - bin_dirs = [ - os.path.join(self.installdir, 'bin'), - ] - txt += self.module_generator.prepend_paths('PATH', bin_dirs) + txt += self.module_generator.prepend_paths('PATH', ['bin']) return txt From df832a74ef4897453b6a1fca428cc6ad6e6a553d Mon Sep 17 00:00:00 2001 From: sassy Date: Mon, 23 Oct 2023 21:01:26 +0100 Subject: [PATCH 18/24] Sanity-test expanded to 4.2.0 version --- easybuild/easyblocks/w/wxpython.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/easyblocks/w/wxpython.py b/easybuild/easyblocks/w/wxpython.py index 35b22b1867..939e2718a1 100644 --- a/easybuild/easyblocks/w/wxpython.py +++ b/easybuild/easyblocks/w/wxpython.py @@ -127,6 +127,9 @@ def sanity_check_step(self): files.extend([os.path.join('bin', 'wxrc')]) dirs.extend(['include', 'share']) py_bins.extend(['alacarte', 'alamode', 'wrap']) + elif LooseVersion(self.version) >= LooseVersion("4.2"): + majver = '3.2' # this is 3.2 in ver 4.2.x + py_bins.extend(['slices', 'slicesshell']) elif LooseVersion(self.version) >= LooseVersion("4.1"): majver = '3.1' # this is 3.1 in ver 4.1.x py_bins.extend(['slices', 'slicesshell']) From b73d7887fab1aa959a4d28190cbba22c427ad5eb Mon Sep 17 00:00:00 2001 From: Jakob Schiotz Date: Tue, 24 Oct 2023 12:39:27 +0200 Subject: [PATCH 19/24] Fix the blas/lapack name passed to meson when building scipy with MKL. --- easybuild/easyblocks/s/scipy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/s/scipy.py b/easybuild/easyblocks/s/scipy.py index fa82d0a866..094a0259b5 100644 --- a/easybuild/easyblocks/s/scipy.py +++ b/easybuild/easyblocks/s/scipy.py @@ -124,7 +124,7 @@ def configure_step(self): if lapack_lib == toolchain.FLEXIBLAS: blas_lapack = 'flexiblas' elif lapack_lib == toolchain.INTELMKL: - blas_lapack = 'mkl' + blas_lapack = 'mkl-dynamic-lp64-seq' elif lapack_lib == toolchain.OPENBLAS: blas_lapack = 'openblas' else: From 56dbb5d226215e98ee8fd449a80b18c83b339303 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 27 Oct 2023 12:14:39 +0200 Subject: [PATCH 20/24] use dependency_names method in UCX-plugins easyblock --- easybuild/easyblocks/u/ucx_plugins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/u/ucx_plugins.py b/easybuild/easyblocks/u/ucx_plugins.py index a80aa379f5..a00512c48c 100644 --- a/easybuild/easyblocks/u/ucx_plugins.py +++ b/easybuild/easyblocks/u/ucx_plugins.py @@ -54,7 +54,7 @@ def plugins(self): """Property to determine list of plugins based on loaded dependencies, or return cached list of plugins.""" if self._plugins is None: plugins = defaultdict(list) - dep_names = set(dep['name'] for dep in self.cfg.dependencies()) + dep_names = self.cfg.dependency_names() if 'CUDAcore' in dep_names or 'CUDA' in dep_names: for key in ('ucm', 'uct', 'ucx_perftest'): From 1cf46f443f26dfc6d08896e16bf97e3bb5da742d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Sun, 29 Oct 2023 00:42:12 +0200 Subject: [PATCH 21/24] Allow version mismatch and include versionsuffix in modulerc --- easybuild/easyblocks/generic/modulerc.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/generic/modulerc.py b/easybuild/easyblocks/generic/modulerc.py index aa67e90fe3..c6bd4b988c 100644 --- a/easybuild/easyblocks/generic/modulerc.py +++ b/easybuild/easyblocks/generic/modulerc.py @@ -30,6 +30,7 @@ import os from easybuild.framework.easyblock import EasyBlock +from easybuild.framework.easyconfig import CUSTOM from easybuild.framework.easyconfig.easyconfig import ActiveMNS from easybuild.tools.build_log import EasyBuildError, print_msg from easybuild.tools.config import install_path @@ -41,6 +42,16 @@ class ModuleRC(EasyBlock): Generic easyblock to create a software-specific .modulerc file """ + @staticmethod + def extra_options(extra_vars=None): + """Define extra easyconfig parameters specific to ModuleRC""" + if extra_vars is None: + extra_vars = {} + extra_vars.update({ + 'check_version': [True, "Check version is prefix of dependency", CUSTOM], + }) + return EasyBlock.extra_options(extra_vars) + def configure_step(self): """Do nothing.""" pass @@ -67,7 +78,8 @@ def make_module_step(self, fake=False): raise EasyBuildError("Name does not match dependency name: %s vs %s", self.name, deps[0]['name']) # ensure version to alias to is a prefix of the version of the dependency - if not deps[0]['version'].startswith(self.version) and not self.version == "default": + if self.cfg['check_version'] and \ + not deps[0]['version'].startswith(self.version) and not self.version == "default": raise EasyBuildError("Version is not 'default' and not a prefix of dependency version: %s vs %s", self.version, deps[0]['version']) @@ -85,7 +97,7 @@ def make_module_step(self, fake=False): module_version_specs = { 'modname': alias_modname, - 'sym_version': self.version, + 'sym_version': self.version + self.cfg['versionsuffix'], 'version': deps[0]['version'], } self.module_generator.modulerc(module_version=module_version_specs, filepath=modulerc) From 6a71006f4c7970db2a8154b775e16b84d8075735 Mon Sep 17 00:00:00 2001 From: Viktor Rehnberg <35767167+VRehnberg@users.noreply.github.com> Date: Mon, 30 Oct 2023 10:06:29 +0100 Subject: [PATCH 22/24] Remove make_module_extra as requested --- easybuild/easyblocks/p/palm.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/easybuild/easyblocks/p/palm.py b/easybuild/easyblocks/p/palm.py index f83e9bd2a8..f0777a4dbe 100644 --- a/easybuild/easyblocks/p/palm.py +++ b/easybuild/easyblocks/p/palm.py @@ -75,10 +75,4 @@ def sanity_check_step(self): } super().sanity_check_step(custom_paths=custom_paths) - def make_module_extra(self): - """Extra statements specific to PALM to include in generated module file.""" - txt = super().make_module_extra() - - txt += self.module_generator.prepend_paths('PATH', ['bin']) - return txt From 6e367e9adb77c4aa5c460ff500fb4c746a91ba82 Mon Sep 17 00:00:00 2001 From: Viktor Rehnberg <35767167+VRehnberg@users.noreply.github.com> Date: Mon, 30 Oct 2023 10:07:39 +0100 Subject: [PATCH 23/24] Remove line missed in last commit --- easybuild/easyblocks/p/palm.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/easybuild/easyblocks/p/palm.py b/easybuild/easyblocks/p/palm.py index f0777a4dbe..de1af55341 100644 --- a/easybuild/easyblocks/p/palm.py +++ b/easybuild/easyblocks/p/palm.py @@ -74,5 +74,3 @@ def sanity_check_step(self): 'dirs': [], } super().sanity_check_step(custom_paths=custom_paths) - - return txt From f037c2a889c6fae4b1d64e6542b0b90d5525e3ed Mon Sep 17 00:00:00 2001 From: Viktor Rehnberg <35767167+VRehnberg@users.noreply.github.com> Date: Mon, 30 Oct 2023 10:52:17 +0100 Subject: [PATCH 24/24] Set copy right to 2023 --- easybuild/easyblocks/p/palm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/p/palm.py b/easybuild/easyblocks/p/palm.py index de1af55341..6674be5c7a 100644 --- a/easybuild/easyblocks/p/palm.py +++ b/easybuild/easyblocks/p/palm.py @@ -1,5 +1,5 @@ ## -# Copyright 2018-2019 Ghent University +# Copyright 2023 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),