Skip to content

Unit test for Optimizer restart functionality

Tara Maria Boland requested to merge optimizer-restart into master

The restart test only checks that the restart will fail if given a bad restart file. While this is good, it is not enough to ensure that the restart functionality is doing what one would expect it to do.

Given the importance of a restart, one should be more careful in regard to how something is restarted.

This adds a test for optimizers by checking that (1) a single run to optimize a structure and, (2) a restarted optimization run, that is stopped after N steps:

  • are IDENTICAL each other
  • that the trajectory file is also identical and contains appropriate information
  • the restart and trajectory file contain the appropriate information

There were unsurprisingly bugs found when these tests were added. The bug fixes are provided in a separate MR !3135 (merged), which should be merged first. BFGSLineSearch is marked as xfail, it does not restart the same. A lot of time was spent fixing CellAwareBFGS and BFGS.

This test is still not comprehensive enough. One should have a test for each optimizer option to ensure these calculations are doing what the doc string claims.

Checklist

Edited by Tara Maria Boland

Merge request reports