mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 03:23:29 +01:00
Less memory with QMCkl Jastrow
This commit is contained in:
parent
145e18f394
commit
6ad2dd668f
@ -121,8 +121,11 @@
|
|||||||
double precision :: f
|
double precision :: f
|
||||||
f = 1.d0 / dble(elec_num - 1)
|
f = 1.d0 / dble(elec_num - 1)
|
||||||
|
|
||||||
integer*8 :: n_points, k
|
integer*8 :: n_points, n_points_max, k
|
||||||
n_points = n_points_extra_final_grid * n_points_final_grid
|
integer :: ipoint_block, ipoint_end
|
||||||
|
|
||||||
|
n_points_max = n_points_extra_final_grid * n_points_final_grid
|
||||||
|
n_points = 100_8*n_points_extra_final_grid
|
||||||
|
|
||||||
double precision, allocatable :: rij(:,:,:)
|
double precision, allocatable :: rij(:,:,:)
|
||||||
allocate( rij(3, 2, n_points) )
|
allocate( rij(3, 2, n_points) )
|
||||||
@ -131,10 +134,14 @@
|
|||||||
integer(qmckl_exit_code) :: rc
|
integer(qmckl_exit_code) :: rc
|
||||||
|
|
||||||
double precision, allocatable :: gl(:,:,:)
|
double precision, allocatable :: gl(:,:,:)
|
||||||
|
|
||||||
allocate( gl(2,4,n_points) )
|
allocate( gl(2,4,n_points) )
|
||||||
|
|
||||||
|
do ipoint_block = 1, n_points_final_grid, 100 ! r1
|
||||||
|
ipoint_end = min(n_points_final_grid, ipoint_block+100)
|
||||||
|
|
||||||
k=0
|
k=0
|
||||||
do ipoint = 1, n_points_final_grid ! r1
|
do ipoint = ipoint_block, ipoint_end
|
||||||
do jpoint = 1, n_points_extra_final_grid ! r2
|
do jpoint = 1, n_points_extra_final_grid ! r2
|
||||||
k=k+1
|
k=k+1
|
||||||
rij(1:3, 1, k) = final_grid_points (1:3, ipoint)
|
rij(1:3, 1, k) = final_grid_points (1:3, ipoint)
|
||||||
@ -142,7 +149,6 @@
|
|||||||
end do
|
end do
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
|
||||||
rc = qmckl_set_electron_coord(qmckl_ctx_jastrow, 'N', n_points, rij, n_points*6_8)
|
rc = qmckl_set_electron_coord(qmckl_ctx_jastrow, 'N', n_points, rij, n_points*6_8)
|
||||||
if (rc /= QMCKL_SUCCESS) then
|
if (rc /= QMCKL_SUCCESS) then
|
||||||
print *, irp_here, 'qmckl error in set_electron_coord'
|
print *, irp_here, 'qmckl error in set_electron_coord'
|
||||||
@ -150,7 +156,6 @@
|
|||||||
stop -1
|
stop -1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
! ---
|
! ---
|
||||||
! e-e term
|
! e-e term
|
||||||
|
|
||||||
@ -162,7 +167,7 @@
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
k=0
|
k=0
|
||||||
do ipoint = 1, n_points_final_grid ! r1
|
do ipoint = ipoint_block, ipoint_end
|
||||||
do jpoint = 1, n_points_extra_final_grid ! r2
|
do jpoint = 1, n_points_extra_final_grid ! r2
|
||||||
k=k+1
|
k=k+1
|
||||||
grad1_u12_num(jpoint,ipoint,1) = gl(1,1,k)
|
grad1_u12_num(jpoint,ipoint,1) = gl(1,1,k)
|
||||||
@ -202,15 +207,13 @@
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
k=0
|
k=0
|
||||||
do ipoint = 1, n_points_final_grid ! r1
|
do ipoint = ipoint_block, ipoint_end ! r1
|
||||||
do jpoint = 1, n_points_extra_final_grid ! r2
|
do jpoint = 1, n_points_extra_final_grid ! r2
|
||||||
k = k+1
|
k = k+1
|
||||||
grad1_u12_num(jpoint,ipoint,1) = grad1_u12_num(jpoint,ipoint,1) + f * gl(1,1,k)
|
grad1_u12_num(jpoint,ipoint,1) = grad1_u12_num(jpoint,ipoint,1) + f * gl(1,1,k)
|
||||||
grad1_u12_num(jpoint,ipoint,2) = grad1_u12_num(jpoint,ipoint,2) + f * gl(1,2,k)
|
grad1_u12_num(jpoint,ipoint,2) = grad1_u12_num(jpoint,ipoint,2) + f * gl(1,2,k)
|
||||||
grad1_u12_num(jpoint,ipoint,3) = grad1_u12_num(jpoint,ipoint,3) + f * gl(1,3,k)
|
grad1_u12_num(jpoint,ipoint,3) = grad1_u12_num(jpoint,ipoint,3) + f * gl(1,3,k)
|
||||||
enddo
|
|
||||||
|
|
||||||
do jpoint = 1, n_points_extra_final_grid ! r2
|
|
||||||
dx = grad1_u12_num(jpoint,ipoint,1)
|
dx = grad1_u12_num(jpoint,ipoint,1)
|
||||||
dy = grad1_u12_num(jpoint,ipoint,2)
|
dy = grad1_u12_num(jpoint,ipoint,2)
|
||||||
dz = grad1_u12_num(jpoint,ipoint,3)
|
dz = grad1_u12_num(jpoint,ipoint,3)
|
||||||
@ -218,6 +221,10 @@
|
|||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
enddo !ipoint_block
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
deallocate(gl, rij)
|
deallocate(gl, rij)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user