I should add to my mention of MPI_Quit that I am not at all confident that a clean & portable semantic is possible.
I am not suggesting anything that provides subset synchronizations or application notifications. No promise of message delivery among other tasks. No promise that other tasks reach a standards defined state before being ended.
If MPI_Quit means anything more than a promise by libmpi that all tasks will be terminated and all resources recovered, it becomes a much more difficult problem.
A call to MPI_Quit would let the application give a return code of 0 so a script or wrapper that checks the mpiexec return code would regard the application as a success.
Dick Treumann - MPI Team
IBM Systems & Technology Group
Dept X2ZA / MS P963 -- 2455 South Road -- Poughkeepsie, NY 12601
Tele (845) 433-7846 Fax (845) 433-8363