Skip to content

Commit a306cde

Browse files
authored
Merge branch '2023.06-software.eessi.io' into megahit
2 parents b0012d8 + 5619dbf commit a306cde

3 files changed

Lines changed: 55 additions & 4 deletions

File tree

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
easyconfigs:
22
- buildenv-default-foss-2023a.eb
3+
- Zoltan-3.901-foss-2023a.eb:
4+
options:
5+
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/23068
6+
from-commit: 644b17f1b42bbf8eb4ad56d9e8f125b8c52d7258
7+
- OpenFOAM-12-foss-2023a.eb
38
- MEGAHIT-1.2.9-GCCcore-12.3.0.eb:
4-
options:
5-
# fix support for non-x86_64 systems,
6-
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/23073
7-
- from-commit: 6acf5617670d860cee1d12b120c18699be3c1a68
9+
options:
10+
# fix support for non-x86_64 systems,
11+
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/23073
12+
from-commit: 6acf5617670d860cee1d12b120c18699be3c1a68
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
easyconfigs:
22
- buildenv-default-foss-2023b.eb
3+
- VSEARCH-2.30.0-GCC-13.2.0.eb
4+
- cutadapt-5.0-GCCcore-13.2.0.eb

eb_hooks.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,37 @@ def pre_fetch_hook(self, *args, **kwargs):
422422
if cpu_target == CPU_TARGET_ZEN4:
423423
pre_fetch_hook_zen4_gcccore1220(self, *args, **kwargs)
424424

425+
# Always check the software installation path
426+
pre_fetch_hook_check_installation_path(self, *args, **kwargs)
427+
428+
429+
# Check the installation path so we verify that accelerator software always gets installed into the correct location
430+
def pre_fetch_hook_check_installation_path(self, *args, **kwargs):
431+
# When we know the CUDA status, we will need to verify the installation path
432+
# if we are doing an EESSI or host_injections installation
433+
accelerator_deps = ['CUDA']
434+
strict_eessi_installation = (
435+
bool(re.search(EESSI_INSTALLATION_REGEX, self.installdir)) or
436+
self.installdir.startswith(HOST_INJECTIONS_LOCATION))
437+
if strict_eessi_installation:
438+
dependency_names = self.cfg.dependency_names()
439+
if self.cfg.name in accelerator_deps or any(dep in dependency_names for dep in accelerator_deps):
440+
# Make sure the path is an accelerator location
441+
if "/accel/" not in self.installdir:
442+
raise EasyBuildError(
443+
f"It seems you are trying to install an accelerator package {self.cfg.name} into a "
444+
f"non-accelerator location {self.installdir}. You need to reconfigure your installation to target "
445+
"the correct location."
446+
)
447+
else:
448+
# If we don't have an accelerator dependency then we should be in a CPU installation path
449+
if "/accel/" in self.installdir:
450+
raise EasyBuildError(
451+
f"It seems you are trying to install a CPU-only package {self.cfg.name} into accelerator location "
452+
f"{self.installdir}. If this is a dependency of the package you are really interested in you will "
453+
"need to first install the CPU-only dependencies of that package."
454+
)
455+
425456

426457
def pre_fetch_hook_zen4_gcccore1220(self, *args, **kwargs):
427458
"""Use --force --module-only if building a foss-2022b-based EasyConfig for Zen4.
@@ -600,6 +631,18 @@ def pre_configure_hook_score_p(self, *args, **kwargs):
600631
raise EasyBuildError("Score-P-specific hook triggered for non-Score-P easyconfig?!")
601632

602633

634+
def pre_configure_hook_vsearch(self, *args, **kwargs):
635+
"""
636+
Pre-configure hook for VSEARCH
637+
- Workaround for a Zlib macro being renamed in Gentoo, see https://bugs.gentoo.org/383179
638+
(solves "expected initializer before 'OF'" errors)
639+
"""
640+
if self.name == 'VSEARCH':
641+
self.cfg.update('configopts', 'CPPFLAGS="-DOF=_Z_OF ${CPPFLAGS}"')
642+
else:
643+
raise EasyBuildError("VSEARCH-specific hook triggered for non-VSEARCH easyconfig?!")
644+
645+
603646
def pre_configure_hook_extrae(self, *args, **kwargs):
604647
"""
605648
Pre-configure hook for Extrae
@@ -1286,6 +1329,7 @@ def post_module_hook(self, *args, **kwargs):
12861329
'WRF': pre_configure_hook_wrf_aarch64,
12871330
'LAMMPS': pre_configure_hook_LAMMPS_zen4,
12881331
'Score-P': pre_configure_hook_score_p,
1332+
'VSEARCH': pre_configure_hook_vsearch,
12891333
}
12901334

12911335
PRE_TEST_HOOKS = {

0 commit comments

Comments
 (0)