Update home authored by van Vliet's avatar van Vliet
......@@ -1029,6 +1029,80 @@ You can see from the output that we have **3 GPU's: Cuda devices: 0,1,2**
#### Compiling and running GPU programs
```
module purge
module add library/cuda/10.1/gcc.8.3.1
cd
git clone https://github.com/NVIDIA/cuda-samples.git
cd cuda-samples/Samples/UnifiedMemoryPerf/
make
cat gpu-test.slurm
#!/bin/bash
#
#SBATCH --partition=gpu
#SBATCH --gres=gpu:1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --time=3:00
module purge
module add library/cuda/10.2/gcc.8.3.1
hostname
echo "Cuda devices: $CUDA_VISIBLE_DEVICES"
$HOME/cuda-samples/Samples/UnifiedMemoryPerf/UnifiedMemoryPerf
[user@res-hpc-gpu01 GPU]$ nvidia-smi
Tue Apr 14 16:06:06 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.33.01 Driver Version: 440.33.01 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 TITAN Xp Off | 00000000:3B:00.0 Off | N/A |
| 17% 31C P0 61W / 250W | 0MiB / 12196MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 TITAN Xp Off | 00000000:AF:00.0 Off | N/A |
| 23% 34C P2 69W / 250W | 259MiB / 12196MiB | 2% Default |
+-------------------------------+----------------------+----------------------+
| 2 TITAN Xp Off | 00000000:D8:00.0 Off | N/A |
| 18% 31C P0 61W / 250W | 0MiB / 12196MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 1 29726 C ...les/UnifiedMemoryPerf/UnifiedMemoryPerf 145MiB |
+-----------------------------------------------------------------------------+
cat slurm-206625.out
res-hpc-gpu01.researchlumc.nl
Cuda devices: 0
GPU Device 0: "Pascal" with compute capability 6.1
Running ........................................................
Overall Time For matrixMultiplyPerf
Printing Average of 100 measurements in (ms)
Size_KB UMhint UMhntAs UMeasy 0Copy MemCopy CpAsync CpHpglk CpPglAs
4 10.879 23.178 0.222 0.014 0.031 0.026 0.035 0.026
16 10.657 25.849 0.580 0.030 0.051 0.046 0.052 0.039
64 21.117 37.351 0.852 0.103 0.124 0.116 0.095 0.081
256 21.184 38.074 1.387 0.587 0.450 0.415 0.313 0.302
1024 24.174 33.124 3.032 3.650 1.741 1.649 1.211 1.199
4096 21.668 35.167 11.067 25.803 7.119 7.104 5.329 5.333
16384 51.674 62.263 49.300 191.051 34.179 34.632 28.582 28.054
NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.
```
### Slurm Environment Variables
Available environment variables include:
......
......