Computing/LIP_Lisbon_Farm/5_SGE-deprecated/5.3_Job_Submissions_Advanced

Advanced job submission options

# Request for 1G of free virtual memory. The system will schedule the task in a machine with 1 GB of virtual memory free but the job will be killed if it uses more than on 1G.
$ qsub -l h_vmem=1G <your script>

# Request for 1G of virtual memory and 20G of free space. The job will be killed if it needs more resources that it requested.
$ qsub -l h_vmem=1G,h_fsize=20G <your script>

# Request for 30m of wallclock time. The job will be killed if it uses more than 30m.
$ qsub -l s_rt=00:30:00 <your script>

Job Wrappers

# ! /bin/bash -l
shopt -s expand_aliases

$ cat my_job_wrapper.sh
# ! /bin/bash
shopt -s expand_aliases

i=$1
while [ $i -le $2 ]; do
   cat << EOF > job.sh.$i
#\$ -v SGEIN1=input_file$i.txt
#\$ -v SGEOUT1=output_file$i.txt
cat input_file$i.txt >> output_file$i.txt
EOF
   qsub job.sh.$i
   rm -f job.sh.$i
   i=`expr $i + 1`
done

exit 0
last edited 2022-04-06 11:16:23 by jpina