$ SGE_TASK_ID没有得到设定的qsub阵列网格作业 [英] $SGE_TASK_ID not getting set with qsub array grid job

查看:1009
本文介绍了$ SGE_TASK_ID没有得到设定的qsub阵列网格作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过一个很简单的的zsh 脚本:

 #!/ bin中/ zsh的NUMS =(1 2 3)
NUM = $ NUMS [$ SGE_TASK_ID]

$ SGE_TASK_ID 是太阳网发动机的任务ID。我使用的qsub提交作业的数组。

我下面什么在使用qsub手册页建议( HTTP:// WWW .clusterresources.com / torquedocs /命令/ qsub.shtml#牛逼),并提交我的数组工作作为

  #script名称:job_script.sh
的qsub job_script.sh -t 1-3

$ SGE_TASK_ID没有被设置为这个阵列作业......没有任何人有任何想法,为什么?

谢谢!


解决方案

感谢大家的答案。我发现一个可行的解决方案:

根据群集的设置方式,在Sun Grid Engine的可能被配置为使用其他变量名的数组ids。这对我来说是如此。我发现通过执行以下操作使用的变量:


  

// job_script.sh


 #!/ bin中/ zsh的
ENV>> 〜/ job_env
集>> 〜/ job_env

这转储由脚本设置到一个名为job_env文件中的所有环境变量。只需简单地看一下该文件中并查找递增为每个作业一个变量数组ID。不应该是很难找到。

记住要通过qsub提交job_script.sh如下:

 的qsub -t 1-3 job_script.sh

在我的情况下,所设定的ID是$ PBS_ARRAYID。我不认为这是默认设置,以便$ SGE_TASK_ID应该对集群标准的上海黄金交易所的设置工作。

干杯!

With a very simple zsh script:

#!/bin/zsh

nums=(1 2 3)
num=$nums[$SGE_TASK_ID]

$SGE_TASK_ID is the sun-grid engine task id. I'm using qsub to submit an array of jobs.

I am following what is advised in the qsub manpage (http://www.clusterresources.com/torquedocs/commands/qsub.shtml#t) and submitting my array job as

#script name: job_script.sh
qsub job_script.sh -t 1-3

$SGE_TASK_ID is not being set for this array job... does anyone have any ideas why?

Thanks!

解决方案

thanks everyone for the answers. I found a solution that works:

Depending on how the cluster is set up, the Sun Grid Engine might be configured to use another variable name for array ids.. This was the case for me. I found out the variable to use by doing the following:

// job_script.sh

#!/bin/zsh
env >> ~/job_env
set >> ~/job_env

This dumps all environment variables set by the script into a file called job_env. Just simply look in the file and look for a variable array ID that is incremented for each job. Should not be that hard to find.

Remember to submit the job_script.sh with qsub as follows:

qsub -t 1-3 job_script.sh

In my case, the ID that was set was $PBS_ARRAYID. I don't think that's the default so $SGE_TASK_ID should work for standard SGE setups on clusters.

Cheers!

这篇关于$ SGE_TASK_ID没有得到设定的qsub阵列网格作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆