[GE users] Arithemtical operations in Submit Scripts

reuti reuti at staff.uni-marburg.de
Wed Apr 21 12:53:16 BST 2010


Am 21.04.2010 um 00:59 schrieb ppetosy:

> I am trying to submit array jobs and I need to have 0 based Output Stream paths. 
> Let's say this is my script
> #!/bin/sh
> #$ -q short.q
> #$ -t 1-5
> #$ -o /usr/local/tmp/$TASK_ID.tmp
> How can I change the 4th line of this script to something like this 
> #$ -o /usr/local/tmp/($TASK_ID-1).tmp

I suggest to adjust your followup software which depends on this, or rename the files after the job. This could even be done in a global or queue epilog:


for the default names. Adjust to your needs. Just note, that there might be a race-condition when the files are not renamed in ascending order, as they would override a not yet renamed file, but you could add just one character to avoid this to make them unique again and/or use $SGE_TASK_ID directly as the usual environment variables are known in the epilog to build a completely new name.

-- Reuti

> Are arithmetical expressions supported by SGE ? 
> Thanks,
> Petros.
> ------------------------------------------------------
> http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=254243
> To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].


To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].

More information about the gridengine-users mailing list