Skip to content

Commit

Permalink
Accelerate slow tests; add debug tags in output
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrack committed Jan 26, 2024
1 parent 3fb1386 commit a1add34
Show file tree
Hide file tree
Showing 19 changed files with 83 additions and 80 deletions.
20 changes: 10 additions & 10 deletions src/cp2k_debug.F
Original file line number Diff line number Diff line change
Expand Up @@ -455,17 +455,17 @@ SUBROUTINE cp2k_debug_energy_and_forces(force_env)
dd = dipole_moment(k) - dipole_numer(k)
IF (ABS(dipole_moment(k)) > eps_no_error_check) THEN
derr = 100._dp*dd/dipole_moment(k)
WRITE (UNIT=iw, FMT="(T13,A1,T21,F16.8,T38,F16.8,T56,G12.3,T72,F9.3)") &
ACHAR(119 + k), dipole_numer(k), dipole_moment(k), dd, derr
WRITE (UNIT=iw, FMT="(T2,A,T13,A1,T21,F16.8,T38,F16.8,T56,G12.3,T72,F9.3)") &
"DEBUG|", ACHAR(119 + k), dipole_numer(k), dipole_moment(k), dd, derr
ELSE
derr = 0.0_dp
WRITE (UNIT=iw, FMT="(T13,A1,T21,F16.8,T38,F16.8,T56,G12.3)") &
ACHAR(119 + k), dipole_numer(k), dipole_moment(k), dd
WRITE (UNIT=iw, FMT="(T2,A,T13,A1,T21,F16.8,T38,F16.8,T56,G12.3)") &
"DEBUG|", ACHAR(119 + k), dipole_numer(k), dipole_moment(k), dd
END IF
err(k) = derr
ELSE
WRITE (UNIT=iw, FMT="(T13,A1,T21,A16,T38,F16.8)") &
ACHAR(119 + k), " skipped", dipole_moment(k)
WRITE (UNIT=iw, FMT="(T2,A,T13,A1,T21,A16,T38,F16.8)") &
"DEBUG|", ACHAR(119 + k), " skipped", dipole_moment(k)
END IF
END DO
WRITE (UNIT=iw, FMT="((T2,A))") &
Expand Down Expand Up @@ -530,11 +530,11 @@ SUBROUTINE cp2k_debug_energy_and_forces(force_env)
dd = polar_analytic(k, j) - polar_numeric(k, j)
IF (ABS(polar_analytic(k, j)) > eps_no_error_check) THEN
derr = 100._dp*dd/polar_analytic(k, j)
WRITE (UNIT=iw, FMT="(T12,A1,A1,T21,F16.8,T38,F16.8,T56,G12.3,T72,F9.3)") &
ACHAR(119 + k), ACHAR(119 + j), polar_numeric(k, j), polar_analytic(k, j), dd, derr
WRITE (UNIT=iw, FMT="(T2,A,T12,A1,A1,T21,F16.8,T38,F16.8,T56,G12.3,T72,F9.3)") &
"DEBUG|", ACHAR(119 + k), ACHAR(119 + j), polar_numeric(k, j), polar_analytic(k, j), dd, derr
ELSE
WRITE (UNIT=iw, FMT="(T12,A1,A1,T21,F16.8,T38,F16.8,T56,G12.3)") &
ACHAR(119 + k), ACHAR(119 + j), polar_numeric(k, j), polar_analytic(k, j), dd
WRITE (UNIT=iw, FMT="(T2,A,T12,A1,A1,T21,F16.8,T38,F16.8,T56,G12.3)") &
"DEBUG|", ACHAR(119 + k), ACHAR(119 + j), polar_numeric(k, j), polar_analytic(k, j), dd
END IF
END DO
END DO
Expand Down
10 changes: 5 additions & 5 deletions tests/QS/regtest-debug-6/ch2o_dip44.inp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
&GLOBAL
PRINT_LEVEL LOW
PRINT_LEVEL medium
PROJECT td_dipole
RUN_TYPE DEBUG
&END GLOBAL
Expand Down Expand Up @@ -37,11 +37,11 @@
&END MOMENTS
&END PRINT
&QS
EPS_DEFAULT 1.E-14
EPS_DEFAULT 1.0E-10
METHOD GAPW
&END QS
&SCF
EPS_SCF 1.0E-7
EPS_SCF 1.0E-6
MAX_SCF 20
SCF_GUESS ATOMIC
&OT
Expand All @@ -50,7 +50,7 @@
STEPSIZE 0.1
&END OT
&OUTER_SCF
EPS_SCF 1.0E-7
EPS_SCF 1.0E-6
MAX_SCF 20
&END OUTER_SCF
&END SCF
Expand All @@ -61,7 +61,7 @@
&END DFT
&PROPERTIES
&TDDFPT
CONVERGENCE [eV] 1.0e-7
CONVERGENCE [eV] 1.0E-6
EV_SHIFT 6.0
KERNEL sTDA
MAX_ITER 50
Expand Down
12 changes: 6 additions & 6 deletions tests/QS/regtest-debug-6/ch2o_dip45.inp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
&GLOBAL
PRINT_LEVEL LOW
PRINT_LEVEL medium
PROJECT td_dipole
RUN_TYPE DEBUG
&END GLOBAL
Expand All @@ -25,7 +25,7 @@
STATE 1
&END EXCITED_STATES
&MGRID
CUTOFF 250
CUTOFF 200
&END MGRID
&POISSON
PERIODIC NONE
Expand All @@ -38,11 +38,11 @@
&END MOMENTS
&END PRINT
&QS
EPS_DEFAULT 1.E-14
EPS_DEFAULT 1.0E-10
METHOD GAPW
&END QS
&SCF
EPS_SCF 1.0E-7
EPS_SCF 1.0E-6
MAX_SCF 20
SCF_GUESS ATOMIC
&OT
Expand All @@ -51,7 +51,7 @@
STEPSIZE 0.1
&END OT
&OUTER_SCF
EPS_SCF 1.0E-7
EPS_SCF 1.0E-6
MAX_SCF 20
&END OUTER_SCF
&END SCF
Expand All @@ -62,7 +62,7 @@
&END DFT
&PROPERTIES
&TDDFPT
CONVERGENCE [eV] 1.0e-7
CONVERGENCE [eV] 1.0E-6
KERNEL FULL
MAX_ITER 50
NSTATES 1
Expand Down
12 changes: 6 additions & 6 deletions tests/QS/regtest-debug-6/ch2o_dip46.inp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
&GLOBAL
PRINT_LEVEL LOW
PRINT_LEVEL medium
PROJECT td_dipole
RUN_TYPE DEBUG
&END GLOBAL
Expand All @@ -25,7 +25,7 @@
STATE 1
&END EXCITED_STATES
&MGRID
CUTOFF 250
CUTOFF 200
&END MGRID
&POISSON
PERIODIC NONE
Expand All @@ -38,11 +38,11 @@
&END MOMENTS
&END PRINT
&QS
EPS_DEFAULT 1.E-14
EPS_DEFAULT 1.0E-10
METHOD GAPW
&END QS
&SCF
EPS_SCF 1.0E-7
EPS_SCF 1.0E-6
MAX_SCF 20
SCF_GUESS ATOMIC
&OT
Expand All @@ -51,7 +51,7 @@
STEPSIZE 0.1
&END OT
&OUTER_SCF
EPS_SCF 1.0E-7
EPS_SCF 1.0E-6
MAX_SCF 20
&END OUTER_SCF
&END SCF
Expand All @@ -62,7 +62,7 @@
&END DFT
&PROPERTIES
&TDDFPT
CONVERGENCE [eV] 1.0e-7
CONVERGENCE [eV] 1.0E-6
KERNEL FULL
MAX_ITER 50
NSTATES 1
Expand Down
5 changes: 3 additions & 2 deletions tests/QS/regtest-debug-6/ch2o_dip47.inp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
&GLOBAL
PRINT_LEVEL LOW
PRINT_LEVEL medium
PROJECT td_dipole
RUN_TYPE DEBUG
&END GLOBAL
Expand Down Expand Up @@ -45,6 +45,7 @@
&END MOMENTS
&END PRINT
&QS
EPS_DEFAULT 1.0E-10
METHOD GAPW
&END QS
&SCF
Expand All @@ -68,7 +69,7 @@
&PROPERTIES
&TDDFPT
ADMM_KERNEL_CORRECTION_SYMMETRIC
CONVERGENCE [eV] 1.0e-7
CONVERGENCE [eV] 1.0E-6
KERNEL FULL
MAX_ITER 50
NSTATES 1
Expand Down
10 changes: 5 additions & 5 deletions tests/QS/regtest-debug-6/ch2o_xc_dip44.inp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
&GLOBAL
PRINT_LEVEL LOW
PRINT_LEVEL medium
PROJECT td_dipole
RUN_TYPE DEBUG
&END GLOBAL
Expand Down Expand Up @@ -37,11 +37,11 @@
&END MOMENTS
&END PRINT
&QS
EPS_DEFAULT 1.E-14
EPS_DEFAULT 1.0E-10
METHOD GAPW_XC
&END QS
&SCF
EPS_SCF 1.0E-7
EPS_SCF 1.0E-6
MAX_SCF 20
SCF_GUESS ATOMIC
&OT
Expand All @@ -50,7 +50,7 @@
STEPSIZE 0.1
&END OT
&OUTER_SCF
EPS_SCF 1.0E-7
EPS_SCF 1.0E-6
MAX_SCF 20
&END OUTER_SCF
&END SCF
Expand All @@ -61,7 +61,7 @@
&END DFT
&PROPERTIES
&TDDFPT
CONVERGENCE [eV] 1.0e-7
CONVERGENCE [eV] 1.0E-6
EV_SHIFT 6.0
KERNEL sTDA
MAX_ITER 50
Expand Down
12 changes: 6 additions & 6 deletions tests/QS/regtest-debug-6/ch2o_xc_dip45.inp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
&GLOBAL
PRINT_LEVEL LOW
PRINT_LEVEL medium
PROJECT td_dipole
RUN_TYPE DEBUG
&END GLOBAL
Expand All @@ -25,7 +25,7 @@
STATE 1
&END EXCITED_STATES
&MGRID
CUTOFF 250
CUTOFF 200
&END MGRID
&POISSON
PERIODIC NONE
Expand All @@ -38,11 +38,11 @@
&END MOMENTS
&END PRINT
&QS
EPS_DEFAULT 1.E-14
EPS_DEFAULT 1.0E-10
METHOD GAPW_XC
&END QS
&SCF
EPS_SCF 1.0E-7
EPS_SCF 1.0E-6
MAX_SCF 20
SCF_GUESS ATOMIC
&OT
Expand All @@ -51,7 +51,7 @@
STEPSIZE 0.1
&END OT
&OUTER_SCF
EPS_SCF 1.0E-7
EPS_SCF 1.0E-6
MAX_SCF 20
&END OUTER_SCF
&END SCF
Expand All @@ -62,7 +62,7 @@
&END DFT
&PROPERTIES
&TDDFPT
CONVERGENCE [eV] 1.0e-7
CONVERGENCE [eV] 1.0E-6
KERNEL FULL
MAX_ITER 50
NSTATES 1
Expand Down
6 changes: 3 additions & 3 deletions tests/QS/regtest-debug-6/ch2o_xc_dip46.inp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
&GLOBAL
PRINT_LEVEL LOW
PRINT_LEVEL medium
PROJECT td_dipole
RUN_TYPE DEBUG
&END GLOBAL
Expand Down Expand Up @@ -38,7 +38,7 @@
&END MOMENTS
&END PRINT
&QS
EPS_DEFAULT 1.E-10
EPS_DEFAULT 1.0E-10
METHOD GAPW_XC
&END QS
&SCF
Expand All @@ -62,7 +62,7 @@
&END DFT
&PROPERTIES
&TDDFPT
CONVERGENCE [eV] 1.0e-6
CONVERGENCE [eV] 1.0E-6
KERNEL FULL
MAX_ITER 50
NSTATES 1
Expand Down
9 changes: 5 additions & 4 deletions tests/QS/regtest-debug-6/ch2o_xc_dip47.inp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
&GLOBAL
PRINT_LEVEL LOW
PRINT_LEVEL medium
PROJECT td_dipole
RUN_TYPE DEBUG
&END GLOBAL
Expand Down Expand Up @@ -45,18 +45,19 @@
&END MOMENTS
&END PRINT
&QS
EPS_DEFAULT 1.0E-10
METHOD GAPW_XC
&END QS
&SCF
EPS_SCF 1.0E-8
EPS_SCF 1.0E-6
MAX_SCF 10
SCF_GUESS ATOMIC
&OT
MINIMIZER DIIS
PRECONDITIONER FULL_SINGLE_INVERSE
&END OT
&OUTER_SCF
EPS_SCF 1.0E-8
EPS_SCF 1.0E-6
MAX_SCF 10
&END OUTER_SCF
&END SCF
Expand All @@ -68,7 +69,7 @@
&PROPERTIES
&TDDFPT
ADMM_KERNEL_CORRECTION_SYMMETRIC
CONVERGENCE [eV] 1.0e-7
CONVERGENCE [eV] 1.0E-6
KERNEL FULL
MAX_ITER 50
NSTATES 1
Expand Down
3 changes: 2 additions & 1 deletion tests/QS/regtest-debug-6/h2o_check1.inp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
&GLOBAL
PRINT_LEVEL LOW
PRINT_LEVEL medium
PROJECT dipole
RUN_TYPE DEBUG
&END GLOBAL
Expand All @@ -25,6 +25,7 @@
&END MOMENTS
&END PRINT
&QS
EPS_DEFAULT 1.0E-10
METHOD GPW
&END QS
&SCF
Expand Down
3 changes: 2 additions & 1 deletion tests/QS/regtest-debug-6/h2o_check2.inp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
&GLOBAL
PRINT_LEVEL LOW
PRINT_LEVEL medium
PROJECT dipole
RUN_TYPE DEBUG
&END GLOBAL
Expand All @@ -18,6 +18,7 @@
METHOD Quickstep
&DFT
&QS
EPS_DEFAULT 1.0E-10
METHOD GPW
&END QS
&SCF
Expand Down
Loading

0 comments on commit a1add34

Please sign in to comment.