Skip to content

Commit

Permalink
resolve debug mode errors (#907)
Browse files Browse the repository at this point in the history
Signed-off-by: albert <92109627+Albkat@users.noreply.github.com>
  • Loading branch information
Albkat authored Nov 22, 2023
1 parent d7cadbf commit 9a76e94
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/disp/dftd4.F90
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ subroutine disppot(dispm,nat,ndim,at,itbl,q,g_a,g_c,wdispmat,gw,hdisp)
!$acc loop gang private(k, ati)
#else
!$omp parallel do reduction(+:hdisp) shared(itbl, at, dumvec, zerovec) &
!$omp private(ati, ii)
!$omp private(ati, ii, k)
#endif
do iat = 1, nat
k = itbl(iat)
Expand Down
27 changes: 10 additions & 17 deletions src/oniom.f90
Original file line number Diff line number Diff line change
Expand Up @@ -673,31 +673,24 @@ subroutine cutbond(self, env, mol, chk, topo, inner_mol, jacobian, idx2)

! divide initial mol into inner and outer regions !
do i = 1, mol%n
if (i==self%idx(in_itr)) then

if (in_itr > in) then
call env%error("The internal error, inconsistent molecular dimensionality", source=source)
return
if (in_itr <= size(self%idx)) then
if (i==self%idx(in_itr)) then
at(in_itr) = mol%at(i)
xyz(:, in_itr) = mol%xyz(:, i)
in_itr = in_itr + 1
else
at_out(out_itr) = mol%at(i)
xyz_out(:, out_itr) = mol%xyz(:, i)
out_itr = out_itr + 1
endif

at(in_itr) = mol%at(i)
xyz(:, in_itr) = mol%xyz(:, i)
in_itr = in_itr + 1

else

if (out_itr > out) then
call env%error("The internal error, inconsistent molecular dimensionality", source=source)
return
endif

at_out(out_itr) = mol%at(i)
xyz_out(:, out_itr) = mol%xyz(:, i)
out_itr = out_itr + 1

endif
enddo


! initialiaze jacobian as identity !
call create_jacobian(jacobian,at)

Expand Down
7 changes: 3 additions & 4 deletions src/type/molecule.f90
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,10 @@ subroutine initMolecule &
nAt = min(size(at, dim=1), size(xyz, dim=2), size(sym, dim=1))

call mol%allocate(nAt)


mol%lattice = 0.0_wp
if (present(lattice)) then
mol%lattice = lattice
else
mol%lattice = 0.0_wp
if (size(lattice).ne.0) mol%lattice = lattice
end if

if (present(pbc)) then
Expand Down

0 comments on commit 9a76e94

Please sign in to comment.