mopac icon indicating copy to clipboard operation
mopac copied to clipboard

Camp-King performance issues

Open godotalgorithm opened this issue 4 months ago • 0 comments

As noted in #261, the default behavior of MOPAC's SCF cycle is to use the Camp-King converger during the last 10 iterations if ITRY is used to limit the number of iterations. The Camp-King converger uses hand-written dense linear algebra instead of BLAS and LAPACK operations, so it is much slower per-iteration than the default or Pulay convergers. The best way to avoid this behavior is to specify the use of the Pulay converger with the PULAY keyword, which prevents the converger from switching. Pulay is also the most efficient converger in most cases.

I've examined the Camp-King converger, and it cannot be rewritten as-is using level-3 BLAS operations (i.e. the fast ones) because it uses Gram-Schmidt orthogonalization. The algorithm needs to be adjusted to make use of QR-based orthogonalization instead to make use of level-3 BLAS at every performance-critical step. Unfortunately, this is not so straightforward, so the priority of fixing this is low.

godotalgorithm avatar Sep 11 '25 01:09 godotalgorithm