-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Some biocontainer images fail to load #649
Comments
This looks like a module software issue, or possibly we have a typo. Pinging @georgiastuart and @marcodelapierre for their expertise! Thank you for the link (this will be hugely helpful to reproduce it). |
Not sure if this is the reason, but these parentheses seem prematurely closed:
Specifically in the |
Ah so possibly we need to test stripping out (or escaping) parentheses in the name and versions |
Oh, no I think the version parens are fine. It's on the next line. Sorry, grabbed a line too early. |
okay so this part is wonky?
It looks like those are labels maybe?
I think I can probably reproduce this locally and work on it for a fix - thanks for the help @georgiastuart ! |
I produced something slightly different (and true to what the template shows - there are newlines in the list, so that is actually one big value. I think we need to do a little more parsing of the labels (by newline). I'll try that now!
|
Yours looks right! There's no closing |
okay fix is done! I'll get in the PR this evening. Thanks for reporting @mdehollander ! |
And I think we need to figure out how to ignore these non-modulefiles (the wrapper scripts) https://lmod.readthedocs.io/en/latest/025_new.html |
Thanks for looking into this. Hope this works. Here is another example of a lua file for spades for double checking:
Looking forward to see the PR. |
Ah I'm so sorry! I meant to open it after work and it totally blew out of my ears. Here you go! #650 |
Apol for the wait -- out and about for work again. On this one:
@vsoch , Did you notice any weird behaviour coming from the wrapper scripts being there? Because otherwise I remember testing this a bit and concluding we were fine, because Lmod only scans files with |
I don't have a production environment where I test, so I can't say either way - I am going by the issue reported here. Could it be a version thing? |
ah! hadn't noticed the message, thank you. I see, from your link:
The one workaround that comes to mind to me is to have the wrapper scripts hosted in a separate tree. I remember at first you and I had discussed having it inside the Ultimately, I think that unless users notice a slow down in the |
@mdehollander do you notice a slowdown? if so we can look into an option to place the executables elsewhere. |
I tried the
So thanks 🎉 The part that gave an error now looks like this:
There are indeed many files in the modules folder, and not starting with a . I haven't installed many modules, but there are more than 600 files. Most files are in the bin folders. I don't notice any slowness when loading a module, so indeed not a big issue. Happy that loading the biocontainer modules works now! Edit: |
@mdehollander is there anything else you'd like us to work on or try? |
No, the biocontainer images are now loading. Thanks! The warning about the number of modules is something than can be ignored :-P |
I finally could really test this now we have a better connection with the cvmfs mirror. And I have to say I do notice a slowdown. Having all cvmfs biocontainer configs in the module directory it takes almost a minute to load a module. Loading all available modules takes also very long. In contrast, if I start fresh and only create a few module files with This is the output of loading a cvmfs biocontainer module:
|
This has been my experience generally with cvms- it’s slow. |
Thanks for this precious feedback Matthias! If the modules are on CVMfs, would you have the chance to trying copying just the modulefile tree in a local filesystem, and see whether at least the |
We also have a google cloud storage example (that could be extrapolated to other object storage) https://github.com/singularityhub/singularity-hpc/tree/main/example/google-cloud-storage |
The module files are on the local file system, not on the cvmfs. The cvmfs provides only the containers. Using the script from this repo I create the module files. The speed of the cvmfs mount is not an issue. We are using a mirror that is located nearby, and the response is instant. Loading a container (with first cleaning the cache), is just less than a second:
So I think lmod has issues querying/loading the module files from shpc. In htop I see this command running for minutes:
|
Can you test without spack? |
Not so easily, spack was great in getting a recent version of lmod installed. I first used the lmod that comes with the ubuntu dist, but that is version 6.6 and I had troubles installing and loading normal modules with shpc. Installing lmod 8.7.24 via spack was very easy and made the normal thing running. |
@mdehollander you can try to give a go at one of my reference scripts, to install Lmod on Ubuntu via apt + source: https://github.com/marcodelapierre/hpc-middleware-scripts/blob/main/modules/install-lmod.sh |
Thanks for the script. That made installing lmod easy as well. Unfortunately the behavior is the same for the lmod/lua versions I had installed via spack:
I guess the slowdown happens when there a lot of module files. Currently there are 195212 files for 27400 modules in my config.
|
Thanks for testing the "spack" variable, Mattias. I think it could be interesting to test an alternate setup, where all the bash scripts are in a separate tree, and the module tree only contains the |
Is this something I can easily try out myself? Or do the module files need to be regenerated? I am also pinging @audreystott and @muffato from #598, since they might have used the |
Hi @mdehollander . Here we don't serve the entire biocontainers repository through shpc. Only the ones that have been requested by users - a few dozens so far. So no performance issue. |
I'll also comment again that every experience that I've had with cvmfs has been really slow - just for loading a workflow with easybuild or set of dependencies. I don't mean to defer the problem (because I'm happy to help) but I don't think this is explicitly a problem with shpc. |
@vsoch Indeed, it depends how good the performance of cvmfs is. But here using it without shpc, so just Serving a selection of biocontainers as a module is an option, but I still think the possibility to have them all available as module (and the search/spider function), would be nice. |
Probably yes, I can outline a strategy I have in mind, and you can evaluate how much support you would need.
Apologies, I have a few meetings starting, so I am unable to further detail how to implement point 2. (it might need a bit of Lua magic). Please shout up for further support :-) |
So I’ve got kind of a workaround with the modules – when I install Lmod, I have to give it a spider cache dir; and then after the biocontainer_match.py script has been run, I will then run an update to lmod to cache the files. So that the system doesn’t have to recache the entire 9000 biocontainers each time I run module avail or module load. See https://lmod.readthedocs.io/en/latest/130_spider_cache.html
#This step will take several hours as 8000+ module files are being written #This step will take up to 10 minutes, but it enables the spider cache to be stored on the system for use again later. The spider cache has to be recached every time you add a new module though... so this is not an ideal workaround longterm. |
@marcodelapierre Thanks for the steps. It seems like doable but will takes some time. But after reading the response from @audreystott I am not sure how much effect this will have. Because it seems to be a known thing that if you have a lot of modulefiles, lmod becomes slow. Using a cache seems to be the way forward here. If that is true, is indeed not an shpc issue, but rather something that needs to be correctly configured with lmod. @audreystott Thanks for you detailed answer. I will definitely try this and report back here. I assume you have also set |
My pleasure Mattias. And shout out to Audrey, our containers&modules&more bio-devops wizard! |
@audreystott ! 🙌 |
@mdehollander yes that's correct. Both these:
LMOD_SHORT_TIME: |
Mattias, also note that Vanessa has a PR open on point 1. above: #654 I am aiming to review it ASAP this week. |
Using lmod cache works great! See here the difference: After enabling the cache:
Loading a module with the cache disabled takes much longer:
|
oh wow, that is immense! @mdehollander would you care to write up this trick for somewhere in our docs? |
Credits to @audreystott as well, since she pointed me to the lmod caching. I add some things to the user-guide. Would a PR on https://github.com/singularityhub/singularity-hpc/blob/main/docs/getting_started/user-guide.rst be a good start. If I am correct, the biocontainers_match script is also not yet covered in the docs. I found it mentioned in an issue. |
Yes perhaps we want some section for helper scripts, and/or scaled installs? We could add to developer docs or similar. I will leave it to your judgment. |
Describe the bug
The too many modulefiles warning also happens for tools that are working (trinity for example). But this one has a deb-list error and therefore does not work
To Reproduce
Steps to reproduce the behavior:
Install via:
Expected behavior
The tool loads without warning or errors.
Version of Singularity and Singularity Registry HPC Client
Here is a link to the generated fastp module.lua file: https://bin.disroot.org/?440b21e6dfca18ca#9JNBgP8Uuo65TYs27eckSy4AFqn9ZUFVPRsjLKR3gUV2
The text was updated successfully, but these errors were encountered: