-
Notifications
You must be signed in to change notification settings - Fork 66
add scripts to set up minimal EESSI environment and configure EasyBuild, use init/* scripts in install script, inject RPATH override directory via prepare hook to allow for overriding MPI library #116
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
Conversation
|
Addresses #108 |
|
@boegel I'm not sure how this file should be organised. It looks like it is going to get messy. |
|
Example when existing value for |
|
Example when no existing value for |
|
Example when no MPI is used: |
…y hooks to inject RPATH override path
let build script also define $EESSI_SOFTWAREPATH, so it can be used by hooks to inject RPATH override path
EESSI-pilot-install-software.sh
Outdated
| fi | ||
|
|
||
| # make sure we're in Prefix environment by checking $SHELL | ||
| if [[ ${SHELL} = ${EPREFIX}/bin/bash ]]; then |
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 is what startprefix itself checks, so I think we should do the same
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.
Relying on the environment defined by sourcing init/eessi_environment_variables results in more confusing errors when you're not first in the Gentoo Prefix environment, because then all sorts of things can go wrong, like not having python3 which is used to call eessi_software_subdir.py:
software-layer $ ./EESSI-pilot-install-software.sh
>> Setting up environment...
>> Determining software subdirectory to use for current build host...
./EESSI-pilot-install-software.sh: line 62: python3: command not found
ERROR: no value set for $EESSI_SOFTWARE_SUBDIR
ERROR: Failed to determine software subdirectory?!
Another side effect is that the install script now fails hard when the init directory hasn't been populated yet:
>> Setting up environment...
>> Determining software subdirectory to use for current build host...
/cvmfs/pilot.eessi-hpc.org/2021.06/compat/linux/aarch64/usr/lib/python-exec/python3.9/python3: can't open file '/cvmfs/pilot.eessi-hpc.org/2021.06/init/eessi_software_subdir_for_host.py': [Errno 2] No such file or directory
ERROR: no value set for $EESSI_SOFTWARE_SUBDIR
ERROR: Failed to determine software subdirectory?!
We've been doing that late, after fully installing the software layer, but I guess doing that early on instead is fine.
We can add a check in the install script to ensure that init has been populated properly, and produce a clear error if not.
That said, I agree that we should clean things up a bit here, and avoid having the same information like $EESSI_PILOT_VERSION in multiple places.
I think I'll pull this apart a bit more, and split off a "minimal_eessi_env script that's sourced by both this install script and eessi_environment_variables, so we can move up this check and get sensible error reporting...
And allow the possibility that the MPI directory may be a symlinked to a version
| 'rpath_overrides', | ||
| software_name, | ||
| # We can't know the version, but this allows the use of a symlink to facilitate version upgrades without removing files | ||
| 'system', |
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 approach means that you can symlink to a host MPI installation directly (but you'd still need a module to pick up bin).
…h 'error' function from 'init/eessi_environment_variables'
…n /init being populated
…we're in Gentoo Prefix environment
|
I've pulled things apart a bit more, by also adding a script to configure EasyBuild ( So things a more modular now, without having the same information in multiple places... |
|
I have also verified that the EasyBuild hook to inject the So, time to merge this, thanks for the efforts @ocaisa! |
This will configure the relevant rpath override option whenever MPI is part of the toolchain being used to build the software