Require padded atom data for PME GPU
authorMark Abraham <mark.j.abraham@gmail.com>
Fri, 6 Mar 2020 19:43:01 +0000 (20:43 +0100)
committerArtem Zhmurov <zhmurov@gmail.com>
Fri, 13 Mar 2020 09:35:09 +0000 (10:35 +0100)
commitfa5c870e5b46a9e965559316e867278fa7fb5090
treed7995d96bab0b066ec938f3c40b0407245fc45af
parente3d904d007afc9545f95d72da51c7dc8d83dae54
Require padded atom data for PME GPU

The unpadded case doesn't work and is hard-coded not to run, so we
should remove it.

The constant c_usePadding has been true ever since
379b2954fd3efbd1b2c724964932c2ef03078939 introduced it in 2016. This
piece of unecessary complexity probably comes from prior introduction
of the optimization of padding the atom data arrays so that
device-side loads don't have to check boundaries. That's unlikely to
ever change again, and is unused, untested, and poorly
understood. (It's also currently broken - if c_usePadding == false
would be attempted, it would lead to the alignment getter returning
zero that would be used as a divisor, ie. is broken.)

In some places the words alignment and padding were used
interchangeably, which is confusing and fixed. Now code refers to
block size and that it set the minimum divisor for the memory
allocation. Padding size is a misnomer, because the size of the
padding can be interpreted as the number of the extra array elements.

The resulting code is a bit simpler and easier to understand

Change-Id: I51a28c1c722e3ee5a9f3e1787892d81cb9df00fb
21 files changed:
src/gromacs/ewald/CMakeLists.txt
src/gromacs/ewald/pme.h
src/gromacs/ewald/pme_gather.clh
src/gromacs/ewald/pme_gather.cu
src/gromacs/ewald/pme_gpu.cpp
src/gromacs/ewald/pme_gpu_calculate_splines.clh
src/gromacs/ewald/pme_gpu_calculate_splines.cuh
src/gromacs/ewald/pme_gpu_constants.h
src/gromacs/ewald/pme_gpu_internal.cpp
src/gromacs/ewald/pme_gpu_internal.h
src/gromacs/ewald/pme_gpu_program_impl_ocl.cpp
src/gromacs/ewald/pme_gpu_types_host.h
src/gromacs/ewald/pme_only.cpp
src/gromacs/ewald/pme_spread.clh
src/gromacs/ewald/pme_spread.cu
src/gromacs/ewald/tests/pmetestcommon.cpp
src/gromacs/mdrun/runner.cpp
src/gromacs/mdtypes/state_propagator_data_gpu.h
src/gromacs/mdtypes/state_propagator_data_gpu_impl.cpp
src/gromacs/mdtypes/state_propagator_data_gpu_impl.h
src/gromacs/mdtypes/state_propagator_data_gpu_impl_gpu.cpp