I believe your submission script requires an instruction to the SGE 
queuing system to indicate that you are indeed submitting an array 
job. For example, if you have 10 files (i.e., 10 tasks), you could add 
a line that looks like

#$ -t 1-10

SGE_TASK_ID takes on the value 1 for the first task, 2 for the second 
task and so on.

Best regards,
g

--
Gowtham, PhD
Director of Research Computing, IT
Adj. Asst. Professor, Physics/ECE
Michigan Technological University

P: (906) 487-3593
F: (906) 487-2787
http://it.mtu.edu
http://hpc.mtu.edu


On Wed, 2 Sep 2015, VG wrote:

| HI everyone,
| 
| I am trying to make a job array script. I have 2 files in my working 
directory namely
| abc.fastq and def.fastq
| 
| I want to run one command on these 2 files(later on I will include more 
.fastq files) on
| different compute nodes. So I made this array script, but it only produces 
output for
| abc.fastq.
| 
| Here is the script:
| 
| #!/bin/bash
| 
| file=$(ls -1 *.fastq | tail -n +${SGE_TASK_ID}| head -1)
| filename=${file%.fastq}
| awk 'NR % 2 == 0{print substr($1,7,100)};NR % 2 ==1' $file > 
${filename}_BR.fastq
| 
| I submit it as qsub -cwd -j y -t 1-2 -N testjob ./script.sh
| 
| But only abc.fastq file gets processed?:
| 
| What am I doing wrong here?
| 
| Hope to hear sonn from you guys.
| 
| Thanks
| 
| 
_______________________________________________
users mailing list
users@gridengine.org
https://gridengine.org/mailman/listinfo/users

Reply via email to