under test, not sure no errors

This commit is contained in:
root
2026-09-02 07:03:56 +00:00
commit 43c43b491c
4211 changed files with 1013777 additions and 0 deletions

View File

@@ -0,0 +1 @@
from .mpi_utils import *

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()