From 77f400e1539a0cdcdcad20e45dcbdaba6cf70b21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Sch=C3=BCtt?= Date: Fri, 20 Dec 2024 12:10:36 +0100 Subject: [PATCH 1/3] Docker: Set timeout and trigger_path for spack test --- tools/dashboard/dashboard.conf | 1 + tools/docker/cp2k-ci.conf | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/dashboard/dashboard.conf b/tools/dashboard/dashboard.conf index 8dd30a0918..e155aeab34 100644 --- a/tools/dashboard/dashboard.conf +++ b/tools/dashboard/dashboard.conf @@ -225,6 +225,7 @@ report_url: https://storage.googleapis.com/cp2k-ci/dashboard_openmpi-psmp_repor [spack] sortkey: 1033 name: Spack +timeout: 170 host: GCP report_url: https://storage.googleapis.com/cp2k-ci/dashboard_spack_report.txt diff --git a/tools/docker/cp2k-ci.conf b/tools/docker/cp2k-ci.conf index 19aef12007..b2362b0609 100644 --- a/tools/docker/cp2k-ci.conf +++ b/tools/docker/cp2k-ci.conf @@ -243,6 +243,7 @@ cpu: 32 nodepools: pool-t2d-32 build_path: / dockerfile: /tools/docker/Dockerfile.test_spack +trigger_path: spack [fedora-psmp] display_name: Fedora From 308a163a4a604288460ef9b8b6fc5f694b541159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Sch=C3=BCtt?= Date: Fri, 20 Dec 2024 12:34:05 +0100 Subject: [PATCH 2/3] Docs: Also look for keyword mentions in other subdirs --- docs/generate_input_reference.py | 7 ++++--- docs/technologies/eigensolvers/dlaf.md | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/generate_input_reference.py b/docs/generate_input_reference.py index bda3a34849..fa36eff4be 100755 --- a/docs/generate_input_reference.py +++ b/docs/generate_input_reference.py @@ -386,9 +386,10 @@ def render_keyword( def find_all_mentions() -> Dict[str, Set[Path]]: root_dir = Path(__file__).resolve().parent mentions = defaultdict(set) - for fn in (root_dir / "methods").glob("**/*.md"): - for xref in re.findall(r"\(#(CP2K_INPUT\..*)\)", fn.read_text()): - mentions[xref].add(fn.relative_to(root_dir)) + for subdir in "getting-started", "methods", "technologies": + for fn in (root_dir / subdir).glob("**/*.md"): + for xref in re.findall(r"\(#(CP2K_INPUT\..*)\)", fn.read_text()): + mentions[xref].add(fn.relative_to(root_dir)) return mentions diff --git a/docs/technologies/eigensolvers/dlaf.md b/docs/technologies/eigensolvers/dlaf.md index 5939a1b8bf..3747eece3e 100644 --- a/docs/technologies/eigensolvers/dlaf.md +++ b/docs/technologies/eigensolvers/dlaf.md @@ -25,7 +25,7 @@ and optional dependencies. ## CP2K Input File [DLA-Future] can be selected in the CP2K input file with the -[`PREFERRED_DIAG_LIBRARY`](#CP2K_INPUT.GLOBAL.PREFERRED_DIAG_LIBRARY) keyword: +[PREFERRED_DIAG_LIBRARY](#CP2K_INPUT.GLOBAL.PREFERRED_DIAG_LIBRARY) keyword: ``` &GLOBAL @@ -35,7 +35,7 @@ and optional dependencies. &END GLOBAL ``` -The [`DLAF_NEIGVEC_MIN`](#CP2K_INPUT.GLOBAL.DLAF_NEIGVEC_MIN) indicates the minimum matrix size for +The [DLAF_NEIGVEC_MIN](#CP2K_INPUT.GLOBAL.DLAF_NEIGVEC_MIN) indicates the minimum matrix size for which DLA-Future is used instead of ScaLAPACK. DLA-Future is optimized for large matrices on GPUs, and might be slower than ScaLAPACK for small matrices or CPU matrices. From 973f3ddaeb6eedfc4c222682f37d1d915cb35cf6 Mon Sep 17 00:00:00 2001 From: BelizSertcan <48097107+BelizSertcan@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:30:59 +0100 Subject: [PATCH 3/3] TDDFPT| Davidson restart bug fix (#3821) --- src/qs_tddfpt2_methods.F | 20 ++++++++------------ tests/QS/regtest-tddfpt/NO_tddfpt-s-1.inp | 2 +- tests/QS/regtest-tddfpt/NO_tddfpt-s-3.inp | 2 +- tests/QS/regtest-tddfpt/NO_tddfpt-t-1.inp | 2 +- tests/QS/regtest-tddfpt/NO_tddfpt-t-2.inp | 2 +- tests/QS/regtest-tddfpt/NO_tddfpt-t-3.inp | 2 +- tests/QS/regtest-tddfpt/TEST_FILES | 10 +++++----- 7 files changed, 18 insertions(+), 22 deletions(-) diff --git a/src/qs_tddfpt2_methods.F b/src/qs_tddfpt2_methods.F index f18098c61d..8adf001021 100644 --- a/src/qs_tddfpt2_methods.F +++ b/src/qs_tddfpt2_methods.F @@ -830,7 +830,7 @@ SUBROUTINE kernel_info(log_unit, dft_control, tddfpt_control, xc_section) END SUBROUTINE kernel_info ! ************************************************************************************************** -!> \brief The energy cylculation has been moved to its own subroutine +!> \brief The energy calculation has been moved to its own subroutine !> \param qs_env ... !> \param nstates ... !> \param work_matrices ... @@ -887,8 +887,7 @@ SUBROUTINE tddfpt_energies(qs_env, nstates, work_matrices, & INTEGER :: energy_unit, handle, iter, log_unit, & niters, nocc, nstate_max, & nstates_read, nvirt - LOGICAL :: do_admm, do_exck, do_soc, explicit, & - is_restarted + LOGICAL :: do_admm, do_exck, do_soc, explicit REAL(kind=dp) :: conv TYPE(admm_type), POINTER :: admm_env TYPE(cp_blacs_env_type), POINTER :: blacs_env @@ -971,9 +970,9 @@ SUBROUTINE tddfpt_energies(qs_env, nstates, work_matrices, & tddfpt_print_section) END IF - !! Too many states cal lead to Problems - !! You should be warned if there are mor states - !! then occ-virt Combinations!! + !! Too many states can lead to problems + !! You should be warned if there are more states + !! then occ-virt combinations!! CALL cp_fm_get_info(gs_mos(1)%mos_occ, ncol_global=nocc) CALL cp_fm_get_info(gs_mos(1)%mos_virt, ncol_global=nvirt) nstate_max = nocc*nvirt @@ -1003,8 +1002,6 @@ SUBROUTINE tddfpt_energies(qs_env, nstates, work_matrices, & nstates_read = 0 END IF - is_restarted = nstates_read >= nstates - ! build the list of missed singly excited states and sort them in ascending order ! according to their excitation energies log_unit = cp_print_key_unit_nr(logger, tddfpt_print_section, & @@ -1062,15 +1059,14 @@ SUBROUTINE tddfpt_energies(qs_env, nstates, work_matrices, & ! at this point at least one of the following conditions are met: ! a) convergence criteria has been achieved; ! b) maximum number of iterations has been reached; - ! c) Davidson iterations must be restarted due to lack of Krylov vectors or numerical instability + ! c) Davidson iterations must be restarted due to lack of Krylov vectors CALL cp_iterate(logger%iter_info, increment=0, iter_nr_out=iter) ! terminate the loop if either (a) or (b) is true ... - IF ((conv <= tddfpt_control%conv & - .AND. is_restarted) .OR. iter >= niters) EXIT + IF ((conv <= tddfpt_control%conv) .OR. iter >= niters) EXIT ! ... otherwise restart Davidson iterations - is_restarted = .TRUE. + evals = 0.0_dp IF (log_unit > 0) THEN WRITE (log_unit, '(1X,25("-"),1X,A,1X,25("-"))') "Restart Davidson iterations" CALL m_flush(log_unit) diff --git a/tests/QS/regtest-tddfpt/NO_tddfpt-s-1.inp b/tests/QS/regtest-tddfpt/NO_tddfpt-s-1.inp index 652dfc6380..aab9c57b52 100644 --- a/tests/QS/regtest-tddfpt/NO_tddfpt-s-1.inp +++ b/tests/QS/regtest-tddfpt/NO_tddfpt-s-1.inp @@ -31,7 +31,7 @@ &TDDFPT CONVERGENCE 1.0e-5 MAX_ITER 10 - MAX_KV 10 + MAX_KV 30 NSTATES 3 &XC &XC_FUNCTIONAL PBE diff --git a/tests/QS/regtest-tddfpt/NO_tddfpt-s-3.inp b/tests/QS/regtest-tddfpt/NO_tddfpt-s-3.inp index d7cde3d2b3..bcad7c2f1c 100644 --- a/tests/QS/regtest-tddfpt/NO_tddfpt-s-3.inp +++ b/tests/QS/regtest-tddfpt/NO_tddfpt-s-3.inp @@ -31,7 +31,7 @@ &TDDFPT CONVERGENCE 1.0e-5 MAX_ITER 10 - MAX_KV 10 + MAX_KV 30 NSTATES 3 OE_CORR SAOP RKS_TRIPLETS T diff --git a/tests/QS/regtest-tddfpt/NO_tddfpt-t-1.inp b/tests/QS/regtest-tddfpt/NO_tddfpt-t-1.inp index 13a911625e..8ab3c3ad7b 100644 --- a/tests/QS/regtest-tddfpt/NO_tddfpt-t-1.inp +++ b/tests/QS/regtest-tddfpt/NO_tddfpt-t-1.inp @@ -31,7 +31,7 @@ &TDDFPT CONVERGENCE 1.0e-5 MAX_ITER 10 - MAX_KV 10 + MAX_KV 30 NSTATES 3 &XC &XC_FUNCTIONAL BLYP diff --git a/tests/QS/regtest-tddfpt/NO_tddfpt-t-2.inp b/tests/QS/regtest-tddfpt/NO_tddfpt-t-2.inp index e65b008920..12e8855396 100644 --- a/tests/QS/regtest-tddfpt/NO_tddfpt-t-2.inp +++ b/tests/QS/regtest-tddfpt/NO_tddfpt-t-2.inp @@ -31,7 +31,7 @@ &TDDFPT CONVERGENCE 1.0e-5 MAX_ITER 10 - MAX_KV 10 + MAX_KV 30 NSTATES 3 OE_CORR SAOP RKS_TRIPLETS T diff --git a/tests/QS/regtest-tddfpt/NO_tddfpt-t-3.inp b/tests/QS/regtest-tddfpt/NO_tddfpt-t-3.inp index b65ac08343..b6bd6f05b5 100644 --- a/tests/QS/regtest-tddfpt/NO_tddfpt-t-3.inp +++ b/tests/QS/regtest-tddfpt/NO_tddfpt-t-3.inp @@ -31,7 +31,7 @@ &TDDFPT CONVERGENCE 1.0e-5 MAX_ITER 10 - MAX_KV 10 + MAX_KV 30 NSTATES 3 OE_CORR SAOP &XC diff --git a/tests/QS/regtest-tddfpt/TEST_FILES b/tests/QS/regtest-tddfpt/TEST_FILES index 6bbb86212d..424c77057d 100644 --- a/tests/QS/regtest-tddfpt/TEST_FILES +++ b/tests/QS/regtest-tddfpt/TEST_FILES @@ -5,15 +5,15 @@ # for details see cp2k/tools/do_regtest H2O_tddfpt-s-1.inp 37 4.0E-06 0.600232E+00 H2O_tddfpt-t-1.inp 37 4.0E-06 0.289055E+00 -NO_tddfpt-s-1.inp 37 4.0E-06 0.335486E+00 -NO_tddfpt-t-1.inp 37 2.0E-04 0.342419E+00 +NO_tddfpt-s-1.inp 37 4.0E-06 0.319837E+00 +NO_tddfpt-t-1.inp 37 2.0E-04 0.324319E+00 H2O_tddfpt-s-2.inp 37 4.0E-06 0.543390E+00 H2O_tddfpt-t-2.inp 37 4.0E-06 0.548605E+00 -NO_tddfpt-t-2.inp 37 4.0E-06 0.358683E+00 +NO_tddfpt-t-2.inp 37 4.0E-06 0.340342E+00 H2O_tddfpt-s-3.inp 37 4.0E-06 0.543390E+00 H2O_tddfpt-t-3.inp 37 4.0E-06 0.579030E+00 -NO_tddfpt-s-3.inp 37 4.0E-06 0.350929E+00 -NO_tddfpt-t-3.inp 37 4.0E-06 0.358683E+00 +NO_tddfpt-s-3.inp 37 4.0E-06 0.326331E+00 +NO_tddfpt-t-3.inp 37 4.0E-06 0.340342E+00 H2O_tddfpt_NTO.inp 37 4.0E-06 0.542432E+00 H2O_tddfpt_NTO_slist.inp 37 4.0E-06 0.542432E+00 H2O_tddfpt_NTO_restart.inp 37 4.0E-06 0.542432E+00