From b567cd891f5757292892363940e9da6baf2e7330 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 09:46:11 +0200 Subject: [PATCH 01/31] Fix f77zmq --- configure | 8 ++++++-- external/qp2-dependencies | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 5b50d0d7..9b4c4b03 100755 --- a/configure +++ b/configure @@ -17,7 +17,11 @@ git submodule init git submodule update # Update ARM or x86 dependencies -ARCHITECTURE=$(uname -m) +SYSTEM=$(uname -s) +if [[ $SYSTEM = "Linux" ]] ; then + SYSTEM="" +fi +ARCHITECTURE=$(uname -m)$SYSTEM cd ${QP_ROOT}/external/qp2-dependencies git checkout master git pull @@ -232,7 +236,7 @@ EOF execute << EOF cd "\${QP_ROOT}"/external - tar --gunzip --extract --file qp2-dependencies/f77-zmq-4.3.2.tar.gz + tar --gunzip --extract --file qp2-dependencies/f77-zmq-4.3.?.tar.gz cd f77-zmq-* ./configure --prefix=\$QP_ROOT export ZMQ_H="\$QP_ROOT"/include/zmq.h diff --git a/external/qp2-dependencies b/external/qp2-dependencies index ce14f57b..fd43778e 160000 --- a/external/qp2-dependencies +++ b/external/qp2-dependencies @@ -1 +1 @@ -Subproject commit ce14f57b50511825a9fedb096749200779d3f4d4 +Subproject commit fd43778e12bb5858c4c780c34346be0f158b8cc7 From 6757810f566384c8cb053a50631adc2bf5c72627 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 10:10:28 +0200 Subject: [PATCH 02/31] Added config/gfortran_macos.cfg --- config/gfortran_macos.cfg | 62 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 config/gfortran_macos.cfg diff --git a/config/gfortran_macos.cfg b/config/gfortran_macos.cfg new file mode 100644 index 00000000..b7781a68 --- /dev/null +++ b/config/gfortran_macos.cfg @@ -0,0 +1,62 @@ +# Common flags +############## +# +# -ffree-line-length-none : Needed for IRPF90 which produces long lines +# -lblas -llapack : Link with libblas and liblapack libraries provided by the system +# -I . : Include the curent directory (Mandatory) +# +# --ninja : Allow the utilisation of ninja. (Mandatory) +# --align=32 : Align all provided arrays on a 32-byte boundary +# +# +[COMMON] +FC : gfortran -ffree-line-length-none -I . -g -fPIC +LAPACK_LIB : -llapack -lblas +IRPF90 : irpf90 +IRPF90_FLAGS : --ninja --align=32 -DSET_NESTED -DMACOS + +# Global options +################ +# +# 1 : Activate +# 0 : Deactivate +# +[OPTION] +MODE : OPT ; [ OPT | PROFILE | DEBUG ] : Chooses the section below +CACHE : 0 ; Enable cache_compile.py +OPENMP : 1 ; Append OpenMP flags + +# Optimization flags +#################### +# +# -Ofast : Disregard strict standards compliance. Enables all -O3 optimizations. +# It also enables optimizations that are not valid +# for all standard-compliant programs. It turns on +# -ffast-math and the Fortran-specific +# -fno-protect-parens and -fstack-arrays. +[OPT] +FCFLAGS : -Ofast -march=native + +# Profiling flags +################# +# +[PROFILE] +FC : -p -g +FCFLAGS : -Ofast + +# Debugging flags +################# +# +# -fcheck=all : Checks uninitialized variables, array subscripts, etc... +# -g : Extra debugging information +# +[DEBUG] +FCFLAGS : -fcheck=all -g + +# OpenMP flags +################# +# +[OPENMP] +FC : -fopenmp +IRPF90_FLAGS : --openmp + From a2b2c9958a15a58287a24fd5bc8bfdef98e450ca Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 10:13:44 +0200 Subject: [PATCH 03/31] Fixed huge_tlb flag on mac --- src/utils/fortran_mmap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/utils/fortran_mmap.c b/src/utils/fortran_mmap.c index 52df2476..ea37c582 100644 --- a/src/utils/fortran_mmap.c +++ b/src/utils/fortran_mmap.c @@ -22,7 +22,11 @@ void* mmap_fortran(char* filename, size_t bytes, int* file_descr, int read_only) perror("Error opening mmap file for reading"); exit(EXIT_FAILURE); } +#ifdef _GNU_SOURCE map = mmap(NULL, bytes, PROT_READ, MAP_SHARED | MAP_HUGETLB, fd, 0); +#else + map = mmap(NULL, bytes, PROT_READ, MAP_SHARED, fd, 0); +#endif if (map == MAP_FAILED) { /* try again without huge pages */ map = mmap(NULL, bytes, PROT_READ, MAP_SHARED, fd, 0); @@ -53,7 +57,11 @@ void* mmap_fortran(char* filename, size_t bytes, int* file_descr, int read_only) exit(EXIT_FAILURE); } +#ifdef _GNU_SOURCE map = mmap(NULL, bytes, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_HUGETLB, fd, 0); +#else + map = mmap(NULL, bytes, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +#endif if (map == MAP_FAILED) { /* try again without huge pages */ map = mmap(NULL, bytes, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); From b51679b35ecc59ea8746401cc0e9b8cc14aace0a Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 11:20:51 +0200 Subject: [PATCH 04/31] Fix zcat --- bin/zcat | 15 +++++++++++++++ configure | 1 + external/qp2-dependencies | 2 +- scripts/compilation/qp_create_ninja | 3 ++- src/ezfio_files/00.create.bats | 1 - 5 files changed, 19 insertions(+), 3 deletions(-) create mode 100755 bin/zcat diff --git a/bin/zcat b/bin/zcat new file mode 100755 index 00000000..ebf64b7d --- /dev/null +++ b/bin/zcat @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +import sys +import gzip + +# Check if a file path has been provided +if len(sys.argv) < 2: + print("Usage: zcat ") + sys.exit(1) + +# Open the gzip file +with gzip.open(sys.argv[1], "rt") as f: + # Read the contents of the file and print to standard output + print(f.read()) + diff --git a/configure b/configure index 9b4c4b03..d4e27ede 100755 --- a/configure +++ b/configure @@ -226,6 +226,7 @@ EOF cd "\${QP_ROOT}"/external tar --gunzip --extract --file qp2-dependencies/zeromq-4.2.5.tar.gz cd zeromq-* + [[ ${SYSTEM} = Darwin ]] && ./autogen.sh ./configure --prefix="\$QP_ROOT" --without-libsodium --enable-libunwind=no make -j 8 make install diff --git a/external/qp2-dependencies b/external/qp2-dependencies index fd43778e..b9e877d9 160000 --- a/external/qp2-dependencies +++ b/external/qp2-dependencies @@ -1 +1 @@ -Subproject commit fd43778e12bb5858c4c780c34346be0f158b8cc7 +Subproject commit b9e877d9a9444a2aac23ec94b4a174caa4a10dd2 diff --git a/scripts/compilation/qp_create_ninja b/scripts/compilation/qp_create_ninja index aad85778..aa93afb3 100755 --- a/scripts/compilation/qp_create_ninja +++ b/scripts/compilation/qp_create_ninja @@ -40,7 +40,8 @@ from qp_path import QP_ROOT, QP_SRC, QP_EZFIO LIB = " -lz" EZFIO_LIB = join("$QP_ROOT", "lib", "libezfio_irp.a") -ZMQ_LIB = join("$QP_ROOT", "lib", "libf77zmq.a") + " " + join("$QP_ROOT", "lib", "libzmq.a") + " -lstdc++ -lrt -ldl" +ZMQ_LIB = "-lzmq -lf77zmq" +#ZMQ_LIB = join("$QP_ROOT", "lib", "libf77zmq.a") + " " + join("$QP_ROOT", "lib", "libzmq.a") + " -lstdc++ -lrt -ldl" ROOT_BUILD_NINJA = join("$QP_ROOT", "config", "build.ninja") ROOT_BUILD_NINJA_EXP = join(QP_ROOT, "config", "build.ninja") ROOT_BUILD_NINJA_EXP_tmp = join(QP_ROOT, "config", "build.ninja.tmp") diff --git a/src/ezfio_files/00.create.bats b/src/ezfio_files/00.create.bats index cfa6247d..496519f4 100644 --- a/src/ezfio_files/00.create.bats +++ b/src/ezfio_files/00.create.bats @@ -25,7 +25,6 @@ function run { @test "B-B" { - qp set_file b2_stretched.ezfio run b2_stretched.zmt 1 0 6-31g } From b2a593dd2fc8326a03defd20d7f30aa6b0291b4a Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 11:27:51 +0200 Subject: [PATCH 05/31] Improved zcat --- bin/zcat | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/bin/zcat b/bin/zcat index ebf64b7d..ae11ce84 100755 --- a/bin/zcat +++ b/bin/zcat @@ -1,15 +1,22 @@ -#!/usr/bin/env python3 +#!/bin/bash +# On Darwin: try gzcat if available, otherwise use Python + +if [[ $(uname -s) = Darwin ]] ; then + which gzcat &> /dev/null + if [[ $? -eq 0 ]] ; then + exec gzcat $@ + else + + exec python3 << EOF import sys import gzip - -# Check if a file path has been provided -if len(sys.argv) < 2: - print("Usage: zcat ") - sys.exit(1) - -# Open the gzip file -with gzip.open(sys.argv[1], "rt") as f: - # Read the contents of the file and print to standard output +with gzip.open("$1", "rt") as f: print(f.read()) +EOF + fi +else + command=$(which -a zcat | grep -v 'qp2/bin/' | head -1) + exec command +fi From fd1494482ff9f5d1748f84736611ecbcf51f770b Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 11:37:26 +0200 Subject: [PATCH 06/31] Fix create_executables_list.sh on Darwin --- scripts/module/create_executables_list.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/module/create_executables_list.sh b/scripts/module/create_executables_list.sh index 67e1aba2..74880249 100755 --- a/scripts/module/create_executables_list.sh +++ b/scripts/module/create_executables_list.sh @@ -11,7 +11,7 @@ fi cd ${QP_ROOT}/data rm -f executables -EXES=$(find -L ${QP_ROOT}/src -maxdepth 2 -depth -executable -type f | grep -e "${QP_ROOT}/src/[^/]*/[^/]*$" |sort ) +EXES=$(find -L ${QP_ROOT}/src -maxdepth 2 -depth -perm +111 -type f | grep -e "${QP_ROOT}/src/[^/]*/[^/]*$" |sort ) for EXE in $EXES do From 0db547ab4b881d12a44ce4944f74874f006e6c9a Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 12:22:04 +0200 Subject: [PATCH 07/31] Fix RSS on mac --- src/utils/memory.irp.f | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/utils/memory.irp.f b/src/utils/memory.irp.f index d5a066a1..336ac6ac 100644 --- a/src/utils/memory.irp.f +++ b/src/utils/memory.irp.f @@ -29,6 +29,8 @@ subroutine resident_memory(value) call usleep(10) value = 0.d0 +IRP_IF MACOS +IRP_ELSE iunit = getUnitAndOpen('/proc/self/status','r') do read(iunit,*,err=10,end=20) key, value @@ -39,6 +41,7 @@ subroutine resident_memory(value) end do 20 continue close(iunit) +IRP_ENDIF value = value / (1024.d0*1024.d0) call omp_unset_lock(file_lock) end function @@ -53,6 +56,9 @@ subroutine total_memory(value) character*(32) :: key double precision, intent(out) :: value + value = 0.d0 +IRP_IF MACOS +IRP_ELSE iunit = getUnitAndOpen('/proc/self/status','r') do read(iunit,*,err=10,end=20) key, value @@ -63,6 +69,7 @@ subroutine total_memory(value) end do 20 continue close(iunit) +IRP_ENDIF value = value / (1024.d0*1024.d0) end function From 7a6598f6ddf9e84ce09962a1b66c0d4adfcbb334 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 12:33:27 +0200 Subject: [PATCH 08/31] Fix oom killer on MacOS --- src/ezfio_files/ezfio.irp.f | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ezfio_files/ezfio.irp.f b/src/ezfio_files/ezfio.irp.f index 4f53b173..cc1ceb4e 100644 --- a/src/ezfio_files/ezfio.irp.f +++ b/src/ezfio_files/ezfio.irp.f @@ -31,6 +31,8 @@ BEGIN_PROVIDER [ character*(1024), ezfio_filename ] call ezfio_set_file(ezfio_filename) +IRP_IF MACOS +IRP_ELSE ! Adjust out-of-memory killer flag such that the current process will be ! killed first by the OOM killer, allowing compute nodes to survive integer :: getpid @@ -38,6 +40,7 @@ BEGIN_PROVIDER [ character*(1024), ezfio_filename ] write(pidc,*) getpid() write(command,*) 'echo 15 > /proc//'//trim(adjustl(pidc))//'/oom_adj' call system(command) +IRP_ENDIF PROVIDE file_lock From e920be45876fc2cd3d4d2a409fb5c7ee08898dc8 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 12:43:31 +0200 Subject: [PATCH 09/31] python -> python3 --- external/qp2-dependencies | 2 +- src/nuclei/write_pt_charges.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/external/qp2-dependencies b/external/qp2-dependencies index b9e877d9..fd43778e 160000 --- a/external/qp2-dependencies +++ b/external/qp2-dependencies @@ -1 +1 @@ -Subproject commit b9e877d9a9444a2aac23ec94b4a174caa4a10dd2 +Subproject commit fd43778e12bb5858c4c780c34346be0f158b8cc7 diff --git a/src/nuclei/write_pt_charges.py b/src/nuclei/write_pt_charges.py index 6dbcd5b8..dffe469b 100644 --- a/src/nuclei/write_pt_charges.py +++ b/src/nuclei/write_pt_charges.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import sys @@ -52,7 +52,7 @@ fncharges.write(" "+str(n_charges)+'\n') fncharges.close() mv_in_ezfio(EZFIO,tmp) -# Write the file containing the charges and set in EZFIO folder +# Write the file containing the charges and set in EZFIO folder tmp="pts_charge_z" fcharges = open(tmp,'w') fcharges.write(" 1\n") From d64dfb3d5959ae63296482b867149adc6c8199a8 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 12:45:15 +0200 Subject: [PATCH 10/31] Python -> Python3 --- src/hartree_fock/10.hf.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hartree_fock/10.hf.bats b/src/hartree_fock/10.hf.bats index df566032..85e98ecc 100644 --- a/src/hartree_fock/10.hf.bats +++ b/src/hartree_fock/10.hf.bats @@ -39,7 +39,7 @@ rm -rf $EZFIO qp create_ezfio -b def2-svp hcn.xyz -o $EZFIO qp run scf mv hcn_charges.xyz ${EZFIO}_point_charges.xyz -python write_pt_charges.py ${EZFIO} +python3 write_pt_charges.py ${EZFIO} qp set nuclei point_charges True qp run scf | tee ${EZFIO}.pt_charges.out energy="$(ezfio get hartree_fock energy)" From 6a47bb309dac85a900291da319030668c664a4d4 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 12:47:54 +0200 Subject: [PATCH 11/31] Add python bash in bin --- bin/python | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 bin/python diff --git a/bin/python b/bin/python new file mode 100755 index 00000000..c5b1d08f --- /dev/null +++ b/bin/python @@ -0,0 +1,4 @@ +#!/bin/bash + +exec python3 $@ + From 538b6bf149dea036bf413f86690d26795f5b8d2f Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 13:03:46 +0200 Subject: [PATCH 12/31] introduce std=legacy flag --- config/gfortran_macos.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/gfortran_macos.cfg b/config/gfortran_macos.cfg index b7781a68..4fffca29 100644 --- a/config/gfortran_macos.cfg +++ b/config/gfortran_macos.cfg @@ -10,7 +10,7 @@ # # [COMMON] -FC : gfortran -ffree-line-length-none -I . -g -fPIC +FC : gfortran -ffree-line-length-none -I . -g -fPIC -std=legacy LAPACK_LIB : -llapack -lblas IRPF90 : irpf90 IRPF90_FLAGS : --ninja --align=32 -DSET_NESTED -DMACOS From 1cbb555220d718989de7f10a6c0a6e80a6a00875 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 14:26:09 +0200 Subject: [PATCH 13/31] Added -std=legacy to gfortran files --- config/gfortran.cfg | 2 +- config/gfortran_armpl.cfg | 2 +- config/gfortran_avx.cfg | 2 +- config/gfortran_debug.cfg | 2 +- config/gfortran_mpi.cfg | 2 +- config/gfortran_openblas.cfg | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/gfortran.cfg b/config/gfortran.cfg index 33ce48ba..41181c32 100644 --- a/config/gfortran.cfg +++ b/config/gfortran.cfg @@ -10,7 +10,7 @@ # # [COMMON] -FC : gfortran -g -ffree-line-length-none -I . -fPIC -march=native +FC : gfortran -g -ffree-line-length-none -I . -fPIC -march=native -std=legacy LAPACK_LIB : -lblas -llapack IRPF90 : irpf90 IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED diff --git a/config/gfortran_armpl.cfg b/config/gfortran_armpl.cfg index fb5ee1cc..db0904e2 100644 --- a/config/gfortran_armpl.cfg +++ b/config/gfortran_armpl.cfg @@ -13,7 +13,7 @@ # # [COMMON] -FC : gfortran -g -ffree-line-length-none -I . -fPIC -march=native +FC : gfortran -g -ffree-line-length-none -I . -fPIC -march=native -std=legacy LAPACK_LIB : -larmpl_lp64 IRPF90 : irpf90 IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED diff --git a/config/gfortran_avx.cfg b/config/gfortran_avx.cfg index 747dff67..5b51c640 100644 --- a/config/gfortran_avx.cfg +++ b/config/gfortran_avx.cfg @@ -10,7 +10,7 @@ # # [COMMON] -FC : gfortran -ffree-line-length-none -I . -mavx -g -fPIC +FC : gfortran -ffree-line-length-none -I . -mavx -g -fPIC -std=legacy LAPACK_LIB : -llapack -lblas IRPF90 : irpf90 IRPF90_FLAGS : --ninja --align=32 -DSET_NESTED diff --git a/config/gfortran_debug.cfg b/config/gfortran_debug.cfg index 51e5a500..f903142a 100644 --- a/config/gfortran_debug.cfg +++ b/config/gfortran_debug.cfg @@ -10,7 +10,7 @@ # # [COMMON] -FC : gfortran -g -ffree-line-length-none -I . -fPIC +FC : gfortran -g -ffree-line-length-none -I . -fPIC -std=legacy LAPACK_LIB : -lblas -llapack IRPF90 : irpf90 IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED diff --git a/config/gfortran_mpi.cfg b/config/gfortran_mpi.cfg index 1af3ca45..7cc88f1f 100644 --- a/config/gfortran_mpi.cfg +++ b/config/gfortran_mpi.cfg @@ -10,7 +10,7 @@ # # [COMMON] -FC : mpif90 -ffree-line-length-none -I . -g -fPIC +FC : mpif90 -ffree-line-length-none -I . -g -fPIC -std=legacy LAPACK_LIB : -lblas -llapack IRPF90 : irpf90 IRPF90_FLAGS : --ninja --align=32 -DMPI -DSET_NESTED diff --git a/config/gfortran_openblas.cfg b/config/gfortran_openblas.cfg index ab67d8c3..5db46fce 100644 --- a/config/gfortran_openblas.cfg +++ b/config/gfortran_openblas.cfg @@ -10,7 +10,7 @@ # # [COMMON] -FC : gfortran -g -ffree-line-length-none -I . -fPIC -march=native +FC : gfortran -g -ffree-line-length-none -I . -fPIC -march=native -std=legacy LAPACK_LIB : -lopenblas IRPF90 : irpf90 IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED From 5e555a269657cf6121fd024014a79ad93a76947e Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 14:34:11 +0200 Subject: [PATCH 14/31] Update qpsh for Darwin --- bin/qpsh | 3 ++- external/qp2-dependencies | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/qpsh b/bin/qpsh index 1c511248..8db562bb 100755 --- a/bin/qpsh +++ b/bin/qpsh @@ -1,6 +1,7 @@ #!/bin/bash -export QP_ROOT=$(dirname "$(readlink -f "$0")")/.. +REALPATH=$( cd "$(dirname "$0")" ; pwd -P ) +export QP_ROOT=${REALPATH}/.. bash --init-file <(cat << EOF [[ -f /etc/bashrc ]] && source /etc/bashrc diff --git a/external/qp2-dependencies b/external/qp2-dependencies index fd43778e..b9e877d9 160000 --- a/external/qp2-dependencies +++ b/external/qp2-dependencies @@ -1 +1 @@ -Subproject commit fd43778e12bb5858c4c780c34346be0f158b8cc7 +Subproject commit b9e877d9a9444a2aac23ec94b4a174caa4a10dd2 From 85ba1583d517fa85044af8e1c48d7d4d82814344 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 14:45:44 +0200 Subject: [PATCH 15/31] Fix configure for Linux --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index d4e27ede..3dd03017 100755 --- a/configure +++ b/configure @@ -226,7 +226,7 @@ EOF cd "\${QP_ROOT}"/external tar --gunzip --extract --file qp2-dependencies/zeromq-4.2.5.tar.gz cd zeromq-* - [[ ${SYSTEM} = Darwin ]] && ./autogen.sh + [[ "${SYSTEM}" = "Darwin" ]] && ./autogen.sh ./configure --prefix="\$QP_ROOT" --without-libsodium --enable-libunwind=no make -j 8 make install From 3632cb9c706f602a78954dddcba4ad3b26edea5b Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 14:52:03 +0200 Subject: [PATCH 16/31] Fix -lzmq --- scripts/compilation/qp_create_ninja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/compilation/qp_create_ninja b/scripts/compilation/qp_create_ninja index aa93afb3..167dbca9 100755 --- a/scripts/compilation/qp_create_ninja +++ b/scripts/compilation/qp_create_ninja @@ -40,7 +40,7 @@ from qp_path import QP_ROOT, QP_SRC, QP_EZFIO LIB = " -lz" EZFIO_LIB = join("$QP_ROOT", "lib", "libezfio_irp.a") -ZMQ_LIB = "-lzmq -lf77zmq" +ZMQ_LIB = "-lf77zmq -lzmq" #ZMQ_LIB = join("$QP_ROOT", "lib", "libf77zmq.a") + " " + join("$QP_ROOT", "lib", "libzmq.a") + " -lstdc++ -lrt -ldl" ROOT_BUILD_NINJA = join("$QP_ROOT", "config", "build.ninja") ROOT_BUILD_NINJA_EXP = join(QP_ROOT, "config", "build.ninja") From 2bd1a07b6cdc9ae367722cf15ad65eb77caebbad Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 15:55:43 +0200 Subject: [PATCH 17/31] Fix zcat --- bin/zcat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/zcat b/bin/zcat index ae11ce84..715d4842 100755 --- a/bin/zcat +++ b/bin/zcat @@ -17,6 +17,6 @@ EOF fi else command=$(which -a zcat | grep -v 'qp2/bin/' | head -1) - exec command + exec $command $@ fi From f66ee4343abb41c993727982424d3a17972b3aa0 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 18 Apr 2023 16:02:43 +0200 Subject: [PATCH 18/31] Fixed minor bugs --- scripts/module/create_executables_list.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/module/create_executables_list.sh b/scripts/module/create_executables_list.sh index 74880249..41d8853d 100755 --- a/scripts/module/create_executables_list.sh +++ b/scripts/module/create_executables_list.sh @@ -11,7 +11,11 @@ fi cd ${QP_ROOT}/data rm -f executables +if [[ "$(uname -s)" = "Darwin" ]] ; then EXES=$(find -L ${QP_ROOT}/src -maxdepth 2 -depth -perm +111 -type f | grep -e "${QP_ROOT}/src/[^/]*/[^/]*$" |sort ) +else +EXES=$(find -L ${QP_ROOT}/src -maxdepth 2 -depth -executable -type f | grep -e "${QP_ROOT}/src/[^/]*/[^/]*$" |sort ) +fi for EXE in $EXES do From e8dbceb4a8e97310ee0d7d5f42845fb36b701202 Mon Sep 17 00:00:00 2001 From: Abdallah Ammar Date: Sat, 23 Sep 2023 10:24:51 +0200 Subject: [PATCH 19/31] minor modif --- src/non_h_ints_mu/tc_integ_num.irp.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/non_h_ints_mu/tc_integ_num.irp.f b/src/non_h_ints_mu/tc_integ_num.irp.f index ee34f531..5a088331 100644 --- a/src/non_h_ints_mu/tc_integ_num.irp.f +++ b/src/non_h_ints_mu/tc_integ_num.irp.f @@ -47,7 +47,7 @@ call total_memory(mem) mem = max(1.d0, qp_max_mem - mem) n_double = mem * 1.d8 - n_blocks = min(n_double / (n_points_extra_final_grid * 4), 1.d0*n_points_final_grid) + n_blocks = int(min(n_double / (n_points_extra_final_grid * 4.d0), 1.d0*n_points_final_grid)) n_rest = int(mod(n_points_final_grid, n_blocks)) n_pass = int((n_points_final_grid - n_rest) / n_blocks) From ede0bf7152f514f2ac05eb7f162c61534f6f59eb Mon Sep 17 00:00:00 2001 From: Abdallah Ammar Date: Sat, 23 Sep 2023 10:30:38 +0200 Subject: [PATCH 20/31] minor modif --- src/tc_keywords/j1b_pen.irp.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tc_keywords/j1b_pen.irp.f b/src/tc_keywords/j1b_pen.irp.f index 2d5e59a9..56bc63dc 100644 --- a/src/tc_keywords/j1b_pen.irp.f +++ b/src/tc_keywords/j1b_pen.irp.f @@ -91,7 +91,7 @@ print *, ' parameters for nuclei jastrow' print *, ' i, Z, j1b_pen, j1b_pen_coef' do i = 1, nucl_num - write(*,"(I4, 2x, 3(E15.7, 2X))"), i, nucl_charge(i), j1b_pen(i), j1b_pen_coef(i) + write(*,"(I4, 2x, 3(E15.7, 2X))") i, nucl_charge(i), j1b_pen(i), j1b_pen_coef(i) enddo END_PROVIDER From 03754f1d5f73072a9f28f4cc0268f6efa3b1ed5d Mon Sep 17 00:00:00 2001 From: Abdallah Ammar Date: Sat, 23 Sep 2023 11:26:25 +0200 Subject: [PATCH 21/31] noL_0e in tc-scf --- src/tc_scf/fock_three_hermit.irp.f | 7 ++++++- src/tc_scf/rh_tcscf_diis.irp.f | 12 +++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/tc_scf/fock_three_hermit.irp.f b/src/tc_scf/fock_three_hermit.irp.f index 6c132189..00d47fae 100644 --- a/src/tc_scf/fock_three_hermit.irp.f +++ b/src/tc_scf/fock_three_hermit.irp.f @@ -95,7 +95,12 @@ BEGIN_PROVIDER [double precision, diag_three_elem_hf] if(.not. three_body_h_tc) then - diag_three_elem_hf = 0.d0 + if(noL_standard) then + PROVIDE noL_0e + diag_three_elem_hf = noL_0e + else + diag_three_elem_hf = 0.d0 + endif else diff --git a/src/tc_scf/rh_tcscf_diis.irp.f b/src/tc_scf/rh_tcscf_diis.irp.f index 0504373c..66fc83bd 100644 --- a/src/tc_scf/rh_tcscf_diis.irp.f +++ b/src/tc_scf/rh_tcscf_diis.irp.f @@ -71,10 +71,7 @@ subroutine rh_tcscf_diis() etc_tot = TC_HF_energy etc_1e = TC_HF_one_e_energy etc_2e = TC_HF_two_e_energy - etc_3e = 0.d0 - if(three_body_h_tc) then - etc_3e = diag_three_elem_hf - endif + etc_3e = diag_three_elem_hf !tc_grad = grad_non_hermit er_DIIS = maxval(abs(FQS_SQF_mo)) e_delta = dabs(etc_tot - e_save) @@ -202,10 +199,7 @@ subroutine rh_tcscf_diis() etc_tot = TC_HF_energy etc_1e = TC_HF_one_e_energy etc_2e = TC_HF_two_e_energy - etc_3e = 0.d0 - if(three_body_h_tc) then - etc_3e = diag_three_elem_hf - endif + etc_3e = diag_three_elem_hf !tc_grad = grad_non_hermit er_DIIS = maxval(abs(FQS_SQF_mo)) e_delta = dabs(etc_tot - e_save) @@ -245,7 +239,7 @@ subroutine rh_tcscf_diis() write(json_unit, json_real_fmt) ' delta Energy ', e_delta write(json_unit, json_real_fmt) ' DIIS error ', er_DIIS write(json_unit, json_real_fmt) ' level_shift ', level_shift_tcscf - write(json_unit, json_real_fmt) ' DIIS ', dim_DIIS + write(json_unit, json_int_fmt) ' DIIS ', dim_DIIS write(json_unit, json_real_fmt) ' Wall time (min)', (t1-t0)/60.d0 call unlock_io From a4a799837bc7dba8ca2c7e39abc6716056cf5de7 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 13 Oct 2023 15:10:51 +0200 Subject: [PATCH 22/31] Fix natorb with numerical integrals of Jastrow --- configure | 19 +++++++++++++++++-- src/tc_bi_ortho/save_tc_bi_ortho_nat.irp.f | 15 ++++++++++++++- src/tc_bi_ortho/tc_natorb.irp.f | 6 ++++++ 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/configure b/configure index c328c4f0..3ccdf37b 100755 --- a/configure +++ b/configure @@ -211,6 +211,7 @@ EOF execute << EOF cd "\${QP_ROOT}"/external wget https://github.com/TREX-CoE/trexio/releases/download/v${VERSION}/trexio-${VERSION}.tar.gz + rm -rf trexio-${VERSION} tar -zxf trexio-${VERSION}.tar.gz && rm trexio-${VERSION}.tar.gz cd trexio-${VERSION} ./configure --prefix=\${QP_ROOT} --without-hdf5 CFLAGS='-g' @@ -224,6 +225,7 @@ EOF execute << EOF cd "\${QP_ROOT}"/external wget https://github.com/TREX-CoE/trexio/releases/download/v${VERSION}/trexio-${VERSION}.tar.gz + rm -rf trexio-${VERSION} tar -zxf trexio-${VERSION}.tar.gz && rm trexio-${VERSION}.tar.gz cd trexio-${VERSION} ./configure --prefix=\${QP_ROOT} CFLAGS="-g" @@ -235,11 +237,24 @@ EOF execute << EOF cd "\${QP_ROOT}"/external wget https://github.com/TREX-CoE/qmckl/releases/download/v${VERSION}/qmckl-${VERSION}.tar.gz + rm -rf qmckl-${VERSION} tar -zxf qmckl-${VERSION}.tar.gz && rm qmckl-${VERSION}.tar.gz cd qmckl-${VERSION} ./configure --prefix=\${QP_ROOT} --enable-hpc --disable-doc CFLAGS='-g' make && make -j 4 check && make install EOF + elif [[ ${PACKAGE} = qmckl-intel ]] ; then + + VERSION=0.5.4 + execute << EOF + cd "\${QP_ROOT}"/external + wget https://github.com/TREX-CoE/qmckl/releases/download/v${VERSION}/qmckl-${VERSION}.tar.gz + rm -rf qmckl-${VERSION} + tar -zxf qmckl-${VERSION}.tar.gz && rm qmckl-${VERSION}.tar.gz + cd qmckl-${VERSION} + ./configure --prefix=\${QP_ROOT} --enable-hpc --disable-doc --with-icc --with-ifort CFLAGS='-g' + make && make -j 4 check && make install +EOF elif [[ ${PACKAGE} = gmp ]] ; then @@ -378,13 +393,13 @@ fi TREXIO=$(find_lib -ltrexio) if [[ ${TREXIO} = $(not_found) ]] ; then - error "TREXIO (trexio,trexio-nohdf5) is not installed. If you don't have HDF5, use trexio-nohdf5" + error "TREXIO (trexio | trexio-nohdf5) is not installed. If you don't have HDF5, use trexio-nohdf5" fail fi QMCKL=$(find_lib -lqmckl) if [[ ${QMCKL} = $(not_found) ]] ; then - error "QMCkl (qmckl) is not installed." + error "QMCkl (qmckl | qmckl-intel) is not installed." fail fi diff --git a/src/tc_bi_ortho/save_tc_bi_ortho_nat.irp.f b/src/tc_bi_ortho/save_tc_bi_ortho_nat.irp.f index 6b239cfc..ffcd9b22 100644 --- a/src/tc_bi_ortho/save_tc_bi_ortho_nat.irp.f +++ b/src/tc_bi_ortho/save_tc_bi_ortho_nat.irp.f @@ -15,7 +15,20 @@ program tc_natorb_bi_ortho PROVIDE tc_grid1_a tc_grid1_r my_n_pt_r_grid = tc_grid1_r my_n_pt_a_grid = tc_grid1_a - touch my_grid_becke my_n_pt_r_grid my_n_pt_a_grid + touch my_grid_becke my_n_pt_r_grid my_n_pt_a_grid + + if(j1b_type .ge. 100) then + my_extra_grid_becke = .True. + PROVIDE tc_grid2_a tc_grid2_r + my_n_pt_r_extra_grid = tc_grid2_r + my_n_pt_a_extra_grid = tc_grid2_a + touch my_extra_grid_becke my_n_pt_r_extra_grid my_n_pt_a_extra_grid + + call write_int(6, my_n_pt_r_extra_grid, 'radial internal grid over') + call write_int(6, my_n_pt_a_extra_grid, 'angular internal grid over') + endif + + read_wf = .True. touch read_wf diff --git a/src/tc_bi_ortho/tc_natorb.irp.f b/src/tc_bi_ortho/tc_natorb.irp.f index a72d356a..50f448d6 100644 --- a/src/tc_bi_ortho/tc_natorb.irp.f +++ b/src/tc_bi_ortho/tc_natorb.irp.f @@ -29,6 +29,12 @@ write(*, '(100(F16.10,X))') -dm_tmp(:,i) enddo + print *, ' Transition density matrix AO' + do i = 1, ao_num + write(*, '(100(F16.10,X))') tc_transition_matrix_ao(:,i,1,1) + enddo + stop + thr_d = 1.d-6 thr_nd = 1.d-6 thr_deg = 1.d-3 From 676d5c3a7366bb11e98d6f42905e52904f986e86 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Sun, 15 Oct 2023 14:01:49 +0200 Subject: [PATCH 23/31] Fixed missing variables in openmp block --- src/ao_one_e_ints/kin_ao_ints.irp.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ao_one_e_ints/kin_ao_ints.irp.f b/src/ao_one_e_ints/kin_ao_ints.irp.f index a5ee0670..3a97d095 100644 --- a/src/ao_one_e_ints/kin_ao_ints.irp.f +++ b/src/ao_one_e_ints/kin_ao_ints.irp.f @@ -52,7 +52,7 @@ !$OMP DEFAULT(NONE) & !$OMP PRIVATE(A_center,B_center,power_A,power_B,& !$OMP overlap_y, overlap_z, overlap, & - !$OMP alpha, beta,i,j,c,d_a_2,d_2,deriv_tmp, & + !$OMP alpha, beta, n, l, i,j,c,d_a_2,d_2,deriv_tmp, & !$OMP overlap_x0,overlap_y0,overlap_z0) & !$OMP SHARED(nucl_coord,ao_power,ao_prim_num, & !$OMP ao_deriv2_x,ao_deriv2_y,ao_deriv2_z,ao_num,ao_coef_normalized_ordered_transp,ao_nucl, & From 8b34372baa47feb8f4dfb350eb6d24cbc08e1d61 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 16 Oct 2023 16:18:58 +0200 Subject: [PATCH 24/31] Merged erf modules, and moved mu_erf into hamiltonian module --- scripts/module/module_handler.py | 4 +--- src/ao_tc_eff_map/NEED | 2 +- src/ao_two_e_erf_ints/EZFIO.cfg | 13 ------------ src/ao_two_e_erf_ints/NEED | 1 - src/ao_two_e_erf_ints/README.rst | 19 ------------------ src/ao_two_e_ints/EZFIO.cfg | 7 +++++++ src/ao_two_e_ints/NEED | 1 + .../integrals_erf_in_map_slave.irp.f | 0 .../map_integrals_erf.irp.f | 0 .../providers_ao_erf.irp.f | 0 .../routines_save_integrals_erf.irp.f | 0 .../two_e_integrals_erf.irp.f | 0 src/dft_one_e/NEED | 2 -- src/dummy/NEED | 3 +-- src/hamiltonian/EZFIO.cfg | 8 ++++++++ src/hamiltonian/NEED | 0 src/hamiltonian/README.rst | 5 +++++ src/mo_two_e_erf_ints/EZFIO.cfg | 6 ------ src/mo_two_e_erf_ints/NEED | 3 --- src/mo_two_e_erf_ints/README.rst | 20 ------------------- src/mo_two_e_ints/EZFIO.cfg | 7 +++++++ .../core_quantities_erf.irp.f | 0 .../ints_erf_3_index.irp.f | 0 .../map_integrals_erf.irp.f | 0 .../mo_bi_integrals_erf.irp.f | 0 .../routines_save_integrals_erf.irp.f | 0 src/tools/NEED | 1 - 27 files changed, 31 insertions(+), 71 deletions(-) delete mode 100644 src/ao_two_e_erf_ints/EZFIO.cfg delete mode 100644 src/ao_two_e_erf_ints/NEED delete mode 100644 src/ao_two_e_erf_ints/README.rst rename src/{ao_two_e_erf_ints => ao_two_e_ints}/integrals_erf_in_map_slave.irp.f (100%) rename src/{ao_two_e_erf_ints => ao_two_e_ints}/map_integrals_erf.irp.f (100%) rename src/{ao_two_e_erf_ints => ao_two_e_ints}/providers_ao_erf.irp.f (100%) rename src/{ao_two_e_erf_ints => ao_two_e_ints}/routines_save_integrals_erf.irp.f (100%) rename src/{ao_two_e_erf_ints => ao_two_e_ints}/two_e_integrals_erf.irp.f (100%) create mode 100644 src/hamiltonian/EZFIO.cfg create mode 100644 src/hamiltonian/NEED create mode 100644 src/hamiltonian/README.rst delete mode 100644 src/mo_two_e_erf_ints/EZFIO.cfg delete mode 100644 src/mo_two_e_erf_ints/NEED delete mode 100644 src/mo_two_e_erf_ints/README.rst rename src/{mo_two_e_erf_ints => mo_two_e_ints}/core_quantities_erf.irp.f (100%) rename src/{mo_two_e_erf_ints => mo_two_e_ints}/ints_erf_3_index.irp.f (100%) rename src/{mo_two_e_erf_ints => mo_two_e_ints}/map_integrals_erf.irp.f (100%) rename src/{mo_two_e_erf_ints => mo_two_e_ints}/mo_bi_integrals_erf.irp.f (100%) rename src/{mo_two_e_erf_ints => mo_two_e_ints}/routines_save_integrals_erf.irp.f (100%) diff --git a/scripts/module/module_handler.py b/scripts/module/module_handler.py index fbdee171..43030fc8 100755 --- a/scripts/module/module_handler.py +++ b/scripts/module/module_handler.py @@ -115,9 +115,7 @@ def get_l_module_descendant(d_child, l_module): except KeyError: print("Error: ", file=sys.stderr) print("`{0}` is not a submodule".format(module), file=sys.stderr) - print("Check the typo (spelling, case, '/', etc.) ", file=sys.stderr) -# pass - sys.exit(1) + raise return list(set(l)) diff --git a/src/ao_tc_eff_map/NEED b/src/ao_tc_eff_map/NEED index d9edb325..f768b75f 100644 --- a/src/ao_tc_eff_map/NEED +++ b/src/ao_tc_eff_map/NEED @@ -1,4 +1,4 @@ -ao_two_e_erf_ints +ao_two_e_ints mo_one_e_ints ao_many_one_e_ints dft_utils_in_r diff --git a/src/ao_two_e_erf_ints/EZFIO.cfg b/src/ao_two_e_erf_ints/EZFIO.cfg deleted file mode 100644 index 0af0e1d8..00000000 --- a/src/ao_two_e_erf_ints/EZFIO.cfg +++ /dev/null @@ -1,13 +0,0 @@ -[io_ao_two_e_integrals_erf] -type: Disk_access -doc: Read/Write |AO| integrals with the long range interaction from/to disk [ Write | Read | None ] -interface: ezfio,provider,ocaml -default: None - -[mu_erf] -type: double precision -doc: cutting of the interaction in the range separated model -interface: ezfio,provider,ocaml -default: 0.5 -ezfio_name: mu_erf - diff --git a/src/ao_two_e_erf_ints/NEED b/src/ao_two_e_erf_ints/NEED deleted file mode 100644 index b30cc39d..00000000 --- a/src/ao_two_e_erf_ints/NEED +++ /dev/null @@ -1 +0,0 @@ -ao_two_e_ints diff --git a/src/ao_two_e_erf_ints/README.rst b/src/ao_two_e_erf_ints/README.rst deleted file mode 100644 index 45c72b84..00000000 --- a/src/ao_two_e_erf_ints/README.rst +++ /dev/null @@ -1,19 +0,0 @@ -====================== -ao_two_e_erf_ints -====================== - -Here, all two-electron integrals (:math:`erf(\mu r_{12})/r_{12}`) are computed. -As they have 4 indices and many are zero, they are stored in a map, as defined -in :file:`utils/map_module.f90`. - -The main parameter of this module is :option:`ao_two_e_erf_ints mu_erf` which is the range-separation parameter. - -To fetch an |AO| integral, use the -`get_ao_two_e_integral_erf(i,j,k,l,ao_integrals_erf_map)` function. - - -The conventions are: -* For |AO| integrals : (ij|kl) = (11|22) = = <12|12> - - - diff --git a/src/ao_two_e_ints/EZFIO.cfg b/src/ao_two_e_ints/EZFIO.cfg index 9c017813..a489516e 100644 --- a/src/ao_two_e_ints/EZFIO.cfg +++ b/src/ao_two_e_ints/EZFIO.cfg @@ -35,3 +35,10 @@ type: logical doc: Perform Cholesky decomposition of AO integrals interface: ezfio,provider,ocaml default: False + +[io_ao_two_e_integrals_erf] +type: Disk_access +doc: Read/Write |AO| erf integrals from/to disk [ Write | Read | None ] +interface: ezfio,provider,ocaml +default: None + diff --git a/src/ao_two_e_ints/NEED b/src/ao_two_e_ints/NEED index ffc5e8be..542962ec 100644 --- a/src/ao_two_e_ints/NEED +++ b/src/ao_two_e_ints/NEED @@ -1,3 +1,4 @@ +hamiltonian ao_one_e_ints pseudo bitmask diff --git a/src/ao_two_e_erf_ints/integrals_erf_in_map_slave.irp.f b/src/ao_two_e_ints/integrals_erf_in_map_slave.irp.f similarity index 100% rename from src/ao_two_e_erf_ints/integrals_erf_in_map_slave.irp.f rename to src/ao_two_e_ints/integrals_erf_in_map_slave.irp.f diff --git a/src/ao_two_e_erf_ints/map_integrals_erf.irp.f b/src/ao_two_e_ints/map_integrals_erf.irp.f similarity index 100% rename from src/ao_two_e_erf_ints/map_integrals_erf.irp.f rename to src/ao_two_e_ints/map_integrals_erf.irp.f diff --git a/src/ao_two_e_erf_ints/providers_ao_erf.irp.f b/src/ao_two_e_ints/providers_ao_erf.irp.f similarity index 100% rename from src/ao_two_e_erf_ints/providers_ao_erf.irp.f rename to src/ao_two_e_ints/providers_ao_erf.irp.f diff --git a/src/ao_two_e_erf_ints/routines_save_integrals_erf.irp.f b/src/ao_two_e_ints/routines_save_integrals_erf.irp.f similarity index 100% rename from src/ao_two_e_erf_ints/routines_save_integrals_erf.irp.f rename to src/ao_two_e_ints/routines_save_integrals_erf.irp.f diff --git a/src/ao_two_e_erf_ints/two_e_integrals_erf.irp.f b/src/ao_two_e_ints/two_e_integrals_erf.irp.f similarity index 100% rename from src/ao_two_e_erf_ints/two_e_integrals_erf.irp.f rename to src/ao_two_e_ints/two_e_integrals_erf.irp.f diff --git a/src/dft_one_e/NEED b/src/dft_one_e/NEED index 615ee97e..667859a5 100644 --- a/src/dft_one_e/NEED +++ b/src/dft_one_e/NEED @@ -4,6 +4,4 @@ mo_one_e_ints mo_two_e_ints ao_one_e_ints ao_two_e_ints -mo_two_e_erf_ints -ao_two_e_erf_ints mu_of_r diff --git a/src/dummy/NEED b/src/dummy/NEED index 3d5eb1f7..1dcb7a25 100644 --- a/src/dummy/NEED +++ b/src/dummy/NEED @@ -1,6 +1,5 @@ ao_basis ao_one_e_ints -ao_two_e_erf_ints ao_two_e_ints aux_quantities becke_numerical_grid @@ -24,13 +23,13 @@ functionals generators_cas generators_full hartree_fock +hamiltonian iterations kohn_sham kohn_sham_rs mo_basis mo_guess mo_one_e_ints -mo_two_e_erf_ints mo_two_e_ints mpi nuclei diff --git a/src/hamiltonian/EZFIO.cfg b/src/hamiltonian/EZFIO.cfg new file mode 100644 index 00000000..672bfdfa --- /dev/null +++ b/src/hamiltonian/EZFIO.cfg @@ -0,0 +1,8 @@ +[mu_erf] +type: double precision +doc: cutting of the interaction in the range separated model +interface: ezfio,provider,ocaml +default: 0.5 +ezfio_name: mu_erf + + diff --git a/src/hamiltonian/NEED b/src/hamiltonian/NEED new file mode 100644 index 00000000..e69de29b diff --git a/src/hamiltonian/README.rst b/src/hamiltonian/README.rst new file mode 100644 index 00000000..c237f8d2 --- /dev/null +++ b/src/hamiltonian/README.rst @@ -0,0 +1,5 @@ +=========== +hamiltonian +=========== + +Parameters of the Hamiltonian. diff --git a/src/mo_two_e_erf_ints/EZFIO.cfg b/src/mo_two_e_erf_ints/EZFIO.cfg deleted file mode 100644 index 57137e65..00000000 --- a/src/mo_two_e_erf_ints/EZFIO.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[io_mo_two_e_integrals_erf] -type: Disk_access -doc: Read/Write MO integrals with the long range interaction from/to disk [ Write | Read | None ] -interface: ezfio,provider,ocaml -default: None - diff --git a/src/mo_two_e_erf_ints/NEED b/src/mo_two_e_erf_ints/NEED deleted file mode 100644 index 7adb17a1..00000000 --- a/src/mo_two_e_erf_ints/NEED +++ /dev/null @@ -1,3 +0,0 @@ -ao_two_e_erf_ints -mo_two_e_ints -mo_basis diff --git a/src/mo_two_e_erf_ints/README.rst b/src/mo_two_e_erf_ints/README.rst deleted file mode 100644 index b118e0c7..00000000 --- a/src/mo_two_e_erf_ints/README.rst +++ /dev/null @@ -1,20 +0,0 @@ -====================== -mo_two_e_erf_ints -====================== - -Here, all two-electron integrals (:math:`erf({\mu}_{erf} * r_{12})/r_{12}`) are computed. -As they have 4 indices and many are zero, they are stored in a map, as defined -in :file:`Utils/map_module.f90`. - -The range separation parameter :math:`{\mu}_{erf}` is the variable :option:`ao_two_e_erf_ints mu_erf`. - -To fetch an |MO| integral, use -`get_mo_two_e_integral_erf(i,j,k,l,mo_integrals_map_erf)` - -The conventions are: - -* For |MO| integrals : = <12|12> - -Be aware that it might not be the same conventions for |MO| and |AO| integrals. - - diff --git a/src/mo_two_e_ints/EZFIO.cfg b/src/mo_two_e_ints/EZFIO.cfg index ea47c51c..088a2416 100644 --- a/src/mo_two_e_ints/EZFIO.cfg +++ b/src/mo_two_e_ints/EZFIO.cfg @@ -17,3 +17,10 @@ doc: If `True`, computes all integrals except for the integrals having 3 or 4 vi interface: ezfio,provider,ocaml default: false +[io_mo_two_e_integrals_erf] +type: Disk_access +doc: Read/Write MO integrals with the long range interaction from/to disk [ Write | Read | None ] +interface: ezfio,provider,ocaml +default: None + + diff --git a/src/mo_two_e_erf_ints/core_quantities_erf.irp.f b/src/mo_two_e_ints/core_quantities_erf.irp.f similarity index 100% rename from src/mo_two_e_erf_ints/core_quantities_erf.irp.f rename to src/mo_two_e_ints/core_quantities_erf.irp.f diff --git a/src/mo_two_e_erf_ints/ints_erf_3_index.irp.f b/src/mo_two_e_ints/ints_erf_3_index.irp.f similarity index 100% rename from src/mo_two_e_erf_ints/ints_erf_3_index.irp.f rename to src/mo_two_e_ints/ints_erf_3_index.irp.f diff --git a/src/mo_two_e_erf_ints/map_integrals_erf.irp.f b/src/mo_two_e_ints/map_integrals_erf.irp.f similarity index 100% rename from src/mo_two_e_erf_ints/map_integrals_erf.irp.f rename to src/mo_two_e_ints/map_integrals_erf.irp.f diff --git a/src/mo_two_e_erf_ints/mo_bi_integrals_erf.irp.f b/src/mo_two_e_ints/mo_bi_integrals_erf.irp.f similarity index 100% rename from src/mo_two_e_erf_ints/mo_bi_integrals_erf.irp.f rename to src/mo_two_e_ints/mo_bi_integrals_erf.irp.f diff --git a/src/mo_two_e_erf_ints/routines_save_integrals_erf.irp.f b/src/mo_two_e_ints/routines_save_integrals_erf.irp.f similarity index 100% rename from src/mo_two_e_erf_ints/routines_save_integrals_erf.irp.f rename to src/mo_two_e_ints/routines_save_integrals_erf.irp.f diff --git a/src/tools/NEED b/src/tools/NEED index 0f4e17b0..ea465e92 100644 --- a/src/tools/NEED +++ b/src/tools/NEED @@ -1,5 +1,4 @@ fci -mo_two_e_erf_ints aux_quantities hartree_fock two_body_rdm From ad498b073e9103d1c0fdd4f17426c274aacefce8 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 16 Oct 2023 16:29:28 +0200 Subject: [PATCH 25/31] Added use_only_lr for long-range only integrals --- src/ao_two_e_ints/EZFIO.cfg | 5 +++++ src/ao_two_e_ints/two_e_integrals.irp.f | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/ao_two_e_ints/EZFIO.cfg b/src/ao_two_e_ints/EZFIO.cfg index a489516e..ff932b0c 100644 --- a/src/ao_two_e_ints/EZFIO.cfg +++ b/src/ao_two_e_ints/EZFIO.cfg @@ -42,3 +42,8 @@ doc: Read/Write |AO| erf integrals from/to disk [ Write | Read | None ] interface: ezfio,provider,ocaml default: None +[use_only_lr] +type: logical +doc: If true, use only the long range part of the two-electron integrals instead of 1/r12 +interface: ezfio, provider, ocaml +default: False diff --git a/src/ao_two_e_ints/two_e_integrals.irp.f b/src/ao_two_e_ints/two_e_integrals.irp.f index 148ebb62..b55b5f0d 100644 --- a/src/ao_two_e_ints/two_e_integrals.irp.f +++ b/src/ao_two_e_ints/two_e_integrals.irp.f @@ -21,9 +21,9 @@ double precision function ao_two_e_integral(i, j, k, l) double precision :: P_new(0:max_dim,3),P_center(3),fact_p,pp double precision :: Q_new(0:max_dim,3),Q_center(3),fact_q,qq - double precision :: ao_two_e_integral_schwartz_accel - - double precision :: ao_two_e_integral_cosgtos + double precision, external :: ao_two_e_integral_erf + double precision, external :: ao_two_e_integral_cosgtos + double precision, external :: ao_two_e_integral_schwartz_accel if(use_cosgtos) then @@ -31,13 +31,15 @@ double precision function ao_two_e_integral(i, j, k, l) ao_two_e_integral = ao_two_e_integral_cosgtos(i, j, k, l) - else + else if (use_only_lr) then - if (ao_prim_num(i) * ao_prim_num(j) * ao_prim_num(k) * ao_prim_num(l) > 1024 ) then + ao_two_e_integral = ao_two_e_integral_erf(i, j, k, l) + + else if (ao_prim_num(i) * ao_prim_num(j) * ao_prim_num(k) * ao_prim_num(l) > 1024 ) then ao_two_e_integral = ao_two_e_integral_schwartz_accel(i,j,k,l) - else + else dim1 = n_pt_max_integrals @@ -117,8 +119,6 @@ double precision function ao_two_e_integral(i, j, k, l) enddo ! q enddo ! p - endif - endif endif From 14d5268d1b986654c90d328c293b0d28ec6a05fa Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 16 Oct 2023 16:37:08 +0200 Subject: [PATCH 26/31] Fixing compilation --- src/ao_two_e_ints/providers_ao_erf.irp.f | 2 +- src/ao_two_e_ints/routines_save_integrals_erf.irp.f | 2 +- src/dft_one_e/mu_erf_dft.irp.f | 2 +- src/mo_two_e_ints/mo_bi_integrals_erf.irp.f | 2 +- src/mo_two_e_ints/routines_save_integrals_erf.irp.f | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ao_two_e_ints/providers_ao_erf.irp.f b/src/ao_two_e_ints/providers_ao_erf.irp.f index 293df29f..ddc1ec45 100644 --- a/src/ao_two_e_ints/providers_ao_erf.irp.f +++ b/src/ao_two_e_ints/providers_ao_erf.irp.f @@ -90,7 +90,7 @@ BEGIN_PROVIDER [ logical, ao_two_e_integrals_erf_in_map ] if (write_ao_two_e_integrals_erf) then call ezfio_set_work_empty(.False.) call map_save_to_disk(trim(ezfio_filename)//'/work/ao_ints_erf',ao_integrals_erf_map) - call ezfio_set_ao_two_e_erf_ints_io_ao_two_e_integrals_erf("Read") + call ezfio_set_ao_two_e_ints_io_ao_two_e_integrals_erf("Read") endif END_PROVIDER diff --git a/src/ao_two_e_ints/routines_save_integrals_erf.irp.f b/src/ao_two_e_ints/routines_save_integrals_erf.irp.f index 4b0cfad0..d980bc05 100644 --- a/src/ao_two_e_ints/routines_save_integrals_erf.irp.f +++ b/src/ao_two_e_ints/routines_save_integrals_erf.irp.f @@ -4,7 +4,7 @@ subroutine save_erf_two_e_integrals_ao PROVIDE ao_two_e_integrals_erf_in_map call ezfio_set_work_empty(.False.) call map_save_to_disk(trim(ezfio_filename)//'/work/ao_ints_erf',ao_integrals_erf_map) - call ezfio_set_ao_two_e_erf_ints_io_ao_two_e_integrals_erf('Read') + call ezfio_set_ao_two_e_ints_io_ao_two_e_integrals_erf('Read') end subroutine save_erf_two_e_ints_ao_into_ints_ao diff --git a/src/dft_one_e/mu_erf_dft.irp.f b/src/dft_one_e/mu_erf_dft.irp.f index 0b870564..08779f0e 100644 --- a/src/dft_one_e/mu_erf_dft.irp.f +++ b/src/dft_one_e/mu_erf_dft.irp.f @@ -3,7 +3,7 @@ BEGIN_PROVIDER [double precision, mu_erf_dft] BEGIN_DOC ! range separation parameter used in RS-DFT. ! -! It is set to mu_erf in order to be consistent with the module "ao_two_e_erf_ints" +! It is set to mu_erf in order to be consistent with the module "hamiltonian" END_DOC mu_erf_dft = mu_erf diff --git a/src/mo_two_e_ints/mo_bi_integrals_erf.irp.f b/src/mo_two_e_ints/mo_bi_integrals_erf.irp.f index e009b7d9..e7765d71 100644 --- a/src/mo_two_e_ints/mo_bi_integrals_erf.irp.f +++ b/src/mo_two_e_ints/mo_bi_integrals_erf.irp.f @@ -55,7 +55,7 @@ BEGIN_PROVIDER [ logical, mo_two_e_integrals_erf_in_map ] if (write_mo_two_e_integrals_erf) then call ezfio_set_work_empty(.False.) call map_save_to_disk(trim(ezfio_filename)//'/work/mo_ints_erf',mo_integrals_erf_map) - call ezfio_set_mo_two_e_erf_ints_io_mo_two_e_integrals_erf("Read") + call ezfio_set_mo_two_e_ints_io_mo_two_e_integrals_erf("Read") endif END_PROVIDER diff --git a/src/mo_two_e_ints/routines_save_integrals_erf.irp.f b/src/mo_two_e_ints/routines_save_integrals_erf.irp.f index 52fb8f63..9915b206 100644 --- a/src/mo_two_e_ints/routines_save_integrals_erf.irp.f +++ b/src/mo_two_e_ints/routines_save_integrals_erf.irp.f @@ -4,7 +4,7 @@ subroutine save_erf_two_e_integrals_mo PROVIDE mo_two_e_integrals_erf_in_map call ezfio_set_work_empty(.False.) call map_save_to_disk(trim(ezfio_filename)//'/work/mo_ints_erf',mo_integrals_erf_map) - call ezfio_set_mo_two_e_erf_ints_io_mo_two_e_integrals_erf('Read') + call ezfio_set_mo_two_e_ints_io_mo_two_e_integrals_erf('Read') end From d4d42f2851f815ff520f78c3bcd7615b8240dcc2 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 17 Oct 2023 17:52:43 +0200 Subject: [PATCH 27/31] Fixing tests --- src/kohn_sham_rs/61.rsks.bats | 2 +- src/tc_scf/11.tc_scf.bats | 46 +++++++++++++++++------------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/kohn_sham_rs/61.rsks.bats b/src/kohn_sham_rs/61.rsks.bats index 90b82142..29d43c3b 100644 --- a/src/kohn_sham_rs/61.rsks.bats +++ b/src/kohn_sham_rs/61.rsks.bats @@ -13,7 +13,7 @@ function run() { qp set scf_utils thresh_scf 1.e-10 qp set dft_keywords exchange_functional $functional qp set dft_keywords correlation_functional $functional - qp set ao_two_e_erf_ints mu_erf 0.5 + qp set hamiltonian mu_erf 0.5 qp set becke_numerical_grid grid_type_sgn 1 qp_reset --mos $1 qp run rs_ks_scf diff --git a/src/tc_scf/11.tc_scf.bats b/src/tc_scf/11.tc_scf.bats index 91b52540..b81c2f4b 100644 --- a/src/tc_scf/11.tc_scf.bats +++ b/src/tc_scf/11.tc_scf.bats @@ -8,15 +8,15 @@ function run_Ne() { rm -rf Ne_tc_scf echo Ne > Ne.xyz qp create_ezfio -b cc-pcvdz Ne.xyz -o Ne_tc_scf - qp run scf + qp run scf - qp set ao_two_e_erf_ints mu_erf 0.87 + qp set hamiltonian mu_erf 0.87 qp set tc_keywords j1b_type 3 - qp set tc_keywords j1b_pen [1.5] - qp set tc_keywords bi_ortho True + qp set tc_keywords j1b_pen [1.5] + qp set tc_keywords bi_ortho True qp set tc_keywords test_cycle_tc True - qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out + qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out eref=-128.552134 energy="$(qp get tc_scf bitc_energy)" eq $energy $eref 1e-6 @@ -24,22 +24,22 @@ function run_Ne() { @test "Ne" { - run_Ne + run_Ne } function run_C() { rm -rf C_tc_scf echo C > C.xyz qp create_ezfio -b cc-pcvdz C.xyz -o C_tc_scf -m 3 - qp run scf + qp run scf - qp set ao_two_e_erf_ints mu_erf 0.87 + qp set hamiltonian mu_erf 0.87 qp set tc_keywords j1b_type 3 - qp set tc_keywords j1b_pen [1.5] - qp set tc_keywords bi_ortho True + qp set tc_keywords j1b_pen [1.5] + qp set tc_keywords bi_ortho True qp set tc_keywords test_cycle_tc True - qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out + qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out eref=-37.691254356408791 energy="$(qp get tc_scf bitc_energy)" eq $energy $eref 1e-6 @@ -47,7 +47,7 @@ function run_C() { @test "C" { - run_C + run_C } @@ -55,15 +55,15 @@ function run_O() { rm -rf O_tc_scf echo O > O.xyz qp create_ezfio -b cc-pcvdz O.xyz -o O_tc_scf -m 3 - qp run scf + qp run scf - qp set ao_two_e_erf_ints mu_erf 0.87 + qp set hamiltonian mu_erf 0.87 qp set tc_keywords j1b_type 3 - qp set tc_keywords j1b_pen [1.5] - qp set tc_keywords bi_ortho True + qp set tc_keywords j1b_pen [1.5] + qp set tc_keywords bi_ortho True qp set tc_keywords test_cycle_tc True - qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out + qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out eref=-74.814687229354590 energy="$(qp get tc_scf bitc_energy)" eq $energy $eref 1e-6 @@ -71,7 +71,7 @@ function run_O() { @test "O" { - run_O + run_O } @@ -79,16 +79,16 @@ function run_O() { function run_ch2() { rm -rf ch2_tc_scf cp ${QP_ROOT}/tests/input/ch2.xyz . - qp create_ezfio -b "C:cc-pcvdz|H:cc-pvdz" ch2.xyz -o ch2_tc_scf - qp run scf + qp create_ezfio -b "C:cc-pcvdz|H:cc-pvdz" ch2.xyz -o ch2_tc_scf + qp run scf - qp set ao_two_e_erf_ints mu_erf 0.87 + qp set hamiltonian mu_erf 0.87 qp set tc_keywords j1b_type 3 qp set tc_keywords j1b_pen '[1.5,10000,10000]' qp set tc_keywords bi_ortho True qp set tc_keywords test_cycle_tc True - qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out + qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out eref=-38.903247818077737 energy="$(qp get tc_scf bitc_energy)" eq $energy $eref 1e-6 @@ -96,6 +96,6 @@ function run_ch2() { @test "ch2" { - run_ch2 + run_ch2 } From 16565bbda4955d024d758e78e3fda592f834337c Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 17 Oct 2023 23:28:08 +0200 Subject: [PATCH 28/31] Fixing tests --- src/basis_correction/51.basis_c.bats | 4 ++-- src/casscf_cipsi/50.casscf.bats | 4 ++-- src/cis/20.cis.bats | 10 +++++----- src/cisd/30.cisd.bats | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/basis_correction/51.basis_c.bats b/src/basis_correction/51.basis_c.bats index 2682361b..914b482b 100644 --- a/src/basis_correction/51.basis_c.bats +++ b/src/basis_correction/51.basis_c.bats @@ -10,8 +10,8 @@ function run() { qp set perturbation do_pt2 False qp set determinants n_det_max 8000 qp set determinants n_states 1 - qp set davidson threshold_davidson 1.e-10 - qp set davidson n_states_diag 8 + qp set davidson_keywords threshold_davidson 1.e-10 + qp set davidson_keywords n_states_diag 8 qp run fci energy1="$(ezfio get fci energy | tr '[]' ' ' | cut -d ',' -f 1)" eq $energy1 $1 $thresh diff --git a/src/casscf_cipsi/50.casscf.bats b/src/casscf_cipsi/50.casscf.bats index a0db725d..9f63dfe2 100644 --- a/src/casscf_cipsi/50.casscf.bats +++ b/src/casscf_cipsi/50.casscf.bats @@ -9,8 +9,8 @@ function run_stoch() { test_exe casscf || skip qp set perturbation do_pt2 True qp set determinants n_det_max $3 - qp set davidson threshold_davidson 1.e-10 - qp set davidson n_states_diag 4 + qp set davidson_keywords threshold_davidson 1.e-10 + qp set davidson_keywords n_states_diag 4 qp run casscf | tee casscf.out energy1="$(ezfio get casscf energy_pt2 | tr '[]' ' ' | cut -d ',' -f 1)" eq $energy1 $1 $thresh diff --git a/src/cis/20.cis.bats b/src/cis/20.cis.bats index 4f255c7b..4a5c6e45 100644 --- a/src/cis/20.cis.bats +++ b/src/cis/20.cis.bats @@ -9,7 +9,7 @@ function run() { qp set_file $1 qp edit --check qp set determinants n_states 3 - qp set davidson threshold_davidson 1.e-12 + qp set davidson_keywords threshold_davidson 1.e-12 qp set mo_two_e_ints io_mo_two_e_integrals Write qp set_frozen_core qp run cis @@ -59,7 +59,7 @@ function run() { @test "ClO" { # 1.65582s 2.06465s [[ -n $TRAVIS ]] && skip - run clo.ezfio -534.263560525680 -534.256601571199 -534.062020844428 + run clo.ezfio -534.2635737789097 -534.2566081298855 -534.0620070783308 } @test "SO" { # 1.9667s 2.91234s @@ -69,7 +69,7 @@ function run() { @test "OH" { # 2.201s 2.65573s [[ -n $TRAVIS ]] && skip - run oh.ezfio -75.4314648243896 -75.4254639668256 -75.2707675632313 + run oh.ezfio -75.4314822573358 -75.4254733392003 -75.2707586997333 } @test "H2O2" { # 2.27079s 3.07875s @@ -109,7 +109,7 @@ function run() { @test "DHNO" { # 6.42976s 12.9899s [[ -n $TRAVIS ]] && skip - run dhno.ezfio -130.4472288472718 -130.3571808164850 -130.2196257046987 + run dhno.ezfio -130.447238897118 -130.357186843611 -130.219626716369 } @test "CH4" { # 6.4969s 10.9157s @@ -129,7 +129,7 @@ function run() { @test "[Cu(NH3)4]2+" { # 29.7711s 3.45478m [[ -n ${TRAVIS} ]] && skip - run cu_nh3_4_2plus.ezfio -1862.97958885180 -1862.92457657404 -1862.91134959451 + run cu_nh3_4_2plus.ezfio -1862.97958844302 -1862.92454785007 -1862.91130869967 } diff --git a/src/cisd/30.cisd.bats b/src/cisd/30.cisd.bats index 6b8fddb6..fefc3e6d 100644 --- a/src/cisd/30.cisd.bats +++ b/src/cisd/30.cisd.bats @@ -8,8 +8,8 @@ function run() { test_exe cisd || skip qp edit --check qp set determinants n_states 2 - qp set davidson threshold_davidson 1.e-12 - qp set davidson n_states_diag 24 + qp set davidson_keywords threshold_davidson 1.e-12 + qp set davidson_keywords n_states_diag 24 qp run cis qp run cisd energy1="$(qp get cisd energy | tr '[]' ' ' | cut -d ',' -f 1)" From 50800f41c39eb45901a91d458840cc7953f73b49 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 18 Oct 2023 00:13:10 +0200 Subject: [PATCH 29/31] Fixing tests --- src/cisd/30.cisd.bats | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/cisd/30.cisd.bats b/src/cisd/30.cisd.bats index fefc3e6d..5ec11e4b 100644 --- a/src/cisd/30.cisd.bats +++ b/src/cisd/30.cisd.bats @@ -10,8 +10,7 @@ function run() { qp set determinants n_states 2 qp set davidson_keywords threshold_davidson 1.e-12 qp set davidson_keywords n_states_diag 24 - qp run cis - qp run cisd + qp run cisd energy1="$(qp get cisd energy | tr '[]' ' ' | cut -d ',' -f 1)" energy2="$(qp get cisd energy | tr '[]' ' ' | cut -d ',' -f 2)" eq $energy1 $1 $thresh @@ -19,7 +18,7 @@ function run() { } -@test "B-B" { # +@test "B-B" { # qp set_file b2_stretched.ezfio qp set_frozen_core run -49.120607088648597 -49.055152453388231 @@ -34,7 +33,7 @@ function run() { @test "HBO" { # 4.42968s 19.6099s qp set_file hbo.ezfio qp set_frozen_core - run -100.2019254455993 -99.79484127741013 + run -100.2019254455993 -99.79484127741013 } @test "HCO" { # 6.6077s 28.6801s @@ -46,7 +45,7 @@ function run() { @test "H2O" { # 7.0651s 30.6642s qp set_file h2o.ezfio qp set_frozen_core - run -76.22975602077072 -75.80609108747208 + run -76.22975602077072 -75.80609108747208 } @@ -78,7 +77,7 @@ function run() { [[ -n $TRAVIS ]] && skip qp set_file oh.ezfio qp set_frozen_core - run -75.6087472926588 -75.5370393736601 + run -75.6088105201621 -75.5370802925698 } @test "CH4" { # 19.821s 1.38648m @@ -105,8 +104,9 @@ function run() { @test "DHNO" { # 24.7077s 1.46487m [[ -n $TRAVIS ]] && skip qp set_file dhno.ezfio - qp set_mo_class --core="[1-7]" --act="[8-64]" - run -130.458814562403 -130.356308303681 + qp set_mo_class --core="[1-7]" --act="[8-64]" + run -130.4659881027444 -130.2692384198501 +# run -130.458814562403 -130.356308303681 } @test "H3COH" { # 24.7248s 1.85043m @@ -120,7 +120,7 @@ function run() { [[ -n $TRAVIS ]] && skip qp set_file cu_nh3_4_2plus.ezfio qp set_mo_class --core="[1-24]" --act="[25-45]" --del="[46-87]" - run -1862.98689579931 -1862.6883044626563 + run -1862.98310702274 -1862.88506319755 } @@ -135,14 +135,14 @@ function run() { [[ -n $TRAVIS ]] && skip qp set_file c2h2.ezfio qp set_mo_class --act="[1-30]" --del="[31-36]" - run -12.3566731164213 -11.9495394759914 + run -12.3566731164213 -11.9495394759914 } @test "ClO" { # 37.6949s [[ -n $TRAVIS ]] && skip qp set_file clo.ezfio qp set_frozen_core - run -534.5404021326773 -534.3818725793897 + run -534.540464615019 -534.381904487587 } @test "F2" { # 45.2078s @@ -155,7 +155,7 @@ function run() { @test "SO2" { # 47.6922s [[ -n $TRAVIS ]] && skip qp set_file so2.ezfio - qp set_mo_class --core="[1-8]" --act="[9-87]" + qp set_mo_class --core="[1-8]" --act="[9-87]" run -41.5746738710350 -41.3800467740750 } @@ -177,7 +177,7 @@ function run() { [[ -n $TRAVIS ]] && skip qp set_file n2.ezfio qp set_mo_class --core="[1,2]" --act="[3-40]" --del="[41-60]" - run -109.275693633982 -108.757794570948 + run -109.275693633982 -108.757794570948 } @test "HCN" { # 133.8696s From a3db8bb242c16f822d7a112b6c043be69c7abb21 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 18 Oct 2023 09:08:37 +0200 Subject: [PATCH 30/31] Fix ezfio save --- src/ao_two_e_ints/providers_ao_erf.irp.f | 2 +- src/ao_two_e_ints/routines_save_integrals_erf.irp.f | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ao_two_e_ints/providers_ao_erf.irp.f b/src/ao_two_e_ints/providers_ao_erf.irp.f index 293df29f..ff8c31a2 100644 --- a/src/ao_two_e_ints/providers_ao_erf.irp.f +++ b/src/ao_two_e_ints/providers_ao_erf.irp.f @@ -90,7 +90,7 @@ BEGIN_PROVIDER [ logical, ao_two_e_integrals_erf_in_map ] if (write_ao_two_e_integrals_erf) then call ezfio_set_work_empty(.False.) call map_save_to_disk(trim(ezfio_filename)//'/work/ao_ints_erf',ao_integrals_erf_map) - call ezfio_set_ao_two_e_erf_ints_io_ao_two_e_integrals_erf("Read") + call ezfio_set_ao_two_e_ints_io_ao_two_e_integrals_erf('Read') endif END_PROVIDER diff --git a/src/ao_two_e_ints/routines_save_integrals_erf.irp.f b/src/ao_two_e_ints/routines_save_integrals_erf.irp.f index 4b0cfad0..d980bc05 100644 --- a/src/ao_two_e_ints/routines_save_integrals_erf.irp.f +++ b/src/ao_two_e_ints/routines_save_integrals_erf.irp.f @@ -4,7 +4,7 @@ subroutine save_erf_two_e_integrals_ao PROVIDE ao_two_e_integrals_erf_in_map call ezfio_set_work_empty(.False.) call map_save_to_disk(trim(ezfio_filename)//'/work/ao_ints_erf',ao_integrals_erf_map) - call ezfio_set_ao_two_e_erf_ints_io_ao_two_e_integrals_erf('Read') + call ezfio_set_ao_two_e_ints_io_ao_two_e_integrals_erf('Read') end subroutine save_erf_two_e_ints_ao_into_ints_ao From 06b8370e42d24e29da1a82b9667ed48586e6b821 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 19 Oct 2023 17:51:17 +0200 Subject: [PATCH 31/31] Update irpf90 --- external/irpf90 | 2 +- src/mo_two_e_ints/mo_bi_integrals_erf.irp.f | 14 ++++++++------ src/mu_of_r/mu_of_r_conditions.irp.f | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/external/irpf90 b/external/irpf90 index 0007f72f..4ab1b175 160000 --- a/external/irpf90 +++ b/external/irpf90 @@ -1 +1 @@ -Subproject commit 0007f72f677fe7d61c5e1ed461882cb239517102 +Subproject commit 4ab1b175fc7ed0d96c1912f13dc53579b24157a6 diff --git a/src/mo_two_e_ints/mo_bi_integrals_erf.irp.f b/src/mo_two_e_ints/mo_bi_integrals_erf.irp.f index e7765d71..1afc1f3c 100644 --- a/src/mo_two_e_ints/mo_bi_integrals_erf.irp.f +++ b/src/mo_two_e_ints/mo_bi_integrals_erf.irp.f @@ -9,25 +9,27 @@ subroutine mo_two_e_integrals_erf_index(i,j,k,l,i1) integer(key_kind) :: p,q,r,s,i2 p = min(i,k) r = max(i,k) - p = p+ishft(r*r-r,-1) + p = p+shiftr(r*r-r,1) q = min(j,l) s = max(j,l) - q = q+ishft(s*s-s,-1) + q = q+shiftr(s*s-s,1) i1 = min(p,q) i2 = max(p,q) - i1 = i1+ishft(i2*i2-i2,-1) + i1 = i1+shiftr(i2*i2-i2,1) end BEGIN_PROVIDER [ logical, mo_two_e_integrals_erf_in_map ] use map_module implicit none - integer(bit_kind) :: mask_ijkl(N_int,4) - integer(bit_kind) :: mask_ijk(N_int,3) - BEGIN_DOC ! If True, the map of MO two-electron integrals is provided END_DOC + integer(bit_kind) :: mask_ijkl(N_int,4) + integer(bit_kind) :: mask_ijk(N_int,3) + double precision :: cpu_1, cpu_2, wall_1, wall_2 + + PROVIDE mo_class real :: map_mb diff --git a/src/mu_of_r/mu_of_r_conditions.irp.f b/src/mu_of_r/mu_of_r_conditions.irp.f index f9c3b3b3..959950a6 100644 --- a/src/mu_of_r/mu_of_r_conditions.irp.f +++ b/src/mu_of_r/mu_of_r_conditions.irp.f @@ -128,7 +128,7 @@ BEGIN_PROVIDER [double precision, mu_average_prov, (N_states)] implicit none BEGIN_DOC - ! average value of mu(r) weighted with the total one-e density and divised by the number of electrons + ! average value of mu(r) weighted with the total one-e density and divided by the number of electrons ! ! !!!!!! WARNING !!!!!! if no_core_density == .True. then all contributions from the core orbitals !