Skip to content

Commit 635ff46

Browse files
committed
Ensure build scripts are aware of new EESSI-extend behaviour
1 parent 2416487 commit 635ff46

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

EESSI-extend-easybuild.eb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ description = """
3838
3939
Strict installation path checking is enforced by EESSI for EESSI and site
4040
installations involving accelerators. In these cases, if you wish to create an
41-
accelerator installation you must set the environement variable
41+
accelerator installation you must set the environment variable
4242
EESSI_ACCELERATOR_INSTALL (and load/reload this module).
4343
"""
4444

EESSI-install-software.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,12 @@ if [[ ! -z ${EESSI_DEV_PROJECT} ]]; then
285285
fi
286286

287287
# If we have EESSI_ACCELERATOR_TARGET_OVERRIDE set (and non-empty), then this implies building for a GPU target
288-
if [[ -n "$EESSI_ACCELERATOR_TARGET_OVERRIDE" ]]; then
288+
# (this must be set _before_ we load EESSI-extend).
289+
# We also make sure that EESSI_ACCELERATOR_TARGET is also set as EESSI_ACCELERATOR_TARGET_OVERRIDE must
290+
# be set before the EESSI module is loaded in order to set accelerator information.
291+
if [[ -n "$EESSI_ACCELERATOR_TARGET_OVERRIDE" && -z "$EESSI_ACCELERATOR_TARGET" ]]; then
292+
fatal_error "EESSI module should've set EESSI_ACCELERATOR_TARGET when EESSI_ACCELERATOR_TARGET_OVERRIDE exported." >&2
293+
elif [[ -n "$EESSI_ACCELERATOR_TARGET_OVERRIDE" ]]; then
289294
export EESSI_ACCELERATOR_INSTALL=1
290295
fi
291296

0 commit comments

Comments
 (0)