Skip to content

Instantly share code, notes, and snippets.

@Jokeren
Created August 26, 2019 03:55
Show Gist options
  • Save Jokeren/1af1ed415b8df3fce7e5e6783f83dada to your computer and use it in GitHub Desktop.
Save Jokeren/1af1ed415b8df3fce7e5e6783f83dada to your computer and use it in GitHub Desktop.
Install HPCToolkit on cori machines

Prepare environment

module swap PrgEnv-intel PrgEnv-gnu
module unload darshan

Install spack

  • spack configs
git clone https://github.com/jmellorcrummey/spack-configs.git
spack-configs/bin/spacklink -n spack nersc cori
  • spack
git clone https://github.com/spack/spack.git
export SPACK_ROOT=/path/to/spack
export PATH=${SPACK_ROOT}/bin:${PATH}
source ${SPACK_ROOT}/share/spack/setup-env.sh

Install hpctoolkit

  • hpctoolkit
git clone https://github.com/HPCToolkit/hpctoolkit.git
git checkout master-gpu
  • add the following configuration to /.spack/cray/compilers.yaml
- compiler:
    environment: {}
    extra_rpaths: []
    flags: {}
    implicit_rpaths: []
    modules:
    - PrgEnv-gnu
    - gcc/7.3.0
    - cray-mpich/7.7.6
    operating_system: sles15
    paths:
      cc: /opt/gcc/7.3.0/bin/gcc
      cxx: /opt/gcc/7.3.0/bin/g++
      f77: /opt/gcc/7.3.0/bin/gfortran
      fc: /opt/gcc/7.3.0/bin/gfortran
    spec: gcc@7.3.0
    target: x86_64
  • install
module load gcc/7.3.0
spack install --only dependencies hpctoolkit@gpu %gcc@7.3.0 arch=cray-fe-x86_64
cd /path/to/hpctoolkit
mkdir build && cd build
../configure --prefix=/path/to/hpctoolkit/install/prefix --with-cuda=/usr/common/software/cuda/10.1.168 --with-cupti=/usr/common/software/cuda/10.1.168/extras/CUPTI --with-spack=/path/to/spack-pkgs/cray-sles15-x86_64/gcc-7.3.0 MPICXX=CC --enable-all-static
make install -j16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment