When all tasks finish, Session Scheduler exits, all temporary files are deleted, the session job is cleaned from the system, and Session Scheduler output is captured and included in the standard LSF job e-mail.
You can also submit a Session Scheduler job without a task definition file to specify a single task.
The submission directory path can contain up to 4094 characters.
See the ssched command reference for detailed information about all task options.
bsub -app ssched -n num_hosts ssched [task_options] [-tasks task_definition_file]
[command [arguments]]
bsub -app ssched -n 2 ssched -tasks my.tasks
-J task_name[index_list]
The index list must be enclosed in square brackets. The index list is a comma-separated list whose elements have the syntax start[-end[:step]] where start, end and step are positive integers. If the step is omitted, a step of one (1) is assumed. The task array index starts at one (1).
All tasks in the array share the same option parameters. Each element of the array is distinguished by its array index.
See the ssched command reference for detailed information about all task options.
-Q "exit_code ..."
-Q enables automatic task requeue and sets the LSB_EXIT_REQUEUE environment variable. Use spaces to separate multiple exit codes. LSF does not save the output from the failed task, and does not notify the user that the task failed.
If a job is killed by a signal, the exit value is 128+signal_value. Use the sum of 128 and the signal value as the exit code in the parameter. For example, if you want a task to rerun if it is killed with a signal 9 (SIGKILL), the exit value is 128+9=137.
The SSCHED_REQUEUE_LIMIT setting limits the number of times a task can be requeued.
See the ssched command reference for detailed information about all task options.
Integrate Session Scheduler with bsub to make the execution of Session Scheduler jobs transparent. You can then use bsub to submit Session Scheduler jobs without specifying the Session Scheduler application profile and options.
The bsub command recognizes two environment variables to support Session Scheduler job submission: LSB_TASK_LIST (the task definition file) and LSB_BSUB_MODE (the current bsub mode). If LSB_BUSB_MODE is "ssched", running bsub does not submit a job to mbatchd. Instead, running bsub opens the task definition file (LSB_TASK_LIST) and inserts the submitted job as a task into the task definition file.
This integration supports the following bsub options: -E, -Ep, -e, -i, -J, -j, -o, -M, -Q, and -W.
Other bsub options are ignored.
Create the script files necessary for setting up the execution environment to integrate Session Scheduler with bsub.
Use bsub to submit Session Scheduler jobs without specifying the Session Scheduler application profile and options.
You can also run these commands entirely from a script. For example:
#!/bin/sh
. begin_ssched.sh -n2
bsub task1
bsub task2
. end_ssched.sh
ssched exits after the check is complete. An exit code of 0 indicates no errors were found. A non-zero exit code indicates errors. You can run ssched -C outside of LSF.
See the ssched command reference for detailed information about all task options.
Example output of ssched -C:
ssched -C -tasks my.tasks
Error in tasks file line 1: -XXX 123 sleep 0
Unsupported option: -XXX
Error in tasks file line 2: -o my.out
A command must be specified
Only the ssched parameters are checked, not the ssched task command itself. The task command must exist and be executable. ssched -C cannot detect whether the task command exists or is executable. To check a task definitions file, remember to specify the -tasks option.
By default, Session Scheduler sessions are unrecoverable. In the event of a system crash, the session job must be resubmitted and all tasks are resubmitted and rerun.
However, the Session Scheduler supports application-level checkpoint/restart using Platform LSF's existing facilities. If the user specifies a checkpoint directory when submitting the session job, the job can be restarted using brestart. After a restart, only those tasks that have not yet completed are resubmitted and run.
You do not need to call bchkpnt. The Session Scheduler automatically checkpoints itself after each task completes.
bsub -app ssched -k "/share/scratch method=ssched" -n 8 ssched -tasks simpton.tasks
Job <123> is submitted to default queue <normal>.
...
brestart /share/scratch 123