kaldi GridEngine

概況

queue.ql: gridengine 多機運行
run.ql: 本地多進程,忽略除了JOB以外的其他參數

queue.pl test.log  echo foo \| awk 's/f/F/';

基本格式

queue.pl <options> <log-file> <command>

其中command對於”|>;”這些shell會解析的符號需要做轉義
queue.pl傳入參數到qsub參數的對應關係
這裏寫圖片描述

GridEngine

Grid Engine是分佈式的資源管理工具,類似於Torque/SLURM/LAVA等工具。一開始是sun公司,後被oracle收購以後相關資料變少,而後oracle又將其移交給Univa
最後一個開源版本是6.2u5,後面有兩個主要分支:
- 商業版本:oracle收購sun以後,繼續出售商業版的Grid Engine,後交由Univa,稱之爲Univa Grid Engine
- 開源版本:分別是Son of Grid Engine和Open Grid Scheduler

master節點作爲queue management,master本身也可以作爲node,shadow master相當於master的backup。
安裝操作參考http://gridscheduler.sourceforge.net/CompileGridEngineSource.html

安裝部分

% export SGE_ROOT=< Your Target Directory >
% mkdir $SGE_ROOT
% scripts/distinst -all -local -noexit
% cd $SGE_ROOT
% ./install_qmaster
% ./install_execd

配置信息

Adding Nodes

  1. 安裝grid engine
    將編譯好的程序由master複製到其他機器
    保證default/common/act_qmaster是前面master的hostname
    運行 default/common/sgeexecd start
  2. 將client的機器設置成三種host
    三種hosts分別是administrative hosts, execution hosts and submit hosts,每臺機器都設置成這三種形式。
#查看三種類型host命令
qconf -sh
qconf -sel
qconf -ss
#添加host命令
qconf -ah <your-fqdn>
qconf -ae <your-fqdn> #修改complex_values字段        ram_free=20G,gpu=4 
qconf -as <your-fqdn>
  1. 將client組成group對應到queue
#add a group of hosts
qconf -ahgrp @allhosts
#add your clients to the group
qconf -mhgrp @allhosts
#set the group and slot  to the queue,like:
#hostlist @allhosts
#slots  20 #告知queue該節點分配多少slot,slot的個數跟cpu的核數有關
qconf -mq all.q

Configuring GridEngine

  1. 對job信息增加以下兩行信息
    qconf -mc
gpu                 g           INT         <=    YES         YES        0        10000
ram_free            ram_free    MEMORY      <=    YES         JOB        1G       0
  1. 增加parallel environment
    qconf -ap smp
pe_name            smp
slots              9999
  1. 新增queue,修改相關字段
    qconf -aq all.q
hostlist              @allhosts
pe_list               make smp
rerun                 TRUE
slots                 25
prolog                <dir>/prolog.sh
  1. 全局配置sge的路徑
cat /etc/profile
. <SGE_ROOT>/default/common/settings.sh

常用命令

##查看修改增加配置
qconf [a|d|m|s][m|q|conf|c|p]
#m: manager
#q: queue,查看所有queue使用qconf -sql
#conf: global conf, not connected with any queue
#c: GridEngine has the concept of "resources" which can be requested or specified by your jobs
#p: It's a simple parallel environment where GridEngine doesn't really do anything, it just reserves you a certain number of slots, so if you do qsub -pe smp 10 <your-script> you will get 10 CPU slots reserved; this can be useful for multi-threaded or multi-process jobs.首先通過qconf -ap smp增加一個名字爲smp的pe,然後使用qconf -mq all.q修改對應的pe_list參數(make smp)將pe需要映射到all.q對應的queue。

queue.pl -q all.q -l arch=*64 -l gpu=1 -l mem_free=10G,ram_free=10G -pe smp 10
-q: name of queue, which is added by qconf -aq all.q
-l: params related to job, which is added by qconf -ac
-pe: set number of cpu slots

##關閉/啓動node
qmod -d all.q@gpu04 #disable
qmod -e all.q@gpu04 #enable

參考

http://kaldi-asr.org/doc/queue.html

發佈了132 篇原創文章 · 獲贊 94 · 訪問量 62萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章