Skip to content

Commit e4c4f17

Browse files
authored
Merge pull request #184 from trz42/modifications-for-eessi-bot-sw-layer-pr24
[DRAFT] Adjustments to scripts necessary for bot PR24
2 parents 65b06ce + 1659ca9 commit e4c4f17

File tree

4 files changed

+56
-13
lines changed

4 files changed

+56
-13
lines changed

EESSI-pilot-install-software.sh

+49-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,52 @@
11
#!/bin/bash
22
#
33
# Script to install EESSI pilot software stack (version 2021.12)
4-
#
4+
5+
# see example parsing of command line arguments at
6+
# https://wiki.bash-hackers.org/scripting/posparams#using_a_while_loop
7+
# https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash
8+
9+
display_help() {
10+
echo "usage: $0 [OPTIONS]"
11+
echo " -g | --generic - instructs script to build for generic architecture target"
12+
echo " -h | --help - display this usage information"
13+
echo " -x | --http-proxy URL - provides URL for the environment variable http_proxy"
14+
echo " -y | --https-proxy URL - provides URL for the environment variable https_proxy"
15+
}
16+
17+
POSITIONAL_ARGS=()
18+
19+
while [[ $# -gt 0 ]]; do
20+
case $1 in
21+
-g|--generic)
22+
EASYBUILD_OPTARCH="GENERIC"
23+
shift
24+
;;
25+
-h|--help)
26+
display_help # Call your function
27+
# no shifting needed here, we're done.
28+
exit 0
29+
;;
30+
-x|--http-proxy)
31+
export http_proxy="$2"
32+
shift 2
33+
;;
34+
-y|--https-proxy)
35+
export https_proxy="$2"
36+
shift 2
37+
;;
38+
-*|--*)
39+
echo "Error: Unknown option: $1" >&2
40+
exit 1
41+
;;
42+
*) # No more options
43+
POSITIONAL_ARGS+=("$1") # save positional arg
44+
shift
45+
;;
46+
esac
47+
done
48+
49+
set -- "${POSITIONAL_ARGS[@]}"
550

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

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

353+
### add packages here
354+
308355
echo ">> Creating/updating Lmod cache..."
309356
export LMOD_RC="${EASYBUILD_INSTALLPATH}/.lmod/lmodrc.lua"
310357
if [ ! -f $LMOD_RC ]; then

README.md

+5-9
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,17 @@ See also https://eessi.github.io/docs/software_layer.
66

77
## Pilot software stack
88

9-
A script that sets up your environment to start using the 2020.08 version of the EESSI pilot software stack
10-
is available at `EESSI-pilot-2020.08_init.sh`.
11-
12-
This script should be copied to `/cvmfs/pilot.eessi-hpc.org/2020.08/init/bash` if it is not available there already,
13-
and sourced to set up your environment:
9+
You can set up your environment by sourcing the init script:
1410

1511
```
16-
$ source /cvmfs/pilot.eessi-hpc.org/2020.08/init/bash
17-
Found EESSI pilot repo @ /cvmfs/pilot.eessi-hpc.org/2020.08!
12+
$ source /cvmfs/pilot.eessi-hpc.org/versions/2021.12/init/bash
13+
Found EESSI pilot repo @ /cvmfs/pilot.eessi-hpc.org/versions/2021.12!
1814
Derived subdirectory for software layer: x86_64/intel/haswell
1915
Using x86_64/intel/haswell subdirectory for software layer (HARDCODED)
2016
Initializing Lmod...
21-
Prepending /cvmfs/pilot.eessi-hpc.org/2020.08/software/x86_64/intel/haswell/modules/all to $MODULEPATH...
17+
Prepending /cvmfs/pilot.eessi-hpc.org/versions/2021.12/software/x86_64/intel/haswell/modules/all to $MODULEPATH...
2218
Environment set up to use EESSI pilot software stack, have fun!
23-
[EESSI pilot 2020.08] $
19+
[EESSI pilot 2021.12] $
2420
```
2521

2622
# License

build_container.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if [ $? -eq 0 ]; then
2626
attr -s test -V test $testfile > /dev/null
2727
if [ $? -ne 0 ]; then
2828
echo "ERROR: $EESSI_TMPDIR does not support extended attributes!" >&2
29-
exit 2
29+
#exit 2
3030
else
3131
rm $testfile
3232
fi

install_software_layer.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22
export EESSI_PILOT_VERSION='2021.12'
3-
./run_in_compat_layer_env.sh ./EESSI-pilot-install-software.sh
3+
./run_in_compat_layer_env.sh ./EESSI-pilot-install-software.sh "$@"

0 commit comments

Comments
 (0)