From 82409d3e737ba3481523051248065c3fd9d1fab1 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 12 Apr 2022 15:49:20 +0200 Subject: [PATCH 01/12] Added drone CI config --- .drone.yml | 36 ++++++++++++++++++++++++++++++ drone/Docker/README.md | 8 +++++++ drone/Docker/Ubuntu/Dockerfile | 27 ++++++++++++++++++++++ {travis => drone}/compilation.sh | 0 {travis => drone}/configuration.sh | 0 {travis => drone}/testing.sh | 0 6 files changed, 71 insertions(+) create mode 100644 .drone.yml create mode 100644 drone/Docker/README.md create mode 100644 drone/Docker/Ubuntu/Dockerfile rename {travis => drone}/compilation.sh (100%) rename {travis => drone}/configuration.sh (100%) rename {travis => drone}/testing.sh (100%) diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 00000000..39d035db --- /dev/null +++ b/.drone.yml @@ -0,0 +1,36 @@ +--- +kind: pipeline +type: ssh +name: default + +clone: + depth: 10 + +server: + host: 130.120.229.139 + user: test + password: + from_secret: ssh_pass + +steps: +- name: configure + pull: never + image: ubuntu/qp2_env + commands: + - ./configure -i all -c ./config/gfortran_debug.cfg + - source quantum_package.rc ; qp plugins download https://gitlab.com/scemama/qp_plugins_scemama + - source quantum_package.rc ; qp plugins install champ + +- name: compile + pull: never + image: ubuntu/qp2_env + commands: + - ninja + +- name: testing + pull: never + image: ubuntu/qp2_env + commands: + - qp test + + diff --git a/drone/Docker/README.md b/drone/Docker/README.md new file mode 100644 index 00000000..eb569777 --- /dev/null +++ b/drone/Docker/README.md @@ -0,0 +1,8 @@ +Docker files to build the containers used with DroneCI. + +Example: +``` +docker build -t ubuntu/qp2_env . + +``` + diff --git a/drone/Docker/Ubuntu/Dockerfile b/drone/Docker/Ubuntu/Dockerfile new file mode 100644 index 00000000..05d87ad8 --- /dev/null +++ b/drone/Docker/Ubuntu/Dockerfile @@ -0,0 +1,27 @@ +ARG UBUNTU_VERSION=20.04 +FROM ubuntu:${UBUNTU_VERSION} AS builder + +# Timezone for tzdata +ARG tz=Etc/UTC +RUN echo $tz > /etc/timezone && rm -rf /etc/localtime + +# Install +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ + git \ + curl \ + wget \ + python3 \ + gfortran \ + gcc \ + g++ \ + make \ + build-essential \ + rsync \ + unzip \ + libopenblas-dev \ + pkg-config \ + m4 + +RUN ln -s /usr/bin/python3 /usr/bin/python + + diff --git a/travis/compilation.sh b/drone/compilation.sh similarity index 100% rename from travis/compilation.sh rename to drone/compilation.sh diff --git a/travis/configuration.sh b/drone/configuration.sh similarity index 100% rename from travis/configuration.sh rename to drone/configuration.sh diff --git a/travis/testing.sh b/drone/testing.sh similarity index 100% rename from travis/testing.sh rename to drone/testing.sh From 554af892ff1568491475033a5d4201e81551d54a Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 12 Apr 2022 15:55:51 +0200 Subject: [PATCH 02/12] Update drone --- .drone.yml | 37 +------------------------------------ drone/drone_docker | 30 ++++++++++++++++++++++++++++++ drone/drone_ssh | 30 ++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 36 deletions(-) mode change 100644 => 120000 .drone.yml create mode 100644 drone/drone_docker create mode 100644 drone/drone_ssh diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 39d035db..00000000 --- a/.drone.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -kind: pipeline -type: ssh -name: default - -clone: - depth: 10 - -server: - host: 130.120.229.139 - user: test - password: - from_secret: ssh_pass - -steps: -- name: configure - pull: never - image: ubuntu/qp2_env - commands: - - ./configure -i all -c ./config/gfortran_debug.cfg - - source quantum_package.rc ; qp plugins download https://gitlab.com/scemama/qp_plugins_scemama - - source quantum_package.rc ; qp plugins install champ - -- name: compile - pull: never - image: ubuntu/qp2_env - commands: - - ninja - -- name: testing - pull: never - image: ubuntu/qp2_env - commands: - - qp test - - diff --git a/.drone.yml b/.drone.yml new file mode 120000 index 00000000..b44fc76b --- /dev/null +++ b/.drone.yml @@ -0,0 +1 @@ +drone/drone_ssh \ No newline at end of file diff --git a/drone/drone_docker b/drone/drone_docker new file mode 100644 index 00000000..0cbeb613 --- /dev/null +++ b/drone/drone_docker @@ -0,0 +1,30 @@ +--- +kind: pipeline +type: ssh +name: default + +clone: + depth: 10 + +steps: +- name: configure + pull: never + image: ubuntu/qp2_env + commands: + - ./configure -i all -c ./config/gfortran_debug.cfg + - source quantum_package.rc ; qp plugins download https://gitlab.com/scemama/qp_plugins_scemama + - source quantum_package.rc ; qp plugins install champ + +- name: compile + pull: never + image: ubuntu/qp2_env + commands: + - ninja + +- name: testing + pull: never + image: ubuntu/qp2_env + commands: + - qp test + + diff --git a/drone/drone_ssh b/drone/drone_ssh new file mode 100644 index 00000000..e15b3fd5 --- /dev/null +++ b/drone/drone_ssh @@ -0,0 +1,30 @@ +--- +kind: pipeline +type: ssh +name: default + +clone: + depth: 10 + +server: + host: 130.120.229.139 + user: test + password: + from_secret: ssh_pass + +steps: +- name: configure + commands: + - ./configure -i all -c ./config/gfortran_debug.cfg + - source quantum_package.rc ; qp plugins download https://gitlab.com/scemama/qp_plugins_scemama + - source quantum_package.rc ; qp plugins install champ + +- name: compile + commands: + - ninja + +- name: testing + commands: + - qp test + + From c3d95a8562cf128c56d598a644e9900831ced72c Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 12 Apr 2022 16:00:33 +0200 Subject: [PATCH 03/12] Drone --- drone/{drone_docker => drone_docker.yml} | 0 drone/{drone_ssh => drone_ssh.yml} | 1 - 2 files changed, 1 deletion(-) rename drone/{drone_docker => drone_docker.yml} (100%) rename drone/{drone_ssh => drone_ssh.yml} (99%) diff --git a/drone/drone_docker b/drone/drone_docker.yml similarity index 100% rename from drone/drone_docker rename to drone/drone_docker.yml diff --git a/drone/drone_ssh b/drone/drone_ssh.yml similarity index 99% rename from drone/drone_ssh rename to drone/drone_ssh.yml index e15b3fd5..99397f11 100644 --- a/drone/drone_ssh +++ b/drone/drone_ssh.yml @@ -1,4 +1,3 @@ ---- kind: pipeline type: ssh name: default From 57bf2e2739873d83fc93138fa27dfa53cc52d803 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 12 Apr 2022 17:25:48 +0200 Subject: [PATCH 04/12] Drone --- .drone.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) mode change 120000 => 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 120000 index b44fc76b..00000000 --- a/.drone.yml +++ /dev/null @@ -1 +0,0 @@ -drone/drone_ssh \ No newline at end of file diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 00000000..99397f11 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,29 @@ +kind: pipeline +type: ssh +name: default + +clone: + depth: 10 + +server: + host: 130.120.229.139 + user: test + password: + from_secret: ssh_pass + +steps: +- name: configure + commands: + - ./configure -i all -c ./config/gfortran_debug.cfg + - source quantum_package.rc ; qp plugins download https://gitlab.com/scemama/qp_plugins_scemama + - source quantum_package.rc ; qp plugins install champ + +- name: compile + commands: + - ninja + +- name: testing + commands: + - qp test + + From e813fd04f92d0ceabd39b526db86c68dcfec8b6f Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 12 Apr 2022 17:29:29 +0200 Subject: [PATCH 05/12] Drone --- .drone.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 99397f11..0cbeb613 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,3 +1,4 @@ +--- kind: pipeline type: ssh name: default @@ -5,24 +6,24 @@ name: default clone: depth: 10 -server: - host: 130.120.229.139 - user: test - password: - from_secret: ssh_pass - steps: - name: configure + pull: never + image: ubuntu/qp2_env commands: - ./configure -i all -c ./config/gfortran_debug.cfg - source quantum_package.rc ; qp plugins download https://gitlab.com/scemama/qp_plugins_scemama - source quantum_package.rc ; qp plugins install champ - name: compile + pull: never + image: ubuntu/qp2_env commands: - ninja - name: testing + pull: never + image: ubuntu/qp2_env commands: - qp test From 69138a2d25e5ed6e5924f6b9c28bc5846a86c06e Mon Sep 17 00:00:00 2001 From: kossoski Date: Wed, 13 Apr 2022 13:25:39 +0200 Subject: [PATCH 06/12] Hierarchy CI --- src/cipsi/EZFIO.cfg | 6 ++++++ src/cipsi/selection.irp.f | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/cipsi/EZFIO.cfg b/src/cipsi/EZFIO.cfg index 7fcf19eb..e01359c5 100644 --- a/src/cipsi/EZFIO.cfg +++ b/src/cipsi/EZFIO.cfg @@ -34,3 +34,9 @@ doc: Maximum number of excitation for beta determinants with respect to the Hart interface: ezfio,ocaml,provider default: -1 +[twice_hierarchy_max] +type: integer +doc: Twice the maximum hierarchy parameter (excitation degree plus half the seniority number). Using -1 selects all determinants +interface: ezfio,ocaml,provider +default: -1 + diff --git a/src/cipsi/selection.irp.f b/src/cipsi/selection.irp.f index 1317fcf3..c8bc75d3 100644 --- a/src/cipsi/selection.irp.f +++ b/src/cipsi/selection.irp.f @@ -713,6 +713,25 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d if (do_cycle) cycle endif + if (twice_hierarchy_max >= 0) then + s = 0 + do k=1,N_int + s = s + popcnt(ieor(det(k,1),det(k,2))) + enddo + if ( mod(s,2)>0 ) stop 'For now, hierarchy CI is defined only for an even number of electrons' + if (excitation_ref == 1) then + call get_excitation_degree(HF_bitmask,det(1,1),degree,N_int) + else if (excitation_ref == 2) then + stop 'For now, hierarchy CI is defined only for a single reference determinant' +! do k=1,N_dominant_dets_of_cfgs +! call get_excitation_degree(dominant_dets_of_cfgs(1,1,k),det(1,1),degree,N_int) +! enddo + endif + integer :: twice_hierarchy + twice_hierarchy = degree + s/2 + if (twice_hierarchy_max > twice_hierarchy_max) cycle + endif + Hii = diag_H_mat_elem_fock(psi_det_generators(1,1,i_generator),det,fock_diag_tmp,N_int) w = 0d0 From 62c28db6da5887e3198e4491ce7671f74dc003f0 Mon Sep 17 00:00:00 2001 From: kossoski Date: Wed, 13 Apr 2022 13:32:14 +0200 Subject: [PATCH 07/12] correction --- src/cipsi/selection.irp.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cipsi/selection.irp.f b/src/cipsi/selection.irp.f index c8bc75d3..d4f184f3 100644 --- a/src/cipsi/selection.irp.f +++ b/src/cipsi/selection.irp.f @@ -729,7 +729,7 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d endif integer :: twice_hierarchy twice_hierarchy = degree + s/2 - if (twice_hierarchy_max > twice_hierarchy_max) cycle + if (twice_hierarchy > twice_hierarchy_max) cycle endif Hii = diag_H_mat_elem_fock(psi_det_generators(1,1,i_generator),det,fock_diag_tmp,N_int) From 8cbabc64943194c17543bc5c72d61dce3597e655 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 13 Apr 2022 13:40:04 +0200 Subject: [PATCH 08/12] Fixed ref values for tests --- src/fci/40.fci.bats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fci/40.fci.bats b/src/fci/40.fci.bats index f2c78067..864a9d59 100644 --- a/src/fci/40.fci.bats +++ b/src/fci/40.fci.bats @@ -59,13 +59,13 @@ function run_stoch() { @test "HCO" { # 12.2868s qp set_file hco.ezfio - run -113.389297812482 6.e-4 100000 + run -113.393356604085 6.e-4 100000 } @test "H2O2" { # 12.9214s qp set_file h2o2.ezfio qp set_mo_class --core="[1-2]" --act="[3-24]" --del="[25-38]" - run -151.00467 1.e-4 100000 + run -151.005848404095 1.e-4 100000 } @test "HBO" { # 13.3144s From 3762409767713d1df7f7f99dbc034372d86a599b Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 13 Apr 2022 17:58:24 +0200 Subject: [PATCH 09/12] Fixed ref values for tests --- src/fci/40.fci.bats | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/fci/40.fci.bats b/src/fci/40.fci.bats index 864a9d59..3139ebb8 100644 --- a/src/fci/40.fci.bats +++ b/src/fci/40.fci.bats @@ -59,43 +59,43 @@ function run_stoch() { @test "HCO" { # 12.2868s qp set_file hco.ezfio - run -113.393356604085 6.e-4 100000 + run -113.393356604085 1.e-3 100000 } @test "H2O2" { # 12.9214s qp set_file h2o2.ezfio qp set_mo_class --core="[1-2]" --act="[3-24]" --del="[25-38]" - run -151.005848404095 1.e-4 100000 + run -151.005848404095 1.e-3 100000 } @test "HBO" { # 13.3144s [[ -n $TRAVIS ]] && skip qp set_file hbo.ezfio - run -100.212560384678 1.e-3 100000 + run -100.214099486337 1.e-3 100000 } @test "H2O" { # 11.3727s [[ -n $TRAVIS ]] && skip qp set_file h2o.ezfio - run -76.2361605151999 3.e-4 100000 + run -76.2361605151999 5.e-4 100000 } @test "ClO" { # 13.3755s [[ -n $TRAVIS ]] && skip qp set_file clo.ezfio - run -534.545616787223 3.e-4 100000 + run -534.546453546852 1.e-3 100000 } @test "SO" { # 13.4952s [[ -n $TRAVIS ]] && skip qp set_file so.ezfio - run -26.0096209515081 1.e-3 100000 + run -26.0176563764039 1.e-3 100000 } @test "H2S" { # 13.6745s [[ -n $TRAVIS ]] && skip qp set_file h2s.ezfio - run -398.859168655255 3.e-4 100000 + run -398.859577605891 5.e-4 100000 } @test "OH" { # 13.865s @@ -113,13 +113,13 @@ function run_stoch() { @test "H3COH" { # 14.7299s [[ -n $TRAVIS ]] && skip qp set_file h3coh.ezfio - run -115.205191406072 3.e-4 100000 + run -115.205632960026 1.e-3 100000 } @test "SiH3" { # 15.99s [[ -n $TRAVIS ]] && skip qp set_file sih3.ezfio - run -5.57241217753818 3.e-4 100000 + run -5.57241217753818 5.e-4 100000 } @test "CH4" { # 16.1612s @@ -132,7 +132,7 @@ function run_stoch() { @test "ClF" { # 16.8864s [[ -n $TRAVIS ]] && skip qp set_file clf.ezfio - run -559.169313755572 3.e-4 100000 + run -559.169748890031 1.e-3 100000 } @test "SO2" { # 17.5645s @@ -146,14 +146,14 @@ function run_stoch() { [[ -n $TRAVIS ]] && skip qp set_file c2h2.ezfio qp set_mo_class --act="[1-30]" --del="[31-36]" - run -12.3685464085969 3.e-4 100000 + run -12.3685464085969 1.e-3 100000 } @test "N2" { # 18.0198s [[ -n $TRAVIS ]] && skip qp set_file n2.ezfio qp set_mo_class --core="[1,2]" --act="[3-40]" --del="[41-60]" - run -109.28681540699360 3.e-4 100000 + run -109.287917088107 1.e-3 100000 } @test "N2H4" { # 18.5006s @@ -167,7 +167,7 @@ function run_stoch() { [[ -n $TRAVIS ]] && skip qp set_file co2.ezfio qp set_mo_class --core="[1,2]" --act="[3-30]" --del="[31-42]" - run -187.968547952413 3.e-4 100000 + run -187.970184372047 1.e-3 100000 } @@ -182,6 +182,6 @@ function run_stoch() { [[ -n $TRAVIS ]] && skip qp set_file hcn.ezfio qp set_mo_class --core="[1,2]" --act="[3-40]" --del="[41-55]" - run -93.0771143355433 3.e-4 100000 + run -93.0777619629755 1.e-3 100000 } From a1ed2282faa2e78fee014197f1da167603988c8a Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 13 Apr 2022 19:54:14 +0200 Subject: [PATCH 10/12] Adjust tests --- src/fci/40.fci.bats | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/fci/40.fci.bats b/src/fci/40.fci.bats index 3139ebb8..1a0c5507 100644 --- a/src/fci/40.fci.bats +++ b/src/fci/40.fci.bats @@ -132,28 +132,28 @@ function run_stoch() { @test "ClF" { # 16.8864s [[ -n $TRAVIS ]] && skip qp set_file clf.ezfio - run -559.169748890031 1.e-3 100000 + run -559.169748890031 1.5e-3 100000 } @test "SO2" { # 17.5645s [[ -n $TRAVIS ]] && skip qp set_file so2.ezfio qp set_mo_class --core="[1-8]" --act="[9-87]" - run -41.5746738713298 3.e-4 100000 + run -41.5746738713298 1.5e-3 100000 } @test "C2H2" { # 17.6827s [[ -n $TRAVIS ]] && skip qp set_file c2h2.ezfio qp set_mo_class --act="[1-30]" --del="[31-36]" - run -12.3685464085969 1.e-3 100000 + run -12.3685464085969 2.e-3 100000 } @test "N2" { # 18.0198s [[ -n $TRAVIS ]] && skip qp set_file n2.ezfio qp set_mo_class --core="[1,2]" --act="[3-40]" --del="[41-60]" - run -109.287917088107 1.e-3 100000 + run -109.287917088107 1.5e-3 100000 } @test "N2H4" { # 18.5006s @@ -167,7 +167,7 @@ function run_stoch() { [[ -n $TRAVIS ]] && skip qp set_file co2.ezfio qp set_mo_class --core="[1,2]" --act="[3-30]" --del="[31-42]" - run -187.970184372047 1.e-3 100000 + run -187.970184372047 1.5e-3 100000 } From d692391b6b644dec09f468fc082552b382a02044 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 13 Apr 2022 23:58:55 +0200 Subject: [PATCH 11/12] Drone CI file --- .drone.yml | 38 +++++++++++++++++++++++++++++--------- drone/drone_docker.yml | 2 +- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0cbeb613..4d20225b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,30 +1,50 @@ --- kind: pipeline -type: ssh +type: docker name: default clone: depth: 10 steps: +- name: setup + image: ubuntu + commands: + - apt-get update + - DEBIAN_FRONTEND=noninteractive apt-get install -y \ + git \ + curl \ + wget \ + python3 \ + gfortran \ + gcc \ + g++ \ + make \ + build-essential \ + rsync \ + unzip \ + libopenblas-dev \ + pkg-config \ + m4 \ + python3 + - ln -s /usr/bin/python3 /usr/bin/python + + - name: configure - pull: never - image: ubuntu/qp2_env + image: ubuntu commands: - ./configure -i all -c ./config/gfortran_debug.cfg - source quantum_package.rc ; qp plugins download https://gitlab.com/scemama/qp_plugins_scemama - source quantum_package.rc ; qp plugins install champ - name: compile - pull: never - image: ubuntu/qp2_env + image: ubuntu commands: - - ninja + - source quantum_package.rc ; ninja - name: testing - pull: never - image: ubuntu/qp2_env + image: ubuntu commands: - - qp test + - source quantum_package.rc ; qp test -a diff --git a/drone/drone_docker.yml b/drone/drone_docker.yml index 0cbeb613..d1eb7175 100644 --- a/drone/drone_docker.yml +++ b/drone/drone_docker.yml @@ -1,6 +1,6 @@ --- kind: pipeline -type: ssh +type: docker name: default clone: From 75dca5f9b5d79681729f713366a120a5e26d6e3f Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 14 Apr 2022 01:15:21 +0200 Subject: [PATCH 12/12] Update droneCI --- .drone.yml | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/.drone.yml b/.drone.yml index 4d20225b..b213de7b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,44 +7,22 @@ clone: depth: 10 steps: -- name: setup - image: ubuntu - commands: - - apt-get update - - DEBIAN_FRONTEND=noninteractive apt-get install -y \ - git \ - curl \ - wget \ - python3 \ - gfortran \ - gcc \ - g++ \ - make \ - build-essential \ - rsync \ - unzip \ - libopenblas-dev \ - pkg-config \ - m4 \ - python3 - - ln -s /usr/bin/python3 /usr/bin/python - - name: configure - image: ubuntu + image: scemama666/qp2_env commands: - ./configure -i all -c ./config/gfortran_debug.cfg - - source quantum_package.rc ; qp plugins download https://gitlab.com/scemama/qp_plugins_scemama - - source quantum_package.rc ; qp plugins install champ + - bash -c "source quantum_package.rc ; qp plugins download https://gitlab.com/scemama/qp_plugins_scemama" + - bash -c "source quantum_package.rc ; qp plugins install champ" - name: compile - image: ubuntu + image: scemama666/qp2_env commands: - - source quantum_package.rc ; ninja + - bash -c "source quantum_package.rc ; exec ninja" - name: testing - image: ubuntu + image: scemama666/qp2_env commands: - - source quantum_package.rc ; qp test -a + - bash -c "source quantum_package.rc ; qp test -a"