[GE users] signals and -notify

Reuti reuti at staff.uni-marburg.de
Thu Nov 25 02:18:26 GMT 2004

    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some special characters may be displayed incorrectly. ]


> Consider that I
>   qsub -notify -pe mpi 8 -l h_rt=0:05:00 script
> where script contains
>   #!/bin/sh
>   #
>   perl_prog &

The & will bypass SGE.

>   #
>   mpirun -np 8 run.x
> and the MPI jobs are running on several nodes (say, 4 or 8).
> My question is: who gets signalled SIGUSR2 after 5 minutes?
> My main script?
> The perl_prog process, too?
> The mpirun process?
> All instances of run.x on all the nodes they are running on?

At least on the master node all in the same process group as the master job 
will get the signal - but it's not easy to get them. Because the behavior of 
the shell and the started program may be different, I found it best to replace 
the shell with the program to start (i.e. exec myprogram as last line in the 
script). Then I don't have to use any traps in the shell to avoid the default 
handling there (trap '' usr2 in the shell will also inherited to the child 
processes, unless you change it there again). To do this with mpirun may not be 

Cheers - Reuti

To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net

More information about the gridengine-users mailing list