SCF converges for outer circle but SCF does not converge in general

25 views
Skip to first unread message

Joshua Edzards

unread,
Aug 27, 2025, 6:48:34 AM (10 days ago) Aug 27
to cp2k
Dear CP2K comunity,

I was running a single-point energy calculation with PBE0 on MOF5 with a hydrogen molecule inside. Somehow, after the third outer SCF loop, the calculation seems to have converged. But the next line clearly states that it failed.

  outer SCF iter =    3 RMS gradient =   0.58E-05 energy =      -1195.0423806694
  outer SCF loop converged in   3 iterations or   75 steps


 *******************************************************************************
 *   ___                                                                       *
 *  /   \                                                                      *
 * [ABORT]                                                                     *
 *  \___/     SCF run NOT converged. To continue the calculation regardless,   *
 *    |             please set the keyword IGNORE_CONVERGENCE_FAILURE.         *
 *  O/|                                                                        *
 * /| |                                                                        *
 * / \                                                            qs_scf.F:611 *
 *******************************************************************************

I was wondering why this happens. Additionally, I get an error message from Slurm, and I assume that this might cause the problem.

--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
[c0365:144409] 191 more processes have sent help message help-mpi-api.txt / mpi-abort
[c0365:144409] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages

The Slurm script, the error, and also CP2K in- and output files are attached. Any help is appreciated. Also, if more information is needed, I am happy to provide it.

Thank you very much, and all the best
Josh
aiida.out
_scheduler-stderr.txt
_aiidasubmit.sh
aiida.in

Marcella Iannuzzi

unread,
Aug 27, 2025, 6:59:48 AM (10 days ago) Aug 27
to cp2k
Hi Josh

The eps_scf  for the inner and outer loop are set at different values
From the reference manual: Notice that the EPS_SCF of the inner loop also determines the value that can be reached in the outer loop, typically EPS_SCF of the outer loop must be smaller than or equal to EPS_SCF of the inner loop. 

Regards
Marcella

                       --------------------------------------------------------

                        max_scf:                                              25

                        max_scf_history:                                       0

                        max_diis:                                              4

                        --------------------------------------------------------

                        eps_scf:                                        5.00E-07

                        eps_scf_history:                                0.00E+00

                        eps_diis:                                       1.00E-01

                        eps_eigval:                                     1.00E-05

                        --------------------------------------------------------

                        level_shift [a.u.]:                             0.000000

                        --------------------------------------------------------

                        Outer loop SCF in use

                        No variables optimised in outer loop

                        eps_scf                                         1.00E-05

                        max_scf                                               10

                        No outer loop optimization

                        step_size                                       5.00E-01


Frederick Stein

unread,
Aug 27, 2025, 7:00:27 AM (10 days ago) Aug 27
to cp2k
Dear Josh,
You should use the same EPS_SCF for the OUTER_SCF (you did not provide it, thus CP2K uses 1.0E-5) as for the inner SCF iteration (in your case 5E-07). The iteration did not converged because the inner SCF loop did not converge.
HTH,
Frederick

Joshua Edzards

unread,
Aug 27, 2025, 8:02:43 AM (10 days ago) Aug 27
to cp2k
Dear Marcelle, dear Frederick,

thank you very much for the rapid response! This helps a lot!

All the best
Josh
Reply all
Reply to author
Forward
0 new messages