Skip to content

Commit b63e91f

Browse files
authored
Merge pull request #29 from JuliaParallel/initial
Write tmp installation output into log
2 parents bac5659 + ad21d0b commit b63e91f

File tree

6 files changed

+175
-29
lines changed

6 files changed

+175
-29
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,25 +60,28 @@ Details are given in the following two subsections.
6060
- `JUHPC_ADIOS2_HOME`: Activates HPC setup for ADIOS2 and is used to set ADIOS2.jl preferences.
6161

6262
> [!NOTE]
63-
> The automatically defined preferences suitable for typical HPC needs can be modified with a post install Julia script (see `JUHPC_POST_INSTALL_JL` in next section). Also preferences for other packages could be added this way if needed. Of course, any of these preferences can later be overwritten by local preferences.
63+
> The automatically defined preferences suitable for typical HPC needs can be modified with a post install Julia script (see keyword argument `--postinstall` in next section). Also preferences for other packages could be added this way if needed. Of course, any of these preferences can later be overwritten by local preferences.
6464
6565
### 2. Call JUHPC
6666

6767
The `juhpc` bash script is called as follows:
6868
```bash
69-
juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR [$JUHPC_POST_INSTALL_JL]
69+
juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR [--postinstall=<julia-script>] [--verbose=<value>]
7070
```
71-
I.e., it takes the following arguments:
71+
I.e., it takes the following positional arguments:
7272
- `JUHPC_SETUP_INSTALLDIR`: the folder into which the HPC setup is installed, e.g., `"$SCRATCH/../julia/${HOSTNAME%%-*}/juhpc_setup"`.
7373
- `JULIAUP_INSTALLDIR`: the folder into which Juliaup and Julia will automatically be installed the first time the end user calls `juliaup`. *User environment variables should be escaped* in order not to have them expanded during HPC setup installation, but during its usage by the end user, e.g., `"\$SCRATCH/../julia/\$USER/\${HOSTNAME%%-*}/juliaup"`.
74-
- `JUHPC_POST_INSTALL_JL` (optional): site-specific post installation Julia script, using the project where preferences were set (e.g, to modify preferences or to create an uenv view equivalent to the activation script).
7574

7675
> [!NOTE]
7776
> The above examples assume that `$SCRATCH/../julia` is a wipe out protected folder on scratch.
7877
7978
> [!IMPORTANT]
8079
> Separate installation by `HOSTNAME` is required if different hosts with different architectures share the file system used for installation (e.g., daint and eiger on ALPS).
8180
81+
Furthermore, it supports the following keyword argument:
82+
- `--postinstall=<julia-script>`: site-specific post installation Julia script, using the project where preferences were set (e.g, to modify preferences or to create an uenv view equivalent to the activation script).
83+
- `--verbose=<value>`: verbosity of the output during the HPC setup installation: if set to `1`, the generated HPC package preferences and environment variables are printed; if set to `2`, all the output of all commands is printed in addition for debugging purposes (default verbosity is `0`). No matter which verbosity level is set, all output is written in to a log file (`"$JUHPC_SETUP_INSTALLDIR/hpc_setup_install.log"`).
84+
8285

8386
## Examples: HPC setup installations on the ALPS supercomputer (CSCS)
8487

@@ -139,7 +142,7 @@ JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%-*}/juliaup"
139142
JUHPC_POST_INSTALL_JL=$ENV_EXTRA/uenv_view.jl
140143
VERSION="v0.2.0"
141144
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
142-
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR $JUHPC_POST_INSTALL_JL
145+
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR --postinstall=$JUHPC_POST_INSTALL_JL --verbose=1
143146
```
144147

145148
### Test of example 1

examples/cscs/daint/gpu/craype_config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ echo 'using Preferences
3636
# Call JUHPC
3737
JUHPC_SETUP_INSTALLDIR=$SCRATCH/../julia/${HOSTNAME%%[0-9]*}-gpu/juhpc_setup
3838
JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%[0-9]*}-gpu/juliaup"
39-
VERSION="v0.2.0"
39+
VERSION="v0.3.0"
4040
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
41-
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR $JUHPC_POST_INSTALL_JL
41+
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR --postinstall=$JUHPC_POST_INSTALL_JL
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
# Author: Samuel Omlin, CSCS (omlins)
4+
#
5+
# Description: Definition of site specific variables and call of JUHPC.
6+
# Site: Piz Daint:gpu, Swiss National Supercomputing Centre (CSCS)
7+
# Base: craype (not using CUDA-aware MPI because system CUDA is outdated as daint is to be decommissioned soon)
8+
9+
10+
# Load required modules, including correct CPU and GPU target modules (NOTE: the same modules should be loaded when running julia - JUHPC can be used in a module build recipe...)
11+
module load daint-gpu
12+
module switch PrgEnv-cray PrgEnv-gnu
13+
module load cray-hdf5-parallel
14+
module list
15+
16+
17+
# Environment variables for HPC key packages that require system libraries that require system libraries (MPI.jl, CUDA.jl, AMDGPU.jl, HDF5.jl and ADIOS2.jl)
18+
export JUHPC_MPI_HOME=$MPICH_DIR
19+
export JUHPC_MPI_EXEC="srun -C gpu"
20+
export JUHPC_HDF5_HOME=$HDF5_DIR
21+
22+
23+
# Call JUHPC
24+
JUHPC_SETUP_INSTALLDIR=$SCRATCH/../julia/${HOSTNAME%%[0-9]*}-gpu-nocudaaware/juhpc_setup
25+
JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%[0-9]*}-gpu-nocudaaware/juliaup"
26+
VERSION="v0.2.0"
27+
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
28+
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
# Variable set in craype_config
4+
JUHPC_SETUP_INSTALLDIR=$SCRATCH/../julia/${HOSTNAME%%[0-9]*}-gpu/juhpc_setup
5+
6+
# Load required modules, including correct CPU and GPU target modules (NOTE: the same modules should be loaded when running julia - JUHPC can be used in a module build recipe...)
7+
module load daint-gpu
8+
module switch PrgEnv-cray PrgEnv-gnu
9+
module load cudatoolkit/11.2.0_3.39-2.1__gf93aa1c craype-accel-nvidia60 # Load latest available cudatoolkit
10+
module load cray-hdf5-parallel
11+
module list
12+
13+
# Activate the HPC setup environment variables
14+
. $JUHPC_SETUP_INSTALLDIR/activate
15+
16+
# Call juliaup to install juliaup and latest julia on scratch
17+
juliaup
18+
19+
# Call juliaup to see its options
20+
juliaup
21+
22+
# Call julia Pkg
23+
julia -e 'using Pkg; Pkg.status()'
24+
25+
# Add CUDA.jl
26+
julia -e 'using Pkg; Pkg.add("CUDA"); using CUDA; CUDA.versioninfo()'
27+
28+
# Add MPI.jl
29+
julia -e 'using Pkg; Pkg.add("MPI"); using MPI; MPI.versioninfo()'
30+
31+
# Add HDF5.jl
32+
julia -e 'using Pkg; Pkg.add("HDF5"); using HDF5; @show HDF5.has_parallel()'

examples/eurohpc/lumi/mi250x/test_craype_config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Variable set in craype_config
4-
JUHPC_SETUP_INSTALLDIR=$SCRATCH/${HOSTNAME%%[0-9]*}/juhpc_setup
4+
JUHPC_SETUP_INSTALLDIR=$SCRATCH/uan/juhpc_setup
55

66
# Load required modules (including correct CPU and GPU target modules)
77
module load LUMI

juhpc

Lines changed: 104 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
# - optionally executing a site-specific post installation julia script, using the project where preferences were set (e.g, to modify preferences or to create an uenv view equivalent to the activation script).
99

1010

11-
# Define info, error, cleanup and check functions
11+
# Define log, info, error, cleanup, check functions and julia call for setting preferences
12+
13+
export JUHPC_SETUP_INSTALLLOG="./hpc_setup_install.log" # must be defined at the very beginning
1214

1315
export JUHPC="\e[1;34m[\e[0m \e[1;35mJ\e[0m\e[1;32mU\e[0m\e[1;31mH\e[0m\e[1;31mP\e[0m\e[1;31mC\e[0m\e[1;34m:\e[0m"
1416

@@ -28,7 +30,11 @@ print_logo() {
2830

2931
info() {
3032
local message="$1"
31-
echo -e "$JUHPC $message" >&2
33+
local verbose_min="${2:-0}" # Default to 0 if not provided
34+
if [[ "$JUHPC_VERBOSE" -ge "$verbose_min" ]]; then
35+
echo -e "$JUHPC $message" >&2
36+
fi
37+
echo -e "$JUHPC $message" >> "$JUHPC_SETUP_INSTALLLOG"
3238
}
3339

3440
cleanup() {
@@ -59,12 +65,78 @@ check_dir() {
5965
done
6066
}
6167

68+
julia_pref() {
69+
local cmd="$1"
70+
local progress="${2:-}" # The second argument is optional, default to an empty string if not provided
71+
72+
if [[ "$JUHPC_VERBOSE" -gt 1 ]]; then
73+
julia --project="$JULIA_PREFDIR" -e "$cmd" 2>&1 | tee -a "$JUHPC_SETUP_INSTALLLOG"
74+
else
75+
julia --project="$JULIA_PREFDIR" -e "$cmd" >> "$JUHPC_SETUP_INSTALLLOG" 2>&1
76+
fi
77+
78+
if [[ -n "$progress" ]]; then
79+
progress_bar "$progress"
80+
fi
81+
}
82+
83+
percent() {
84+
local p=00$(($1*100000/$2))
85+
printf -v "$3" %.2f ${p::-3}.${p: -3}
86+
}
87+
88+
progress_bar() {
89+
local progress=$1
90+
local width=${2:-50} # Default to a width of 50 if not provided
91+
local percent_var
92+
percent "$progress" 100 percent_var # Always assume total is 100
93+
local filled_length=$((width * progress / 100))
94+
local bar=""
95+
96+
if [[ "$JUHPC_VERBOSE" -lt 2 ]]; then
97+
for ((i=0; i<filled_length; i++)); do
98+
bar+=""
99+
done
100+
for ((i=filled_length; i<width; i++)); do
101+
bar+=""
102+
done
103+
printf '\r|%s| %s%%' "$bar" "$percent_var"
104+
if [[ "$progress" -eq 100 ]]; then echo ''; fi
105+
fi
106+
}
107+
62108

63-
# Assign passed arguments to environment variables
109+
# Assign positional arguments and set default values for keyword arguments
64110

65111
export JUHPC_SETUP_INSTALLDIR="$1"
66112
export JULIAUP_INSTALLDIR="$2"
67-
export JUHPC_POST_INSTALL_JL="$3"
113+
export JUHPC_POST_INSTALL_JL=""
114+
export JUHPC_VERBOSE=0
115+
116+
117+
# Check positional arguments
118+
119+
check_var "JUHPC_SETUP_INSTALLDIR" "JULIAUP_INSTALLDIR"
120+
if [[ "$JULIAUP_INSTALLDIR" == "$JUHPC_SETUP_INSTALLDIR" ]]; then
121+
error "JULIAUP_INSTALLDIR and JUHPC_SETUP_INSTALLDIR cannot have the same value."
122+
fi
123+
check_dir "$JUHPC_SETUP_INSTALLDIR"
124+
125+
126+
# Parse and check the keyword arguments
127+
128+
shift 2
129+
for arg in "$@"; do
130+
case $arg in
131+
--postinstall=*) export JUHPC_POST_INSTALL_JL="${arg#*=}" ;;
132+
--verbose=*) export JUHPC_VERBOSE="${arg#*=}" ;;
133+
*) error "Unknown argument: $arg" ;;
134+
esac
135+
done
136+
137+
if ! [[ "$JUHPC_VERBOSE" =~ ^[0-2]$ ]]; then
138+
error "JUHPC_VERBOSE must be between 0 and 2."
139+
fi
68140

69141

70142
# Set (derived) general environment variables
@@ -86,8 +158,9 @@ export TMP_JULIAUP_ROOTDIR="$TMP/juliaup"
86158

87159
print_logo
88160
info "Starting installation of HPC setup for juliaup, julia and HPC key packages requiring system libraries..."
89-
check_var "JULIAUP_INSTALLDIR" "JUHPC_SETUP_INSTALLDIR"
90-
check_dir "$JUHPC_SETUP_INSTALLDIR"
161+
162+
mkdir -p "$TMP" || { error "failed to create directory: $TMP"; }
163+
mkdir -p "$JUHPC_SETUP_INSTALLDIR" || { error "failed to create directory: $JUHPC_SETUP_INSTALLDIR"; }
91164

92165

93166
# Download and install julia in /tmp using juliaup
@@ -102,7 +175,7 @@ export PATH=$(echo $PATH | perl -pe "s|[^:]*julia(?:up)?[^:]*:?||g") # Remove al
102175
export PATH=$TMP_JULIAUP_BINDIR:$PATH
103176

104177
check_dir "$TMP_JULIAUP_ROOTDIR"
105-
curl -fsSL https://install.julialang.org | sh -s -- --add-to-path=no --yes --path="$TMP_JULIAUP_ROOTDIR" --background-selfupdate 0 --startup-selfupdate 0 || { error "failed to install Juliaup (and Julia) in $TMP_JULIAUP_ROOTDIR."; }
178+
curl -fsSL https://install.julialang.org | sh -s -- --add-to-path=no --yes --path="$TMP_JULIAUP_ROOTDIR" --background-selfupdate 0 --startup-selfupdate 0 > $JUHPC_SETUP_INSTALLLOG || { error "failed to install Juliaup (and Julia) in $TMP_JULIAUP_ROOTDIR."; }
106179

107180
if [ ! -f "$TMP_JULIAUP_BINDIR/juliaup" ]; then error "temporary juliaup installation failed."; fi
108181

@@ -111,60 +184,67 @@ info "... done: temporary installation completed."
111184

112185
# Create preferences for HPC key packages that require system libraries (MPI.jl, CUDA.jl, AMDGPU.jl, HDF5.jl, ADIOS2.jl, ...)
113186

114-
info "Creating preferences for HPC key packages..."
187+
info "Creating preferences for HPC key packages (this can take a few minutes, because some packages have to be temporarily installed)..."
115188

116189
export JULIA_PREFDIR="$JUHPC_SETUP_INSTALLDIR/julia_preferences"
117190
export JULIA_PREF_PROJECT="$JULIA_PREFDIR/Project.toml"
118191
export JULIA_PREFS="$JULIA_PREFDIR/LocalPreferences.toml"
119192
mkdir -p "$JULIA_PREFDIR" || { error "failed to create directory: $JULIA_PREFDIR"; }
120193

194+
progress_bar 1 # Initialize progress bar.
195+
julia_pref 'using Pkg' 10 # Initialize project.
196+
121197
if [[ -n "${JUHPC_CUDA_HOME}" || -n "${JUHPC_ROCM_HOME}" ]]; then
122-
julia --project="$JULIA_PREFDIR" -e 'using Pkg; Pkg.add("Preferences")'
198+
julia_pref 'using Pkg; Pkg.add("Preferences")' 30
123199
echo "[extras]" >> "$JULIA_PREF_PROJECT"
124200
fi
125201

126202
if [ -n "${JUHPC_CUDA_HOME}" ]; then # Set preference for using the local CUDA runtime before any installation of CUDA.jl to avoid downloading of artifacts
127203
echo 'CUDA_Runtime_jll = "76a88914-d11a-5bdc-97e0-2f5a05c973a2"' >> "$JULIA_PREF_PROJECT"
128204

129-
julia --project="$JULIA_PREFDIR" -e 'using Preferences; set_preferences!("CUDA_Runtime_jll", "local"=>true)'
205+
julia_pref 'using Preferences; set_preferences!("CUDA_Runtime_jll", "local"=>true)' 35
130206
if [ -n "${JUHPC_CUDA_RUNTIME_VERSION}" ]; then
131-
julia --project="$JULIA_PREFDIR" -e 'using Preferences; set_preferences!("CUDA_Runtime_jll", "version"=>join(split(ENV["JUHPC_CUDA_RUNTIME_VERSION"],".")[1:2],"."))'
207+
julia_pref 'using Preferences; set_preferences!("CUDA_Runtime_jll", "version"=>join(split(ENV["JUHPC_CUDA_RUNTIME_VERSION"],".")[1:2],"."))' 40
132208
fi
133209
fi
134210

135211
if [ -n "${JUHPC_ROCM_HOME}" ]; then # Set preference for using the local ROCm runtime before any installation of AMDGPU.jl to avoid downloading of artifacts
136212
echo 'AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e"' >> "$JULIA_PREF_PROJECT"
137213

138-
julia --project="$JULIA_PREFDIR" -e 'using Preferences; set_preferences!("AMDGPU", "use_artifacts"=>false, "eager_gc"=>false)'
214+
julia_pref 'using Preferences; set_preferences!("AMDGPU", "use_artifacts"=>false, "eager_gc"=>false)' 45
139215
fi
140216

141217
if [ -n "${JUHPC_CUDA_HOME}" ]; then export CUDA_HOME="$JUHPC_CUDA_HOME"; fi
142218
if [ -n "${JUHPC_ROCM_HOME}" ]; then export ROCM_PATH="$JUHPC_ROCM_HOME"; fi
143219

144-
julia --project="$JULIA_PREFDIR" -e 'using Pkg; Pkg.add([p for (p,l) in [("MPIPreferences", "JUHPC_MPI_VENDOR"), ("MPIPreferences", "JUHPC_MPI_HOME"), ("CUDA", "JUHPC_CUDA_HOME"), ("AMDGPU", "JUHPC_ROCM_HOME"), ("HDF5", "JUHPC_HDF5_HOME")] if haskey(ENV,l) && ENV[l]!=""])'
220+
julia_pref 'using Pkg; Pkg.add([p for (p,l) in [("MPIPreferences", "JUHPC_MPI_VENDOR"), ("MPIPreferences", "JUHPC_MPI_HOME"), ("CUDA", "JUHPC_CUDA_HOME"), ("AMDGPU", "JUHPC_ROCM_HOME"), ("HDF5", "JUHPC_HDF5_HOME")] if haskey(ENV,l) && ENV[l]!=""])' 70
145221

146222
if [ -n "${JUHPC_CUDA_HOME}" ]; then # Set preference for using the local CUDA runtime in a more stable way (in case the previous would not be valid anymore)
147-
julia --project="$JULIA_PREFDIR" -e 'using CUDA; CUDA.set_runtime_version!((VersionNumber(join(split(ENV[key],".")[1:2],".")) for key in ["JUHPC_CUDA_RUNTIME_VERSION"] if haskey(ENV,key) && ENV[key]!=="")...; local_toolkit=true)'
223+
julia_pref 'using CUDA; CUDA.set_runtime_version!((VersionNumber(join(split(ENV[key],".")[1:2],".")) for key in ["JUHPC_CUDA_RUNTIME_VERSION"] if haskey(ENV,key) && ENV[key]!=="")...; local_toolkit=true)' 80
148224
fi
149225

150226
if [ -n "${JUHPC_ROCM_HOME}" ]; then # Set preference for using the local ROCm runtime in a more stable way (in case the previous would not be valid anymore)
151-
julia --project="$JULIA_PREFDIR" -e 'using AMDGPU; AMDGPU.ROCmDiscovery.use_artifacts!(false)'
227+
julia_pref 'using AMDGPU; AMDGPU.ROCmDiscovery.use_artifacts!(false)' 85
152228
fi
153229

154230
if [ -n "${JUHPC_MPI_VENDOR}" ]; then
155231
check_var "JUHPC_MPI_EXEC"
156-
julia --project="$JULIA_PREFDIR" -e 'using MPIPreferences; MPIPreferences.use_system_binary(mpiexec=split(ENV["JUHPC_MPI_EXEC"]), vendor=ENV["JUHPC_MPI_VENDOR"])'
232+
julia_pref 'using MPIPreferences; MPIPreferences.use_system_binary(mpiexec=split(ENV["JUHPC_MPI_EXEC"]), vendor=ENV["JUHPC_MPI_VENDOR"])' 90
157233
elif [ -n "${JUHPC_MPI_HOME}" ]; then
158234
check_var "JUHPC_MPI_EXEC"
159-
julia --project="$JULIA_PREFDIR" -e 'using MPIPreferences; MPIPreferences.use_system_binary(mpiexec=split(ENV["JUHPC_MPI_EXEC"]), extra_paths=["$(ENV["JUHPC_MPI_HOME"])/lib"])'
235+
julia_pref 'using MPIPreferences; MPIPreferences.use_system_binary(mpiexec=split(ENV["JUHPC_MPI_EXEC"]), extra_paths=["$(ENV["JUHPC_MPI_HOME"])/lib"])' 90
160236
fi
161237

162238
if [ -n "${JUHPC_HDF5_HOME}" ]; then
163-
julia --project="$JULIA_PREFDIR" -e 'using HDF5; HDF5.API.set_libraries!("$(ENV["JUHPC_HDF5_HOME"])/lib/libhdf5.so", "$(ENV["JUHPC_HDF5_HOME"])/lib/libhdf5_hl.so")'
239+
julia_pref 'using HDF5; HDF5.API.set_libraries!("$(ENV["JUHPC_HDF5_HOME"])/lib/libhdf5.so", "$(ENV["JUHPC_HDF5_HOME"])/lib/libhdf5_hl.so")'
164240
fi
165241

166242
if [ ! -s "$JULIA_PREFS" ]; then error "preferences file is missing or empty."; fi
167243

244+
progress_bar 100 # Finalize progress bar.
245+
246+
info "Preferences:\n$(cat "$JULIA_PREFS")" 1
247+
168248
info "... done: preferences created."
169249

170250

@@ -215,7 +295,7 @@ fi
215295
if [ ! -s "$JULIAUP_WRAPPER" ]; then error "Juliaup wrapper is missing or empty."; fi
216296
chmod +x "$JULIAUP_WRAPPER"
217297

218-
info "... done."
298+
info "... done: wrapper created."
219299

220300

221301
# Create an activation script that sets environment variables for juliaup, julia and HPC key packages
@@ -258,14 +338,16 @@ $(haskey(ENV,"JUHPC_ADIOS2_HOME") && ENV["JUHPC_ADIOS2_HOME"] != "" ? """
258338

259339
if [ ! -s "$ACTIVATE_SCRIPT" ]; then error "Activate script is missing or empty."; fi
260340

261-
info "... done."
341+
info "Environment variables:\n$(grep '^export ' "$ACTIVATE_SCRIPT")" 1
342+
343+
info "... done: activate script created."
262344

263345

264346
# Optionally execute a site-specific post installation julia script (if passed a third argument)
265347

266348
if [ -n "${JUHPC_POST_INSTALL_JL}" ]; then
267349
info "Executing site-specific post-installation julia script (using the project where preferences were set)..."
268-
julia --project="$JULIA_PREFDIR" "$JUHPC_POST_INSTALL_JL"
350+
julia --project="$JULIA_PREFDIR" "$JUHPC_POST_INSTALL_JL" 2>&1 | tee -a "$JUHPC_SETUP_INSTALLLOG"
269351
info "... done: post-installation script completed."
270352
fi
271353

@@ -274,5 +356,6 @@ fi
274356

275357
cleanup
276358
mv "$JULIA_PREFDIR/Manifest.toml" "$JULIA_PREFDIR/Manifest.toml.bak" || { error "failed to move Manifest.toml in $JULIA_PREFDIR"; }
359+
mv "$JUHPC_SETUP_INSTALLLOG" "$JUHPC_SETUP_INSTALLDIR/" || { error "failed to move $JUHPC_SETUP_INSTALLLOG to $JUHPC_SETUP_INSTALLDIR"; }
277360

278361
info "... The installation of the HPC setup for juliaup, julia and HPC key packages is complete.\n\n"

0 commit comments

Comments
 (0)