def size(self): if MPI_INSTALLED: mpi_comm = MPI.COMM_WORLD return mpi_comm.Get_size() else: return 1