[Developers] exit strategies

Erik Schnetter schnetter at cct.lsu.edu
Sat Dec 30 07:57:47 CST 2006


On Dec 6, 2006, at 20:29:17, Steve White wrote:

> Let's discuss these possibilites
>
> 	1) a parameter that makes any call to CCTK_Exit() with value other
> 	   than EXIT_SUCCESS to call abort().
>
> 	2) To make CCTK_Abort print a message and call abort().
>
> 	3) To clean up raw calls to exit() in thorns.
>
> 	4) make CCTK_VWarn to pass EXIT_FAILURE to CCTK_Abort if
> 	   level <= error_level (do in Flesh, PUGH and Carpet)

We discussed 2) before.  There is a problem when running in parallel,  
since calling exit() or abort() may have problems terminating other  
MPI processes.  It is much preferred to call MPI_Abort() instead.   
However, MPI_Abort() does not call abort(), it calls exit().

Hence there are are two different behaviours:

- Call MPI_Abort(), reliably causing all MPI processes to exit cleanly
- Call abort(), ending up in a debugger or obtaining a core dump, and  
possibly leaving the other MPI processes in an undefined state

Both behaviours have their uses in times.  I suggest to add a command  
line option to distinguish between these two behaviours.  I think it  
should be a command line option and not a parameter because this  
behaviour does not influence any physics output of a simulation, it  
only changes how the job interacts with its environment, similar to  
choosing line buffering or redirecting I/O to files.  A command line  
option also makes it easier to change this behaviour quickly when  
debugging.

-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: 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/20061230/121efaa8/attachment.bin 


More information about the Developers mailing list