Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/cp2k/cp2k
Browse files Browse the repository at this point in the history
  • Loading branch information
hfp committed Dec 20, 2024
2 parents 13b5997 + 973f3dd commit 2c784d2
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 27 deletions.
7 changes: 4 additions & 3 deletions docs/generate_input_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
4 changes: 2 additions & 2 deletions docs/technologies/eigensolvers/dlaf.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

Expand Down
20 changes: 8 additions & 12 deletions src/qs_tddfpt2_methods.F
Original file line number Diff line number Diff line change
Expand Up @@ -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 ...
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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, &
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/QS/regtest-tddfpt/NO_tddfpt-s-1.inp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
&TDDFPT
CONVERGENCE 1.0e-5
MAX_ITER 10
MAX_KV 10
MAX_KV 30
NSTATES 3
&XC
&XC_FUNCTIONAL PBE
Expand Down
2 changes: 1 addition & 1 deletion tests/QS/regtest-tddfpt/NO_tddfpt-s-3.inp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/QS/regtest-tddfpt/NO_tddfpt-t-1.inp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
&TDDFPT
CONVERGENCE 1.0e-5
MAX_ITER 10
MAX_KV 10
MAX_KV 30
NSTATES 3
&XC
&XC_FUNCTIONAL BLYP
Expand Down
2 changes: 1 addition & 1 deletion tests/QS/regtest-tddfpt/NO_tddfpt-t-2.inp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/QS/regtest-tddfpt/NO_tddfpt-t-3.inp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
&TDDFPT
CONVERGENCE 1.0e-5
MAX_ITER 10
MAX_KV 10
MAX_KV 30
NSTATES 3
OE_CORR SAOP
&XC
Expand Down
10 changes: 5 additions & 5 deletions tests/QS/regtest-tddfpt/TEST_FILES
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tools/dashboard/dashboard.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions tools/docker/cp2k-ci.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2c784d2

Please sign in to comment.