I have a PBS script to run jobs. The name is specified by #PBS -N tag.
But, if you want to run a number of files (100s, 1000s), it may be tedious to edit submit-jobs file for each file. Instead one can use this onliner to assign name to each jobs.
For example,
#For foo_bar_abc_1_01_geh_file.in, the Job Name should be test01,
#For foo_bar_abc_1_02_geh_file.in, the Job Name should be test02,
#For foo_bar_abc_1_100_geh_file.in, the Job Name should be test100,
etc.
for f in foo*.in; do qsub -N test$(echo $f|cut -d_ -f5) -v infile=$f run.pbs; done
But, if you want to run a number of files (100s, 1000s), it may be tedious to edit submit-jobs file for each file. Instead one can use this onliner to assign name to each jobs.
For example,
#For foo_bar_abc_1_01_geh_file.in, the Job Name should be test01,
#For foo_bar_abc_1_02_geh_file.in, the Job Name should be test02,
#For foo_bar_abc_1_100_geh_file.in, the Job Name should be test100,
etc.
for f in foo*.in; do qsub -N test$(echo $f|cut -d_ -f5) -v infile=$f run.pbs; done
No comments:
Post a Comment