-
Notifications
You must be signed in to change notification settings - Fork 7
Make EESSI-extend
support accelerator installations
#27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 10 commits
47290c5
f551ffe
889480a
c5e8830
132ab4d
a72a5e1
bb5faa1
dd4238d
5ed221d
540e088
2416487
635ff46
8a6ce0f
996f065
b9cdb1a
d4ceacc
baae956
787dd5e
545f5d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,11 @@ description = """ | |
If both EESSI_USER_INSTALL and EESSI_PROJECT_INSTALL are defined, both sets of | ||
installations are exposed, but new installations are created as user | ||
installations. | ||
|
||
Strict installation path checking is enforced by EESSI for EESSI and site | ||
installations involving accelerators. In these cases, if you wish to create an | ||
accelerator installation you must set the environement variable | ||
EESSI_ACCELERATOR_INSTALL (and load/reload this module). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This new environment variable has an impact on the build scripts, it needs to be set in the scenario where we expect to do an accelerator installation |
||
""" | ||
|
||
toolchain = SYSTEM | ||
|
@@ -78,8 +83,21 @@ if (mode() == "load") then | |
end | ||
end | ||
working_dir = os.getenv("WORKING_DIR") or pathJoin("/tmp", os.getenv("USER")) | ||
|
||
-- Gather the EPREFIX to use as a sysroot | ||
sysroot = os.getenv("EESSI_EPREFIX") | ||
|
||
-- Check if we have GPU capabilities and configure CUDA compute capabilities | ||
eessi_accelerator_target = os.getenv("EESSI_ACCELERATOR_TARGET") | ||
if (eessi_accelerator_target ~= nil) then | ||
cuda_compute_capability = string.match(eessi_accelerator_target, "^accel/nvidia/cc([0-9][0-9])$") | ||
if (cuda_compute_capability ~= nil) then | ||
easybuild_cuda_compute_capabilities = cuda_compute_capability:sub(1, 1) .. "." .. cuda_compute_capability:sub(2, 2) | ||
else | ||
LmodError("Incorrect value for $EESSI_ACCELERATOR_TARGET: " .. eessi_accelerator_target) | ||
end | ||
end | ||
|
||
-- Use an installation prefix that we _should_ have write access to | ||
if (os.getenv("EESSI_CVMFS_INSTALL") ~= nil) then | ||
-- Make sure no other EESSI install environment variables are set | ||
|
@@ -88,22 +106,20 @@ if (os.getenv("EESSI_CVMFS_INSTALL") ~= nil) then | |
end | ||
eessi_cvmfs_install = true | ||
easybuild_installpath = os.getenv("EESSI_SOFTWARE_PATH") | ||
eessi_accelerator_target = os.getenv("EESSI_ACCELERATOR_TARGET") | ||
if (eessi_accelerator_target ~= nil) then | ||
cuda_compute_capability = string.match(eessi_accelerator_target, "^nvidia/cc([0-9][0-9])$") | ||
if (cuda_compute_capability ~= nil) then | ||
easybuild_installpath = pathJoin(easybuild_installpath, 'accel', eessi_accelerator_target) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was actually wrong, |
||
easybuild_cuda_compute_capabilities = cuda_compute_capability:sub(1, 1) .. "." .. cuda_compute_capability:sub(2, 2) | ||
else | ||
LmodError("Incorrect value for $EESSI_ACCELERATOR_TARGET: " .. eessi_accelerator_target) | ||
end | ||
-- enforce accelerator subdirectory usage for CVMFS installs (only if an accelerator install is requested) | ||
if (eessi_accelerator_target ~= nil) and (cuda_compute_capability ~= nil) and (os.getenv("EESSI_ACCELERATOR_INSTALL") ~= nil) then | ||
easybuild_installpath = pathJoin(easybuild_installpath, eessi_accelerator_target) | ||
end | ||
elseif (os.getenv("EESSI_SITE_INSTALL") ~= nil) then | ||
-- Make sure no other EESSI install environment variables are set | ||
if ((os.getenv("EESSI_PROJECT_INSTALL") ~= nil) or (os.getenv("EESSI_USER_INSTALL") ~= nil)) then | ||
LmodError("You cannot use EESSI_SITE_INSTALL in combination with any other EESSI_*_INSTALL environment variables") | ||
end | ||
easybuild_installpath = os.getenv("EESSI_SITE_SOFTWARE_PATH") | ||
-- enforce accelerator subdirectory usage for site installs (only if an accelerator install is requested) | ||
if (eessi_accelerator_target ~= nil) and (cuda_compute_capability ~= nil) and (os.getenv("EESSI_ACCELERATOR_INSTALL") ~= nil) then | ||
easybuild_installpath = pathJoin(easybuild_installpath, eessi_accelerator_target) | ||
end | ||
else | ||
-- Deal with user and project installs | ||
project_install = os.getenv("EESSI_PROJECT_INSTALL") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,8 +29,8 @@ fi | |
if [ ! -z ${EESSI_SOFTWARE_SUBDIR_OVERRIDE} ]; then | ||
INPUT="export EESSI_SOFTWARE_SUBDIR_OVERRIDE=${EESSI_SOFTWARE_SUBDIR_OVERRIDE}; ${INPUT}" | ||
fi | ||
if [ ! -z ${EESSI_ACCELERATOR_TARGET} ]; then | ||
INPUT="export EESSI_ACCELERATOR_TARGET=${EESSI_ACCELERATOR_TARGET}; ${INPUT}" | ||
if [ ! -z ${EESSI_ACCELERATOR_TARGET_OVERRIDE} ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @trz42 This is why I was asking about where these environment variables get set, this should be using the override mechanism There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
INPUT="export EESSI_ACCELERATOR_TARGET_OVERRIDE=${EESSI_ACCELERATOR_TARGET_OVERRIDE}; ${INPUT}" | ||
fi | ||
if [ ! -z ${EESSI_CVMFS_REPO_OVERRIDE} ]; then | ||
INPUT="export EESSI_CVMFS_REPO_OVERRIDE=${EESSI_CVMFS_REPO_OVERRIDE}; ${INPUT}" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is this variable (
EESSI_ACCELERATOR_INSTALL
) andEESSI_ACCELERATOR_TARGET_OVERRIDE
that need to be set by the bot in order to configureEESSI-extend
correctly for a GPU installation