Missing Platform LSF commands part 2: btree

In a previous article, I discussed a hypothetical Platform LSF command, bwait, which would waits for LSF jobs to complete before returning. Another command that I would like to see in the Platform LSF suite of commands is a command to track parent-child relationship between jobs. Linux has a pstree command, LSF could have a btree command.

A simple scenario for submitting hierarchical LSF jobs would be for launching regressions. You may want to have a master job representing a regression responsible for launching multiple children jobs: the test cases. In this case, a command tracking the parent-child relationship between LSF jobs would be useful:

$ bsub my_regression
Job <56478> is submitted to default queue.

# Some time later
$ btree 56478

This command would be able to trace a child job back to the parent:

$ btree --find-parent 56481

Another application for this command is for hierarchical builds, where a parent job dispatches multiple smaller build jobs. For instance, if you describe your hierarchical build in GNU Make and in sub-makes, you are letting GNU Make decide what needs to be built. If you want to know what GNU Make has launched behind the scenes, you need to track the hierarchy of jobs. Again, a btree command becomes useful:

$ bsub make large_build
Job <1234> is submitted to default queue.

# And some time later:
$ btree 1234

The btree command would be able to report the tree of jobs long after the jobs are done. It could also do all kinds of fancy stuff like print log files name and the job status along with the jobs id, so you could quickly review the status of a large set of jobs by holding on to a single job id number.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: