Skip to content

Commit 02db9c1

Browse files
authored
Merge branch 'EESSI:main' into mpi_injection
2 parents 347bef1 + 91a8a1d commit 02db9c1

16 files changed

+327
-378
lines changed

.github/workflows/tests_eessi_extend_module.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,19 @@ jobs:
8686
# check some specific ones
8787
check_env_var "EASYBUILD_INSTALLPATH" "$EESSI_SOFTWARE_PATH"
8888
check_env_var "EASYBUILD_UMASK" "022"
89+
# Check some things that are EasyBuild 5+ (available in all EESSI versions so should exist)
90+
check_env_var "EASYBUILD_STRICT_RPATH_SANITY_CHECK" "1"
91+
check_env_var "EASYBUILD_CUDA_SANITY_CHECK_ERROR_ON_FAILED_CHECKS" "1"
92+
check_env_var "EASYBUILD_FAIL_ON_MOD_FILES_GCCCORE" "1"
93+
check_env_var "EASYBUILD_LOCAL_VAR_NAMING_CHECK" "error"
94+
# Check some EESSI version specific settings
95+
if [[ "${{ matrix.EESSI_VERSION }}" != "2023.06" ]]; then
96+
check_env_var "EASYBUILD_PREFER_PYTHON_SEARCH_PATH" "EBPYTHONPREFIXES"
97+
check_env_var "EASYBUILD_MODULE_SEARCH_PATH_HEADERS" "include_paths"
98+
check_env_var "EASYBUILD_SEARCH_PATH_CPP_HEADERS" "include_paths"
99+
fi
100+
# verify the configuration is actually valid
101+
eb --show-config
89102
# unload and check the environment is clean again
90103
module unload EESSI-extend
91104
check_disallowed_env_prefix EASYBUILD_
@@ -97,6 +110,8 @@ jobs:
97110
# check some specific envvars
98111
check_env_var "EASYBUILD_INSTALLPATH" "$EESSI_SITE_SOFTWARE_PATH"
99112
check_env_var "EASYBUILD_UMASK" "022"
113+
# verify the configuration is actually valid
114+
eb --show-config
100115
# unload and check the environment is clean again
101116
module unload EESSI-extend
102117
check_disallowed_env_prefix EASYBUILD_
@@ -110,6 +125,8 @@ jobs:
110125
check_env_var "EASYBUILD_INSTALLPATH" "$EXPECTED_INSTALLATION_PATH"
111126
check_env_var "EASYBUILD_UMASK" "002"
112127
check_env_var "EASYBUILD_GROUP_WRITABLE_INSTALLDIR" "1"
128+
# verify the configuration is actually valid
129+
eb --show-config
113130
# unload and check the environment is clean again
114131
module unload EESSI-extend
115132
check_disallowed_env_prefix EASYBUILD_
@@ -123,6 +140,8 @@ jobs:
123140
export EXPECTED_INSTALLATION_PATH="$MY_INSTALLATION_PATH/$USER/versions/$EESSI_VERSION/software/linux/$EESSI_SOFTWARE_SUBDIR"
124141
check_env_var "EASYBUILD_INSTALLPATH" "$EXPECTED_INSTALLATION_PATH"
125142
check_env_var "EASYBUILD_UMASK" "077"
143+
# verify the configuration is actually valid
144+
eb --show-config
126145
# unload and check the environment is clean again
127146
module unload EESSI-extend
128147
check_disallowed_env_prefix EASYBUILD_

.github/workflows/tests_link_nvidia_host_libraries.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,18 @@ jobs:
1919

2020
- name: Initialize EESSI
2121
uses: eessi/github-action-eessi@v3
22-
22+
23+
- name: Test function nvidia_gpu_available before setup of libraries
24+
run: |
25+
source scripts/utils.sh
26+
if nvidia_gpu_available; then
27+
echo "Error: Found NVIDIA libraries before the mock libraries were set up."
28+
exit 1
29+
else
30+
echo "NVIDIA libraries were not found."
31+
echo "Proceeding to setting up the mock NVIDIA libraries."
32+
fi
33+
2334
- name: Setup mock NVIDIA libraries
2435
run: |
2536
# Run the script to create mock libraries
@@ -48,6 +59,16 @@ jobs:
4859
echo "Updating PATH"
4960
echo "PATH=/tmp/nvidia-bin:$PATH" >> $GITHUB_ENV
5061
62+
- name: Test nvidia_gpu_available after setup of mock libraries
63+
run: |
64+
source scripts/utils.sh
65+
if nvidia_gpu_available; then
66+
echo "mock NVIDIA libraries and nvidia-smi were set up"
67+
else
68+
echo "Error: mock nvidia-smi is not available."
69+
exit 1
70+
fi
71+
5172
- name: Test LD_PRELOAD mode
5273
run: |
5374
echo ">>> Testing LD_PRELOAD mode"

.github/workflows/tests_scripts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,6 @@ jobs:
160160
export EESSI_VERSION_OVERRIDE="${{matrix.EESSI_VERSION}}"
161161
162162
out="${PWD}/eb-${EB_VERSION}.out"
163-
./eessi_container.sh --access rw --mode run --verbose /software-layer-scripts/run_in_compat_layer_env.sh ls 2>&1 | tee ${out}
163+
./eessi_container.sh --repository software.eessi.io,access=rw,mount=bind --mode run --verbose /software-layer-scripts/run_in_compat_layer_env.sh ls 2>&1 | tee ${out}
164164
echo $(grep "SINGULARITY_BIND" ${out})
165165
grep "SINGULARITY_BIND" ${out} | grep "software.eessi.io" || (echo "software.eessi.io did not seem to be bind mounted!" && exit 1)

EESSI-extend-easybuild.eb

Lines changed: 56 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,16 @@ description = """
4545
toolchain = SYSTEM
4646

4747
# All the dependencies we filter in EESSI
48-
local_deps_to_filter = "Autoconf,Automake,Autotools,binutils,bzip2,DBus,flex,gettext,gperf,help2man,intltool,libreadline,libtool,M4,makeinfo,ncurses,ParMETIS,util-linux,XZ,zlib"
48+
local_deps_to_filter = "binutils,bzip2,DBus,flex,gettext,gperf,help2man,intltool,libreadline,makeinfo,ncurses,ParMETIS,util-linux,XZ,zlib"
49+
50+
# filter extra dependencies based on CPU family
4951
local_arch_specific_deps_to_filter = {'aarch64': ',Yasm', 'riscv64': ',Yasm', 'x86_64': ''}
5052
local_deps_to_filter += local_arch_specific_deps_to_filter[ARCH]
5153

54+
# only filter Autotools & co for EESSI 2023.06
55+
if version == '2023.06':
56+
local_deps_to_filter += ",Autoconf,Automake,Autotools,libtool,M4"
57+
5258
# Set the universal EasyBuild variables
5359
modextravars = {
5460
'EASYBUILD_FILTER_DEPS': local_deps_to_filter,
@@ -70,7 +76,7 @@ modextravars = {
7076
# EASYBUILD_INSTALLPATH=${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR}
7177
# EASYBUILD_SOURCEPATH=${WORKDIR}/easybuild/sources:${EESSI_SOURCEPATH}
7278
#
73-
# And also some optional ones based on the kind of installation
79+
# And also some optional ones based on the installation mode
7480
# EASYBUILD_SET_GID_BIT
7581
# EASYBUILD_GROUP_WRITABLE_INSTALLDIR
7682
# EASYBUILD_UMASK
@@ -98,21 +104,26 @@ if (eessi_accelerator_target ~= nil) then
98104
end
99105
end
100106
107+
-- Some environment variables affect behaviour, let's gather them once
108+
local eessi_cvmfs_install = os.getenv("EESSI_CVMFS_INSTALL") ~= nil
109+
local eessi_site_install = os.getenv("EESSI_SITE_INSTALL") ~= nil
110+
local eessi_project_install = os.getenv("EESSI_PROJECT_INSTALL") ~= nil
111+
local eessi_user_install = os.getenv("EESSI_USER_INSTALL") ~= nil
112+
101113
-- Use an installation prefix that we _should_ have write access to
102-
if (os.getenv("EESSI_CVMFS_INSTALL") ~= nil) then
114+
if eessi_cvmfs_install then
103115
-- Make sure no other EESSI install environment variables are set
104-
if ((os.getenv("EESSI_SITE_INSTALL") ~= nil) or (os.getenv("EESSI_PROJECT_INSTALL") ~= nil) or (os.getenv("EESSI_USER_INSTALL") ~= nil)) then
116+
if (eessi_site_install or eessi_project_install or eessi_user_install) then
105117
LmodError("You cannot use EESSI_CVMFS_INSTALL in combination with any other EESSI_*_INSTALL environment variables")
106118
end
107-
eessi_cvmfs_install = true
108119
easybuild_installpath = os.getenv("EESSI_SOFTWARE_PATH")
109120
-- enforce accelerator subdirectory usage for CVMFS installs (only if an accelerator install is requested)
110121
if (eessi_accelerator_target ~= nil) and (cuda_compute_capability ~= nil) and (os.getenv("EESSI_ACCELERATOR_INSTALL") ~= nil) then
111122
easybuild_installpath = pathJoin(easybuild_installpath, eessi_accelerator_target)
112123
end
113-
elseif (os.getenv("EESSI_SITE_INSTALL") ~= nil) then
124+
elseif eessi_site_install then
114125
-- Make sure no other EESSI install environment variables are set
115-
if ((os.getenv("EESSI_PROJECT_INSTALL") ~= nil) or (os.getenv("EESSI_USER_INSTALL") ~= nil)) then
126+
if (eessi_project_install or eessi_user_install) then
116127
LmodError("You cannot use EESSI_SITE_INSTALL in combination with any other EESSI_*_INSTALL environment variables")
117128
end
118129
easybuild_installpath = os.getenv("EESSI_SITE_SOFTWARE_PATH")
@@ -122,35 +133,35 @@ elseif (os.getenv("EESSI_SITE_INSTALL") ~= nil) then
122133
end
123134
else
124135
-- Deal with user and project installs
125-
project_install = os.getenv("EESSI_PROJECT_INSTALL")
136+
project_install_dir = os.getenv("EESSI_PROJECT_INSTALL")
126137
project_modulepath = nil
127-
if (project_install ~= nil) then
138+
if eessi_project_install then
128139
-- Check the folder exists
129-
if not isDir(project_install) then
130-
LmodError("The location of EESSI_PROJECT_INSTALL (" .. project_install .. ") does not exist or is not a folder")
140+
if not isDir(project_install_dir) then
141+
LmodError("The location of EESSI_PROJECT_INSTALL (" .. project_install_dir .. ") does not exist or is not a folder")
131142
end
132143
if (mode() == "load") then
133-
LmodMessage("Configuring for use of EESSI_PROJECT_INSTALL under " .. project_install)
144+
LmodMessage("Configuring for use of EESSI_PROJECT_INSTALL under " .. project_install_dir)
134145
end
135-
easybuild_installpath = string.gsub(os.getenv("EESSI_SOFTWARE_PATH"), os.getenv("EESSI_CVMFS_REPO"), project_install)
146+
easybuild_installpath = string.gsub(os.getenv("EESSI_SOFTWARE_PATH"), os.getenv("EESSI_CVMFS_REPO"), project_install_dir)
136147
project_modulepath = pathJoin(easybuild_installpath, 'modules', 'all')
137148
end
138-
user_install = os.getenv("EESSI_USER_INSTALL")
149+
user_install_dir = os.getenv("EESSI_USER_INSTALL")
139150
user_modulepath = nil
140-
if (user_install ~= nil) then
151+
if eessi_user_install then
141152
-- Check the folder exists
142-
if not isDir(user_install) then
143-
LmodError("The location of EESSI_USER_INSTALL (" .. user_install .. ") does not exist or is not a folder")
153+
if not isDir(user_install_dir) then
154+
LmodError("The location of EESSI_USER_INSTALL (" .. user_install_dir .. ") does not exist or is not a folder")
144155
end
145-
elseif (user_install == nil) and (project_install == nil) then
156+
elseif (user_install_dir == nil) and (project_install_dir == nil) then
146157
-- No need to check for existence when we use a HOME subdir
147-
user_install = pathJoin(os.getenv("HOME"), "eessi")
158+
user_install_dir = pathJoin(os.getenv("HOME"), "eessi")
148159
end
149-
if (user_install ~= nil) then
160+
if (user_install_dir ~= nil) then
150161
if (mode() == "load") then
151-
LmodMessage("Configuring for use of EESSI_USER_INSTALL under " .. user_install)
162+
LmodMessage("Configuring for use of EESSI_USER_INSTALL under " .. user_install_dir)
152163
end
153-
easybuild_installpath = string.gsub(os.getenv("EESSI_SOFTWARE_PATH"), os.getenv("EESSI_CVMFS_REPO"), user_install)
164+
easybuild_installpath = string.gsub(os.getenv("EESSI_SOFTWARE_PATH"), os.getenv("EESSI_CVMFS_REPO"), user_install_dir)
154165
user_modulepath = pathJoin(easybuild_installpath, 'modules', 'all')
155166
end
156167
end
@@ -196,10 +207,33 @@ elseif (project_modulepath ~= nil) then
196207
-- configure MODULEPATH
197208
prepend_path("MODULEPATH", project_modulepath)
198209
end
210+
199211
-- Make sure EasyBuild itself is loaded
212+
-- need to also handle the unload behaviour where the version is defined only before we unload
213+
easybuild_version = os.getenv("EBVERSIONEASYBUILD")
200214
if not ( isloaded("EasyBuild") ) then
201215
load(latest("EasyBuild"))
202216
end
217+
easybuild_version = os.getenv("EBVERSIONEASYBUILD") or easybuild_version
218+
eessi_version = os.getenv("EESSI_VERSION") or "2023.06"
219+
220+
-- Set environment variables that are EasyBuild version specific
221+
-- Do unload unconditionally, so that even if EB versions were switched in the meantime, this gets unset
222+
-- This avoids issues where EESSI-extend is first loaded with EB => 5.1 (which set these vars)
223+
-- but then EB is swapped for a version < 5.1 and then EESSI-extend is unloaded (which would not unset
224+
-- these vars if we did it conditional on the EB version)
225+
if mode() == "unload" or mode() == "dependencyCk" or convertToCanonical(easybuild_version) >= convertToCanonical("5.1") then
226+
setenv ("EASYBUILD_STRICT_RPATH_SANITY_CHECK", "1")
227+
setenv ("EASYBUILD_CUDA_SANITY_CHECK_ERROR_ON_FAILED_CHECKS", "1")
228+
setenv ("EASYBUILD_FAIL_ON_MOD_FILES_GCCCORE", "1")
229+
setenv ("EASYBUILD_LOCAL_VAR_NAMING_CHECK", "error")
230+
-- Set environment variables that are EESSI version specific
231+
if convertToCanonical(eessi_version) > convertToCanonical("2023.06") then
232+
setenv ("EASYBUILD_PREFER_PYTHON_SEARCH_PATH", "EBPYTHONPREFIXES")
233+
setenv ("EASYBUILD_MODULE_SEARCH_PATH_HEADERS", "include_paths")
234+
setenv ("EASYBUILD_SEARCH_PATH_CPP_HEADERS", "include_paths")
235+
end
236+
end
203237
"""
204238

205239
moduleclass = 'devel'

0 commit comments

Comments
 (0)