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

Show available variants for modules with module avail <modname> #407

Closed
zerothi opened this issue Aug 17, 2021 · 1 comment
Closed

Show available variants for modules with module avail <modname> #407

zerothi opened this issue Aug 17, 2021 · 1 comment
Milestone

Comments

@zerothi
Copy link

zerothi commented Aug 17, 2021

Is your feature request related to a problem? Please describe.

Currently one cannot easily see the available variants for modules, doing module avail will only list the modules but not the available variants for the module.

$> module avail mpi/4.0.3
...
mpi/4.0.3
...

$> module show mpi/4.0.3
...
variant         --default gcc/9.3.0 compiler gcc/8.4.0 gcc/9.3.0 gcc/10.1.0 intel/2019u5 intel/2020u1
variant         --default i4 isize i4 i8
...

however, users that are not familiar with env-modules don't figure this out.

Describe the solution you'd like

I think there should be two scenarios covered:

  1. module avail --variants which would forcefully show all variants for all modules (very verbose but some users might find it useful).
    In this case it might be better to force all listed modules in a list-like format
mpi/4.0.3
    compiler = [ 1, 2, 3, <line-break>
                       4, 5 ]

Just doing module avail should not do this!

  1. When asking for specific modules module avail mpi it should default to show the variants. Since there may be many variants formatting might be problematic, but...
@xdelaruelle xdelaruelle added this to the 5.3 milestone Jan 17, 2023
@xdelaruelle
Copy link
Member

Adding the variant value to the -o/--output option, will render all variant values of modulefiles along their name/version.

$ module av vrreq1
---------------- /path/to/testsuite/modulefiles.3 ----------------
vrreq1/1.0  vrreq1/2.0  'vrreq1/w s'  

Key:
modulepath
$ module av -o +variant vrreq1
---------------- /path/to/testsuite/modulefiles.3 ----------------
vrreq1/1.0{foo=val1,val2,val3}  vrreq1/2.0{foo=val1,val2,val3}  'vrreq1/w s'  

Key:
modulepath  {variant=value}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants