10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-02 11:25:26 +02:00

Better scaling of Davidson

This commit is contained in:
Anthony Scemama 2018-10-03 22:44:26 +02:00
parent d3c74ae300
commit c688c057a8
3 changed files with 9 additions and 11 deletions

View File

@ -17,14 +17,9 @@ END_PROVIDER
e = elec_num - n_core_orb * 2
pt2_n_tasks_max = 1 + min((e*(e-1))/2, int(dsqrt(dble(N_det_generators)))/10)
do i=1,N_det_generators
if (maxval(dabs(psi_coef_sorted_gen(i,1:N_states))) > 0.01d0) then
pt2_F(i) = pt2_n_tasks_max
else
pt2_F(i) = 1
endif
pt2_F(i) = 1 + dble(pt2_n_tasks_max)*maxval(dsqrt(dabs(psi_coef_sorted_gen(i,1:N_states))))
enddo
if(N_det_generators < 128) then
pt2_minDetInFirstTeeth = 1
pt2_N_teeth = 1

View File

@ -129,8 +129,11 @@ subroutine davidson_slave_work(zmq_to_qp_run_socket, zmq_socket_push, N_st, sze,
endif
if(task_id == 0) exit
read (msg,*) imin, imax, ishift, istep
v_t = 0.d0
s_t = 0.d0
integer :: k
do k=imin,imax
v_t(:,k) = 0.d0
s_t(:,k) = 0.d0
enddo
call H_S2_u_0_nstates_openmp_work(v_t,s_t,u_t,N_st,N_det,imin,imax,ishift,istep)
if (task_done_to_taskserver(zmq_to_qp_run_socket,worker_id,task_id) == -1) then
print *, irp_here, 'Unable to send task_done'
@ -362,7 +365,7 @@ subroutine H_S2_u_0_nstates_zmq(v_0,s_0,u_0,N_st,sze)
ishift=0
imin=1
N_det_inv = 1.d0/dble(N_det)
max_workload = 50000.d0
max_workload = 10000.d0
do imax=1,N_det
w = w + 1.d0
if (w > max_workload) then

View File

@ -175,7 +175,7 @@ subroutine H_S2_u_0_nstates_openmp_work_$N_int(v_t,s_t,u_t,N_st,sze,istart,iend,
ASSERT (istart > 0)
ASSERT (istep > 0)
!$OMP DO SCHEDULE(dynamic,64)
!$OMP DO SCHEDULE(guided,64)
do k_a=istart+ishift,iend,istep
krow = psi_bilinear_matrix_rows(k_a)
@ -246,7 +246,7 @@ subroutine H_S2_u_0_nstates_openmp_work_$N_int(v_t,s_t,u_t,N_st,sze,istart,iend,
enddo
!$OMP END DO
!$OMP DO SCHEDULE(dynamic,64)
!$OMP DO SCHEDULE(guided,64)
do k_a=istart+ishift,iend,istep