Skip to content

Commit cdfcc9a

Browse files
authored
Merge pull request #6 from omlins/initial
Finalize initial version
2 parents c53b624 + a4f5d06 commit cdfcc9a

File tree

6 files changed

+93
-62
lines changed

6 files changed

+93
-62
lines changed

README.md

Lines changed: 81 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,84 @@
1-
# JUHPC: a community software development project for everyone - including end users
2-
JUHPC is an attempt to convert the numerous efforts at different HPC sites for defining a suitable Julia HPC setup into a community software development project... *which suits everyone*. The objective is to gather all the experience of the Julia HPC community and transform it in an portable automatic Julia HPC setup, enhanced and maintained jointly by the Julia HPC community. JUHPC can be used stand-alone (by end users) or as part of a recipe for automated software stack generation (by HPC sites) as, e.g., the generation of modules or [uenvs](https://eth-cscs.github.io/uenv/) (used on the ALPS supercomputer at the Swiss National Supercomputing Centre, see [here](https://confluence.cscs.ch/display/KB/UENV+user+environments)).
1+
# JUHPC <!-- omit from toc -->
32

4-
An important lesson learned by the Julia HPC community for providing Julia at HPC sites is not to preinstall any packages site wide. JUHPC pushes this insight even one step further and does not preinstall Julia either. Instead, juliaup is leveraged and the installation of juliaup, Julia and packages is preconfigured for being automatically executed by the end user.
3+
## Introduction: a community project for everyone - including end users
54

6-
Concretely, JUHPC creates an HPC setup for juliaup, Julia and some HPC key packages (MPI.jl, CUDA.jl, HDF5.jl, ADIOS2.jl, ...), including
5+
JUHPC is an attempt to convert the numerous efforts at different HPC sites for defining a suitable Julia HPC setup into a community scripting project... *which suits everyone*. The objective is to gather all the experience of the Julia HPC community and transform it in an portable automatic Julia HPC setup, enhanced and maintained jointly by the Julia HPC community. JUHPC can be used stand-alone (by end users) or as part of a recipe for automated software stack generation (by HPC sites) as, e.g., the generation of modules or [uenvs](https://eth-cscs.github.io/uenv/) (used on the ALPS supercomputer at the Swiss National Supercomputing Centre, see [here](https://confluence.cscs.ch/display/KB/UENV+user+environments)).
6+
7+
An important lesson learned by the Julia HPC community for providing Julia at HPC sites is not to preinstall any packages site wide. JUHPC pushes this insight even one step further and does not preinstall Julia either. Instead, Juliaup is leveraged and the installation of Juliaup, Julia and packages is preconfigured for being automatically executed by the end user. Furthermore, for maximal robustness, the preferences are created using the available API calls of the corresponding packages.
8+
9+
Concretely, JUHPC creates an HPC setup for Juliaup, Julia and some HPC key packages (MPI.jl, CUDA.jl, HDF5.jl, ADIOS2.jl, ...), including
710
- preferences for HPC key packages that require system libraries;
8-
- a wrapper for juliaup that will install juliaup (and latest Julia) automatically in a predefined location (e.g., scratch) when the end user calls `juliaup` the first time;
9-
- an activation script that sets environment variables for juliaup, Julia and HPC key packages;
11+
- a wrapper for Juliaup that will install Juliaup (and latest Julia) automatically in a predefined location (e.g., scratch) when the end user calls `juliaup` the first time;
12+
- an activation script that sets environment variables for Juliaup, Julia and HPC key packages;
1013
- optional execution of 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).
1114

1215
HPC sites can install the HPC setup into a folder in a location accessible to all users (which can also be part, e.g., of a uenv). HPC end users can install the HPC setup into any folder to their liking, accessible from the compute nodes; it is then enough to source the activate script in this folder in order to activate the HPC setup.
1316

17+
## Table of contents <!-- omit from toc -->
18+
- [Introduction: a community project for everyone - including end users](#introduction-a-community-project-for-everyone---including-end-users)
19+
- [Usage](#usage)
20+
- [1. Export environment variables for the installation of some HPC key packages](#1-export-environment-variables-for-the-installation-of-some-hpc-key-packages)
21+
- [2. Call JUHPC](#2-call-juhpc)
22+
- [Examples: HPC setup installations on the ALPS supercomputer (CSCS)](#examples-hpc-setup-installations-on-the-alps-supercomputer-cscs)
23+
- [Example 1: using Cray Programming Environment](#example-1-using-cray-programming-environment)
24+
- [Example 2: using UENV](#example-2-using-uenv)
25+
- [Test of example 1](#test-of-example-1)
26+
- [Test of example 2](#test-of-example-2)
27+
- [Your contributions](#your-contributions)
28+
- [Contributors](#contributors)
29+
1430

15-
# It's as simple as that
31+
## Usage
32+
Installing a HPC setup for Juliaup, Julia and some HPC key packages, requires only two steps:
33+
1. Export environment variables for the installation of some HPC key packages.
34+
2. Call JUHPC.
1635

17-
# 1. Export environment variables for the installation of some HPC key packages
36+
Details are given in the following two subsections.
1837

19-
## CUDA
20-
- `JUHPC_CUDA_HOME`: Activates HPC setup for CUDA and is used for CUDA.jl runtime discovery (set as CUDA_HOME in the activate script).
21-
- `JUHPC_CUDA_RUNTIME_VERSION`: Used to set CUDA.jl preferences (fixes runtime version enabling pre-compilation on login nodes).
38+
### 1. Export environment variables for the installation of some HPC key packages
2239

23-
## AMDGPU
24-
- `JUHPC_ROCM_HOME`: Activates HPC setup for AMDGPU and is used for AMDGPU.jl runtime discovery (set as ROCM_PATH in the activate script).
40+
- CUDA
41+
- `JUHPC_CUDA_HOME`: Activates HPC setup for CUDA and is used for CUDA.jl runtime discovery (set as CUDA_HOME in the activate script).
42+
- `JUHPC_CUDA_RUNTIME_VERSION`: Used to set CUDA.jl preferences (fixes runtime version enabling pre-compilation on login nodes).
2543

26-
## MPI
27-
- `JUHPC_MPI_HOME`: Activates HPC setup for MPI and is used to set MPI.jl preferences. Incompatible with `JUHPC_MPI_VENDOR`
28-
- `JUHPC_MPI_VENDOR`: Activates HPC setup for MPI and is used to set MPI.jl preferences (currently only "cray" is valid, see [here](https://juliaparallel.org/MPI.jl/stable/configuration/#Notes-about-vendor-provided-MPI-backends)). Incompatible with `JUHPC_MPI_HOME`.
29-
- `JUHPC_MPI_EXEC`: Used to set MPI.jl preferences (exec command definition). Arguments are space separated, e.g., "srun -C gpu".
44+
- AMDGPU
45+
- `JUHPC_ROCM_HOME`: Activates HPC setup for AMDGPU and is used for AMDGPU.jl runtime discovery (set as ROCM_PATH in the activate script).
3046

31-
## HDF5
32-
- `JUHPC_HDF5_HOME`: Activates HPC setup for HDF5 and is used to set HDF5.jl preferences.
47+
- MPI
48+
- `JUHPC_MPI_HOME`: Activates HPC setup for MPI and is used to set MPI.jl preferences. Incompatible with `JUHPC_MPI_VENDOR`
49+
- `JUHPC_MPI_VENDOR`: Activates HPC setup for MPI and is used to set MPI.jl preferences (currently only "cray" is valid, see [here](https://juliaparallel.org/MPI.jl/stable/configuration/#Notes-about-vendor-provided-MPI-backends)). Incompatible with `JUHPC_MPI_HOME`.
50+
- `JUHPC_MPI_EXEC`: Used to set MPI.jl preferences (exec command definition). Arguments are space separated, e.g., "srun -C gpu".
3351

34-
## ADIOS2
35-
- `JUHPC_ADIOS2_HOME`: Activates HPC setup for ADIOS2 and is used to set ADIOS2.jl preferences.
52+
- HDF5
53+
- `JUHPC_HDF5_HOME`: Activates HPC setup for HDF5 and is used to set HDF5.jl preferences.
3654

55+
- ADIOS2
56+
- `JUHPC_ADIOS2_HOME`: Activates HPC setup for ADIOS2 and is used to set ADIOS2.jl preferences.
3757

38-
# 2. Call JUHPC
58+
59+
### 2. Call JUHPC
3960

4061
The `juhpc` bash script is called as follows:
4162
```bash
4263
juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR [$JUHPC_POST_INSTALL]
4364
```
4465
I.e., it takes the following arguments:
45-
- `JUHPC_SETUP_INSTALLDIR`: the folder to install the HPC setup into, e.g., `"$SCRATCH/../julia/${HOSTNAME%%-*}/juhpc_setup"` (assuming `$SCRATCH/../julia` is a wipe out protected folder on scratch).
46-
- `JULIAUP_INSTALLDIR`: the folder 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"` (assuming `$SCRATCH/../julia` is a wipe out protected folder on scratch).
47-
- `JUHPC_POST_INSTALL` (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).
66+
- `JUHPC_SETUP_INSTALLDIR`: the folder into which the HPC setup is installed, e.g., `"$SCRATCH/../julia/${HOSTNAME%%-*}/juhpc_setup"` (assuming `$SCRATCH/../julia` is a wipe out protected folder on scratch).
67+
- `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"` (assuming `$SCRATCH/../julia` is a wipe out protected folder on scratch).
68+
- `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).
69+
70+
71+
> ℹ️ The above examples assume that `$SCRATCH/../julia` is a wipe out protected folder on scratch.
4872
49-
> :note: The above examples assume that `$SCRATCH/../julia` is a wipe out protected folder on scratch.
50-
> :note: Separate installation by HOSTNAME is required if different hosts with different architectures share file system used for installation (e.g., daint and eiger on ALPS).
73+
> ⚠️ Separate installation by HOSTNAME is required if different hosts with different architectures share file system used for installation (e.g., daint and eiger on ALPS).
5174
5275

53-
# Examples of HPC setup installations on the ALPS supercomputer (CSCS)
76+
## Examples: HPC setup installations on the ALPS supercomputer (CSCS)
5477

5578
Examples of HPC setup installations are found in the folder `configs` of which two are featured in the following.
5679

57-
## Example 1: using Cray Programming Environment
80+
### Example 1: using Cray Programming Environment
81+
5882
```bash
5983
# Load required modules (including correct CPU and GPU target modules)
6084
module load cray
@@ -71,14 +95,15 @@ export JUHPC_MPI_EXEC="srun -C gpu"
7195
export JUHPC_HDF5_HOME=$HDF5_DIR
7296

7397
# Call JUHPC
74-
git clone https://github.com/JuliaParallel/JUHPC
75-
JUHPC=./JUHPC/src/juhpc
7698
JUHPC_SETUP_INSTALLDIR=$SCRATCH/../julia/${HOSTNAME%%-*}/juhpc_setup
7799
JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%-*}/juliaup"
78-
bash -l $JUHPC $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
100+
VERSION="v0.1.0"
101+
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
102+
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
79103
```
80104

81-
## Example 2: using UENV
105+
### Example 2: using UENV
106+
82107
```bash
83108
# UENV specific environment variables
84109
export ENV_MOUNT={{ env.mount }} # export ENV_MOUNT=/user-environment
@@ -96,18 +121,16 @@ export JUHPC_HDF5_HOME=$(spack -C $ENV_MOUNT/config location -i hdf5)
96121
export JUHPC_ADIOS2_HOME=$(spack -C $ENV_MOUNT/config location -i adios2)
97122

98123
# Call JUHPC
99-
JUHPC_DIR=$ENV_EXTRA/JUHPC
100-
git clone https://github.com/JuliaParallel/JUHPC $JUHPC_DIR
101-
JUHPC=$JUHPC_DIR/src/juhpc
102124
JUHPC_SETUP_INSTALLDIR=$ENV_MOUNT/juhpc_setup
103125
JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%-*}/juliaup"
104-
JUHPC_POST_INSTALL=$ENV_EXTRA/uenv_view.jl
105-
bash -l $JUHPC $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR $JUHPC_POST_INSTALL
126+
JUHPC_POST_INSTALL_JL=$ENV_EXTRA/uenv_view.jl
127+
VERSION="v0.1.0"
128+
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
129+
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR $JUHPC_POST_INSTALL_JL
106130
```
107131

108-
# Test of HPC setup installations
132+
### Test of example 1
109133

110-
## Test of example 1
111134
```bash
112135
#!/bin/bash
113136

@@ -124,13 +147,13 @@ module list
124147
# Activate the HPC setup environment variables
125148
. $JUHPC_SETUP_INSTALLDIR/activate
126149

127-
# Call juliaup to install juliaup and latest julia on scratch
150+
# Call Juliaup to install Juliaup and latest Julia on scratch
128151
juliaup
129152

130-
# Call juliaup to see its options
153+
# Call Juliaup to see its options
131154
juliaup
132155

133-
# Call julia Pkg
156+
# Call Julia Pkg
134157
julia -e 'using Pkg; Pkg.status()'
135158

136159
# Add CUDA.jl
@@ -147,20 +170,21 @@ cd ~/cudaaware
147170
MPICH_GPU_SUPPORT_ENABLED=1 srun -Acsstaff -C'gpu' -N2 -n2 julia cudaaware.jl
148171
```
149172

150-
## Test of example 2
173+
### Test of example 2
174+
151175
```bash
152176
#!/bin/bash
153177

154178
# Start uenv with the view equivalent to the activation script
155179
uenv start --view=julia julia
156180

157-
# Call juliaup to install juliaup and latest julia on scratch
158-
juliaup
181+
# Call Juliaup to install Juliaup and latest Julia on scratch
182+
Juliaup
159183

160-
# Call juliaup to see its options
184+
# Call Juliaup to see its options
161185
juliaup
162186

163-
# Call julia Pkg
187+
# Call Julia Pkg
164188
julia -e 'using Pkg; Pkg.status()'
165189

166190
# Add CUDA.jl
@@ -178,10 +202,17 @@ MPICH_GPU_SUPPORT_ENABLED=1 srun -Acsstaff -C'gpu' -N2 -n2 julia cudaaware.jl
178202
```
179203

180204

181-
# Contributors
205+
## Your contributions
206+
207+
Any contribution is valuable to the Julia HPC community:
208+
- contribute the HPC setup config file for your cluster or supercomputer in `configs` as an example for others;
209+
- open a PR with some enhancement or fix;
210+
- open an issue for a bug or an idea for enhancement.
211+
182212

183-
The initial version of JUHPC was contributed by Samuel Omlin, Swiss National Supercomputing Centre, ETH Zurich (@omlins). The following people have provided valuable contributions over the years in the effort of defining a suitable Julia HPC setup (this is based on the list found [here](https://github.com/hlrs-tasc/julia-on-hpc-systems); please add missing people or let us know):
213+
## Contributors
184214

215+
The initial version of JUHPC was contributed by Samuel Omlin, Swiss National Supercomputing Centre, ETH Zurich (@omlins). The following people have provided valuable contributions over the years in the effort of defining a suitable Julia HPC setup (this is based on the list found [here](https://github.com/hlrs-tasc/julia-on-hpc-systems); please add missing people or let us know; the list is ordered alphabetically):
185216
- Carsten Bauer (@carstenbauer)
186217
- Alexander Bills (@abillscmu)
187218
- Johannes Blaschke (@jblaschke)

configs/cscs/alps/gh200/craype_config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export JUHPC_HDF5_HOME=$HDF5_DIR
2424

2525

2626
# Call JUHPC
27-
git clone https://github.com/omlins/JUHPC
28-
JUHPC=./JUHPC/src/juhpc
2927
JUHPC_SETUP_INSTALLDIR=$SCRATCH/${HOSTNAME%%-*}/juhpc_setup
3028
JULIAUP_INSTALLDIR="\$SCRATCH/\${HOSTNAME%%-*}/juliaup"
31-
bash -l $JUHPC $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
29+
VERSION="v0.1.0"
30+
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
31+
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR

configs/cscs/alps/mc/craype_config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export JUHPC_HDF5_HOME=$HDF5_DIR
2121

2222

2323
# Call JUHPC
24-
git clone https://github.com/omlins/JUHPC
25-
JUHPC=./JUHPC/src/juhpc
2624
JUHPC_SETUP_INSTALLDIR=$SCRATCH/${HOSTNAME%%-*}/juhpc_setup
2725
JULIAUP_INSTALLDIR="\$SCRATCH/\${HOSTNAME%%-*}/juliaup"
28-
bash -l $JUHPC $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
26+
VERSION="v0.1.0"
27+
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
28+
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR

configs/cscs/daint/gpu/craype_config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ echo 'using Preferences
3434

3535

3636
# Call JUHPC
37-
git clone https://github.com/omlins/JUHPC
38-
JUHPC=./JUHPC/src/juhpc
3937
JUHPC_SETUP_INSTALLDIR=$SCRATCH/../julia/${HOSTNAME%%[0-9]*}-gpu/juhpc_setup
4038
JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%[0-9]*}-gpu/juliaup"
41-
bash -l $JUHPC $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR $JUHPC_POST_INSTALL_JL
39+
VERSION="v0.1.0"
40+
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

configs/cscs/daint/mc/craype_config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export JUHPC_HDF5_HOME=$HDF5_DIR
2121

2222

2323
# Call JUHPC
24-
git clone https://github.com/omlins/JUHPC
25-
JUHPC=./JUHPC/src/juhpc
2624
JUHPC_SETUP_INSTALLDIR=$SCRATCH/../julia/${HOSTNAME%%[0-9]*}-mc/juhpc_setup
2725
JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%[0-9]*}-mc/juliaup"
28-
bash -l $JUHPC $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR
26+
VERSION="v0.1.0"
27+
wget https://raw.githubusercontent.com/JuliaParallel/JUHPC/$VERSION/juhpc -O /tmp/juhpc
28+
bash -l /tmp/juhpc $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR

src/juhpc renamed to juhpc

File renamed without changes.

0 commit comments

Comments
 (0)