CUDA PME kernels with analytical Ewald correction
authorSzilard Pall <pszilard@cbr.su.se>
Tue, 12 Mar 2013 02:18:43 +0000 (03:18 +0100)
committerSzilard Pall <pszilard@cbr.su.se>
Wed, 17 Apr 2013 16:59:51 +0000 (18:59 +0200)
commit8b44f79a5288f5bc70af330d9e7fa79f45763889
treec7a4897694ebd81e8d9762229c04a1f55bfc3fb5
parentee89852a76209a19bacb4e74aada23d00b2db8ba
CUDA PME kernels with analytical Ewald correction

The analytical Ewald kernels have been used in the CPU SIMD kernels, but
due to CUDA compiler issues it has been difficult to determine in which
cases does this provide a performance advantage compared to the
tabulated kernels.Although the nvcc optimizations are rather unreliable,
on Kepler (SM 3.x) the analytical Ewald kernels are up to 5% faster, but
on Fermi (SM 2.x) 7% slower than the tabulated. Hence, this commit
enables the analytical kernels as default for Kepler GPUs, but keeps the
tabulated kernels as default on Fermi.

Note that the analytical Ewald correction is not implemented in the
legacy kernels as these are anyway only used on Fermi.

Additional minor change is the back-port of some variable (re)naming and
simple optimizations from the default to the legacy CUDA kernels which
give 2-3% performance improvement and better code readability.

Change-Id: Idd4659ef3805609356fe8865dc57fd19b0b614fe
src/mdlib/nbnxn_cuda/nbnxn_cuda.cu
src/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu
src/mdlib/nbnxn_cuda/nbnxn_cuda_kernel.cuh
src/mdlib/nbnxn_cuda/nbnxn_cuda_kernel_legacy.cuh
src/mdlib/nbnxn_cuda/nbnxn_cuda_kernel_utils.cuh
src/mdlib/nbnxn_cuda/nbnxn_cuda_kernels.cuh
src/mdlib/nbnxn_cuda/nbnxn_cuda_types.h