software-layer icon indicating copy to clipboard operation
software-layer copied to clipboard

Minimise initialisation script to only initialise Lmod

Open ocaisa opened this issue 1 year ago • 6 comments

With the compat layer, we can have multiple OSes side-by-side without issue. The only reason we can't right now is because of our init script since it is adding compat layer paths to the environment. I think we should move almost all our init script into a module file, and indeed an initial attempt has already been made in #68.

In the past this was tricky because we needed archspec to determine the architecture, but if our bash only approach (#187) is reliable this would no longer be a restriction (we can use bash from the host). And even deciding the architecture could be done as part of the LMOD_RC in Lua (which may even make us resilient against exported environment variables in a job context).

Then for each compat layers, you can have a gateway module (with an Lmod family so you can't have two loaded at once) to give you access to a particular compat layer (and associated EB stack).

As a major plus, this would also mean we would be able leverage Lmod to work in different shell environments.

The only thing remaining in the initialisation script would be initialising Lmod. It wouldn't even matter which version as we should be able to switch version to match the pilot version as part of the compat module file (if this was considered necessary).

ocaisa avatar Jun 15 '23 13:06 ocaisa