Skip to content

Fix issue with NekMesh Python logger

Dave Moxey requested to merge fix/nekmesh-python-logger into master

Issue/feature addressed

This MR fixes a small sequencing issue with the NekMesh Python API. When modules are created, if an unknown key is used in the initialisation of the module then a segmentation fault is raised because the output uses an uninitialised logger reference, e.g.

from NekPy.NekMesh import Mesh, InputModule
mesh = Mesh()
module = InputModule("xml", mesh, "input.xml", unknownconfig = False)
module.Process() # this line will segfault

Proposed solution

Re-order the parsing of configuration options so that the logger is constructed before any other options are set.


See above.


One small test has been added as a unit test.




  • Functions and classes, or changes to them, are documented.
  • User guide/documentation is updated.
  • Changelog is updated.
  • Suitable tests added for new functionality.
  • Newly added files are correctly formatted.
  • License added to any new files.
  • No extraneous files have been added (e.g. compiler output or test data files).
Edited by Dave Moxey

Merge request reports