I use Sun Grid Engine a lot and often need to submit a job that depends on the output of other jobs. qsub option –hold_jid does just that: it tells the scheduler not to process a job until another job is completed.

Therefore, I use it. A LOT.

Sometimes, it even gets difficult to know which job is waiting for which job to complete. Here comes a simple script I wrote, that happens to be very helpful!

The JobDependencyGraph-1.1 script allows to get a graphical representation of the jobs you submitted to a Sun Grid Engine (nodes), along with their –hold_jid dependencies (edges).

Job dependency graph

Each node is a job (ID and name). Greenish nodes are running jobs. Edges are –hold_jid dependencies.

It was tested with GE 6.2u4 and Graphviz dot version 2.6. You might need to modify it slightly to match your qstat output format if you use a different version.

I thought of writing this script after reading this blog post, where Chi Hung Chan basically does the opposite of this script (i.e. converts a graph into a collection of qsub calls).

Hope it’s useful!


Published

10 February 2011

Tags