Only accept CUDA 9.0 for the WellContributions kernel. Also removed unused variables

This commit is contained in:
T.D. (Tongdong) Qiu 2020-03-19 11:46:57 +01:00
parent 8223cd1db8
commit 04fe46a9da
2 changed files with 2 additions and 3 deletions

View File

@ -46,7 +46,8 @@ if(NOT CMAKE_DISABLE_FIND_PACKAGE_CUDA AND
# While the documentation says that it is deprecated, FindCUDA seems the
# only easy way to determine the cublas and cusparse libraries.
# Hence we call it unconditionally
find_package(CUDA)
# The WellContributions kernel uses __shfl_down_sync, which was introduced in CUDA 9.0
find_package(CUDA 9.0)
endif()
if(CUDA_FOUND)

View File

@ -50,7 +50,6 @@ namespace Opm
{
const int idx_b = blockIdx.x;
const int idx_t = threadIdx.x;
int idx = idx_b * blockDim.x + idx_t;
const unsigned int val_size = val_pointers[idx_b+1] - val_pointers[idx_b];
const int vals_per_block = dim * dim_wells; // 12
@ -59,7 +58,6 @@ namespace Opm
const int lane = idx_t % 32;
const int c = lane % dim; // col in block
const int r = (lane / dim) % dim_wells; // row in block
const int NUM_THREADS = gridDim.x * blockDim.x;
extern __shared__ double smem[];
double * __restrict__ z1 = smem;