I am not calling the cpi.py script directly. The master is spawning those processes. So I call
$ mpiexec -n 30 python master.py
Then each of the 30 ranks should spawn a cpi.py process. But with the attached master.py and cpi.py (directly from the mpi4py tutorial), you can see the errors I get:
[jlarson@mintthinkpad tutorial_example]$ mpiexec -n 30 python master.py
[mpiexec@mintthinkpad] control_cb (pm/pmiserv/pmiserv_cb.c:200): assert (!closed) failed
[mpiexec@mintthinkpad] HYDT_dmxu_poll_wait_for_event (tools/demux/demux_poll.c:76): callback returned error status
[mpiexec@mintthinkpad] HYD_pmci_wait_for_completion (pm/pmiserv/pmiserv_pmci.c:198): error waiting for event
[mpiexec@mintthinkpad] main (ui/mpich/mpiexec.c:336): process manager error waiting for completion
As was previously stated, this appears to be an mpi4py problem and not a mpich question.
Since you are curious about the application, I the motivating example involves the numerical optimization of the output from an expensive simulation. I do not have access to the simulation code, so my master will tell the workers where they need to evaluate the expensive simulation. Then the simulation might itself depend heavily on MPI.
But I welcome your input on the design paradigm to avoid the "sharp edges"
Thank you again,
Jeff