Am 15.09.2011 10:44, schrieb Reuti:
> Hi,
>
> Am 15.09.2011 um 10:00 schrieb Sangmin Park:
>
>   
>> hello,
>> I have a question about naming of job.
>>
>> in the sge batch file, for example,
>>
>> I want to name my job below
>>
>> #!/bin/bash
>>
>> myjob=xxx
>> #$ -N $myjob
>> #$ -q serial.q
>>     
> the substitution of environment variables is done by the shell, not SGE. And 
> for the shell it's a plain comment. There are some exceptions for -e/-o/-i to 
> have some "pseudo" variables replaced by the actual value of the SGE job like 
> $job_id, but not arbitrary ones.
>
> If you want to set some variables and honor them during the creation of the 
> job, you have to either include it on the command line, where the shell will 
> replace it again:
>
> $ myjob=foobar
> $ qsub -N $myjob script.sh
>
> or generate a temporary document where the shell has a chance to replace it 
> again:
>
> *** Top of data ***
> #!/bin/sh
> myjob=foobar
> jobscript=/tmp/script.$$.sh
> exec 4>$jobscript
>
> cat >&4 <<-EOF
> #!/bin/sh
> # -N $myjob
> echo "Hello World."
> sleep 60
> EOF
>
> exec 4>&-
> qsub $jobscript
> rm $jobscript
> *** End of data ***
>
> The replacement will be done already by the shell in the temporary script 
> file.
>
> -- Reuti
> _______________________________________________
> users mailing list
> [email protected]
> https://gridengine.org/mailman/listinfo/users
>
>   
Hi everybody,

I am using qalter at the beginning of the job script to change the name
of the job:

# Change name of job.
qalter $JOB_ID -N "$myjob"

Maybe this can be used in your case as well.

Cheers,

Kasper


<<attachment: kasper_fischer.vcf>>

_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to