Skip to content

Commit

Permalink
Reset changes and match upstream/master.
Browse files Browse the repository at this point in the history
  • Loading branch information
hfp committed Feb 29, 2024
1 parent 5f5994a commit f5cf16e
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 29 deletions.
32 changes: 16 additions & 16 deletions src/eri_mme/eri_mme_lattice_summation.F
Original file line number Diff line number Diff line change
Expand Up @@ -759,23 +759,23 @@ SUBROUTINE pgf_sum_3c_1d(S_G, RA, RB, RC, zeta, zetb, zetc, a_mm, lgth, R_bounds
CALL pgf_sum_3c_rspace_1d_generic(S_G, RA, RB, RC, zeta, zetb, zetc, a_mm, lgth, R_bounds_3)
ELSE
#:for l_max in range(0,lmax_unroll+1)
IF (l_max == ${l_max}$) THEN
#:for m_max in range(0,lmax_unroll+1)
IF (m_max == ${m_max}$) THEN
#:for n_max in range(0, lmax_unroll+1)
IF (n_max == ${n_max}$) THEN
#:for prop_exp in range(0,2)
IF (prop_exp == ${prop_exp}$) THEN
CALL pgf_sum_3c_rspace_1d_${l_max}$_${m_max}$_${n_max}$_exp_${prop_exp}$ (S_G, RA, RB, RC, &
IF (l_max == ${l_max}$) THEN
#:for m_max in range(0,lmax_unroll+1)
IF (m_max == ${m_max}$) THEN
#:for n_max in range(0, lmax_unroll+1)
IF (n_max == ${n_max}$) THEN
#:for prop_exp in range(0,2)
IF (prop_exp == ${prop_exp}$) THEN
CALL pgf_sum_3c_rspace_1d_${l_max}$_${m_max}$_${n_max}$_exp_${prop_exp}$ (S_G, RA, RB, RC, &
zeta, zetb, zetc, a_mm, lgth, R_bounds_3)
RETURN
END IF
#:endfor
END IF
#:endfor
END IF
#:endfor
END IF
RETURN
END IF
#:endfor
END IF
#:endfor
END IF
#:endfor
END IF
#:endfor
END IF

Expand Down
16 changes: 8 additions & 8 deletions src/ewalds_multipole_sr.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -1108,14 +1108,14 @@
energy = energy + eloc
#:endif
#:if store_forces
IF (do_forces) THEN
forces(1, atom_a) = forces(1, atom_a) - fr(1)
forces(2, atom_a) = forces(2, atom_a) - fr(2)
forces(3, atom_a) = forces(3, atom_a) - fr(3)
forces(1, atom_b) = forces(1, atom_b) + fr(1)
forces(2, atom_b) = forces(2, atom_b) + fr(2)
forces(3, atom_b) = forces(3, atom_b) + fr(3)
END IF
IF (do_forces) THEN
forces(1, atom_a) = forces(1, atom_a) - fr(1)
forces(2, atom_a) = forces(2, atom_a) - fr(2)
forces(3, atom_a) = forces(3, atom_a) - fr(3)
forces(1, atom_b) = forces(1, atom_b) + fr(1)
forces(2, atom_b) = forces(2, atom_b) + fr(2)
forces(3, atom_b) = forces(3, atom_b) + fr(3)
END IF
#:endif
! Electric fields
IF (do_efield) THEN
Expand Down
4 changes: 1 addition & 3 deletions src/grid/dgemm/grid_dgemm_tensor_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ static inline void initialize_tensor(struct tensor_ *a, const int dim,
const int *const sizes) {
if (a == NULL)
return;
#if !defined(NDEBUG)
memset(a, 0, sizeof(*a));
#endif

a->dim_ = dim;
for (int d = 0; d < dim; d++)
a->size[d] = sizes[d];
Expand Down
2 changes: 0 additions & 2 deletions src/grid/ref/grid_ref_collint.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ ortho_cx_to_grid(const int lp, const int k1, const int k2, const int j1,
#if (GRID_DO_COLLOCATE)
// collocate
double reg[4] = {0.0, 0.0, 0.0, 0.0};
#pragma omp simd reduction(+ : reg)
for (int lxp = 0; lxp <= lp; lxp++) {
const double p = pol[0][lxp][i + cmax];
reg[0] += cx[lxp * 4 + 0] * p;
Expand All @@ -82,7 +81,6 @@ ortho_cx_to_grid(const int lp, const int k1, const int k2, const int j1,
#else
// integrate
const double reg[4] = {*grid_0, *grid_1, *grid_2, *grid_3};
#pragma omp simd
for (int lxp = 0; lxp <= lp; lxp++) {
const double p = pol[0][lxp][i + cmax];
cx[lxp * 4 + 0] += reg[0] * p;
Expand Down
4 changes: 4 additions & 0 deletions src/pw/realspace_grid_types.F
Original file line number Diff line number Diff line change
Expand Up @@ -1916,13 +1916,17 @@ SUBROUTINE rs_grid_zero(rs)
CALL timeset(routineN, handle)
l(1) = LBOUND(rs%r, 1); l(2) = LBOUND(rs%r, 2); l(3) = LBOUND(rs%r, 3)
u(1) = UBOUND(rs%r, 1); u(2) = UBOUND(rs%r, 2); u(3) = UBOUND(rs%r, 3)
!$OMP PARALLEL DO DEFAULT(NONE) COLLAPSE(3) &
!$OMP PRIVATE(i,j,k) &
!$OMP SHARED(rs,l,u)
DO k = l(3), u(3)
DO j = l(2), u(2)
DO i = l(1), u(1)
rs%r(i, j, k) = 0.0_dp
END DO
END DO
END DO
!$OMP END PARALLEL DO
CALL timestop(handle)
END SUBROUTINE rs_grid_zero
Expand Down

0 comments on commit f5cf16e

Please sign in to comment.