Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no error message loading non-existent modules (only when multiple levels in the hierarchy have default symlinks?) #740

Open
bernstei opened this issue Dec 20, 2024 · 0 comments

Comments

@bernstei
Copy link

Describe the bug

If a default symlink exists above the deepest level of a directory tree, lmod can end up substituting it for explicitly specified non-existent modules.

To Reproduce

Create the following directory tree

lmod_test_modules/:
t_dft/

lmod_test_modules/t_dft:
vasp/

lmod_test_modules/t_dft/vasp:
6.4.3/  default@

lmod_test_modules/t_dft/vasp/6.4.3:
default@  normal.lua  _test.lua

where the vasp/default symlink points to 6.4.3, and the 6.4.3/default symlink points to normal.lua. Now do

module use lmod_test_modules
module purge
module load t_dft/vasp/does_not_exist
module list

the output will show that it added t_dft/vasp/6.4.3/normal. That'd make sense to me if does_not_exist wasn't specified (because of the default symlink), but with it, I'd expect an error that this module does not exist. And indeed, doing module load t_dft/vasp/6.4.3/does_not_exist gives exactly the error I'd expect, so I suspect it has something to do with the default symlinks on multiple levels of the tree.

Expected behavior

An error message when trying to load a non-existent submodule directly under t_dft/vasp, like I get for t_dft/vasp/6.4.3/nonexistent

Desktop (please complete the following information):

  • OS: Linux
  • Rocky 8.10
  • Lmod Version: Modules based on Lua: Version 8.7.55 (8.7.55-2-g1dce13cc) 2024-12-19 12:53 -05:00
  • For Lmod Versions 8.7.7+, please run "module --miniConfig" and
    include the output here.
Modules based on Lua: Version 8.7.55 (8.7.55-2-g1dce13cc) 2024-12-19 12:53 -05:00
    by Robert McLay [email protected]

Lmod Version: 8.7.55-2-g1dce13cc
Lua Version:  5.3
MODULEPATH:   /home/cluster/bernstei/lmod_test_modules:/home/cluster/bernstei/a:/opt/local/lmod/modulefiles:/opt/ohpc/pub/modulefiles


Changes from Default Configuration
----------------------------------

Name                         Where Set  Default                                                               Value
----                         ---------  -------                                                               -----
LFS_VERSION                  D          1.6.3                                                                 1.8.0
LMOD_COLORIZE                E          yes                                                                   no
LMOD_LD_LIBRARY_PATH         E          false                                                                 /home/cluster/bernstei/.local/lib64:/opt/ohpc/pub/mpi/ucx-ohpc/1.15.0/lib:/opt/local/openmpi4/install/4.1.4/gnu/lib:/opt/intel/oneapi/mkl/2022.1.0/lib/intel64:/opt/ohpc/pub/compiler/gcc/12.4.0/lib64:/home/cluster/bernstei/lib:/share/apps/local/lib
LMOD_LD_PRELOAD              E          false                                                                 /opt/intel/oneapi/mkl/2022.1.0/lib/intel64/libmkl_gf_lp64.so:/opt/intel/oneapi/mkl/2022.1.0/lib/intel64/libmkl_sequential.so:/opt/intel/oneapi/mkl/2022.1.0/lib/intel64/libmkl_core.so
LMOD_PACKAGE_PATH            D          nil                                                                   <empty>
LMOD_PAGER                   C          less                                                                  /usr/bin/less
LMOD_SITEPACKAGE_LOCATION    Other      /home/cluster/bernstei/lmod_test/lmod/8.7.55/libexec/SitePackage.lua  <srctree>
LMOD_SYSTEM_DEFAULT_MODULES  D          __unknown__                                                           <empty>
LMOD_TCLSH                   C          tclsh                                                                 /home/Software/python/miniconda3/bin/tclsh
MODULEPATH_ROOT              C                                                                                /home/cluster/bernstei/lmod_test/modulefiles
PATH_TO_LUA                  C          lua                                                                   /usr/bin/lua


Where Set -> D: default, E: environment, C: configuration
             lmod_cfg: lmod_config.lua SitePkg: SitePackage StdPkg: StandardPackage
             Other: Set somewhere outside of normal locations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant