|
| 1 | +help([[ |
| 2 | +Description |
| 3 | +=========== |
| 4 | +The European Environment for Scientific Software Installations (EESSI, pronounced as easy) is a collaboration between different European partners in HPC community.The goal of this project is to build a common stack of scientific software installations for HPC systems and beyond, including laptops, personal workstations and cloud infrastructure. |
| 5 | +
|
| 6 | +More information |
| 7 | +================ |
| 8 | + - URL: https://www.eessi.io/docs/ |
| 9 | +]]) |
| 10 | +whatis("Description: The European Environment for Scientific Software Installations (EESSI, pronounced as easy) is a collaboration between different European partners in HPC community. The goal of this project is to build a common stack of scientific software installations for HPC systems and beyond, including laptops, personal workstations and cloud infrastructure.") |
| 11 | +whatis("URL: https://www.eessi.io/docs/") |
| 12 | +conflict("EESSI") |
| 13 | +local eessi_version = myModuleVersion() |
| 14 | +local eessi_repo = "/cvmfs/software.eessi.io" |
| 15 | +local eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version) |
| 16 | +local eessi_os_type = "linux" |
| 17 | +setenv("EESSI_VERSION", eessi_version) |
| 18 | +setenv("EESSI_CVMFS_REPO", eessi_repo) |
| 19 | +setenv("EESSI_OS_TYPE", eessi_os_type) |
| 20 | +function archdetect_cpu() |
| 21 | + local script = pathJoin(eessi_prefix, 'init', 'lmod_eessi_archdetect_wrapper.sh') |
| 22 | + if not os.getenv("EESSI_ARCHDETECT_OPTIONS") then |
| 23 | + if convertToCanonical(LmodVersion()) < convertToCanonical("8.6") then |
| 24 | + LmodError("Loading this modulefile requires using Lmod version >= 8.6, but you can export EESSI_ARCHDETECT_OPTIONS to the available cpu architecture in the form of: x86_64/intel/haswell:x86_64/generic or aarch64/neoverse_v1:aarch64/generic") |
| 25 | + end |
| 26 | + source_sh("bash", script) |
| 27 | + end |
| 28 | + local archdetect_options = os.getenv("EESSI_ARCHDETECT_OPTIONS") or "" |
| 29 | + for archdetect_filter_cpu in string.gmatch(archdetect_options, "([^" .. ":" .. "]+)") do |
| 30 | + if isDir(pathJoin(eessi_prefix, "software", eessi_os_type, archdetect_filter_cpu, "software")) then |
| 31 | + -- use x86_64/amd/zen3 for now when AMD Genoa (Zen4) CPU is detected, |
| 32 | + -- since optimized software installations for Zen4 are a work-in-progress, |
| 33 | + -- see https://gitlab.com/eessi/support/-/issues/37 |
| 34 | + if archdetect_filter_cpu == "x86_64/amd/zen4" then |
| 35 | + archdetect_filter_cpu = "x86_64/amd/zen3" |
| 36 | + if mode() == "load" then |
| 37 | + LmodMessage("Sticking to " .. archdetect_filter_cpu .. " for now, since optimized installations for AMD Genoa (Zen4) are a work in progress.") |
| 38 | + end |
| 39 | + end |
| 40 | + return archdetect_filter_cpu |
| 41 | + end |
| 42 | + end |
| 43 | + LmodError("Software directory check for the detected architecture failed") |
| 44 | +end |
| 45 | +local archdetect = archdetect_cpu() |
| 46 | +local eessi_cpu_family = archdetect:match("([^/]+)") |
| 47 | +local eessi_software_subdir = archdetect |
| 48 | +local eessi_eprefix = pathJoin(eessi_prefix, "compat", eessi_os_type, eessi_cpu_family) |
| 49 | +local eessi_software_path = pathJoin(eessi_prefix, "software", eessi_os_type, eessi_software_subdir) |
| 50 | +local eessi_module_path = pathJoin(eessi_software_path, "modules", "all") |
| 51 | +local eessi_site_module_path = string.gsub(eessi_module_path, "versions", "host_injections") |
| 52 | +setenv("EPREFIX", eessi_eprefix) |
| 53 | +setenv("EESSI_CPU_FAMILY", eessi_cpu_family) |
| 54 | +setenv("EESSI_SITE_MODULEPATH", eessi_site_module_path) |
| 55 | +setenv("EESSI_SOFTWARE_SUBDIR", eessi_software_subdir) |
| 56 | +setenv("EESSI_PREFIX", eessi_prefix) |
| 57 | +setenv("EESSI_EPREFIX", eessi_eprefix) |
| 58 | +prepend_path("PATH", pathJoin(eessi_eprefix, "bin")) |
| 59 | +prepend_path("PATH", pathJoin(eessi_eprefix, "usr/bin")) |
| 60 | +setenv("EESSI_SOFTWARE_PATH", eessi_software_path) |
| 61 | +setenv("EESSI_MODULEPATH", eessi_module_path) |
| 62 | +if ( mode() ~= "spider" ) then |
| 63 | + prepend_path("MODULEPATH", eessi_module_path) |
| 64 | +end |
| 65 | +prepend_path("LMOD_RC", pathJoin(eessi_software_path, "/.lmod/lmodrc.lua")) |
| 66 | +prepend_path("MODULEPATH", eessi_site_module_path) |
| 67 | +setenv("LMOD_PACKAGE_PATH", pathJoin(eessi_software_path, ".lmod")) |
| 68 | +if mode() == "load" then |
| 69 | + LmodMessage("EESSI/" .. eessi_version .. " loaded successfully") |
| 70 | +end |
0 commit comments