1from mpi4py import rc 2rc.finalize = False 3 4from mpi4py import MPI 5assert MPI.Is_initialized() 6assert not MPI.Is_finalized() 7