singularityhub / singularity-hpc

Local filesystem registry for containers (intended for HPC) using Lmod or Environment Modules. Works for users and admins.
https://singularity-hpc.readthedocs.io
Mozilla Public License 2.0
113 stars 26 forks source link

how to correctly install module? #639

Open jiaqiwang969 opened 1 year ago

jiaqiwang969 commented 1 year ago

Hi, I am fresh. when I install module, and install singularity-hpc step by step. I try:

shpc install ghcr.io/autamus/clingo
module use ./modules/
module avail

as been told. However, only the default "modulefiles", not the modulefile in singualarity-hpc, where clingo is installed here.

Can anyone tell me what's wrong, how to set module?

Thanks, best

vsoch commented 1 year ago

Can you share the module software you are using and the version? Pinging @marcodelapierre that has a lot more experience to add to the conversation!

jiaqiwang969 commented 1 year ago

Latest singularity-hpc version env:ubuntu:20.04

wjq@wjq:~$ module --version
Modules Release 4.2.4 (2019-04-26)
wjq@wjq:~$ singularity --version
singularity-ce version 3.9.7-bionic
jiaqiwang969 commented 1 year ago

May be I am not have set

shpc config set module_sys tcl
shpc config set container_base xxx/images
shpc config set module_base xxx/modules

Anyway, when I use "pip3 install singularity-hpc", and set avove config, it works. Maybe, there is a suggestion for new, to easy use it, by seting the default. thanks

vsoch commented 1 year ago

That's correct, you'd need to set it for the correct module system first, and then install, and then do the steps above. Are you all set and we can close the issue?

jiaqiwang969 commented 1 year ago

Yes, thanks

jiaqiwang969 commented 1 year ago

Hi, there still some bugs, as follows:

(env) wjq@wjq:~/singularity-hpc$ module avail

----------------------------------------------------------- ./modules ------------------------------------------------------------ quay.io/pawsey/openfoam/v2212/99-shpc.sh quay.io/pawsey/openfoam/v2212/bin/openfoam-container quay.io/pawsey/openfoam/v2212/bin/openfoam-exec quay.io/pawsey/openfoam/v2212/bin/openfoam-inspect-deffile quay.io/pawsey/openfoam/v2212/bin/openfoam-inspect-runscript quay.io/pawsey/openfoam/v2212/bin/openfoam-run quay.io/pawsey/openfoam/v2212/bin/openfoam-shell (D) quay.io/pawsey/openfoam/v2212/module

(env) wjq@wjq:~/singularity-hpc$ module load quay.io/pawsey/openfoam/v2212 Lmod has detected the following error: The following module(s) are unknown: "quay.io/pawsey/openfoam/v2212"

Please check the spelling or version number. Also try "module spider ..."

vsoch commented 1 year ago

This looks like a bug @georgiastuart had hit - and I think we figured out - ping @georgiastuart and @marcodelapierre !

georgiastuart commented 1 year ago

It was related to the (old) version of lmod Ubuntu has in apt. @jiaqiwang969 what version of lmod do you have?

jiaqiwang969 commented 1 year ago

@georgiastuart Modules based on Lua: Version 6.6 2016-10-13 13:28 -05:00 by Robert McLay mclay@tacc.utexas.edu

marcodelapierre commented 1 year ago

I think it is not a bug, with that setup you need to type (see exact output of module avail):

module load quay.io/pawsey/openfoam/v2212/module

However, if you make use of a module view, https://singularity-hpc.readthedocs.io/en/latest/getting_started/user-guide.html#views, you should be able to achieve a setup that works with:

module load openfoam/v2212

As a result of the view setup, note that you will need to module use a different directory.

georgiastuart commented 1 year ago

Modules based on Lua: Version 6.6 2016-10-13 13:28 -05:00 by Robert McLay mclay@tacc.utexas.edu

Yeah, this is a lmod out of date problem!

Lmod is currently on version 8.7. This looks like the version apt has on 22.04 LTS. I'd recommend installing a newer version, not through apt, and seeing if that sorts out your issue.

vsoch commented 1 year ago

@jiaqiwang969 were you able to update your LMOD version and resolve this issue?