TACC / Lmod

Lmod: An Environment Module System based on Lua, Reads TCL Modules, Supports a Software Hierarchy
http://lmod.readthedocs.org
Other
486 stars 126 forks source link

As sysadmin: can I disable defaults and enforce fullnames (Name/Version) ? #658

Closed ruixingw closed 1 year ago

ruixingw commented 1 year ago

Forgive me if this is documented somewhere but I can't find it.

Is it possible to enforce users to use fullnames (Name/Version)? For example, they must do module load FOO/bar, and module load FOO should raise an error.

mrcawood commented 1 year ago

Hi, you are looking for LMOD_EXACT_MATCH

ruixingw commented 1 year ago

Hi, you are looking for LMOD_EXACT_MATCH

Thank you. This is useful, but it seems to be globally effective. Is there an option to only enforce fullname for a certain module? For example, for FOO, one must use fullname like module load FOO/1.0, and module load FOO should raise an error. But for BAR, one can just load the default version by module load BAR.

ruixingw commented 1 year ago

Hi, you are looking for LMOD_EXACT_MATCH

Thank you. This is useful, but it seems to be globally effective. Is there an option to only enforce fullname for a certain module? For example, for FOO, one must use fullname like module load FOO/1.0, and module load FOO should raise an error. But for BAR, one can just load the default version by module load BAR.

Oh, I guess this can be achieved by creating a module file that simply raises an error (maybe also print a message to tell the users to use fullname), and make a default symlint that points to it.

rtmclay commented 1 year ago

That solution you propose will work great. Other sites have created a 9999999 module to be the default that reports an error.

O.K. to close this issue?

ruixingw commented 1 year ago

That solution you propose will work great. Other sites have created a 9999999 module to be the default that reports an error.

O.K. to close this issue?

Sure. Thanks for the help.