qsub:使用 -t 选项指定非连续数据集

qsub: Specifying non-consecutive datasets with the -t option

我正在使用 qsub 命令将作业提交到 Sun Grid Engine。 qsub-t 选项使我能够指定要调用脚本的数据集——例如,

$ qsub . . . -t 101-103 my_script.sh

我的问题是,是否可以使用 -t 选项指定非连续数据集?例如,假设我想 运行 101103 上的脚本,而不是 102。我将如何做到这一点?

而且,更一般地说,我将如何 select 任意编号的数据集?

我想要一个在实践中适用于大量数据集的答案——远远超出这个玩具示例中使用的两个数据集。

如果目标是 运行 规则间隔的数据集——例如,1, 3, 5, . . .10, 15, 20, . . .——那么@chrk 的答案就是要使用的答案。

对于任意编号的数据集,使用 -t 是不可能的。但是,使用 submit 命令(使用 -f 选项)而不是 qsub.

可以获得相同的功能
$ submit . . . -s my_script.sh -f my_datasets.txt

文件my_datasets.txt每行包含一个数据集,如

101
103

我不确定此解决方案对我的计算环境的特定配置有多具体。

不确定,但在解释 -t 的段落中引用 qsub's man page

. . .

The task id range specified in the option argument may be a single number, a simple range of the form n-m or a range with a step size. Hence, the task id range specified by 2-10:2 would result in the task id indexes 2, 4, 6, 8, and 10, for a total of 5 identical tasks,

. . .

所以,也许:

$ qsub . . . -t 101-103:2 my_script.sh

会做。