1.安装cuda
wget https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.105_418.39_linux.run
sudo bash cuda_10.1.105_418.39_linux.run --silent --samples --toolkit
echo 'export PATH=$PATH:/usr/local/cuda/bin' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib64' >>~/.bashrc
source ~/.bashrc
2.测试cuda
~/NVIDIA_CUDA-10.1_Samples/5_Simulations/nbody
./nbody -benchmark -device=0 -numbodies=1000192