Skip to content

adjustments to scripts necessary for bot #184

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

Merged
merged 1 commit into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 49 additions & 2 deletions EESSI-pilot-install-software.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,52 @@
#!/bin/bash
#
# Script to install EESSI pilot software stack (version 2021.12)
#

# see example parsing of command line arguments at
# https://wiki.bash-hackers.org/scripting/posparams#using_a_while_loop
# https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash

display_help() {
echo "usage: $0 [OPTIONS]"
echo " -g | --generic - instructs script to build for generic architecture target"
echo " -h | --help - display this usage information"
echo " -x | --http-proxy URL - provides URL for the environment variable http_proxy"
echo " -y | --https-proxy URL - provides URL for the environment variable https_proxy"
}

POSITIONAL_ARGS=()

while [[ $# -gt 0 ]]; do
case $1 in
-g|--generic)
EASYBUILD_OPTARCH="GENERIC"
shift
;;
-h|--help)
display_help # Call your function
# no shifting needed here, we're done.
exit 0
;;
-x|--http-proxy)
export http_proxy="$2"
shift 2
;;
-y|--https-proxy)
export https_proxy="$2"
shift 2
;;
-*|--*)
echo "Error: Unknown option: $1" >&2
exit 1
;;
*) # No more options
POSITIONAL_ARGS+=("$1") # save positional arg
shift
;;
esac
done

set -- "${POSITIONAL_ARGS[@]}"

TOPDIR=$(dirname $(realpath $0))

Expand Down Expand Up @@ -39,7 +84,7 @@ export PYTHONPYCACHEPREFIX=$TMPDIR/pycache
DETECTION_PARAMETERS=''
GENERIC=0
EB='eb'
if [[ "$1" == "--generic" || "$EASYBUILD_OPTARCH" == "GENERIC" ]]; then
if [[ "$EASYBUILD_OPTARCH" == "GENERIC" ]]; then
echo_yellow ">> GENERIC build requested, taking appropriate measures!"
DETECTION_PARAMETERS="$DETECTION_PARAMETERS --generic"
GENERIC=1
Expand Down Expand Up @@ -305,6 +350,8 @@ fail_msg="Installation of WRF failed, that's unexpected..."
OMPI_MCA_pml=ucx UCX_TLS=tcp $EB WRF-3.9.1.1-foss-2020a-dmpar.eb -r --include-easyblocks-from-pr 2648
check_exit_code $? "${ok_msg}" "${fail_msg}"

### add packages here

echo ">> Creating/updating Lmod cache..."
export LMOD_RC="${EASYBUILD_INSTALLPATH}/.lmod/lmodrc.lua"
if [ ! -f $LMOD_RC ]; then
Expand Down
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,17 @@ See also https://eessi.github.io/docs/software_layer.

## Pilot software stack

A script that sets up your environment to start using the 2020.08 version of the EESSI pilot software stack
is available at `EESSI-pilot-2020.08_init.sh`.

This script should be copied to `/cvmfs/pilot.eessi-hpc.org/2020.08/init/bash` if it is not available there already,
and sourced to set up your environment:
You can set up your environment by sourcing the init script:

```
$ source /cvmfs/pilot.eessi-hpc.org/2020.08/init/bash
Found EESSI pilot repo @ /cvmfs/pilot.eessi-hpc.org/2020.08!
$ source /cvmfs/pilot.eessi-hpc.org/versions/2021.12/init/bash
Found EESSI pilot repo @ /cvmfs/pilot.eessi-hpc.org/versions/2021.12!
Derived subdirectory for software layer: x86_64/intel/haswell
Using x86_64/intel/haswell subdirectory for software layer (HARDCODED)
Initializing Lmod...
Prepending /cvmfs/pilot.eessi-hpc.org/2020.08/software/x86_64/intel/haswell/modules/all to $MODULEPATH...
Prepending /cvmfs/pilot.eessi-hpc.org/versions/2021.12/software/x86_64/intel/haswell/modules/all to $MODULEPATH...
Environment set up to use EESSI pilot software stack, have fun!
[EESSI pilot 2020.08] $
[EESSI pilot 2021.12] $
```

# License
Expand Down
2 changes: 1 addition & 1 deletion build_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [ $? -eq 0 ]; then
attr -s test -V test $testfile > /dev/null
if [ $? -ne 0 ]; then
echo "ERROR: $EESSI_TMPDIR does not support extended attributes!" >&2
exit 2
#exit 2
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than commenting this out, we should just drop this attr check, should be OK thanks to EESSI/filesystem-layer#125

I'll do that in a follow-up PR

Copy link
Contributor

Choose a reason for hiding this comment

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

see #189

else
rm $testfile
fi
Expand Down
2 changes: 1 addition & 1 deletion install_software_layer.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
export EESSI_PILOT_VERSION='2021.12'
./run_in_compat_layer_env.sh ./EESSI-pilot-install-software.sh
./run_in_compat_layer_env.sh ./EESSI-pilot-install-software.sh "$@"