Skip to content

Commit

Permalink
Merge pull request #32 from JuliaParallel/initial
Browse files Browse the repository at this point in the history
replace /tmp/juhpc with ./juhpc and improve examples/cscs/daint/gpu/craype_config_no_cudaaware
  • Loading branch information
omlins authored Oct 25, 2024
2 parents 93ba15f + 8f5adb6 commit 5e8478d
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 29 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ export JUHPC_HDF5_HOME=$HDF5_DIR
JUHPC_SETUP_INSTALLDIR=$SCRATCH/../julia/${HOSTNAME%%-*}/juhpc_setup
JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%-*}/juliaup"
VERSION="v0.2.0"
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O ./juhpc
bash -l ./juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
```

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

### Test of example 1
Expand Down
4 changes: 2 additions & 2 deletions examples/cscs/alps/gh200/craype_config
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ export JUHPC_HDF5_HOME=$HDF5_DIR
JUHPC_SETUP_INSTALLDIR=$SCRATCH/${HOSTNAME%%-*}/juhpc_setup
JULIAUP_INSTALLDIR="\$SCRATCH/\${HOSTNAME%%-*}/juliaup"
VERSION="v0.2.0"
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O ./juhpc
bash -l ./juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR --verbose=1
4 changes: 2 additions & 2 deletions examples/cscs/alps/mc/craype_config
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ export JUHPC_HDF5_HOME=$HDF5_DIR
JUHPC_SETUP_INSTALLDIR=$SCRATCH/${HOSTNAME%%-*}/juhpc_setup
JULIAUP_INSTALLDIR="\$SCRATCH/\${HOSTNAME%%-*}/juliaup"
VERSION="v0.2.0"
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O ./juhpc
bash -l ./juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
4 changes: 2 additions & 2 deletions examples/cscs/daint/gpu/craype_config
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ echo 'using Preferences
JUHPC_SETUP_INSTALLDIR=$SCRATCH/../julia/${HOSTNAME%%[0-9]*}-gpu/juhpc_setup
JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%[0-9]*}-gpu/juliaup"
VERSION="v0.3.0"
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR --postinstall=$JUHPC_POST_INSTALL_JL
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O ./juhpc
bash -l ./juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR --postinstall=$JUHPC_POST_INSTALL_JL
21 changes: 7 additions & 14 deletions examples/cscs/daint/gpu/craype_config_no_cudaaware
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,29 @@
# 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...)
module load daint-gpu
module switch PrgEnv-cray PrgEnv-gnu
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)
module load cray-hdf5-parallel
module list


# 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)
export JUHPC_CUDA_HOME=$CUDA_HOME
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...)
export JUHPC_MPI_HOME=$MPICH_DIR
export JUHPC_MPI_EXEC="srun -C gpu"
export JUHPC_HDF5_HOME=$HDF5_DIR


# 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...)
JUHPC_POST_INSTALL_JL=./post_install.jl
echo 'using Preferences
echo 'using Pkg; Pkg.add("CUDA_Runtime_jll")
using Preferences
set_preferences!("CUDA_Runtime_jll",
"version" => "11.8",
"local" => false;
force=true
)
set_preferences!("MPIPreferences",
"preloads" => ["libcuda.so", "libcudart.so"],
"preloads_env_switch" => "MPICH_RDMA_ENABLED_CUDA";
force=true
)' > $JUHPC_POST_INSTALL_JL
)' > $JUHPC_POST_INSTALL_JL # (Set to the highest possible CUDA runtime version that can work on daint using artifacts - "local" is set to false...)


# Call JUHPC
JUHPC_SETUP_INSTALLDIR=$SCRATCH/../julia/${HOSTNAME%%[0-9]*}-gpu-nocudaaware/juhpc_setup
JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%[0-9]*}-gpu-nocudaaware/juliaup"
VERSION="v0.2.0"
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR $JUHPC_POST_INSTALL_JL
VERSION="v0.3.0"
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O ./juhpc
bash -l ./juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR --postinstall=$JUHPC_POST_INSTALL_JL --verbose=1
4 changes: 2 additions & 2 deletions examples/cscs/daint/mc/craype_config
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ export JUHPC_HDF5_HOME=$HDF5_DIR
JUHPC_SETUP_INSTALLDIR=$SCRATCH/../julia/${HOSTNAME%%[0-9]*}-mc/juhpc_setup
JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%[0-9]*}-mc/juliaup"
VERSION="v0.2.0"
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O ./juhpc
bash -l ./juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
4 changes: 2 additions & 2 deletions examples/eurohpc/lumi/mi250x/craype_config
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ export JUHPC_HDF5_HOME=$HDF5_DIR
JUHPC_SETUP_INSTALLDIR=$SCRATCH/${HOSTNAME%%[0-9]*}/juhpc_setup #SCRATCH is assumed to be defined in ~/.bashrc, e.g., SCRATCH=/scratch/project_465000105/$USER
JULIAUP_INSTALLDIR="\$SCRATCH/\${HOSTNAME%%[0-9]*}/juliaup"
VERSION="v0.2.0"
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O ./juhpc
bash -l ./juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
2 changes: 1 addition & 1 deletion juhpc
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ $(haskey(ENV,"JUHPC_ADIOS2_HOME") && ENV["JUHPC_ADIOS2_HOME"] != "" ? """

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

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

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

Expand Down

0 comments on commit 5e8478d

Please sign in to comment.