[GE users] signals and -notify

Wolfgang Dobler Wolfgang.Dobler at ucalgary.ca
Fri Nov 26 00:32:31 GMT 2004

 > >  #!/bin/sh
 > >  #
 > >  perl_prog &
 > >  #
 > >  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?

Rayson Ho writes:
 > Did you have the tight MPI integration??

Not currently, but I could switch to that (although I recall I didn't see
much of a difference between the tight sge-lam and my own scripts
startin/stopping lam-mpi).

Reuti writes:
 > >   perl_prog &
 > The & will bypass SGE.

A pity.

 > 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.

Is there a way to spawn perl_prog such that it runs in the same process

 > 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
 > easy.

What I am after is a way to have perl_prog catch the signal and write a
file that then tells the MPI processes to finish up. So I don't want any
of the other processes to die because of the signal (not the run.x
processes, not the mpirun process, and also not the main script, because
that one will have to copy some data files after the mpirun has finished).

I want to avoid dealing with signals in the executable run.x, because that
would require some non-standard (read: non-portable) F90 stuff.

W o l f g a n g

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