10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-03 20:54:00 +01:00

Deterministic selection

This commit is contained in:
Anthony Scemama 2016-01-04 10:11:40 +01:00
parent 97a966df04
commit a38290cce4
2 changed files with 1 additions and 11 deletions

View File

@ -20,8 +20,6 @@ subroutine fill_H_apply_buffer_selection(n_selected,det_buffer,e_2_pert_buffer,c
ASSERT (N_int == N_int) ASSERT (N_int == N_int)
ASSERT (N_selected >= 0) ASSERT (N_selected >= 0)
call omp_set_lock(H_apply_buffer_lock(1,iproc)) call omp_set_lock(H_apply_buffer_lock(1,iproc))
smax = selection_criterion
smin = selection_criterion_min
new_size = H_apply_buffer(iproc)%N_det + n_selected new_size = H_apply_buffer(iproc)%N_det + n_selected
if (new_size > h_apply_buffer(iproc)%sze) then if (new_size > h_apply_buffer(iproc)%sze) then
@ -41,8 +39,6 @@ subroutine fill_H_apply_buffer_selection(n_selected,det_buffer,e_2_pert_buffer,c
select_max_out = max(select_max_out,s) select_max_out = max(select_max_out,s)
enddo enddo
if (is_selected) then if (is_selected) then
l = l+1 l = l+1
do j=1,N_int do j=1,N_int
@ -55,8 +51,6 @@ subroutine fill_H_apply_buffer_selection(n_selected,det_buffer,e_2_pert_buffer,c
enddo enddo
ASSERT (sum(popcnt(h_apply_buffer(iproc)%det(:,1,l)) )== elec_alpha_num) ASSERT (sum(popcnt(h_apply_buffer(iproc)%det(:,1,l)) )== elec_alpha_num)
ASSERT (sum(popcnt(h_apply_buffer(iproc)%det(:,2,l))) == elec_beta_num) ASSERT (sum(popcnt(h_apply_buffer(iproc)%det(:,2,l))) == elec_beta_num)
smax = max(s,smax)
smin = min(selection_criterion_min,smin)
endif endif
enddo enddo
H_apply_buffer(iproc)%N_det = l H_apply_buffer(iproc)%N_det = l
@ -65,10 +59,6 @@ subroutine fill_H_apply_buffer_selection(n_selected,det_buffer,e_2_pert_buffer,c
ASSERT (sum(popcnt(h_apply_buffer(iproc)%det(:,2,i))) == elec_beta_num) ASSERT (sum(popcnt(h_apply_buffer(iproc)%det(:,2,i))) == elec_beta_num)
enddo enddo
call omp_unset_lock(H_apply_buffer_lock(1,iproc)) call omp_unset_lock(H_apply_buffer_lock(1,iproc))
!$OMP CRITICAL
selection_criterion = max(selection_criterion,smax)
selection_criterion_min = min(selection_criterion_min,smin)
!$OMP END CRITICAL
end end
BEGIN_PROVIDER [ double precision, selection_criterion ] BEGIN_PROVIDER [ double precision, selection_criterion ]

View File

@ -20,7 +20,7 @@ Energy = namedtuple('Energy', ['without_pseudo', 'with_pseudo'])
# O p t # # O p t #
# ~#~#~ # # ~#~#~ #
precision = 5.e-7 precision = 5.e-3
# A test get a geo file and a basis file. # A test get a geo file and a basis file.
# A global dict containt the result for this test # A global dict containt the result for this test