From: Szilárd Páll Date: Tue, 9 Sep 2014 21:35:26 +0000 (+0200) Subject: Fix malformed CUDA version macro check X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?p=alexxy%2Fgromacs.git;a=commitdiff_plain;h=89fae8d67c27af46c6336e1e6c1716a60b5bf0bf Fix malformed CUDA version macro check The CUDA_VERSION macro check is incorrect in two places. The first is harmless as it is related to legacy CUDA 3.2 version's reporting. The second occurrence affects the check that enables stream priorities and due to the incorrect check, with CUDA 5.5 priorities have not been used. Fixes #1594 Change-Id: Icf781d41549c39b6b913c11bb11d4dc4e9f3be9c --- diff --git a/src/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu b/src/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu index 087b760927..a35bfedb81 100644 --- a/src/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu +++ b/src/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu @@ -458,7 +458,7 @@ static int pick_nbnxn_kernel_version(FILE *fplog, } bCUDA32 = bCUDA40 = false; -#if CUDA_VERSION == 3200 +#if CUDA_VERSION == 3020 bCUDA32 = true; sprintf(sbuf, "3.2"); #elif CUDA_VERSION == 4000 @@ -556,7 +556,7 @@ void nbnxn_cuda_init(FILE *fplog, * priorities, because we are querying the priority range which in this * case will be a single value. */ -#if CUDA_VERSION >= 5500 +#if CUDA_VERSION >= 5050 { int highest_priority; stat = cudaDeviceGetStreamPriorityRange(NULL, &highest_priority);