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

Update existing Doc on how to use EESSI #317

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

TopRichard
Copy link

@TopRichard TopRichard commented Oct 8, 2024

Updating setting_up_environment.md in EESSI docs by adding EESSI module usage

Copy link
Collaborator

@trz42 trz42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good ... it feels a bit like one would have to know a bit about the system you're running on or read through several alternatives before you get going. Too many choices. Would be nice if one could just say eessi init and the best option is chosen. Then if one wants more control one specifies options to this command (or uses one of the alternatives listed here).

docs/using_eessi/setting_up_environment.md Outdated Show resolved Hide resolved
docs/using_eessi/setting_up_environment.md Outdated Show resolved Hide resolved
docs/using_eessi/setting_up_environment.md Outdated Show resolved Hide resolved
docs/using_eessi/setting_up_environment.md Outdated Show resolved Hide resolved
docs/using_eessi/setting_up_environment.md Outdated Show resolved Hide resolved
docs/using_eessi/setting_up_environment.md Outdated Show resolved Hide resolved
docs/using_eessi/setting_up_environment.md Outdated Show resolved Hide resolved
docs/using_eessi/setting_up_environment.md Outdated Show resolved Hide resolved
docs/using_eessi/setting_up_environment.md Outdated Show resolved Hide resolved
docs/using_eessi/setting_up_environment.md Show resolved Hide resolved
@ocaisa
Copy link
Member

ocaisa commented Oct 16, 2024

It is perhaps even more complicated than this, as we haven't told them what to do if they are using a shell other than bash, for Lmod there are multiple permitted options.

@trz42
Copy link
Collaborator

trz42 commented Oct 17, 2024

It is perhaps even more complicated than this, as we haven't told them what to do if they are using a shell other than bash, for Lmod there are multiple permitted options.

That's right. I wonder if - eventually - we can come up with a single command that works for most users.

For now, it's ok to accept that such a single command doesn't exist yet and we provide information about all the alternatives.

@ocaisa
Copy link
Member

ocaisa commented Oct 17, 2024

You can, but that will ultimately be a wrapper around Lmod (you're basically trying to reimplement the same thing that module load ... does), and then you would still need shell specific versions of the wrappers.

Unless such a command starts a subshell...which is possible. You could set BASH_ENV and start a prefix shell.

Copy link
Member

@ocaisa ocaisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of other suggestions

docs/using_eessi/setting_up_environment.md Outdated Show resolved Hide resolved
docs/using_eessi/setting_up_environment.md Outdated Show resolved Hide resolved
docs/using_eessi/setting_up_environment.md Show resolved Hide resolved

:clap: Your environment is now set up, you are ready to start running software provided by EESSI!

3. Should Lmod be unavailable and `MODULEPATH` not utilized, you can initialise EESSI via an Lmod module by directly sourcing the Lmod initialisation script (this script automatically loads the EESSI module):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep things simple, we should probably start with this and then have a collapsed section for "Other scenarios" that mentions the two other approaches (and the note/warning about unsetting the MODULEPATH). That way the two approaches are equivalent for typical use case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.  Should Lmod be unavailable and `$MODULEPATH` not used, you can initialise EESSI via an Lmod module by directly sourcing the Lmod initialisation script (this script automatically loads the EESSI module):

3. Should Lmod be unavailable and `MODULEPATH` not utilized, you can initialise EESSI via an Lmod module by directly sourcing the Lmod initialisation script (this script automatically loads the EESSI module):

``` { .bash .copy }
source /cvmfs/software.eessi.io/versions/2023.06/init/lmod/bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make it clear that there are a range of options available here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or use $SHELL instead of harcoding bash?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked yesterday and $SHELL is not reliable for the supported shells, $0 is more reliable but not very visually helpful

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(or rather the even worse $(basename $0))


## Sourcing the EESSI `bash` initialisation script

You can initialise EESSI (in a non-reversible way) by running the command:
Copy link
Member

@ocaisa ocaisa Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is worth explicitly saying that this command only works with bash, and if you use another shell you should take the other approach.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • how to check (echo $SHELL)


!!! note "Why do we recommend to unset `MODULEPATH`?"

Unsetting MODULEPATH may not be possible at some sites, and some compromise or workaround may
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Unsetting MODULEPATH may not be possible at some sites, and some compromise or workaround may
Unsetting the `$MODULEPATH` environment variable, which tells Lmod in which directories environment module files are available, may not be possible at some sites, and some compromise or workaround may


Unsetting MODULEPATH may not be possible at some sites, and some compromise or workaround may
be necessary. The underlying reason to suggest this is that EESSI and your system are most likely based on
two different operating system distributions - EESSI uses Gentoo Prefix, your system almost certainly uses some other
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't mention Gentoo Prefix here, keep it more general (compatibility layer + link to the corresponding page)

Unsetting MODULEPATH may not be possible at some sites, and some compromise or workaround may
be necessary. The underlying reason to suggest this is that EESSI and your system are most likely based on
two different operating system distributions - EESSI uses Gentoo Prefix, your system almost certainly uses some other
distribution. If you can find a way to ensure that the _software stacks_ from your site and EESSI do not mix
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

distribution -> Linux distribution


1. You are already using Lmod with version >= 8.6

In this case, we _recommend_ unsetting the `MODULEPATH`, because EESSI is not designed to mix modules coming from EESSI and from your system.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    In this case, we _recommend_ unsetting `$MODULEPATH`, because EESSI is not designed to mix modules coming from EESSI and from your system.

Comment on lines +22 to +23
unset MODULEPATH
export MODULEPATH=/cvmfs/software.eessi.io/init/modules
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're doing a hard set, then there's no need to unset?


2. You are using an Lmod with a version older than 8.6 or any other tool utilizing `MODULEPATH` (Tmod, etc.)

You should unset MODULEPATH to prevent Lmod from attempting to build a cache for your module tree (as this can be very slow if you have
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You should unset MODULEPATH to prevent Lmod from attempting to build a cache for your module tree (as this can be very slow if you have
You should unset `$MODULEPATH` to prevent Lmod from attempting to build a cache for your module tree (as this can be very slow if you have

2. You are using an Lmod with a version older than 8.6 or any other tool utilizing `MODULEPATH` (Tmod, etc.)

You should unset MODULEPATH to prevent Lmod from attempting to build a cache for your module tree (as this can be very slow if you have
a lot of modules). Again, unsetting the MODULEPATH should be considered as a good idea in general so you do not mix local and EESSI
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
a lot of modules). Again, unsetting the MODULEPATH should be considered as a good idea in general so you do not mix local and EESSI
a lot of modules). Again, unsetting the `$MODULEPATH` should be considered as a good idea in general so you do not mix local and EESSI


:clap: Your environment is now set up, you are ready to start running software provided by EESSI!

3. Should Lmod be unavailable and `MODULEPATH` not utilized, you can initialise EESSI via an Lmod module by directly sourcing the Lmod initialisation script (this script automatically loads the EESSI module):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.  Should Lmod be unavailable and `$MODULEPATH` not used, you can initialise EESSI via an Lmod module by directly sourcing the Lmod initialisation script (this script automatically loads the EESSI module):

3. Should Lmod be unavailable and `MODULEPATH` not utilized, you can initialise EESSI via an Lmod module by directly sourcing the Lmod initialisation script (this script automatically loads the EESSI module):

``` { .bash .copy }
source /cvmfs/software.eessi.io/versions/2023.06/init/lmod/bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or use $SHELL instead of harcoding bash?


## Sourcing the EESSI `bash` initialisation script

You can initialise EESSI (in a non-reversible way) by running the command:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • how to check (echo $SHELL)

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

Successfully merging this pull request may close these issues.

4 participants