精简版指导
lspci | grep -i nvidia
lspci -s 4f:00.0 -vvv
适用版本
cuda_11.8.0_520.61.05_linux.run
cuda-samples-11.8.tar.gz
NVIDIA-Linux-x86_64-525.116.04.run
安装: ./NVIDIA-Linux-x86_64-525.116.04.run
查看是否为一拖八:nvidia-smi topo -m
禁用nouveau
lsmod |grep -i nouveau
rmmod nouveau
安装cuda:./cuda_11.8.0_520.61.05_linux.run
vi ~/.bashrc
最后添加两行环境后,保存退出 执行source ~/.bashrc
export PATH=/usr/local/cuda-11.8/bin/: P A T H e x p o r t L D L I B R A R Y P A T H = / u s r / l o c a l / c u d a − 11.8 / l i b 64 : PATH export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64: PATHexportLDLIBRARYPATH=/usr/local/cuda−11.8/lib64:LD_LIBRARY_PATH
下载shoc-master.zip,传到服务器上,
解压:unzip shoc-master.zip
cd shoc-master
yum install -y libstdc++.so.6
./configure CUDA_CPPFLAGS=“-gencode=arch=compute_86,code=sm_86” CXXFLAGS=" -g -O2 -L/usr/local/cuda/lib64 -lcudart -lcuda" --host=x86_64,注:红色字体需根据下表的型号调整,无<>。
编译:make install -j 40
执行测试:./bin/shocdriver -s 4 -cuda -d 0
cd /
./stream_test
cd /usr/local/cuda-11.8/extras/demo_suite/
./bandwidthTest
卸载cuda指导:此步无需操作
cd /usr/local/cuda/bin
./cuda-uninstall
enter勾选所有
点最下面的uninstall