Skip to content

Search for module taking loaded modules into account #624

@Flamefire

Description

@Flamefire

In short: We need a module search command between module spider <foo> and module 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 load GCC/1 OpenMPI/1 and for Foo/2 you need GCC/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 2 GCC modules loaded. module av Foo would be empty because OpenMPI isn't yet loaded and module spider Foo would show both and you need to run module 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 by module spider users see modules for other architectures then the one they are using which makes it hard to use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions