Skip to content

Commit

Permalink
Merge branch '2023.06-software.eessi.io' into 2023.06-software.eessi.…
Browse files Browse the repository at this point in the history
…io_OpenFOAM-v2312
  • Loading branch information
ocaisa authored Jul 30, 2024
2 parents 2801ecd + 7dbb8df commit b57463a
Show file tree
Hide file tree
Showing 18 changed files with 160 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- cron: '25 15 * * 3'
push:
branches:
- '2023.06-software.eessi.io'
- '*-software.eessi.io'

# Declare default permissions as read only.
permissions: read-all
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test-software.eessi.io.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Check for missing software installations in software.eessi.io
on: [push, pull_request, workflow_dispatch]
on:
push:
branches: [ "*-software.eessi.io" ]
pull_request:
workflow_dispatch:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test_eessi_container_script.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Tests for eessi_container.sh script
on: [push, pull_request, workflow_dispatch]
on:
push:
branches: [ "*-software.eessi.io" ]
pull_request:
workflow_dispatch:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test_licenses.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Test software licenses
on: [push, pull_request]
on:
push:
branches: [ "*-software.eessi.io" ]
pull_request:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Tests
on: [push, pull_request]
on:
push:
branches: [ "*-software.eessi.io" ]
pull_request:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/tests_archdetect.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Tests for eessi_archdetect.sh
on: [push, pull_request]
on:
push:
branches: [ "*-software.eessi.io" ]
pull_request:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/tests_init.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Tests for init scripts
on: [push, pull_request]
on:
push:
branches: [ "*-software.eessi.io" ]
pull_request:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
easyconfigs:
- BLAST+-2.14.0-gompi-2022b.eb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ easyconfigs:
- LSD2-2.4.1-GCCcore-12.3.0.eb
- MAFFT-7.520-GCC-12.3.0-with-extensions.eb
- ncbi-vdb-3.0.10-gompi-2023a.eb
- MetalWalls-21.06.1-foss-2023a.eb
- QuantumESPRESSO-7.3.1-foss-2023a.eb:
options:
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/20138
from-commit: dbdaacc0739fdee91baa9123864ea4428cf21273
# see https://github.com/easybuilders/easybuild-easyblocks/pull/3338
include-easyblocks-from-commit: 32e45bd1f2d916732ca5852d55d17fa4d99e388b
- CP2K-2023.1-foss-2023a.eb:
options:
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/20951
from-commit: a92667fe32396bbd4106243658625f7ff2adcd68
- amdahl-0.3.1-gompi-2023a.eb
- OpenFOAM-v2312-foss-2023a.eb:
options:
# https://github.com/easybuilders/easybuild-easyblocks/pull/3388
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
easyconfigs:
- IPython-8.17.2-GCCcore-13.2.0.eb
- dlb-3.4-gompi-2023b.eb
- pystencils-1.3.4-gfbf-2023b.eb:
options:
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/20889
from-commit: c66c4788a17f7e4f55aa23f9fdb782aad97c9ce7
- Extrae-4.2.0-gompi-2023b.eb:
options:
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/21017
from-commit: 120f4d56efebd2bc61382db4c84a664a339c66cf
# see https://github.com/easybuilders/easybuild-easyblocks/pull/3393
include-easyblocks-from-commit: c4951c78d62fa5cf8e9f6fe0ead212d2a4d7cb9c
- pyMBE-0.8.0-foss-2023b.eb:
options:
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/21034
from-commit: 76e7fc6657bab64bfbec826540a3a8f0040258f2
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 2024.07.19
# GObject-Introspection sets $LD_LIBRARY_PATH (to many different paths, including $EPREFIX/lib)
# when calling gcc, and this causes a lot of issues for, especially, scripts using /bin/bash.
#
# This rebuild ensures (by using a new EasyBuild hook) that GObject-Introspection will not set
# environment variables that are configured to be filtered by EasyBuild.
#
# See https://github.com/EESSI/software-layer/issues/196
easyconfigs:
- GObject-Introspection-1.76.1-GCCcore-12.3.0.eb
- GObject-Introspection-1.78.1-GCCcore-13.2.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# 2024.07.19
# GObject-Introspection sets $LD_LIBRARY_PATH (to many different paths, including $EPREFIX/lib)
# when calling gcc, and this causes a lot of issues for, especially, scripts using /bin/bash.
#
# This rebuild ensures (by using a new EasyBuild hook) that GObject-Introspection will not set
# environment variables that are configured to be filtered by EasyBuild.
#
# See https://github.com/EESSI/software-layer/issues/196
easyconfigs:
- GObject-Introspection-1.74.0-GCCcore-12.2.0.eb
- GObject-Introspection-1.76.1-GCCcore-12.3.0.eb
- GObject-Introspection-1.78.1-GCCcore-13.2.0.eb
- at-spi2-core-2.46.0-GCCcore-12.2.0.eb
- at-spi2-core-2.49.91-GCCcore-12.3.0.eb
81 changes: 65 additions & 16 deletions eb_hooks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Hooks to customize how EasyBuild installs software in EESSI
# see https://docs.easybuild.io/en/latest/Hooks.html
import glob
import os
import re

Expand Down Expand Up @@ -298,6 +299,22 @@ def parse_hook_lammps_remove_deps_for_CI_aarch64(ec, *args, **kwargs):
raise EasyBuildError("LAMMPS-specific hook triggered for non-LAMMPS easyconfig?!")


def parse_hook_CP2K_remove_deps_for_aarch64(ec, *args, **kwargs):
"""
Remove x86_64 specific dependencies for the CI and missing installations to pass on aarch64
"""
if ec.name == 'CP2K' and ec.version in ('2023.1',):
if os.getenv('EESSI_CPU_FAMILY') == 'aarch64':
# LIBXSMM is not supported on ARM with GCC 12.2.0 and 12.3.0
# See https://www.cp2k.org/dev:compiler_support
# See https://github.com/easybuilders/easybuild-easyconfigs/pull/20951
# we need this hook because we check for missing installations for all CPU targets
# on an x86_64 VM in GitHub Actions (so condition based on ARCH in LAMMPS easyconfig is always true)
ec['dependencies'] = [dep for dep in ec['dependencies'] if dep[0] not in ('libxsmm',)]
else:
raise EasyBuildError("CP2K-specific hook triggered for non-CP2K easyconfig?!")


def pre_prepare_hook_highway_handle_test_compilation_issues(self, *args, **kwargs):
"""
Solve issues with compiling or running the tests on both
Expand Down Expand Up @@ -357,6 +374,51 @@ def pre_configure_hook_BLIS_a64fx(self, *args, **kwargs):
else:
raise EasyBuildError("BLIS-specific hook triggered for non-BLIS easyconfig?!")

def pre_configure_hook_extrae(self, *args, **kwargs):
"""
Pre-configure hook for Extrae
- avoid use of 'which' in configure script
- specify correct path to binutils/zlib (in compat layer)
"""
if self.name == 'Extrae':

# determine path to Prefix installation in compat layer via $EPREFIX
eprefix = get_eessi_envvar('EPREFIX')

binutils_lib_path_glob_pattern = os.path.join(eprefix, 'usr', 'lib*', 'binutils', '*-linux-gnu', '2.*')
binutils_lib_path = glob.glob(binutils_lib_path_glob_pattern)
if len(binutils_lib_path) == 1:
self.cfg.update('configopts', '--with-binutils=' + binutils_lib_path[0])
else:
raise EasyBuildError("Failed to isolate path for binutils libraries using %s, got %s",
binutils_lib_path_glob_pattern, binutils_lib_path)

# zlib is a filtered dependency, so we need to manually specify it's location to avoid the host version
self.cfg.update('configopts', '--with-libz=' + eprefix)

# replace use of 'which' with 'command -v', since 'which' is broken in EESSI build container;
# this must be done *after* running configure script, because initial configuration re-writes configure script,
# and problem due to use of which only pops up when running make ?!
self.cfg.update('prebuildopts', "cp config/mpi-macros.m4 config/mpi-macros.m4.orig && sed -i 's/`which /`command -v /g' config/mpi-macros.m4 && ")
else:
raise EasyBuildError("Extrae-specific hook triggered for non-Extrae easyconfig?!")


def pre_configure_hook_gobject_introspection(self, *args, **kwargs):
"""
pre-configure hook for GObject-Introspection:
- prevent GObject-Introspection from setting $LD_LIBRARY_PATH if EasyBuild is configured to filter it, see:
https://github.com/EESSI/software-layer/issues/196
"""
if self.name == 'GObject-Introspection':
# inject a line that removes all items from runtime_path_envvar that are in $EASYBUILD_FILTER_ENVVARS
sed_cmd = r'sed -i "s@\(^\s*runtime_path_envvar = \)\(.*\)@'
sed_cmd += r'\1\2\n\1 [x for x in runtime_path_envvar if not x in os.environ.get(\'EASYBUILD_FILTER_ENV_VARS\', \'\').split(\',\')]@g"'
sed_cmd += ' %(start_dir)s/giscanner/ccompiler.py && '
self.cfg.update('preconfigopts', sed_cmd)
else:
raise EasyBuildError("GObject-Introspection-specific hook triggered for non-GObject-Introspection easyconfig?!")


def pre_configure_hook_gromacs(self, *args, **kwargs):
"""
Expand Down Expand Up @@ -439,21 +501,6 @@ def pre_configure_hook_wrf_aarch64(self, *args, **kwargs):
raise EasyBuildError("WRF-specific hook triggered for non-WRF easyconfig?!")


def pre_configure_hook_atspi2core_filter_ld_library_path(self, *args, **kwargs):
"""
pre-configure hook for at-spi2-core:
- instruct GObject-Introspection's g-ir-scanner tool to not set $LD_LIBRARY_PATH
when EasyBuild is configured to filter it, see:
https://github.com/EESSI/software-layer/issues/196
"""
if self.name == 'at-spi2-core':
if build_option('filter_env_vars') and 'LD_LIBRARY_PATH' in build_option('filter_env_vars'):
sed_cmd = 'sed -i "s/gir_extra_args = \[/gir_extra_args = \[\\n \'--lib-dirs-envvar=FILTER_LD_LIBRARY_PATH\',/g" %(start_dir)s/atspi/meson.build && '
self.cfg.update('preconfigopts', sed_cmd)
else:
raise EasyBuildError("at-spi2-core-specific hook triggered for non-at-spi2-core easyconfig?!")


def pre_test_hook(self,*args, **kwargs):
"""Main pre-test hook: trigger custom functions based on software name."""
if self.name in PRE_TEST_HOOKS:
Expand Down Expand Up @@ -697,6 +744,7 @@ def inject_gpu_property(ec):
'CGAL': parse_hook_cgal_toolchainopts_precise,
'fontconfig': parse_hook_fontconfig_add_fonts,
'LAMMPS': parse_hook_lammps_remove_deps_for_CI_aarch64,
'CP2K': parse_hook_CP2K_remove_deps_for_aarch64,
'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors,
'pybind11': parse_hook_pybind11_replace_catch2,
'Qt5': parse_hook_qt5_check_qtwebengine_disable,
Expand All @@ -713,8 +761,9 @@ def inject_gpu_property(ec):
}

PRE_CONFIGURE_HOOKS = {
'at-spi2-core': pre_configure_hook_atspi2core_filter_ld_library_path,
'BLIS': pre_configure_hook_BLIS_a64fx,
'GObject-Introspection': pre_configure_hook_gobject_introspection,
'Extrae': pre_configure_hook_extrae,
'GROMACS': pre_configure_hook_gromacs,
'libfabric': pre_configure_hook_libfabric_disable_psm3_x86_64_generic,
'MetaBAT': pre_configure_hook_metabat_filtered_zlib_dep,
Expand Down
2 changes: 1 addition & 1 deletion init/bash
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function show_msg {
# only echo msg if EESSI_SILENT is unset
msg=$1
if [[ ! -v EESSI_SILENT ]]; then
if [[ -z ${EESSI_SILENT+x} ]]; then
echo "$msg"
fi
}
Expand Down
2 changes: 1 addition & 1 deletion init/eessi_archdetect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ cpupath(){
*) log "ERROR" "cpupath: Unsupported CPU architecture $machine_type"
esac
# spec files are located in a subfolder with this script
local base_dir=$(dirname $(realpath $0))
local base_dir=$(dirname $(readlink -f $0))
update_arch_specs "$base_dir/arch_specs/${spec_file}"

# Identify the host CPU vendor
Expand Down
2 changes: 1 addition & 1 deletion init/eessi_defaults
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
if [[ $(uname -m) == "riscv64" ]]; then
export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO_OVERRIDE:=/cvmfs/riscv.eessi.io}"
export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:=20240402}"
if [[ ! -v EESSI_SILENT ]]; then
if [[ -z ${EESSI_SILENT+x} ]]; then
echo "RISC-V architecture detected, but there is no RISC-V support yet in the production repository."
echo "Automatically switching to version ${EESSI_VERSION} of the RISC-V development repository ${EESSI_CVMFS_REPO}."
echo "For more details about this repository, see https://www.eessi.io/docs/repositories/riscv.eessi.io/."
Expand Down
13 changes: 11 additions & 2 deletions init/eessi_environment_variables
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# this script is *sourced*, not executed, so can't rely on $0 to determine path to self
# $BASH_SOURCE points to correct path, see also http://mywiki.wooledge.org/BashFAQ/028
EESSI_INIT_DIR_PATH=$(dirname $(realpath $BASH_SOURCE))
EESSI_INIT_DIR_PATH=$(dirname $(readlink -f $BASH_SOURCE))

function error() {
echo -e "\e[31mERROR: $1\e[0m" >&2
Expand All @@ -10,7 +10,7 @@ function error() {
function show_msg {
# only echo msg if EESSI_SILENT is unset
msg=$1
if [[ ! -v EESSI_SILENT ]]; then
if [[ -z ${EESSI_SILENT+x} ]]; then
echo "$msg"
fi
}
Expand Down Expand Up @@ -106,6 +106,15 @@ if [ -d $EESSI_PREFIX ]; then
false
fi

# Fix wrong path for RHEL >=8 libcurl
# This is required here because we ship curl in our compat layer. If we only provided
# curl as a module file we could instead do this via a `modluafooter` in an EasyBuild
# hook (or via an Lmod hook)
rhel_libcurl_file="/etc/pki/tls/certs/ca-bundle.crt"
if [ -f $rhel_libcurl_file ]; then
show_msg "Found libcurl CAs file at RHEL location, setting CURL_CA_BUNDLE"
export CURL_CA_BUNDLE=$rhel_libcurl_file
fi

else
error "EESSI software layer at $EESSI_SOFTWARE_PATH not found!"
Expand Down
2 changes: 1 addition & 1 deletion init/minimal_eessi_env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# this script is *sourced*, not executed, so can't rely on $0 to determine path to self
# $BASH_SOURCE points to correct path, see also http://mywiki.wooledge.org/BashFAQ/028
EESSI_INIT_DIR_PATH=$(dirname $(realpath $BASH_SOURCE))
EESSI_INIT_DIR_PATH=$(dirname $(readlink -f $BASH_SOURCE))

# set up defaults: EESSI_CVMFS_REPO, EESSI_VERSION
# script takes *_OVERRIDEs into account
Expand Down

0 comments on commit b57463a

Please sign in to comment.