[Patch, Fortran, 4.7] PR 18918 - Add initial support for a coarray communication library
Tobias Burnus
burnus@net-b.de
Sat Mar 19 21:09:00 GMT 2011
Hi Ralf,
Ralf Wildenhues wrote:
> Some MPI implementations require that the thread that called MPI_Init
> also calls MPI_Finalize. How can this be ensured in this case?
Well, the front-end only calls (via the wrapper) MPI_Finalize for STOP
and at the end of the main program. However, the end of the main program
cannot be present if the main program is not in Fortran - and if the
main program is written in Fortran, it will be MPI_Init. And in case of
STOP, if the program exits, there is no chance to leave invoke
MPI_Finalize of the original thread. (STOP is the normal termination,
ERROR STOP is the error termination.) Thus, I think the code is OK.
Thanks for scrutinizing at the code.
Tobias
More information about the Gcc-patches
mailing list