@@ -119,14 +119,17 @@ function dofile (filename)
119
119
return f ()
120
120
end
121
121
122
- local ccr_soft_path = os.getenv (" CCR_SOFTWARE_PATH " )
122
+ local ccr_version = os.getenv (" CCR_VERSION " )
123
123
local ccr_prefix = os.getenv (" CCR_PREFIX" )
124
+
125
+ -- NOTE: this matches CCR_PREFIX/easybuild and CCR_PREFIX/banalbuild
126
+ local ccr_soft_path = pathJoin (ccr_prefix , " .*build" )
127
+
124
128
local lmod_package_path = os.getenv (" LMOD_PACKAGE_PATH" )
125
129
dofile (pathJoin (lmod_package_path ," SitePackage_logging.lua" ))
126
130
dofile (pathJoin (lmod_package_path ," SitePackage_licenses.lua" ))
127
131
dofile (pathJoin (lmod_package_path ," SitePackage_families.lua" ))
128
132
dofile (pathJoin (lmod_package_path ," SitePackage_properties.lua" ))
129
- dofile (pathJoin (lmod_package_path ," SitePackage_localpaths.lua" ))
130
133
131
134
sandbox_registration { loadfile = loadfile , assert = assert , loaded_modules = loaded_modules , serializeTbl = serializeTbl , clearWarningFlag = clearWarningFlag }
132
135
@@ -233,20 +236,17 @@ sandbox_registration{ get_installed_cuda_driver_version = get_installed_cuda_dri
233
236
234
237
local function unload_hook (t )
235
238
set_family (t )
236
- set_local_paths (t )
237
239
end
238
240
239
241
local function load_hook (t )
240
242
local valid = validate_license (t )
241
243
set_props (t )
242
244
set_family (t )
243
- log_module_load (t ,true )
244
- set_local_paths (t )
245
+ log_module_load (t ,true )
245
246
end
246
247
247
248
local function spider_hook (t )
248
249
set_props (t )
249
- set_local_paths (t )
250
250
end
251
251
252
252
hook .register (" unload" , unload_hook )
@@ -257,7 +257,7 @@ hook.register("load_spider", spider_hook)
257
257
local mapT =
258
258
{
259
259
grouped = {
260
- [ccr_soft_path .. ' /modules/Core.*' ] = " Core Modules " ,
260
+ [ccr_soft_path .. ' /modules/Core.*' ] = " Core modules " ,
261
261
[ccr_soft_path .. ' /modules/CUDA.*' ] = " Cuda-dependent modules" ,
262
262
[ccr_soft_path .. ' /modules/avx512/Core.*' ] = " Core avx512 modules" ,
263
263
[ccr_soft_path .. ' /modules/avx512/Compiler.*' ] = " Compiler-dependent avx512 modules" ,
@@ -271,10 +271,11 @@ local mapT =
271
271
[ccr_soft_path .. ' /modules/sse3/Core.*' ] = " Core sse modules" ,
272
272
[ccr_soft_path .. ' /modules/sse3/Compiler.*' ] = " Compiler-dependent sse3 modules" ,
273
273
[ccr_soft_path .. ' /modules/sse3/MPI.*' ] = " MPI-dependent sse3 modules" ,
274
- [ccr_prefix .. ' /config/modulefiles$' ] = " Custom CCR modules" ,
275
- [' /srv/software.*layer/config/modulefiles$' ] = " Custom CCR modules" ,
276
- [' /project/.*' ] = " Your groups' modules" ,
277
- [' /user/.*' ] = " Your personal modules" ,
274
+ [ccr_prefix .. ' /config/modulefiles$' ] = " Core modules" ,
275
+ [' /srv/software.*layer/config/modulefiles$' ] = " Core modules" ,
276
+ [' /projects/.*' ] = " Your groups' modules" ,
277
+ [' /user/.*/modules/.*' ] = " Your personal modules" ,
278
+ [' /home/.*/modules/.*' ] = " Your personal modules" ,
278
279
},
279
280
}
280
281
@@ -284,13 +285,24 @@ function avail_hook(t)
284
285
if (not availStyle or availStyle == " system" or styleT == nil ) then
285
286
return
286
287
end
287
- local localModulePaths = os.getenv (" CCR_LOCAL_MODULEPATHS" ) or nil
288
- if localModulePaths ~= nil then
289
- for localModulePathRoot in localModulePaths :split (" :" ) do
290
- styleT [localModulePathRoot .. " /.*/Core.*" ] = " Cluster specific Core modules"
291
- styleT [localModulePathRoot .. " /.*/CUDA.*" ] = " Cluster specific Cuda-dependent modules"
292
- styleT [localModulePathRoot .. " /.*/Compiler.*" ] = " Cluster specific Compiler-dependent modules"
293
- styleT [localModulePathRoot .. " /.*/MPI.*" ] = " Cluster specific MPI-dependent modules"
288
+ local customBuildPaths = os.getenv (" CCR_CUSTOM_BUILD_PATHS" ) or nil
289
+ if customBuildPaths ~= nil then
290
+ for customPath in customBuildPaths :split (" :" ) do
291
+ local customModulePathRoot = pathJoin (customPath , ccr_version )
292
+ styleT [customModulePathRoot .. " /modules/Core.*" ] = " Your Core modules"
293
+ styleT [customModulePathRoot .. " /modules/CUDA.*" ] = " Your Cuda-dependent modules"
294
+ styleT [customModulePathRoot .. " /modules/avx512/Core.*" ] = " Your avx512 modules"
295
+ styleT [customModulePathRoot .. " /modules/avx512/Compiler.*" ] = " Your Compiler-dependent avx512 modules"
296
+ styleT [customModulePathRoot .. " /modules/avx512/MPI.*" ] = " Your MPI-dependent avx512 modules"
297
+ styleT [customModulePathRoot .. " /modules/avx2/Core.*" ] = " Your avx2 modules"
298
+ styleT [customModulePathRoot .. " /modules/avx2/Compiler.*" ] = " Your Compiler-dependent avx2 modules"
299
+ styleT [customModulePathRoot .. " /modules/avx2/MPI.*" ] = " Your MPI-dependent avx2 modules"
300
+ styleT [customModulePathRoot .. " /modules/avx/Core.*" ] = " Your avx modules"
301
+ styleT [customModulePathRoot .. " /modules/avx/Compiler.*" ] = " Your Compiler-dependent avx modules"
302
+ styleT [customModulePathRoot .. " /modules/avx/MPI.*" ] = " Your MPI-dependent avx modules"
303
+ styleT [customModulePathRoot .. " /modules/sse3/Core.*" ] = " Your sse3 modules"
304
+ styleT [customModulePathRoot .. " /modules/sse3/Compiler.*" ] = " Your Compiler-dependent sse3 modules"
305
+ styleT [customModulePathRoot .. " /modules/sse3/MPI.*" ] = " Your MPI-dependent sse3 modules"
294
306
end
295
307
end
296
308
for k ,v in pairs (t ) do
0 commit comments