fixed mpi context manager