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

lmod integration unclear in module documentation #16730

Open
sjpb opened this issue May 19, 2020 · 2 comments
Open

lmod integration unclear in module documentation #16730

sjpb opened this issue May 19, 2020 · 2 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation impact-low modules

Comments

@sjpb
Copy link

sjpb commented May 19, 2020

Having recently installed spack on a system with lmod and built packages with it I was confused that module avail showed no modules. After asking for help on slack I discovered that setup-env.sh only sets MODULEPATH for tcl. I suggested on Slack that the module tutorial wasn't very clear about lmod use but having just gone back and reread the it Hierarchical Module Files section is actually fairly clear, but the details for lmod get a bit lost in a) the length of it and b) issues elsewhere.

Things which are confusing:

  • Using module files via Spack suggests to me that lmod should "just work" with no configuration:

    If you have installed a supported module system you should be able to run either module avail or use -l spack to see what module files have been installed.

  • Shell support says:

    To enable additional Spack commands for loading and unloading module files, and to add the correct path to MODULEPATH, you need to source the appropriate setup file in the $SPACK_ROOT/share/spack directory.

    with no mention that actually this only applies to tcl.

Additionally the module tutorial:

  • starts with lmod
  • says in that section:

    Now we can re-source the setup file and Spack modules will be put in our module path

  • shows module avail working without changes to MODULEPATH - admittedly this is for non-hierarchical modules, but it is using lmod.

I also note (although its not strictly related) that the module tutorial says that spack load

employed the module files generated automatically by Spack.

which I understand is not true.

Its hard to provide a clean paragraph change which fixes the above, but from a new user point-of-view I think the list of things needed to know to get lmod working as expected (i.e. hierarchically, because that's how lmod is generally used I believe):

  • ${SPACK_ROOT}/etc/spack/modules.yaml needs to have lmod: or maybe lmod:: in it.

  • You need to load the compiler(s) you want to use, then run spack compiler add.

  • You must define at least one Core (i.e. os-defined) compiler in modules.yaml, to form the entry point for the heirarchy.

  • You need to run something like this to add Spack's modules into lmod:

    module use ${SPACK_ROOT}/share/spack/lmod/linux-centos7-x86_64/Core/
    
  • You need to rebuild Spack's modules using

    spack module lmod refresh --delete-tree -y
    

    (I think?)

@sjpb sjpb added bug Something isn't working triage The issue needs to be prioritized labels May 19, 2020
@justbennet
Copy link
Contributor

You must define at least one Core (i.e. os-defined) compiler there, to form the entry point for the heirarchy.

Does one have to declare the system compiler as Core? Would Spack be usable for, say, a small bioinformatics cluster that doesn't need newer compilers and only run serial/multicore software?

Just trying to separate a requirement from a usual or recommended practice.

@sjpb
Copy link
Author

sjpb commented May 20, 2020

My understanding - and I may be wrong - is that you have to specify some compiler as Core, else there's no entry point for the module tree. So the system compiler should be in Core, but if that's all you need, fine.

@adamjstewart adamjstewart added documentation Improvements or additions to documentation modules labels May 21, 2020
@alalazo alalazo added impact-low and removed triage The issue needs to be prioritized labels May 21, 2020
@alalazo alalazo added this to To do in Spack v0.14.3 release via automation May 21, 2020
@becker33 becker33 removed this from To do in Spack v0.14.3 release Jun 22, 2020
@becker33 becker33 added this to To Do in Spack v0.15.1 release via automation Jun 22, 2020
@scheibelp scheibelp removed this from To Do in Spack v0.15.1 release Jul 8, 2020
@tgamblin tgamblin added this to To do in Spack v0.16.1 release via automation Nov 18, 2020
@tgamblin tgamblin removed this from To Do in Spack v0.16.0 release Nov 18, 2020
@tldahlgren tldahlgren added this to To do in Spack v0.16.2 Release via automation Feb 3, 2021
@tldahlgren tldahlgren removed this from To do in Spack v0.16.1 release Feb 3, 2021
@tgamblin tgamblin removed this from To do in Spack v0.16.2 Release May 10, 2021
@tgamblin tgamblin added this to To do in Spack v0.16.3 release via automation May 10, 2021
@haampie haampie removed this from To do in Spack v0.16.3 release Sep 17, 2021
@haampie haampie added this to To do in Spack 0.16.4 release via automation Sep 17, 2021
@alalazo alalazo removed this from To do in Spack 0.16.4 release Dec 24, 2021
@alalazo alalazo added this to To do in Spack v0.18.0 release via automation Dec 24, 2021
@tgamblin tgamblin removed this from To do in Spack v0.18.0 release Jul 7, 2022
@tgamblin tgamblin added this to To do in Spack v0.19.0 release via automation Jul 7, 2022
@tgamblin tgamblin added this to the v0.20.0 milestone Nov 7, 2022
@tgamblin tgamblin removed this from To do in Spack v0.19.0 release Nov 7, 2022
@alalazo alalazo removed this from the v0.20.0 milestone May 2, 2023
@alalazo alalazo removed their assignment May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation impact-low modules
Projects
Status: Todo
Development

No branches or pull requests

5 participants