本文介绍了设置SGE以在不同节点上运行具有不同输入文件的可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前使用SLURM调度程序来处理集群,但是现在我或多或少被迫切换到基于SGE的集群,而我试图摆脱这种局面.我在SLURM系统上进行的工作涉及使用N个输入文件运行可执行文件,并以这种方式设置SLURM配置文件,

I used to work with a cluster using SLURM scheduler, but now I am more or less forced to switch to a SGE-based cluster, and I'm trying to get a hang of it. The thing I was working on SLURM system involves running an executable using N input files, and set a SLURM configuration file in this fashion,

slurmConf.conf SLURM configuration file
    0   /path/to/exec /path/to/input1
    1   /path/to/exec /path/to/input2
    2   /path/to/exec /path/to/input3
    3   /path/to/exec /path/to/input4
    4   /path/to/exec /path/to/input5
    5   /path/to/exec /path/to/input6
    6   /path/to/exec /path/to/input7
    7   /path/to/exec /path/to/input8
    8   /path/to/exec /path/to/input9
    9   /path/to/exec /path/to/input10

我在SLURM中的工作提交脚本包含这一行;

And my working submission script in SLURM contains this line;

srun -n $SLURM_NNODES --multi-prog $slconf
$slconf refers to a path to that configuration file

此设置按我的意愿工作-用10个节点同时运行具有10个不同输入的可执行文件.现在,我刚刚过渡到SGE系统,我想做同样的事情,但是我尝试阅读该手册,却没有发现与SLURM类似的东西.您能否给我一些关于如何在SGE系统上实现相同目标的信息?

This setup worked as I wanted - to run the executable with 10 different inputs at the same time with 10 nodes. Now that I just transitioned to SGE system, I want to do the same thing but I tried to read the manual and found nothing quite like SLURM. Could you please give me some light on how to achieve the same thing on SGE system?

非常感谢!

推荐答案

您可以使用Grid Engine的作业数组"功能.

You could use the "job array" feature of the Grid Engine.

创建一个shell脚本sge_job.sh

Create a shell script sge_job.sh

#!/bin/sh
#
# sge_job.sh -- SGE job description script
#
#$ -t 1-10
/path/to/exec /path/to/input$SGE_TASK_ID

并使用qsub将此脚本提交给SGE.

And submit this script to SGE with qsub.

qsub sge_job.sh

这篇关于设置SGE以在不同节点上运行具有不同输入文件的可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 22:03