[torqueusers] how to get qsubid and other info in epilogue and prologue scripts?

Garrick Staples garrick at usc.edu
Fri Oct 14 20:35:57 MDT 2005


On Wed, Oct 12, 2005 at 10:15:02AM +0800, ?????? alleged:
> hello everyone:
> 
>      I want to get qsubid in epilogue and prologue scripts, but i don't know how to get , can you help me ?

The jobid is passed as the first argument to pro/epilog scripts.



>      another question , when I use qsub, I want to send like this:
>      qsub job_name ......
>      and I want send a string for example "00000001" belong with qsub , and get this string in prologue and epilogue scripts, how can I trans this string frome qsub command to epilogue and prologue scripts?
> 

It is not currently possible to pass arbitrary arguments to submit
scripts.

This is kind of ugly, but if you put your argument inside of the job
script, you could grep for it in prologue:

mom_priv/prologue:
#!/bin/bash
JOBID=$1
JOBUSER=$2
JOBGROUP=$3
input=$(grep something jobs/${JOBID:0:11}.SC)
...do something with $input...

-- 
Garrick Staples, Linux/HPCC Administrator
University of Southern California
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torqueusers/attachments/20051014/8725737d/attachment.bin


More information about the torqueusers mailing list