mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-29 06:35:28 -04:00
grid: Fix bug in GPU integrate kernel for large basis sets
This commit is contained in:
parent
98d2d7a0dd
commit
c340a2d608
1 changed files with 3 additions and 1 deletions
|
|
@ -255,7 +255,9 @@ __device__ static void grid_to_cxyz(const kernel_params *params,
|
|||
// Add register values to coefficients stored in shared memory.
|
||||
#pragma unroll // avoid dynamic indexing of registers
|
||||
for (int i = 0; i < GRID_N_CXYZ_REGISTERS; i++) {
|
||||
atomicAddDouble(&cxyz[i + offset], cxyz_regs[i]);
|
||||
if (i + offset < ncoset(task->lp)) {
|
||||
atomicAddDouble(&cxyz[i + offset], cxyz_regs[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
__syncthreads(); // because of concurrent writes to cxyz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue