I use pyton 3.10.13,mpi4py 3.1.5. In Blocking,the codes you give is running well.    Maybe mpi4py update .