Skip to content Skip to sidebar Skip to footer

Python Script Running With Mpirun Not Stopping If Assert On Processor 0 Fails

I have a python script with a set of operations done in parallel, with the library mpi4py. At the end of the operations the processor with rank 0 executes an assert test. If the as

Solution 1:

Instead of assert, you should abort.

https://planet.scipy.org/docs/apiref/mpi4py.MPI.Comm-class.html#Abort

if rank == 0:
    ifmytest() === 0:
        comm.Abort()

Post a Comment for "Python Script Running With Mpirun Not Stopping If Assert On Processor 0 Fails"