-
Notifications
You must be signed in to change notification settings - Fork 45
Adding non-standard ways to use EESSI #387
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
base: main
Are you sure you want to change the base?
Conversation
|
|
True, in my Ubuntu works but seems that its because I have CVMFS already available, I tested it in other systems without CVMFS and the same error message shows :( |
clarirfication for cvmfsexec
| orted_wrapper_dir=$(dirname $0) | ||
| export PATH=$(echo $PATH | tr ':' '\n' | grep -v $orted_wrapper_dir | tr '\n' ':') | ||
|
|
||
| ~/bin/cvmfsexec_eessi.sh orted "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work? I imagine that you need to load the modules you need in your cvmfsexec_eessi.sh script or it will not find orted inside the container
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the reason this works is that the context calling the orted command already has the module loaded, isn't it? I.e. the typical usage is:
module load EESSI/2023.06
module load GROMACS/whatever
# This mpirun calls `orted` on the remote node, probably exporting the _current_ `$PATH`, on which `orted` is available because the mpi module is loaded through GROMACS. It would fail if we _don't_ wrap that `orted` command in a `~/bin/cvmfsexec_eessi.sh`, because on the remote node the CVMFS repo is _not_ yet mounted. However, mounting the CVMFS repo is _sufficient_, because the `$PATH` is correct - it just points to the CVMFS repo...
mpirun <something>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this comes directly from https://www.eessi.io/docs/blog/2024/06/28/espresso-portable-test-run-eurohpc/ , so we know this worked when we did this on Deucalion :)
docs/getting_access/non_standard.md
Outdated
|
|
||
| ## Via `squashfs` + cvmfs's `shrinkwrap` utility | ||
|
|
||
| CernVM-FS provides the Shrinkwrap utility, allowing users to create a portable snapshot of a CVMFS repository. This can be exported and distributed without the need of a CVMFS client or network access. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should link to the CVMFS docs on this early on.
Co-authored-by: ocaisa <alan.ocais@cecam.org>
Co-authored-by: ocaisa <alan.ocais@cecam.org>
Co-authored-by: ocaisa <alan.ocais@cecam.org>
Co-authored-by: ocaisa <alan.ocais@cecam.org>
|
cvmfs-2.13.0 was released a few minutes ago, so the approach with shrinkwrap should work out-of-the-box if you have that version available. This also means I can start working on a script to manage this once our client containers are updated |
| ``` | ||
| You can see the original blog post on how they used this solution in Deucalion [here](https://www.eessi.io/docs/blog/2024/06/28/espresso-portable-test-run-eurohpc/#running-espresso-on-deucalion-via-eessi-cvmfsexec). | ||
|
|
||
| ## Via `squashfs` + cvmfs's `shrinkwrap` utility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section should probably start by saying that it requires a system that does have access to the repository. Note that running this from the EESSI container is probably also an option (in fact, I think I did that once...), but it might be worth explaining that separately not to confuse people (doing it on a node that has CVMFS natively is definitely easier).
| !/versions/2023.06/compat/linux/x86_64/var/cache | ||
|
|
||
| ``` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the spec file requires extra explanation. E.g. we should probably state that the compat layer is always needed, as is the dir that allows initializing the environment. Then, we should probably give some examples: e.g. how to export the full x86_64 tree (with the warning that it requires a massive amount of memory due to a known issue, see https://gitlab.com/eessi/support/-/issues/118), how to export for a single (or a handful) of micro-architectures, and maybe even an approach how to export for a single piece of software (i.e. load the GROMACS module, check all EBROOT variables, and export those - that should be enough...)
docs/getting_access/non_standard.md
Outdated
| Once completed, the contents will be available in /tmp/cvmfs. You can create an squashfs image from it: | ||
|
|
||
| ```bash | ||
| mksquashfs /tmp/cvmfs software.eessi.io.sqsh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should also make clear that other compression tools can be used. E.g. zstd is typically much faster (because it is multithreaded) than the standard gzip. It also typically achieves better compression.
mksquashfs /tmp/cvmfs software.eessi.io.sqsh -comp zstd
Co-authored-by: Caspar van Leeuwen <33718780+casparvl@users.noreply.github.com>
Co-authored-by: Caspar van Leeuwen <33718780+casparvl@users.noreply.github.com>
Co-authored-by: Caspar van Leeuwen <33718780+casparvl@users.noreply.github.com>
Co-authored-by: Caspar van Leeuwen <33718780+casparvl@users.noreply.github.com>
Co-authored-by: Caspar van Leeuwen <33718780+casparvl@users.noreply.github.com>
| $ cat gid.map | ||
| * 1001 | ||
| ``` | ||
| In addition, you need to create a spec file `software.eessi.io.spec` with the files you want to include and/or exclude in the shrinkwrap. Please note that specifying the compatibility layer is a must to ensure a proper functioning of the export as it initializes the environment. The most basic setup would be: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| In addition, you need to create a spec file `software.eessi.io.spec` with the files you want to include and/or exclude in the shrinkwrap. Please note that specifying the compatibility layer is a must to ensure a proper functioning of the export as it initializes the environment. The most basic setup would be: | |
| In addition, you need to create a spec file `software.eessi.io.spec` with the files you want to include and/or exclude in the shrinkwrap. Please note that the spec file should at least include | |
| - the compatibility layer for the architecture on which you intend to run the exported stack (in this example, `/versions/2023.06/compat/linux/x86_64/*`) | |
| - the initialization scripts and EESSI module (`/versions/2023.06/init/*` and `/init/*`) | |
| to ensure a proper functioning of the export as it initializes the environment. The most basic setup would be: |
|
|
||
| ```bash | ||
| /versions/2023.06/compat/linux/x86_64/* | ||
| /versions/2023.06/init/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/init/*
| /versions/2023.06/compat/linux/x86_64/* | ||
| /versions/2023.06/init/* | ||
| /versions/2023.06/scripts/* | ||
| /versions/2023.06/software/linux/aarch64/neoverse_n1/* | ||
| /versions/2023.06/software/linux/aarch64/a64fx/* | ||
| /versions/2023.06/software/linux/aarch64/nvidia/* | ||
| # Exclude the Gentoo ebuild repo and cache files | ||
| !/versions/2023.06/compat/linux/x86_64/var/db/repos/gentoo | ||
| !/versions/2023.06/compat/linux/x86_64/var/cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using arm micro-architectures as example is nice, but then you should also export the ARM compat layer :)
Also, while note a big deal, you probably want nvidia/grace/* instead of nvidia/* (the latter would be more like exporting all intel-based archs).
| /versions/2023.06/compat/linux/x86_64/* | |
| /versions/2023.06/init/* | |
| /versions/2023.06/scripts/* | |
| /versions/2023.06/software/linux/aarch64/neoverse_n1/* | |
| /versions/2023.06/software/linux/aarch64/a64fx/* | |
| /versions/2023.06/software/linux/aarch64/nvidia/* | |
| # Exclude the Gentoo ebuild repo and cache files | |
| !/versions/2023.06/compat/linux/x86_64/var/db/repos/gentoo | |
| !/versions/2023.06/compat/linux/x86_64/var/cache | |
| /versions/2023.06/compat/linux/aarch64/* | |
| /versions/2023.06/init/* | |
| /versions/2023.06/scripts/* | |
| /versions/2023.06/software/linux/aarch64/neoverse_n1/* | |
| /versions/2023.06/software/linux/aarch64/a64fx/* | |
| /versions/2023.06/software/linux/aarch64/nvidia/grace/* | |
| # Exclude the Gentoo ebuild repo and cache files | |
| !/versions/2023.06/compat/linux/aarch64/var/db/repos/gentoo | |
| !/versions/2023.06/compat/linux/aarch64/var/cache |
| !/versions/2023.06/compat/linux/x86_64/var/cache | ||
|
|
||
| ``` | ||
| But be careful as exporting the whole tree takes huge amounts of memory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's phrase this a bit more careful: for some reason, Alan wasn't able to reproduce my Out Of Memory error...
| But be careful as exporting the whole tree takes huge amounts of memory. | |
| But be careful as exporting the whole tree may require a large amount of memory. |
|
|
||
| ```bash | ||
| mksquashfs /tmp/cvmfs software.eessi.io.sqsh | ||
| # And if you squashed the compat layer separately: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It actually sounds quite nice to have a separate squashfs for the compat layer. I never tried it, but: how would I then mount both? Does a straightforward
apptainer shell -B software.eessi.io.sqsh:/cvmfs:image-src=/ -B software.eessi.io_compat.sqsh:/cvmfs:image-src=/ docker://ubuntu
work? It seems weird to me that you'd mount two different squasfs filesystems to the same mountpoint - how would it know how to integrate them if there are overlapping files/directory names?
| ``` | ||
|
|
||
| Right now, this may seem like quite a manual process, but there is work in progress towards creating a script to automate this process. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove all the trailing white lines?
casparvl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments :)
As per this issue: https://gitlab.com/eessi/support/-/issues/119
First batch regarding the cvmfsexec usage. A couple of thoughts:
so seems only works for RHEL :/