[Developers] MPI_Finalize

Erik Schnetter schnetter at cct.lsu.edu
Tue Oct 2 10:43:36 CDT 2007


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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: shutdown.diff
Type: application/octet-stream
Size: 4209 bytes
Desc: not available
Url : http://www.cactuscode.org/pipermail/developers/attachments/20071002/57d584a8/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://www.cactuscode.org/pipermail/developers/attachments/20071002/57d584a8/attachment.bin 


More information about the Developers mailing list