From 741b5deaba57c7ddee62418028867322a9142a35 Mon Sep 17 00:00:00 2001 From: Yann Garniron Date: Thu, 8 Sep 2016 12:27:37 +0200 Subject: [PATCH] removed debug checks --- plugins/Full_CI_ZMQ/selection_double.irp.f | 66 +++++++++++----------- plugins/Full_CI_ZMQ/selection_single.irp.f | 22 ++++---- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/plugins/Full_CI_ZMQ/selection_double.irp.f b/plugins/Full_CI_ZMQ/selection_double.irp.f index 676cefae..268d9cbf 100644 --- a/plugins/Full_CI_ZMQ/selection_double.irp.f +++ b/plugins/Full_CI_ZMQ/selection_double.irp.f @@ -30,7 +30,7 @@ subroutine select_doubles(i_generator,hole_mask,particle_mask,fock_diag_tmp,E0,p call bitstring_to_list_ab(hole , hole_list , N_holes , N_int) call bitstring_to_list_ab(particle, particle_list, N_particles, N_int) - call assert(psi_det_generators(1,1,i_generator) == psi_det_sorted(1,1,i_generator), "sorted selex") + !call assert(psi_det_generators(1,1,i_generator) == psi_det_sorted(1,1,i_generator), "sorted selex") do s1=1,2 do s2=s1,2 sp = s1 @@ -42,7 +42,7 @@ subroutine select_doubles(i_generator,hole_mask,particle_mask,fock_diag_tmp,E0,p h1 = hole_list(i1,s1) h2 = hole_list(i2,s2) call apply_holes(psi_det_generators(1,1,i_generator), s1,h1,s2,h2, mask, ok, N_int) - call assert(ok, irp_here) + !call assert(ok, irp_here) logical :: banned(mo_tot_num, mo_tot_num) logical :: bannedOrb(mo_tot_num, 2) @@ -98,7 +98,7 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d end if call apply_holes(psi_det_generators(1,1,i_generator), s1, h1, s2, h2, mask, ok, N_int) - call assert(ok, "sosoqs") + !call assert(ok, "sosoqs") do p1=1,mo_tot_num if(bannedOrb(p1, s1)) cycle ib = 1 @@ -108,7 +108,7 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d if(banned(p1,p2)) cycle if(mat(1, p1, p2) == 0d0) cycle call apply_particles(mask, s1, p1, s2, p2, det, ok, N_int) - call assert(ok, "ododod") + !call assert(ok, "ododod") val = mat(1, p1, p2) Hii = diag_H_mat_elem_fock(psi_det_generators(1,1,i_generator),det,fock_diag_tmp,N_int) @@ -175,11 +175,11 @@ subroutine splash_pq(mask, sp, det, i_gen, N_sel, bannedOrb, banned, mat) call bitstring_to_list(mobMask(1,1), p(1,1), p(0,1), N_int) call bitstring_to_list(mobMask(1,2), p(1,2), p(0,2), N_int) - call assert(nt >= 2, irp_here//"qsd") + !call assert(nt >= 2, irp_here//"qsd") if(i < i_gen) then if(nt == 4) call past_d2(banned, p, sp) if(nt == 3) call past_d1(bannedOrb, p) - call assert(nt /= 2, "should have been discarded") + !call assert(nt /= 2, "should have been discarded") else if(nt == 4) then call get_d2(det(1,1,i), psi_phasemask(1,1,i), bannedOrb, banned, mat, mask, h, p, sp, psi_selectors_coef_transp(1, i)) @@ -215,7 +215,7 @@ subroutine get_d2(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) tip = p(0,1) * p(0,2) - call assert(p(0,1) + p(0,2) == 4, irp_here//"df") + !call assert(p(0,1) + p(0,2) == 4, irp_here//"df") ma = sp if(p(0,1) > p(0,2)) ma = 1 if(p(0,1) < p(0,2)) ma = 2 @@ -231,14 +231,14 @@ subroutine get_d2(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) i2 = turn3(2,i) p1 = p(i1, ma) p2 = p(i2, ma) - call assert(h(0,ma) == 2, "dmdmd") - call assert(p(0, ma) == 3, "dmdm2") + !call assert(h(0,ma) == 2, "dmdmd") + !call assert(p(0, ma) == 3, "dmdm2") h1 = h(1, ma) h2 = h(2, ma) hij = (integral8(p1, p2, h1, h2) - integral8(p2,p1, h1, h2)) * get_phase_bi(phasemask, ma, ma, h1, p1, h2, p2) - call debug_hij(hij, gen, mask, mi, ma, puti, putj) + !call debug_hij(hij, gen, mask, mi, ma, puti, putj) if(ma == 1) then mat(:, putj, puti) += coefs * hij else @@ -246,7 +246,7 @@ subroutine get_d2(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) end if end do else - call assert(tip == 4, "df") + !call assert(tip == 4, "df") do i = 1,2 do j = 1,2 puti = p(i, 1) @@ -257,7 +257,7 @@ subroutine get_d2(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) h2 = h(1,2) hij = integral8(p1, p2, h1, h2) * get_phase_bi(phasemask, 1, 2, h1, p1, h2, p2) - call debug_hij(hij, gen, mask, 1, 2, puti, putj) + !call debug_hij(hij, gen, mask, 1, 2, puti, putj) mat(:, puti, putj) += coefs * hij end do @@ -277,7 +277,7 @@ subroutine get_d2(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) p1 = p(i1, ma) p2 = p(i2, ma) hij = (integral8(p1, p2, h1, h2) - integral8(p2,p1, h1, h2)) * get_phase_bi(phasemask, ma, ma, h1, p1, h2, p2) - call debug_hij(hij, gen, mask, ma, ma, puti, putj) + !call debug_hij(hij, gen, mask, ma, ma, puti, putj) mat(:, puti, putj) += coefs * hij end do end do @@ -285,17 +285,17 @@ subroutine get_d2(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) h1 = h(1, mi) h2 = h(1, ma) p1 = p(1, mi) - call assert(ma == sp, "dldl") + !call assert(ma == sp, "dldl") do i=1,3 p2 = p(i, ma) puti = p(turn3(1,i), ma) putj = p(turn3(2,i), ma) hij = integral8(p1, p2, h1, h2) * get_phase_bi(phasemask, mi, ma, h1, p1, h2, p2) - call debug_hij(hij, gen, mask, ma, ma, puti, putj) + !call debug_hij(hij, gen, mask, ma, ma, puti, putj) mat(:, min(puti, putj), max(puti, putj)) += coefs * hij end do else ! tip == 4 - call assert(tip == 4, "qsdf") + !call assert(tip == 4, "qsdf") puti = p(1, sp) putj = p(2, sp) p1 = p(1, mi) @@ -303,7 +303,7 @@ subroutine get_d2(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) h1 = h(1, mi) h2 = h(2, mi) hij = (integral8(p1, p2, h1, h2) - integral8(p2,p1, h1, h2)) * get_phase_bi(phasemask, mi, mi, h1, p1, h2, p2) - call debug_hij(hij, gen, mask,ma,ma, puti, putj) + !call debug_hij(hij, gen, mask,ma,ma, puti, putj) mat(:, puti, putj) += coefs * hij end if end if @@ -324,7 +324,7 @@ subroutine debug_hij(hij, gen, mask, s1, s2, p1, p2) integer :: exc(0:2,2,2) call apply_particles(mask, s1, p1, s2, p2, det, ok, N_int) - call assert(ok, "nokey") + !call assert(ok, "nokey") call i_H_j_phase_out(gen,det,N_int,hij_ref,phase_ref,exc,degree) if(hij /= hij_ref) then print *, hij, hij_ref @@ -375,7 +375,7 @@ subroutine get_d1(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) if(sp == 3) then !move MA - call assert(p(0,1)*p(0,2) == 2, "ddmmm") + !call assert(p(0,1)*p(0,2) == 2, "ddmmm") puti = p(1,mi) hfix = h(1,ma) p1 = p(1,ma) @@ -385,13 +385,13 @@ subroutine get_d1(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) do putj=1, hfix-1 if(lbanned(putj, ma)) cycle hij = (integral8(p1, p2, putj, hfix)-integral8(p2,p1,putj,hfix)) * get_phase_bi(phasemask, ma, ma, putj, p1, hfix, p2) - call debug_hij(hij, gen, mask, mi, ma, puti, putj) + !call debug_hij(hij, gen, mask, mi, ma, puti, putj) tmp_row(:,putj) += hij * coefs end do do putj=hfix+1, mo_tot_num if(lbanned(putj, ma)) cycle hij = (integral8(p1, p2, hfix, putj)-integral8(p2,p1,hfix,putj)) * get_phase_bi(phasemask, ma, ma, hfix, p1, putj, p2) - call debug_hij(hij, gen, mask, mi, ma, puti, putj) + !call debug_hij(hij, gen, mask, mi, ma, puti, putj) tmp_row(:,putj) += hij * coefs end do @@ -411,11 +411,11 @@ subroutine get_d1(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) !p1 fixed putj = p1 hij = integral8(p2,pfix,hfix,puti) * get_phase_bi(phasemask, ma, mi, hfix, p2, puti, pfix) - call debug_hij(hij, gen, mask, mi, ma, puti, putj) + !call debug_hij(hij, gen, mask, mi, ma, puti, putj) tmp_row(:,puti) += hij * coefs putj = p2 hij = integral8(p1,pfix,hfix,puti) * get_phase_bi(phasemask, ma, mi, hfix, p1, puti, pfix) - call debug_hij(hij, gen, mask, mi, ma, puti, putj) + !call debug_hij(hij, gen, mask, mi, ma, puti, putj) tmp_row2(:,puti) += hij * coefs end do @@ -437,13 +437,13 @@ subroutine get_d1(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) do putj=1,hfix-1 if(lbanned(putj,ma)) cycle hij = (integral8(p1, p2, putj, hfix)-integral8(p2,p1,putj,hfix)) * get_phase_bi(phasemask, ma, ma, putj, p1, hfix, p2) - call debug_hij(hij, gen, mask, ma, ma, puti, putj) + !call debug_hij(hij, gen, mask, ma, ma, puti, putj) tmp_row(:,putj) += hij * coefs end do do putj=hfix+1,mo_tot_num if(lbanned(putj,ma)) cycle hij = (integral8(p1, p2, hfix, putj)-integral8(p2,p1,hfix,putj)) * get_phase_bi(phasemask, ma, ma, hfix, p1, putj, p2) - call debug_hij(hij, gen, mask, ma, ma, puti, putj) + !call debug_hij(hij, gen, mask, ma, ma, puti, putj) tmp_row(:,putj) += hij * coefs end do @@ -451,7 +451,7 @@ subroutine get_d1(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) mat(:, puti, puti:) += tmp_row(:,puti:) end do else - call assert(sp == ma, "sp == ma") + !call assert(sp == ma, "sp == ma") hfix = h(1,mi) pfix = p(1,mi) p1 = p(1,ma) @@ -462,12 +462,12 @@ subroutine get_d1(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) if(lbanned(puti,ma)) cycle putj = p2 hij = integral8(pfix, p1, hfix, puti) * get_phase_bi(phasemask, mi, ma, hfix, pfix, puti, p1) - call debug_hij(hij, gen, mask, ma, ma, putj, puti) + !call debug_hij(hij, gen, mask, ma, ma, putj, puti) tmp_row(:,puti) += hij * coefs putj = p1 hij = integral8(pfix, p2, hfix, puti) * get_phase_bi(phasemask, mi, ma, hfix, pfix, puti, p2) - call debug_hij(hij, gen, mask, ma, ma, putj, puti) + !call debug_hij(hij, gen, mask, ma, ma, putj, puti) tmp_row2(:,puti) += hij * coefs end do mat(:,:p2-1,p2) += tmp_row(:,:p2-1) @@ -531,13 +531,13 @@ subroutine get_d0(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) if(banned(p1, p2)) cycle ! rentable? if(p1 == h1 .or. p2 == h2) then call apply_particles(mask, 1,p1,2,p2, det, ok, N_int) - call assert(ok, "zsdq") + !call assert(ok, "zsdq") call i_h_j(gen, det, N_int, hij) mat(:, p1, p2) += coefs * hij else hij = integral8(p1, p2, h1, h2) * get_phase_bi(phasemask, 1, 2, h1, p1, h2, p2) phase = get_phase_bi(phasemask, 1, 2, h1, p1, h2, p2) - call debug_hij(hij, gen, mask, 1, 2, p1, p2) + !call debug_hij(hij, gen, mask, 1, 2, p1, p2) mat(:, p1, p2) += coefs * hij end if end do @@ -558,7 +558,7 @@ subroutine get_d0(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) else hij = (integral8(p1, p2, puti, putj) - integral8(p2, p1, puti, putj))* get_phase_bi(phasemask, sp, sp, puti, p1 , putj, p2) mat(:, puti, putj) += coefs * hij - call debug_hij(hij, gen, mask, sp, sp, puti, putj) + !call debug_hij(hij, gen, mask, sp, sp, puti, putj) end if end do end do @@ -646,8 +646,8 @@ subroutine spot_isinwf(mask, det, i_gen, N, banned, fullMatch) call bitstring_to_list(myMask(1,1), list(1), na, N_int) call bitstring_to_list(myMask(1,2), list(na+1), nb, N_int) - call assert(na + nb == 2, "oyo") - call assert(na == 1 .or. list(1) < list(2), "sqdsmmmm") + !call assert(na + nb == 2, "oyo") + !call assert(na == 1 .or. list(1) < list(2), "sqdsmmmm") banned(list(1), list(2)) = .true. end do genl end subroutine diff --git a/plugins/Full_CI_ZMQ/selection_single.irp.f b/plugins/Full_CI_ZMQ/selection_single.irp.f index 89f2b1ec..b9f53766 100644 --- a/plugins/Full_CI_ZMQ/selection_single.irp.f +++ b/plugins/Full_CI_ZMQ/selection_single.irp.f @@ -43,7 +43,7 @@ subroutine select_singles(i_gen,hole_mask,particle_mask,fock_diag_tmp,E0,pt2,buf do i=1, N_holes(sp) h1 = hole_list(i,sp) call apply_hole(psi_det_generators(1,1,i_gen), sp, h1, mask, ok, N_int) - call assert(ok, irp_here) + !call assert(ok, irp_here) bannedOrb = .false. bannedOrb(h1) = .true. call spot_hasBeen(mask, sp, psi_det_sorted, i_gen, N_det, bannedOrb, fullMatch) @@ -174,7 +174,7 @@ subroutine get_m2(gen, phasemask, bannedOrb, vect, mask, h, p, sp, coefs) p2 = p(turn3_2(2,i), sp) hij = integral8(p1, p2, h1, h2) - integral8(p2, p1, h1, h2) hij *= get_phase_bi(phasemask, sp, sp, h1, p1, h2, p2) - call debug_hij_mo(hij, gen, mask, sp, puti) + !call debug_hij_mo(hij, gen, mask, sp, puti) vect(:, puti) += hij * coefs end do else if(h(0,sp) == 1) then @@ -187,7 +187,7 @@ subroutine get_m2(gen, phasemask, bannedOrb, vect, mask, h, p, sp, coefs) pmob = p(turn2(j), sp) hij = integral8(pfix, pmob, hfix, hmob) hij *= get_phase_bi(phasemask, sp, sfix, hmob, pmob, hfix, pfix) - call debug_hij_mo(hij, gen, mask, sp, puti) + !call debug_hij_mo(hij, gen, mask, sp, puti) vect(:, puti) += hij * coefs end do else @@ -199,7 +199,7 @@ subroutine get_m2(gen, phasemask, bannedOrb, vect, mask, h, p, sp, coefs) h2 = h(2,sfix) hij = (integral8(p1,p2,h1,h2) - integral8(p2,p1,h1,h2)) hij *= get_phase_bi(phasemask, sfix, sfix, h1, p1, h2, p2) - call debug_hij_mo(hij, gen, mask, sp, puti) + !call debug_hij_mo(hij, gen, mask, sp, puti) vect(:, puti) += hij * coefs end if end subroutine @@ -239,7 +239,7 @@ subroutine get_m1(gen, phasemask, bannedOrb, vect, mask, h, p, sp, coefs) if(lbanned(i)) cycle hij = (integral8(p1, p2, i, hole) - integral8(p2, p1, i, hole)) hij *= get_phase_bi(phasemask, sp, sp, i, p1, hole, p2) - call debug_hij_mo(hij, gen, mask, sp, i) + !call debug_hij_mo(hij, gen, mask, sp, i) vect(:,i) += hij * coefs end do do i=hole+1,mo_tot_num @@ -251,7 +251,7 @@ subroutine get_m1(gen, phasemask, bannedOrb, vect, mask, h, p, sp, coefs) end do call apply_particle(mask, sp, p2, det, ok, N_int) - call assert(ok, "OKE223") + !call assert(ok, "OKE223") call i_h_j(gen, det, N_int, hij) vect(:, p2) += hij * coefs else @@ -260,13 +260,13 @@ subroutine get_m1(gen, phasemask, bannedOrb, vect, mask, h, p, sp, coefs) if(lbanned(i)) cycle hij = integral8(p1, p2, i, hole) hij *= get_phase_bi(phasemask, sp, sh, i, p1, hole, p2) - call debug_hij_mo(hij, gen, mask, sp, i) + !call debug_hij_mo(hij, gen, mask, sp, i) vect(:,i) += hij * coefs end do end if call apply_particle(mask, sp, p1, det, ok, N_int) - call assert(ok, "OKQQE2") + !call assert(ok, "OKQQE2") call i_h_j(gen, det, N_int, hij) vect(:, p1) += hij * coefs @@ -293,7 +293,7 @@ subroutine get_m0(gen, phasemask, bannedOrb, vect, mask, h, p, sp, coefs) do i=1,mo_tot_num if(lbanned(i)) cycle call apply_particle(mask, sp, i, det, ok, N_int) - call assert(ok, "qsdo") + !call assert(ok, "qsdo") call i_h_j(gen, det, N_int, hij) vect(:, i) += hij * coefs end do @@ -365,8 +365,8 @@ subroutine debug_hij_mo(hij, gen, mask, s1, p1) logical, external :: detEq call apply_particle(mask, s1, p1, det, ok, N_int) - call assert(ok, "nokey_mo") - call assert(.not. detEq(det, gen, N_int), "Hii ...") + !call assert(ok, "nokey_mo") + !call assert(.not. detEq(det, gen, N_int), "Hii ...") call i_H_j_phase_out(gen,det,N_int,hij_ref,phase_ref,exc,degree) if(hij /= hij_ref) then print *, hij, hij_ref