Skip to content

Unit test `parse_input_string` with Fortuno

Alex Buccheri requested to merge unit_test/string_parsing into main

Unit test the subroutine parse_input_string with the Fortuno test framework.

This allows Octopus inputs to be defined as character strings in fortran, and parsed within a test program, rather than depending on external inp files.

Doing so required some refactoring of the oct-parser routines on the fortran side.

Additionally, global_init now optionally accepts an MPI communicator. If this is passed, Octopus will not call MPI_INIT(). This is a requirement of the test framework, which is responsible for initialising the MPI env.

I've also moved initialization of many conf attribute defaults into the class definition, as they are known at compile time and should not change.

TODOs

  • Apply findent to all new fortran files
  • Ensure fortuno unit tests run in Gitlab CO
  • Refactor global_init, such that unit tests with fortuno can be performed for MPI builds of Octopus
Edited by Alex Buccheri

Merge request reports