-
Notifications
You must be signed in to change notification settings - Fork 129
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
Search for module taking loaded modules into account #624
Comments
For your
I guess you could do some more complex logic in that condition, to make it included in |
Basically, you want to see whether there is already a GCC loaded which is different from the current module. If so, then don't prepend_path... something like
|
@mboisson But then how does LMod (and the spider cache) know about modules inside So
doesn't actually applies: We want those modules to be displayed by It might make sense to have some "global |
Ah, for caching, we actually have separate caches for separate architectures. When swapping architecture, it swaps the cache
it would still get displayed if that module is loaded, because then the |
Yes I was thinking about that too, it is just that the idea proposed here would also solve that use case. Recent example where this came up: User has some module he needs, hence a fixed compiler, and needs some TensorFlow module. Now we have multiple TensorFlow modules with different versions, different toolchains/compilers (and even different archs) and finding the 1 or 2 modules that could be loaded with the current compiler is quite cumbersome. |
Yes, I can see how it could be useful, but I suspect it may be more complicated than expected. Introducing a new command also requires user training (or they won't use it) unless the default spider mode is changed (and then you get the surprise of not finding all modules...) |
I wonder if it could be implemented through a spider hook. |
In short: We need a module search command between
module spider <foo>
andmodule available <foo>
.The former lists all modules even when you need to load other modules, while the latter lists only modules that don't need other modules to be loaded.
Now suppose you have 2 installations of GCC, each expanding the modulepath such that more modules become visible. Same with e.g. OpenMPI.
So in order to load
Foo/1
you have to loadGCC/1 OpenMPI/1
and forFoo/2
you needGCC/2 OpenMPI/2
.Now I would want this (new?) module search command to show exactly one of the 2
Foo
modules when I have any of the 2GCC
modules loaded.module av Foo
would be empty becauseOpenMPI
isn't yet loaded andmodule spider Foo
would show both and you need to runmodule spider
on each of them to find which one you can use given the currently loaded modules.In other words I want the
module spider
list filtered by requirements matching the currently loaded modules.This is useful for hierarchical module systems (as described here: GCC enables OpenMP which enables Foo) as well as (how we call it) "module environments" where we have special
modenv/<arch>
modules that enable modules for a given architecture. But as those modules are also found bymodule spider
users see modules for other architectures then the one they are using which makes it hard to use.The text was updated successfully, but these errors were encountered: