Sun MPI 4.0 User's Guide: With LSF

Spawn a Job in the Stopped State

Use the -s argument to cause a job to be spawned in the STOPPED state. It does this by setting the stop-on-exec flag for the spawned process. This feature can be of value in a program monitoring or debugging tool as a way of gaining control over a parallel program. See the proc(4) man page for details.


Note -

Do not use the -s argument with the Prism debugger. It would add nothing to Prism's capabilities and would be likely to interfere with Prism's control over the debugging session.


The following example shows the -s argument being used to spawn an interactive batch job in the STOPPED state.

hpc-demo% bsub -I -n 1 -q hpc -sunhpc -s hpc-job

To identify processes in the STOPPED state, issue the ps command with the -el argument:

hpc-demo% ps -el
F  S  UID  PID  PPID C PRI NI ADDR     SZ WCHAN TTY  TIME  CMD
19 T  0    0    0    0 0   SY f0274e38 0  ?          0:00  sched

Here, the sched command is in the STOPPED state, as indicated by the T entry in the S (State) column.

Note that, when spawning a process in the STOPPED state, the program's name does not appear in the ps output. Instead, the stopped process is identified as a RES daemon.