Skip to content

Instantly share code, notes, and snippets.

@bnlawrence
bnlawrence / mpi_v_example.py
Last active December 28, 2023 10:29
example of using mpi alltoall and alltoallv
from mpi4py import MPI
import numpy as np
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
nprocs = comm.Get_size()
DEBUG = 0
def move_info(info2move):