Skip to content

Commit 5e8478d

Browse files
authored
Merge pull request #32 from JuliaParallel/initial
replace /tmp/juhpc with ./juhpc and improve examples/cscs/daint/gpu/craype_config_no_cudaaware
2 parents 93ba15f + 8f5adb6 commit 5e8478d

File tree

8 files changed

+22
-29
lines changed

8 files changed

+22
-29
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ export JUHPC_HDF5_HOME=$HDF5_DIR
111111
JUHPC_SETUP_INSTALLDIR=$SCRATCH/../julia/${HOSTNAME%%-*}/juhpc_setup
112112
JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%-*}/juliaup"
113113
VERSION="v0.2.0"
114-
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
115-
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
114+
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O ./juhpc
115+
bash -l ./juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
116116
```
117117

118118
> [!TIP]
@@ -141,8 +141,8 @@ JUHPC_SETUP_INSTALLDIR=$ENV_MOUNT/juhpc_setup
141141
JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%-*}/juliaup"
142142
JUHPC_POST_INSTALL_JL=$ENV_EXTRA/uenv_view.jl
143143
VERSION="v0.2.0"
144-
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
145-
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR --postinstall=$JUHPC_POST_INSTALL_JL --verbose=1
144+
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O ./juhpc
145+
bash -l ./juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR --postinstall=$JUHPC_POST_INSTALL_JL --verbose=1
146146
```
147147

148148
### Test of example 1

examples/cscs/alps/gh200/craype_config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ export JUHPC_HDF5_HOME=$HDF5_DIR
2727
JUHPC_SETUP_INSTALLDIR=$SCRATCH/${HOSTNAME%%-*}/juhpc_setup
2828
JULIAUP_INSTALLDIR="\$SCRATCH/\${HOSTNAME%%-*}/juliaup"
2929
VERSION="v0.2.0"
30-
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
31-
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
30+
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O ./juhpc
31+
bash -l ./juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR --verbose=1

examples/cscs/alps/mc/craype_config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ export JUHPC_HDF5_HOME=$HDF5_DIR
2424
JUHPC_SETUP_INSTALLDIR=$SCRATCH/${HOSTNAME%%-*}/juhpc_setup
2525
JULIAUP_INSTALLDIR="\$SCRATCH/\${HOSTNAME%%-*}/juliaup"
2626
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
27+
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O ./juhpc
28+
bash -l ./juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR

examples/cscs/daint/gpu/craype_config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ echo 'using Preferences
3737
JUHPC_SETUP_INSTALLDIR=$SCRATCH/../julia/${HOSTNAME%%[0-9]*}-gpu/juhpc_setup
3838
JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%[0-9]*}-gpu/juliaup"
3939
VERSION="v0.3.0"
40-
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
41-
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR --postinstall=$JUHPC_POST_INSTALL_JL
40+
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O ./juhpc
41+
bash -l ./juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR --postinstall=$JUHPC_POST_INSTALL_JL

examples/cscs/daint/gpu/craype_config_no_cudaaware

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,29 @@
1010
# 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...)
1111
module load daint-gpu
1212
module switch PrgEnv-cray PrgEnv-gnu
13-
module load cudatoolkit # A toolkit needs to be loaded during installation in order to be able to set JUHPC_CUDA_HOME (even though we set preferences to use artifacts in the postinstall)
1413
module load cray-hdf5-parallel
1514
module list
1615

1716

1817
# 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)
19-
export JUHPC_CUDA_HOME=$CUDA_HOME
20-
export JUHPC_CUDA_RUNTIME_VERSION="11.8" # Set to the highest possible version that can work on daint (using artifacts - below "local" is set to false...)
2118
export JUHPC_MPI_HOME=$MPICH_DIR
2219
export JUHPC_MPI_EXEC="srun -C gpu"
2320
export JUHPC_HDF5_HOME=$HDF5_DIR
2421

25-
2622
# Create site-specific post-install script (currently MPIPreferences does not provide an option to set required preloads if not automatically detected; JUHPC_MPI_VENDOR fails on Piz Daint...)
2723
JUHPC_POST_INSTALL_JL=./post_install.jl
28-
echo 'using Preferences
24+
echo 'using Pkg; Pkg.add("CUDA_Runtime_jll")
25+
using Preferences
2926
set_preferences!("CUDA_Runtime_jll",
27+
"version" => "11.8",
3028
"local" => false;
3129
force=true
32-
)
33-
set_preferences!("MPIPreferences",
34-
"preloads" => ["libcuda.so", "libcudart.so"],
35-
"preloads_env_switch" => "MPICH_RDMA_ENABLED_CUDA";
36-
force=true
37-
)' > $JUHPC_POST_INSTALL_JL
30+
)' > $JUHPC_POST_INSTALL_JL # (Set to the highest possible CUDA runtime version that can work on daint using artifacts - "local" is set to false...)
3831

3932

4033
# Call JUHPC
4134
JUHPC_SETUP_INSTALLDIR=$SCRATCH/../julia/${HOSTNAME%%[0-9]*}-gpu-nocudaaware/juhpc_setup
4235
JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%[0-9]*}-gpu-nocudaaware/juliaup"
43-
VERSION="v0.2.0"
44-
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
45-
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR $JUHPC_POST_INSTALL_JL
36+
VERSION="v0.3.0"
37+
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O ./juhpc
38+
bash -l ./juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR --postinstall=$JUHPC_POST_INSTALL_JL --verbose=1

examples/cscs/daint/mc/craype_config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ export JUHPC_HDF5_HOME=$HDF5_DIR
2424
JUHPC_SETUP_INSTALLDIR=$SCRATCH/../julia/${HOSTNAME%%[0-9]*}-mc/juhpc_setup
2525
JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%[0-9]*}-mc/juliaup"
2626
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
27+
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O ./juhpc
28+
bash -l ./juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR

examples/eurohpc/lumi/mi250x/craype_config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ export JUHPC_HDF5_HOME=$HDF5_DIR
2525
JUHPC_SETUP_INSTALLDIR=$SCRATCH/${HOSTNAME%%[0-9]*}/juhpc_setup #SCRATCH is assumed to be defined in ~/.bashrc, e.g., SCRATCH=/scratch/project_465000105/$USER
2626
JULIAUP_INSTALLDIR="\$SCRATCH/\${HOSTNAME%%[0-9]*}/juliaup"
2727
VERSION="v0.2.0"
28-
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
29-
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
28+
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O ./juhpc
29+
bash -l ./juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR

juhpc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ $(haskey(ENV,"JUHPC_ADIOS2_HOME") && ENV["JUHPC_ADIOS2_HOME"] != "" ? """
336336

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

339-
info "Environment variables:\n$(grep '^export ' "$ACTIVATE_SCRIPT")" 1
339+
info "Environment variables in activate script:\n$(grep '^export ' "$ACTIVATE_SCRIPT")" 1
340340

341341
info "... done: activate script created."
342342

0 commit comments

Comments
 (0)