Skip to content

opmd matplotlib.pylab crash (depending on import order) #1792

@pgrete

Description

@pgrete

Describe the bug
Code crashes on import when openpmd is imported before matplotlib

To Reproduce
Compile-able/executable code example to reproduce the problem:

(py-oct25) pgrete@login10 ~ $ python -c "import openpmd_api as opmd; import matplotlib.pylab as plt; print('nope')"
Segmentation fault (core dumped)
(py-oct25) pgrete@login10 ~ $ python -c "import matplotlib.pylab as plt; import openpmd_api as opmd; print('yay')"
yay
(py-oct25) pgrete@login10 ~ $ python -c "import matplotlib as mpl; import openpmd_api as opmd; import matplotlib.pylab as plt; print('yay')"
yay

Expected behavior
No crash

Software Environment

  • version of openPMD-api: current dev
  • installed openPMD-api via: from source
  • machine: Frontier
  • name and version of Python implementation: CPython 3.11

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions