Dear all,
I'm just trying some very basic stuff with MPI_COMM_SPAWN in python (i.e. I use mpi4py package), but I see behaviour that I do not understand - the child process gets spawned, does its stuff and then "should" finish. I see though, that the process created for the child stays alive. I see this only with the MPICH, OPENMPI does what I would (naively) expect. In this way I can end up with N "ghost" process, after calling SPAWN N-times. My minimal working example is following:
______________________________________________parent.py
from __future__ import print_functionfrom mpi4py import MPIcomm = MPI.COMM_WORLDspawned = MPI.COMM_SELF.Spawn(sys.executable,args=['child.py'],maxprocs=1)print("parent process is waiting for child")spawned.Barrier()
______________________________________________child.py
from __future__ import print_functionfrom mpi4py import MPIparent = MPI.Comm.Get_parent()# just do some stupid stuff that takes a bit of timefor i in range(5000000):a = i*i+1-(i*10) + math.sin(math.pow(i,i%8))parent.Barrier()
______________________________________________
I run with e.g.:mpirun -n 1 python mpi.py
Do I miss something with SPAWN method?(I tested on two independent systems, our local cluster with mpich v3.0.4, and my laptop - fedora 26, mpich v3.2.8 from repositories)
thank you very much for suggestions.
Regards,stanislav.
_______________________________________________ discuss mailing list discuss@mpich.org To manage subscription options or unsubscribe: https://lists.mpich.org/mailman/listinfo/discuss