[Developers] [Patches] print process ID in the Cactus banner

Erik Schnetter schnetter at cct.lsu.edu
Thu Feb 12 13:25:39 CST 2009


On Feb 12, 2009, at 10:42:16, Thomas Radke wrote:

> The attached tiny patch outputs the process ID in the Cactus banner  
> printed at simulation startup. This information is useful eg. so  
> that one can associate core.<pid> files with MPI tasks  
> (CCTK_Proc<task-ID>.out files) while post-mortem debugging a  
> parallel run.
>
> -- 
> Cheers, Thomas.
> Index: Banner.c
> ===================================================================
> RCS file: /cactusdevcvs/Cactus/src/main/Banner.c,v
> retrieving revision 1.35
> diff -u -r1.35 Banner.c
> --- Banner.c	16 Feb 2006 16:05:46 -0000	1.35
> +++ Banner.c	12 Feb 2009 16:34:26 -0000
> @@ -102,7 +102,7 @@
>  Util_CurrentTime (DATALENGTH, buffer);
>  printf (" (%s)\n", buffer);
>  Util_GetHostName (buffer, DATALENGTH);
> -  printf ("Run host:          %s\n", buffer);
> +  printf ("Run host:          %s (pid=%d)\n", buffer, (int)  
> getpid());
>  if (getcwd (buffer, DATALENGTH))
>  {
>    printf ("Working directory: %s\n", buffer);


I agree.

-erik

-- 
Erik Schnetter <schnetter at cct.lsu.edu>   http://www.cct.lsu.edu/~eschnett/

My email is as private as my paper mail.  I therefore support encrypting
and signing email messages.  Get my PGP key from <http://pgp.mit.edu>.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://www.cactuscode.org/pipermail/developers/attachments/20090212/fad02cf6/attachment.bin 


More information about the Developers mailing list