You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is already a for_each on all particles. A parallel for each can be used.
For force assignment (read from lattice, write to particle) the calculations are independent for each particle.
for charge assignment (particle to mesh), atomic adds have to be used when writing to the mesh, as several particles can contribute to the same mesh sites
A parallel FFT implementation has to be wrapped in a sub-class of FFTBackend
Currently, the data type of the meshes (e.g. res_mesh) is hard-coded in the FFTBackend class. This might have to be revisited.
K-Space calculations
@jngrad has introduced a for_each_3d algorithm for the lattice loops.
To my understanding, the iterations (i.e., calculations for different k-vectors) are independent from each other, so parallelization can be achieved by writing a Kokkos aware for_each_3d (if it not already exists in Kokkos)
Discussion elsewhere: to parallelize the loops, the meshes would have to be represented as Kokkos views.
I looked into this, briefly.
To bring this in iteratlively, one could begin by creating a Kokkos unmanaged view which points to the memory of the meshes.
In this way, Kokkos parallel loops can be leveraged immediately, and the underlying storage can be replaced separately.
Charge/force assignment
Parallel FFT
FFTBackend
res_mesh
) is hard-coded in theFFTBackend
class. This might have to be revisited.K-Space calculations
The text was updated successfully, but these errors were encountered: