Re: amber-developers: Question regarding use of mexit()

From: David A. Case <>
Date: Fri, 16 Nov 2007 16:02:27 -0800

On Fri, Nov 16, 2007, Daniel R. Roe wrote:
> According to the source code I have (current as of 11-06-2007),
> mexit(6,0) will call MPI_FINALIZE, while mexit(6,1) will call MPI_ABORT.
> From what I have read of these procedures in the MPI documentation,
> MPI_FINALIZE should be called by all processes for normal termination.
> However, it seems that since MPI_ABORT tries to kill all processes in
> the given communicator (comm_world in this case), it should only be
> called by the overall master (worldrank==0); if mutiple threads call
> MPI_ABORT for the same communicator will this result in some processes
> hanging because they end up waiting for other processes to try the abort?
> If this is the case then mexit(6,0) should only be called by
> worldrank==0, and it should be ensured that mexit(6,1) is executed by
> all processes. Does this make sense?

Sounds like it should be the reverse(?): any process can call mexit(6,1), but
everyone should call mexit(6,0). Someone would have to do a code audit to see
how consistent we are in Amber on doing this.

Received on Sun Nov 18 2007 - 06:07:54 PST
Custom Search