The HECToR Service is now closed and has been superceded by ARCHER.

A New CASTEP and ONETEP Geometry Optimiser

The objective of this Distributed Computational Science and Engineering (dCSE) project has been to reduce the memory-per-core requirements of the Density Functional Theory codes CASTEP and ONETEP by improving the memory scaling of the geometry optimisation parts of the codes.

Prior to this project both CASTEP and ONETEP used the Broyden-Fletcher-Goldfarb-Shanno (BFGS) method for non-linear optimisation (both codes having a common heritage and therefore very similar implementations). BFGS scales as O(N^2) in system size N which limits the number of atoms in experiments on HECToR. This is due to a quadratic inverse Hessian matrix, which was stored explicitly in BFGS. In the Limited-BFGS (L-BFGS) algorithm the inverse Hessian is instead built from a history of rank-1 updates, providing linear scaling in memory.

A secondary original aim of the project was to improve the implementation of the part BFGS which resets the inverse Hessian, involving a Singular Value Decomposition (SVD) and 6 O(N^2) matrices, by restricting the SVD to a smaller subspace.

A full set of objectives for this project were:

  • Optimisation of existing BFGS code in CASTEP.
  • Implementation of basic L-BFGS algorithm in CASTEP.
  • Implementation of L-BFGS within SVD part of code in CASTEP.
  • Implementation of new algorithms in ONETEP.
  • Investigate performance improvements.

In summary, all of the aims of the project have been achieved:

  • L-BFGS has been implemented and fully tested in CASTEP and ONETEP and has gone into the main codebase of CASTEP and passed back to the ONETEP developers.
  • Resetting the inverse Hessian (SVD task) has been improved from quadratic to linear scaling by implementing an alternative scheme based on an analysis of the structure of the update matrix for the inverse Hessian and avoiding performing a full SVD on it.
  • Throughout the project optimisations to the existing code have been made where there have been opportunities to do so.
  • Performance improvement in both time and memory have been demonstrated for large systems, clearly showing linear memory scaling, and evaluating different update history lengths.

Please see PDF or HTML for a report which summarises this project.