完整部署快照

This commit is contained in:
root
2026-09-20 02:20:26 +00:00
commit ce553c0dc8
5836 changed files with 1631123 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import os
from mpi4py import MPI
def get_world_size(comm=None):
if comm is None:
comm = MPI.COMM_WORLD
return comm.Get_size()
def get_local_rank(comm=None):
return int(os.environ["OMPI_COMM_WORLD_LOCAL_RANK"])
def get_rank(comm=None):
if comm is None:
comm = MPI.COMM_WORLD
return comm.Get_rank()