Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions modules/StdEnv/2023.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,30 @@ if (mode() == "spider" and (arch == "avx2" or arch == "avx512")) then
end
end

load("gcc")
load("openmpi")
load("flexiblas")
local cpu_vendor_id = os.getenv("RSNT_CPU_VENDOR_ID")
if cpu_vendor_id == "amd" then
if (arch == "avx512") then
load("aocl-blas")
load("aocl-lapack")
setenv("FLEXIBLAS", "aocl")
setenv("FLEXIBLAS64", "aocl")
else
load("blis")
setenv("FLEXIBLAS", "blis")
setenv("FLEXIBLAS64", "blis")
end
end

local load_default_toolchain = os.getenv("RSNT_LOAD_DEFAULT_TOOLCHAIN") or "yes"
if load_default_toolchain == "yes" then
Copy link
Member

@mboisson mboisson Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmm, I don't like changing the behaviour of loading StdEnv/2023 based on an environment variable. Loading StdEnv/2023 should produce the same result (semantically, meaning it could load a different BLAS library, but it should still load one, and a compiler, and MPI, regardless) anywhere, IMO.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of changing the behaviour of loading StdEnv/2023, we should add what's missing in the gentoo/2023 environment, or in the flexiblas module.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My goal with this change is to sync what module spider says on Trillium and what is actually loaded:

1) gentoo/2023 (S)   2) mii/1.1.2   3) CCconfig

Right now they are out of sync. E.g. if I do module spider openmpi/4.1.5 it tells me to load StdEnv/2023 gcc/12.3 when in reality it only needs gcc/12.3 (that spider output is the same on other clusters by the way even if gcc/12.3 is already loaded). So as module spider doesn't assume that StdEnv/2023 contains a full toolchain, we may as well load it without the toolchain for clarity on Trillium.

The alternative I had in mind first was to try to convince module spider to not display StdEnv/2023. That would mean a custom spider cache though!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's because we made the choice to show StdEnv/2023 instead of gentoo/2023, because there is value in loading StdEnv/2023:
https://github.com/ComputeCanada/software-stack-custom/blob/diskusage_report_python/modules/gentoo/2023.lua.core#L86

https://github.com/ComputeCanada/software-stack-custom/blob/diskusage_report_python/modules/StdEnv/2023.lua#L16

Is it that problematic that users see StdEnv/2023 in module spider on Trillium ? Loading StdEnv/2023 is what is going to give them the same environment as on other clusters.

load("gcc")
load("openmpi")
load("flexiblas")
if cpu_vendor_id == "amd" then
if (arch == "avx512") then
load("aocl-blas")
load("aocl-lapack")
else
load("blis")
end
else
load("imkl")
end
else
load("imkl")
end