def test_respawn(comm): pm = ParticleMesh(BoxSize=8.0, Nmesh=[4, 4, 4], comm=comm, dtype='f8') from mpi4py import MPI pm1 = pm.respawn(MPI.COMM_SELF) assert pm1.comm.size == 1