chibi@1604:~/NVIDIA_CUDA-10.2_Samples/5_Simulations/nbody$ cat /etc/os-release
NAME=”Ubuntu”
VERSION=”16.04.6 LTS (Xenial Xerus)”
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=”Ubuntu 16.04.6 LTS”
VERSION_ID=”16.04″
HOME_URL=”http://www.ubuntu.com/”
SUPPORT_URL=”http://help.ubuntu.com/”
BUG_REPORT_URL=”http://bugs.launchpad.net/ubuntu/”
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
chibi@1604:~/NVIDIA_CUDA-10.2_Samples/5_Simulations/nbody$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89
chibi@1604:~/NVIDIA_CUDA-10.2_Samples/5_Simulations/nbody$ ./nbody –benchmark –
-numbodies=256000 -numdevices=2
Run “nbody -benchmark [-numbodies=<numBodies>]” to measure performance.
-fullscreen (run n-body simulation in fullscreen mode)
-fp64 (use double precision floating point values for simulation)
-hostmem (stores simulation data in host memory)
-benchmark (run benchmark to measure performance)
-numbodies=<N> (number of bodies (>= 1) to run in simulation)
-device=<d> (where d=0,1,2…. for the CUDA device to use)
-numdevices=<i> (where i=(number of CUDA devices > 0) to use for simulation)
-compare (compares simulation results running once on the default GPU and once on the CPU)
-cpu (run n-body simulation on the CPU)
-tipsy=<file.bin> (load a tipsy model file for simulation)
NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.
number of CUDA devices = 2
> Windowed mode
> Simulation data stored in system memory
> Single precision floating point simulation
> 2 Devices used for simulation
GPU Device 0: “Volta” with compute capability 7.0
> Compute 7.0 CUDA device: [TITAN V]
> Compute 7.0 CUDA device: [TITAN V]
number of bodies = 256000
256000 bodies, total time for 10 iterations: 1042.558 ms
= 628.608 billion interactions per second
= 12572.154 single-precision GFLOP/s at 20 flops per interaction
chibi@1604:~/NVIDIA_CUDA-10.2_Samples/5_Simulations/nbody$ ./nbody -fp64 –bench
mark –numbodies=256000 -numdevices=2
Run “nbody -benchmark [-numbodies=<numBodies>]” to measure performance.
-fullscreen (run n-body simulation in fullscreen mode)
-fp64 (use double precision floating point values for simulation)
-hostmem (stores simulation data in host memory)
-benchmark (run benchmark to measure performance)
-numbodies=<N> (number of bodies (>= 1) to run in simulation)
-device=<d> (where d=0,1,2…. for the CUDA device to use)
-numdevices=<i> (where i=(number of CUDA devices > 0) to use for simulation)
-compare (compares simulation results running once on the default GPU and once on the CPU)
-cpu (run n-body simulation on the CPU)
-tipsy=<file.bin> (load a tipsy model file for simulation)
NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.
number of CUDA devices = 2
> Windowed mode
> Simulation data stored in system memory
> Double precision floating point simulation
> 2 Devices used for simulation
GPU Device 0: “Volta” with compute capability 7.0
Compute 7.0 CUDA device: [TITAN V]
> Compute 7.0 CUDA device: [TITAN V]
number of bodies = 256000
256000 bodies, total time for 10 iterations: 3589.571 ms
= 182.573 billion interactions per second
= 5477.201 double-precision GFLOP/s at 30 flops per interaction
chibi@1604:~/NVIDIA_CUDA-10.2_Samples/5_Simulations/nbody$