Skip to content

Commit b514065

Browse files
authored
Merge branch 'main' into zen5
2 parents 1b00ca6 + a59cda2 commit b514065

4 files changed

Lines changed: 43 additions & 14 deletions

File tree

.github/workflows/tests_eessi_extend_module.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,13 @@ jobs:
5050
export MY_INSTALLATION_PATH=/tmp/easybuild
5151
export EASYBUILD_PREFIX=$MY_INSTALLATION_PATH
5252
eb EESSI-extend-easybuild.eb --rebuild
53+
module unload EasyBuild
5354
5455
# Verify that we can pick the installed version up
5556
module use $MY_INSTALLATION_PATH/modules/all
57+
# Verify we can run "module show" on the module
58+
module show EESSI-extend/${{matrix.eessi_version}}-easybuild
59+
# Now load it and run additional checks
5660
module load EESSI-extend/${{matrix.eessi_version}}-easybuild
5761
echo $EBROOTEESSIMINEXTEND | grep $MY_INSTALLATION_PATH || { echo "ERROR: Installed version of EESSI-extend not picked up (loaded $EBROOTEESSIMINEXTEND)" >&2; exit 1; }
5862
# Do a test rebuild (with default and local hooks)

EESSI-extend-easybuild.eb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ if eessi_cvmfs_install then
133133
LmodError("You cannot use EESSI_CVMFS_INSTALL in combination with any other EESSI_*_INSTALL environment variables")
134134
end
135135
easybuild_installpath = os.getenv("EESSI_SOFTWARE_PATH")
136-
-- enforce accelerator subdirectory usage for CVMFS installs (only if an accelerator install is requested)
136+
-- Enforce accelerator subdirectory usage for CVMFS installs (only if an accelerator install is requested)
137137
if (eessi_accelerator_target ~= nil) and (cuda_compute_capability ~= nil or amd_compute_capability ~= nil) and (os.getenv("EESSI_ACCELERATOR_INSTALL") ~= nil) then
138138
easybuild_installpath = pathJoin(easybuild_installpath, eessi_accelerator_target)
139139
end
@@ -143,7 +143,7 @@ elseif eessi_site_install then
143143
LmodError("You cannot use EESSI_SITE_INSTALL in combination with any other EESSI_*_INSTALL environment variables")
144144
end
145145
easybuild_installpath = os.getenv("EESSI_SITE_SOFTWARE_PATH")
146-
-- enforce accelerator subdirectory usage for site installs (only if an accelerator install is requested)
146+
-- Enforce accelerator subdirectory usage for site installs (only if an accelerator install is requested)
147147
if (eessi_accelerator_target ~= nil) and (cuda_compute_capability ~= nil) and (os.getenv("EESSI_ACCELERATOR_INSTALL") ~= nil) then
148148
easybuild_installpath = pathJoin(easybuild_installpath, eessi_accelerator_target)
149149
end
@@ -232,7 +232,8 @@ end
232232
233233
-- Make sure EasyBuild itself is loaded
234234
-- need to also handle the unload behaviour where the version is defined only before we unload
235-
easybuild_version = os.getenv("EBVERSIONEASYBUILD")
235+
-- (also provide a sensible default for cases like 'module show' where the modules are never loaded at all)
236+
easybuild_version = os.getenv("EBVERSIONEASYBUILD") or "5.1.1"
236237
if not ( isloaded("EasyBuild") ) then
237238
load(latest("EasyBuild"))
238239
end

bot/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,9 @@ else
193193
fi
194194
echo "bot/build.sh: EESSI_ACCELERATOR_TARGET_OVERRIDE='${EESSI_ACCELERATOR_TARGET_OVERRIDE}'"
195195

196-
# Log the full lscpu and os-release info:
196+
# Log the full lscpu, ulimits, and os-release info:
197197
lscpu > _bot_job${SLURM_JOB_ID}.lscpu
198+
ulimit -a > _bot_job${SLURM_JOB_ID}.ulimits
198199
cat /etc/os-release > _bot_job${SLURM_JOB_ID}.os
199200

200201
# Also: fetch CPU flags into an array, so that we can implement a hard check against a reference

eb_hooks.py

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
from easybuild.tools.build_log import EasyBuildError, print_msg, print_warning
1717
from easybuild.tools.config import build_option, install_path, update_build_option
1818
from easybuild.tools.filetools import apply_regex_substitutions, copy_dir, copy_file, remove_file, symlink, which
19+
from easybuild.tools.modules import get_software_root, get_software_root_env_var_name
1920
from easybuild.tools.run import run_cmd
2021
from easybuild.tools.systemtools import AARCH64, POWER, X86_64, det_parallelism, get_cpu_architecture, get_cpu_features
2122
from easybuild.tools.toolchain.compiler import OPTARCH_GENERIC
2223
from easybuild.tools.toolchain.toolchain import is_system_toolchain
2324
from easybuild.tools.version import VERSION as EASYBUILD_VERSION
24-
from easybuild.tools.modules import get_software_root_env_var_name
2525

2626
# prefer importing LooseVersion from easybuild.tools, but fall back to distuils in case EasyBuild <= 4.7.0 is used
2727
try:
@@ -52,6 +52,7 @@
5252

5353
EESSI_INSTALLATION_REGEX = r"^/cvmfs/[^/]*.eessi.io/versions/"
5454
HOST_INJECTIONS_LOCATION = "/cvmfs/software.eessi.io/host_injections/"
55+
SITE_INSTALLATION_LOCATION = os.getenv("EESSI_SITE_SOFTWARE_PREFIX", HOST_INJECTIONS_LOCATION)
5556

5657
# Make sure a single environment variable name is used for this throughout the hooks
5758
EESSI_IGNORE_ZEN4_GCC1220_ENVVAR="EESSI_IGNORE_LMOD_ERROR_ZEN4_GCC1220"
@@ -744,7 +745,7 @@ def pre_fetch_hook_check_installation_path(self, *args, **kwargs):
744745
accelerator_toolchains = ['rocm-compilers', 'rompi', 'rfbf', 'rfoss']
745746
strict_eessi_installation = (
746747
bool(re.search(EESSI_INSTALLATION_REGEX, self.installdir)) or
747-
self.installdir.startswith(HOST_INJECTIONS_LOCATION))
748+
self.installdir.startswith(SITE_INSTALLATION_LOCATION))
748749
if strict_eessi_installation and not os.getenv("EESSI_OVERRIDE_STRICT_INSTALLPATH_CHECK"):
749750
dependency_names = self.cfg.dependency_names()
750751
if (
@@ -757,15 +758,19 @@ def pre_fetch_hook_check_installation_path(self, *args, **kwargs):
757758
raise EasyBuildError(
758759
f"It seems you are trying to install an accelerator package {self.cfg.name} into a "
759760
f"non-accelerator location {self.installdir}. You need to reconfigure your installation to target "
760-
"the correct location."
761+
"the correct location. If using the EESSI-extend module, this means reloading that module "
762+
"with EESSI_ACCELERATOR_INSTALL set:\n"
763+
" EESSI_ACCELERATOR_TARGET=1 module load EESSI-extend"
761764
)
762765
else:
763766
# If we don't have an accelerator dependency then we should be in a CPU installation path
764767
if "/accel/" in self.installdir:
765768
raise EasyBuildError(
766769
f"It seems you are trying to install a CPU-only package {self.cfg.name} into accelerator location "
767770
f"{self.installdir}. If this is a dependency of the package you are really interested in you will "
768-
"need to first install the CPU-only dependencies of that package."
771+
"need to first install the CPU-only dependencies of that package. If using the EESSI-extend "
772+
"module, this means reloading that module with EESSI_ACCELERATOR_INSTALL unset:\n"
773+
" unset EESSI_ACCELERATOR_TARGET=1 && module load EESSI-extend"
769774
)
770775

771776

@@ -1480,6 +1485,23 @@ def pre_configure_hook_cmake_system(self, *args, **kwargs):
14801485
raise EasyBuildError("CMake-specific hook triggered for non-CMake easyconfig?!")
14811486

14821487

1488+
def pre_configure_hook_Zoltan(self, *args, **kwargs):
1489+
"""
1490+
Pre-configure hook for Zoltan to filter out ParMETIS configure options,
1491+
since we filter out ParMETIS as a dependency
1492+
"""
1493+
if self.name == 'Zoltan':
1494+
if get_software_root('ParMETIS') is None:
1495+
configopts = self.cfg['configopts']
1496+
# get rid of all --with-parmetis configure options, and inject --without-parmetis
1497+
configopts = re.sub('--with-parmetis[^ ]*', '', configopts)
1498+
configopts += " --without-parmetis"
1499+
self.cfg['configopts'] = configopts
1500+
self.log.info("Removed --with-parmetis* configure options for {self.name}, ParMETIS is not a dependency")
1501+
else:
1502+
raise EasyBuildError("Zoltan-specific hook triggered for non-Zoltan easyconfig?!")
1503+
1504+
14831505
def pre_test_hook(self, *args, **kwargs):
14841506
"""Main pre-test hook: trigger custom functions based on software name."""
14851507
if self.name in PRE_TEST_HOOKS:
@@ -2068,24 +2090,25 @@ def post_easyblock_hook(self, *args, **kwargs):
20682090

20692091
PRE_CONFIGURE_HOOKS = {
20702092
'BLIS': pre_configure_hook_BLIS,
2093+
'CMake': pre_configure_hook_cmake_system,
20712094
'CUDA-Samples': pre_configure_hook_CUDA_Samples_test_remove,
2072-
'GObject-Introspection': pre_configure_hook_gobject_introspection,
2095+
'Dyninst': pre_configure_hook_dyninst,
20732096
'Extrae': pre_configure_hook_extrae,
2097+
'GObject-Introspection': pre_configure_hook_gobject_introspection,
20742098
'Graphviz': pre_configure_hook_graphviz,
20752099
'GRASS': pre_configure_hook_grass,
2100+
'LAMMPS': pre_configure_hook_LAMMPS_zen4_and_aarch64_cuda,
20762101
'libfabric': pre_configure_hook_libfabric_disable_psm3_x86_64_generic,
20772102
'LLVM': pre_configure_hook_llvm,
2078-
'ROCm-LLVM': pre_configure_hook_llvm,
20792103
'MetaBAT': pre_configure_hook_metabat_filtered_zlib_dep,
20802104
'OpenBLAS': pre_configure_hook_openblas_optarch_generic,
20812105
'OpenMPI': pre_configure_hook_openmpi_ipv6,
20822106
'PMIx': pre_configure_hook_pmix_ipv6,
20832107
'PRRTE': pre_configure_hook_prrte_ipv6,
2084-
'WRF': pre_configure_hook_wrf_aarch64,
2085-
'LAMMPS': pre_configure_hook_LAMMPS_zen4_and_aarch64_cuda,
2108+
'ROCm-LLVM': pre_configure_hook_llvm,
20862109
'Score-P': pre_configure_hook_score_p,
2087-
'Dyninst': pre_configure_hook_dyninst,
2088-
'CMake': pre_configure_hook_cmake_system,
2110+
'WRF': pre_configure_hook_wrf_aarch64,
2111+
'Zoltan': pre_configure_hook_Zoltan,
20892112
}
20902113

20912114
PRE_TEST_HOOKS = {

0 commit comments

Comments
 (0)