Skip to content

Commit

Permalink
Fix all minor ususe with QMCkl CPU
Browse files Browse the repository at this point in the history
  • Loading branch information
addman2 committed Jan 25, 2024
1 parent 3ab4c45 commit c0a6f58
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
34 changes: 25 additions & 9 deletions src/c_adjoint_forward/compute_fast.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1307,22 +1307,22 @@ subroutine task2(kelind, rion, dist, kel, vpseudolocal, prefactor, ivic, tmu)
end subroutine task2

subroutine task4(kel, rion, dd, vju, winv, winvj)

use qmckl

implicit none

real*8, intent(in) :: kel(3, nel, 0:indt), rion(3, nion)
real*8, intent(inout) :: winv(ipc * nelorbh, 0:indt4, nel) &
real*8, intent(inout) :: winv(ipc * nelorbh, 0:indt4, nel)&
&, winvj(nelorbjmax, 0:indt4j, nel), dd(*), vju(*)

#ifdef _QMCKL
#ifdef _QMCKL
integer*4 :: ii, l
integer(qmckl_exit_code) :: rc
integer*8, save :: ao_num=0, npoints_qmckl=0
real*8, allocatable :: ao_vgl_qmckl(:,:,:)&
&, ao_value_qmckl(:,:)&
&, kel_tmp(:,:)
real*8, allocatable :: ao_vgl_qmckl(:,:,:) &
&, ao_value_qmckl(:,:) &
&, kel_tmp(:,:)
#endif

if(.not.yesupwf.and..not.yesupwfj) return
Expand Down Expand Up @@ -1429,7 +1429,23 @@ subroutine task4(kel, rion, dd, vju, winv, winvj)
#endif
end if
end if


if(nelorbj.ne.0.and.yesupwfj) then
! TODO: These loops can be merged
do j = 1, nelup
call upnewwf(indt, 0, indtm(j), 0, nshelljh, ioptorbj, ioccj, kel(1, j, 0)&
&, nel, r, rmu, vju, zeta, rion, psip, winvj(1, 0, j), nelorbj&
&, nion, kionj, iflagnorm, cnorm(nshell + 1), LBox, rmucos, rmusin, 1d-9&
&, indparj_tab, indorbj_tab, indshellj_tab, .true.)
end do
do j = nelup + 1, nel
call upnewwf(indt, 0, indtm(j), 0, nshelljh, ioptorbj, ioccj, kel(1, j, 0)&
&, nel, r, rmu, vju, zeta, rion, psip, winvj(1, 0, j), nelorbj&
&, nion, kionj, iflagnorm, cnorm(nshell + 1), LBox, rmucos, rmusin, 1d-9&
&, indparj_tab, indorbj_tab, indshellj_tab, .false.)
end do
end if

do j = nelup + 1, nel
if(yesupwf) then
call upnewwf(indt, 0, indtm(j), 0, nshelldoh, ioptorb, ioccdo, kel(1, j, 0)&
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ if(EXT_TOOLS AND EXT_QMC)
add_subdirectory(test_MD_classical_vmc)
add_subdirectory(test_MD_quantum_vmc)

#add_subdirectory(test_setup_qmckl)
add_subdirectory(test_setup_qmckl)

######################################################################

Expand Down

0 comments on commit c0a6f58

Please sign in to comment.