[Developers] MPI_Finalize

Jian Tao jtao at cct.lsu.edu
Tue Oct 2 12:09:32 CDT 2007


Just curious, could MPI_Init be pushed in the driver instead ?

Regards,
Jian

Erik Schnetter wrote:
> Currently, the flesh calls MPI_Init, but the driver is supposed to call 
> MPI_Finalize.  This happens presumably in the terminate bin as 
> Driver_Terminate.  According to the MPI standard, no externally visible 
> operations may be performed after that, so that the driver may as well 
> call exit at the same time.  If not, strange errors can happen, as 
> reported today elsewhere by Luca Baiotti.
> 
> I propose to have the flesh call MPI_Finalize, to make things symmetric 
> to MPI_Init.  It would do so very late in CCTKi_ShutdownCactus after 
> printing "Done.".  This means that thorns could continue to schedule 
> actions in the terminate bin after Driver_Terminate, and in the shutdown 
> bin.
> 
> I attach a diff.  Of course, PUGH and Carpet would also need to be 
> changed, so that they don't call MPI_Finalize any more.
> 
> -erik
> 
> --Erik Schnetter <schnetter at cct.lsu.edu>
> 
> My email is as private as my paper mail.  I therefore support encrypting
> and signing email messages.  Get my PGP key from www.keyserver.net.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Developers mailing list
> Developers at cactuscode.org
> http://www.cactuscode.org/mailman/listinfo/developers



More information about the Developers mailing list