amber-developers: Question regarding use of mexit()

From: Daniel R. Roe <daniel.r.roe.gmail.com>
Date: Fri, 16 Nov 2007 16:50:02 -0500

Hello all, Dan Roe from the Simmerling lab here. I had a question as to
the correct use of mexit() calls.

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?

Thanks!

-Dan Roe

-- 
-------------------------
Daniel R. Roe, Ph.D.
Department of Chemistry
Stony Brook University
Stony Brook, NY, 11790
631-632-1560
Received on Sun Nov 18 2007 - 06:07:52 PST
Custom Search