Open BenWibking opened 1 month ago
Discovered via this PR: https://github.com/AMReX-Codes/pyamrex/pull/320
It's not surprising that a lot of amrex function won't work without amrex::Initialize called.
No, but I don't think it should segfault. This is very surprising (bad) behavior for a Python program. Python scripts should never segfault.
Can amrex be initialized when the module is imported?
Hm, I am a bit hesitant to add a lot if if amrex initialized checks in pyAMReX. But if you add them upstream then we can just C++ throw and this will (should) propagate as a runtime exception to pyAMReX.
Can amrex be initialized when the module is imported?
mpi4py style? Possibly... But there is a lot of runtime stuff people might want to pass to init
Can amrex be initialized when the module is imported?
mpi4py style? Possibly... But there is a lot of runtime stuff people might want to pass to init
Is it possible to re-init after the first (default) init?
The Python interpreter segfaults if a function is called without initializing AMReX:
whereas this works fine: