10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-24 13:23:41 +01:00

unbalanced fragmentation

This commit is contained in:
Yann Garniron 2018-09-03 12:29:12 +02:00
parent abb3b7e08b
commit 99ea7948e0
3 changed files with 24 additions and 13 deletions

View File

@ -70,6 +70,7 @@ subroutine generate_singles_and_doubles(delta_ij_loc, i_generator, bitmask_index
allocate(preinteresting_det(N_int,2,N_det))
maskInd = -1
monoAdo = .true.
monoBdo = .true.
@ -192,7 +193,6 @@ subroutine generate_singles_and_doubles(delta_ij_loc, i_generator, bitmask_index
allocate(counted(mo_tot_num, mo_tot_num), countedOrb(mo_tot_num, 2))
allocate (indexes(0:mo_tot_num, 0:mo_tot_num))
allocate (indexes_end(0:mo_tot_num, 0:mo_tot_num))
maskInd = -1
integer :: nb_count
do s1=1,2
do i1=N_holes(s1),1,-1 ! Generate low excitations first

View File

@ -9,14 +9,14 @@ END_PROVIDER
&BEGIN_PROVIDER [ integer, pt2_F, (N_det_generators) ]
implicit none
pt2_F(:) = 1
pt2_F(:N_det_generators/100+1) = 5
!pt2_F(:N_det_generators/1000*0+50) = 1
pt2_n_tasks_max = N_det_generators/100 + 1
if(N_det_generators < 256) then
pt2_minDetInFirstTeeth = 1
pt2_N_teeth = 1
else
pt2_minDetInFirstTeeth = 5
pt2_minDetInFirstTeeth = min(5, N_det_generators)
pt2_N_teeth = 16
end if
END_PROVIDER
@ -24,7 +24,7 @@ END_PROVIDER
BEGIN_PROVIDER[ integer, dress_N_cp_max ]
dress_N_cp_max = 100
dress_N_cp_max = 32
END_PROVIDER
BEGIN_PROVIDER[integer, pt2_J, (N_det_generators)]
@ -79,10 +79,19 @@ END_PROVIDER
N_c = 0
N_j = pt2_n_0(1)
d(:) = .false.
U = min(1, N_det_generators/(dress_N_cp_max**2/2))
do i=1,dress_N_cp_max-1
dress_M_m(i) = N_det_generators * i / (dress_N_cp_max+1)
dress_M_m(i) = U * ((i**2-i)/2)! / (dress_N_cp_max+1)
end do
U = N_det_generators/((dress_N_cp_max**2+dress_N_cp_max)/2)+1
do i=1, dress_N_cp_max
dress_M_m(i) = U * (((i*i)+i)/2)
end do
dress_M_m(1) = 1
dress_M_m(dress_N_cp_max) = N_det_generators+1
@ -144,7 +153,6 @@ END_PROVIDER
end do
end do
!!!!!!!!!!!!!
END_PROVIDER

View File

@ -37,7 +37,9 @@ subroutine run_dress_slave(thread,iproce,energy)
double precision :: fac
double precision :: ending(1)
integer, external :: zmq_get_dvector
! double precision, external :: omp_get_wtime
double precision :: time, time0
if(iproce /= 0) stop "RUN DRESS SLAVE is OMP"
allocate(delta_det(N_states, N_det, 0:pt2_N_teeth+1, 2))
@ -71,7 +73,8 @@ subroutine run_dress_slave(thread,iproce,energy)
!$OMP PRIVATE(breve_delta_m, task, task_id) &
!$OMP PRIVATE(tmp,fac,m,l,t,sum_f,n_tasks) &
!$OMP PRIVATE(i,p,will_send, i_generator, subset, iproc) &
!$OMP PRIVATE(zmq_to_qp_run_socket, zmq_socket_push, worker_id)
!$OMP PRIVATE(zmq_to_qp_run_socket, zmq_socket_push, worker_id) &
!$OMP PRIVATE(time, time0)
zmq_to_qp_run_socket = new_zmq_to_qp_run_socket()
zmq_socket_push = new_zmq_push_socket(thread)
call connect_to_taskserver(zmq_to_qp_run_socket,worker_id,thread)
@ -80,7 +83,6 @@ subroutine run_dress_slave(thread,iproce,energy)
call end_zmq_push_socket(zmq_socket_push,thread)
stop "WORKER -1"
end if
iproc = omp_get_thread_num()+1
allocate(breve_delta_m(N_states,N_det,2))
@ -132,9 +134,10 @@ subroutine run_dress_slave(thread,iproce,energy)
breve_delta_m(:,:,:) = 0d0
call generator_start(i_generator, iproc)
call alpha_callback(breve_delta_m, i_generator, subset, pt2_F(i_generator)*0 + 1, iproc)
time0 = omp_get_wtime()
call alpha_callback(breve_delta_m, i_generator, subset, pt2_F(i_generator), iproc)
time = omp_get_wtime()
!print '(I0.11, I4, A12, F12.3)', i_generator, subset, "GREPMETIME", time-time0
t = dress_T(i_generator)
call omp_set_lock(lck_det(t))