GVProf的安装

GVProf 官方安装教程 https://gvprof.readthedocs.io/en/latest/install.html
本博客对它做出解释

不要选择一次性安装,可能会出现不可预知的错误。

1. 下载源码

git clone --recursive https://github.com/GVProf/GVProf.git

子项目可能下载不下来,可以手动下载

2. GPU Patch

cd GVProf
make PREFIX=/path/to/gpu-patch/installation SANITIZER_PATH=/usr/local/cuda/compute-sanitizer/ install

/path/to/是到gpu-patch的路径,可以改成./gpu-patch/···
compute-sanitizer是一个文件夹

如果是在cuda-11.0上安装GVProf可以改成以下:

cd GVProf
make PREFIX=./gpu-patch/installation SANITIZER_PATH=/usr/local/cuda-11.0/Sanitizer/ install

安装时如果发生nvcc fatal : Unsupported gpu architecture 'compute_85'等错误,是由于gpu型号不匹配,可以在文件夹下的Makefile文件修改ARCHS := 50 60 70 72 75 80 85把自己型号的GPU后面的数字删去即可
参照:https://www.cnblogs.com/phillee/p/12049208.html

3. Dependencies

spack

git clone https://github.com/spack/spack.git
export SPACK_ROOT=/path/to/spack
source ${SPACK_ROOT}/share/spack/setup-env.sh

也可以找到文件运行source setup-env.sh

required packages

spack spec hpctoolkit
spack install --only dependencies hpctoolkit ^dyninst@master
# XXX(Keren): Temporary workaround until new hpctoolkit is merged
spack install libmonitor@master +dlopen +hpctoolkit

4. Redshow

cd redshow
# Tip: get boost libarary path 'spack find --path' and append include to that path
make install -j8 PREFIX=/path/to/redshow/installation BOOST_DIR=/path/to/boost/installation GPU_PATH_DIR=/path/to/gpu-patch/installation
# Useful options:
# make DEBUG=1
# make OPENMP=1

PREFIX是安装路径/path/to要改成redshow所在路径
BOOST_DIRboost的路径,运行spack find --path会显示boost路径
GPU_PATH_DIR是第2步生成的文件夹gpu-patch

例如:

make install -j8 PREFIX=/home/syt/GVProf/redshow/installation BOOST_DIR=/home/syt/GVProf/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/boost/installation GPU_PATH_DIR=/home/syt/GVProf/gpu-patch/installation/

5. HPCToolkit

profilinf substrates

cd /path/to/hpctoolkit
mkdir build && cd build
# Tip: check spack libraries' root->spack find --path.  
# For example: --with-spack=/home/username/spack/opt/spack/linux-ubuntu18.04-zen/gcc-7.4.0/
../configure --prefix=/path/to/hpctoolkit/installation --with-cuda=/usr/local/cuda-11.0 --with-sanitizer=/path/to/sanitizer --with-gpu-patch=/path/to/gpu-patch/installation --with-redshow=/path/to/redshow/installation --with-spack=/path/to/spack/libraries/root --with(我怀疑多了个with)
make install -j8

--with-spack=可以运行spack find --path,把前面的复制过来

例如:

../configure --prefix=/home/syt/GVProf/hpctoolkit/installation --with-cuda=/usr/local/cuda-11.0 --with-sanitizer=/usr/local/cuda-11.0/Sanitizer --with-gpu-patch=/home/syt/GVProf/gpu-patch/installation --with-redshow=/home/syt/GVProf/redshow/installation --with-spack=/home/syt/GVProf/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/::;;
;
上一篇:MySQL Installation(2021)|How to Install MySQL on Windows 10 | 在WIN10上如何安装MYSQL


下一篇:在linux上安装cuda的时候报错:Existing package manager installation of the driver found.