Skip to content

Commit

Permalink
Speed-up Coulomb electrostatic with collapse statement
Browse files Browse the repository at this point in the history
Signed-off-by: Igor S. Gerasimov <[email protected]>
  • Loading branch information
foxtran committed Feb 5, 2025
1 parent 0e8059a commit 5779127
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/coulomb/klopmanohno.f90
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,13 @@ subroutine getCoulombDerivsCluster(mol, itbl, gamAverage, gExp, hardness, &

!$omp parallel do default(none) reduction(+:djdr, djdtr, djdL) &
!$omp shared(mol, itbl, qvec, gExp, hardness) &
!$omp private(iat, jat, ish, jsh, ii, jj, iid, jid, r1, g1, gij, vec, dG, dS)
!$omp private(iat, jat, ish, jsh, ii, jj, iid, jid, r1, g1, gij, vec, dG, dS) &
!$omp collapse(2) schedule(dynamic,32)
do iat = 1, len(mol)
ii = itbl(1, iat)
iid = mol%id(iat)
do jat = 1, iat-1
do jat = 1, len(mol)
if (jat >= iat) cycle
ii = itbl(1, iat)
iid = mol%id(iat)
jj = itbl(1, jat)
jid = mol%id(jat)
vec(:) = mol%xyz(:, jat) - mol%xyz(:, iat)
Expand Down

0 comments on commit 5779127

Please sign in to comment.