From 9ed92354a42ae95c1966b28df33123a8d81f8b72 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 9 Jan 2019 13:59:24 +0100 Subject: [PATCH] fixed tests --- etc/local.rc | 10 +++++-- etc/qp.rc | 6 +++- src/determinants/spindeterminants.irp.f | 5 +++- src/fci/40.fci.bats | 40 ++++++++++++------------- 4 files changed, 37 insertions(+), 24 deletions(-) diff --git a/etc/local.rc b/etc/local.rc index 552e1a9b..772914df 100644 --- a/etc/local.rc +++ b/etc/local.rc @@ -3,12 +3,18 @@ # Maximum allowed memory per node # export QP_MAXMEM=64 -# Target number of threads for Davidson's algorithm +# Target number of threads for Davidson's algorithm (Hyperthreading is useful) # export QP_NTHREADS_DAVIDSON=32 -# Target number of threads for the computation of the PT2 +# Target number of threads for the computation of the PT2 (Hyperthreading is useful) # export QP_NTHREADS_PT2=32 +# Number of threads for MKL +# exort MKL_NUM_THREADS=16 + +# Number of threads for OpenMP +# exort OMP_NUM_THREADS=16 + # Name of the network interface to be chosen # export QP_NIC=ib0 diff --git a/etc/qp.rc b/etc/qp.rc index dcf9dc35..524b4dca 100644 --- a/etc/qp.rc +++ b/etc/qp.rc @@ -45,7 +45,11 @@ function qp() shift [[ -n $EZFIO_FILE ]] && ezfio unset_file NAME=$(qp_create_ezfio_from_xyz $@) - ezfio set_file $NAME + if [[ -d $NAME ]] ; then + ezfio set_file $NAME + else + echo $NAME | more + fi ;; "set_mo_class") diff --git a/src/determinants/spindeterminants.irp.f b/src/determinants/spindeterminants.irp.f index 7015815e..95f613d6 100644 --- a/src/determinants/spindeterminants.irp.f +++ b/src/determinants/spindeterminants.irp.f @@ -129,6 +129,8 @@ BEGIN_TEMPLATE enddo N_det_$alpha_unique = j + call write_int(6,N_det_$alpha_unique,'Number of unique $alpha determinants') + deallocate (iorder, bit_tmp, duplicate) END_PROVIDER @@ -1002,14 +1004,15 @@ subroutine get_all_spin_singles_1(buffer, idx, spindet, size_buffer, singles, n_ integer, intent(out) :: singles(size_buffer) integer, intent(out) :: n_singles integer :: i + integer(bit_kind) :: v integer :: degree include 'utils/constants.include.F' n_singles = 1 do i=1,size_buffer degree = popcnt(xor( spindet, buffer(i) )) - singles(n_singles) = idx(i) if (degree == 2) then + singles(n_singles) = idx(i) n_singles = n_singles+1 endif enddo diff --git a/src/fci/40.fci.bats b/src/fci/40.fci.bats index 50631777..6cbae1cb 100644 --- a/src/fci/40.fci.bats +++ b/src/fci/40.fci.bats @@ -12,7 +12,7 @@ function run() { ezfio set davidson threshold_davidson 1.e-10 ezfio set davidson n_states_diag 8 qp_run fci $1 - energy1="$(ezfio get fci energy_pt2 | tr '[]' ' ' | cut -d ',' -f 1)" + energy1="$(ezfio get fci energy | tr '[]' ' ' | cut -d ',' -f 1)" eq $energy1 $2 $thresh } @@ -30,38 +30,38 @@ function run() { } @test "HCO" { # 12.2868s - run hco.ezfio -113.311549734862 1.444e-05 + run hco.ezfio -113.297580169167 1.444e-05 } @test "H2O2" { # 12.9214s qp_set_mo_class h2o2.ezfio -core "[1-2]" -act "[3-24]" -del "[25-38]" - run h2o2.ezfio -151.024844964871 0.00011948 + run h2o2.ezfio -151.004593814816 0.00011948 } @test "HBO" { # 13.3144s - run hbo.ezfio -100.221374036381 1.36e-05 + run hbo.ezfio -100.213113590746 1.36e-05 } @test "H2O" { # 11.3727s - run h2o.ezfio -76.2412334158826 1.988e-05 + run h2o.ezfio -76.2358876720796 1.988e-05 } @test "ClO" { # 13.3755s - run clo.ezfio -534.572693465448 0.00019344 + run clo.ezfio -534.545851735243 0.00019344 } @test "SO" { # 13.4952s - run so.ezfio -26.0465405831268 0.00014494 + run so.ezfio -26.0118045926651 0.00014494 } @test "H2S" { # 13.6745s [[ -n $TRAVIS ]] && skip - run h2s.ezfio -398.865096897874 8.46e-06 + run h2s.ezfio -398.859198067009 8.46e-06 } @test "OH" { # 13.865s [[ -n $TRAVIS ]] && skip - run oh.ezfio -75.6188293682445 1.744e-05 + run oh.ezfio -75.6120973654659 1.744e-05 } @test "SiH2_3B1" { # 13.938ss @@ -71,23 +71,23 @@ function run() { @test "H3COH" { # 14.7299s [[ -n $TRAVIS ]] && skip - run h3coh.ezfio -115.223624478701 0.00018132 + run h3coh.ezfio -115.200348295051 0.00018132 } @test "SiH3" { # 15.99s [[ -n $TRAVIS ]] && skip - run sih3.ezfio -5.57759237300615 1.116e-05 + run sih3.ezfio -5.57259338826877 1.116e-05 } @test "CH4" { # 16.1612s [[ -n $TRAVIS ]] && skip qp_set_mo_class ch4.ezfio -core "[1]" -act "[2-30]" -del "[31-59]" - run ch4.ezfio -40.2418916955354 3.02e-06 + run ch4.ezfio -40.2410273920655 3.02e-06 } @test "ClF" { # 16.8864s [[ -n $TRAVIS ]] && skip - run clf.ezfio -559.19410640102 0.00021062 + run clf.ezfio -559.1716279723390.00021062 } @test "SO2" { # 17.5645s @@ -99,42 +99,42 @@ function run() { @test "C2H2" { # 17.6827s [[ -n $TRAVIS ]] && skip qp_set_mo_class c2h2.ezfio -act "[1-30]" -del "[31-36]" - run c2h2.ezfio -12.3844530031717 9.402e-05 + run c2h2.ezfio -12.3681909988587 9.402e-05 } @test "N2" { # 18.0198s [[ -n $TRAVIS ]] && skip qp_set_mo_class n2.ezfio -core "[1,2]" -act "[3-40]" -del "[41-60]" - run n2.ezfio -109.312048711981 0.00010052 + run n2.ezfio -109.291407960731 0.00010052 } @test "N2H4" { # 18.5006s [[ -n $TRAVIS ]] && skip qp_set_mo_class n2h4.ezfio -core "[1-2]" -act "[3-24]" -del "[25-48]" - run n2h4.ezfio -111.382145310854 0.00010255 + run n2h4.ezfio -111.367266319251 0.00010255 } @test "CO2" { # 21.1748s [[ -n $TRAVIS ]] && skip qp_set_mo_class co2.ezfio -core "[1,2]" -act "[3-30]" -del "[31-42]" - run co2.ezfio -188.002445507874 0.00028902 + run co2.ezfio -187.968251806361 0.00028902 } @test "F2" { # 21.331s [[ -n $TRAVIS ]] && skip qp_set_mo_class f2.ezfio -core "[1,2]" -act "[3-30]" -del "[31-62]" - run f2.ezfio -199.084484583825 0.00014534 + run f2.ezfio -199.068698950474 0.00014534 } @test "[Cu(NH3)4]2+" { # 25.0417s [[ -n $TRAVIS ]] && skip qp_set_mo_class cu_nh3_4_2plus.ezfio -core "[1-24]" -act "[25-45]" -del "[46-87]" - run cu_nh3_4_2plus.ezfio -1862.98649500346 5.e-07 + run cu_nh3_4_2plus.ezfio -1862.98632761077 5.e-07 } @test "HCN" { # 20.3273s [[ -n $TRAVIS ]] && skip qp_set_mo_class hcn.ezfio -core "[1,2]" -act "[3-40]" -del "[41-55]" - run hcn.ezfio -93.0959693071658 0.00016522 + run hcn.ezfio -93.0774580352237 0.00016522 }