|
| 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:mc, Swiss National Supercomputing Centre (CSCS) |
| 7 | +# Base: craype |
| 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-mc |
| 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, HDF5.jl and ADIOS2.jl) |
| 18 | +export JUHPC_CUDA_HOME= # Used for CUDA.jl runtime discovery (set as CUDA_HOME in the activate script). |
| 19 | +export JUHPC_CUDA_RUNTIME_VERSION=$CRAY_CUDATOOLKIT_VERSION # Used for CUDA.jl runtime version definition (set in preferences). |
| 20 | +export JUHPC_ROCM_HOME= # Used for AMDGPU.jl runtime discovery (set as ROCM_PATH in the activate script). |
| 21 | +export JUHPC_MPI_HOME=$MPICH_DIR # Used for MPI.jl system binary discovery (set in preferences). |
| 22 | +export JUHPC_MPI_VENDOR= # Used for MPI.jl system binary discovery (used to set preferences). |
| 23 | +export JUHPC_MPI_EXEC="srun -C mc" # Used for MPI.jl exec command discovery (set in preferences). Arguments are space separated, e.g. "srun -C mc". |
| 24 | +export JUHPC_HDF5_HOME=$HDF5_DIR # Used for HDF5.jl library discovery (set in preferences). |
| 25 | +export JUHPC_ADIOS2_HOME= # Used for ADIOS2.jl library discovery (set as JULIA_ADIOS2_PATH in the activate script). |
| 26 | + |
| 27 | + |
| 28 | +# Call JUHPC |
| 29 | +git clone https://github.com/omlins/JUHPC |
| 30 | +JUHPC=./JUHPC/src/juhpc |
| 31 | +JUHPC_SETUP_INSTALLDIR=$SCRATCH/../julia/${HOSTNAME%%[0-9]*}-mc/juhpc_setup # HPC setup installation environment variables must be expanded during installation. |
| 32 | +JULIAUP_INSTALLDIR="\$SCRATCH/../julia/\$USER/\${HOSTNAME%%[0-9]*}-mc/juliaup" # User environment variables SCRATCH and HOSTNAME must not be expanded HPC setup installation, but during usage. Separate installation by HOSTNAME is required, because different hosts with different architectures can share the same file system (e.g., daint and eiger on ALPS). |
| 33 | +bash -l $JUHPC $JUHPC_SETUP_INSTALLDIR $JULIAUP_INSTALLDIR |
| 34 | + |
| 35 | + |
| 36 | +# Activate the HPC setup environment variables |
| 37 | +. $JUHPC_SETUP_INSTALLDIR/activate |
| 38 | + |
| 39 | +# Call juliaup to install juliaup and latest julia on scratch |
| 40 | +juliaup |
| 41 | + |
| 42 | +# Call juliaup to see its options |
| 43 | +juliaup |
| 44 | + |
| 45 | +# Call julia Pkg |
| 46 | +julia -e 'using Pkg; Pkg.status()' |
| 47 | + |
| 48 | +# Add MPI.jl |
| 49 | +julia -e 'using Pkg; Pkg.add("MPI"); using MPI; MPI.versioninfo()' |
| 50 | + |
| 51 | +# Add HDF5.jl |
| 52 | +julia -e 'using Pkg; Pkg.add("HDF5"); using HDF5; @show HDF5.has_parallel()' |
0 commit comments