tslight rearranging of output - sphere - GPU-based 3D discrete element method a… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit a3f8391f6d7702842e46e8ead63ad008d89106f3 | |
parent f924918c5ac9717d5ebc6cb8143e854c7c445e95 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Mon, 30 Jun 2014 10:18:23 +0200 | |
slight rearranging of output | |
Diffstat: | |
M src/device.cu | 13 ++++++++----- | |
1 file changed, 8 insertions(+), 5 deletions(-) | |
--- | |
diff --git a/src/device.cu b/src/device.cu | |
t@@ -89,7 +89,8 @@ __host__ void DEM::initializeGPU(void) | |
cudaDriverGetVersion(&cudaDriverVersion); | |
cudaRuntimeGetVersion(&cudaRuntimeVersion); | |
- ncudacores = prop.multiProcessorCount*cudaCoresPerSM(prop.major, prop.… | |
+ ncudacores = prop.multiProcessorCount | |
+ *cudaCoresPerSM(prop.major, prop.minor); | |
if (ncudacores > max_ncudacores) { | |
max_ncudacores = ncudacores; | |
cudadevice = d; | |
t@@ -106,10 +107,12 @@ __host__ void DEM::initializeGPU(void) | |
} | |
} | |
- // Comment following line when using a system only containing exclusive mo… | |
- // GPUs | |
- cout << " Using CUDA device ID " << cudadevice << '.' << std::endl; | |
- cudaChooseDevice(&cudadevice, &prop); | |
+ cout << " Using CUDA device ID " << cudadevice << " with " | |
+ << max_ncudacores << " cores." << std::endl; | |
+ | |
+ // Comment following line when using a system only containing | |
+ // exclusive mode GPUs | |
+ cudaChooseDevice(&cudadevice, &prop); | |
checkForCudaErrors("While initializing CUDA device"); | |
} |