SGE用スクリプトファイルをPBS用に書き換える方法

提供:biaswiki
ナビゲーションに移動 検索に移動

主なコマンド Common command

PBS commandSGE command
Job submissionqsub [scriptfile]qsub [scriptfile]
Job deletion qdel [job_id] qdel [job_id]
Job status (for user) qstat -u [username] qstat -u [username]
Extended job status qstat -f [job_id] qstat -f -j [job_id]
Hold a job temporarily qhold [job_id] qhold [job_id]
Release job hold qrls [job_id] qrls [job_id]
List of usable queues qstat -Q qconf -sql

リソース指定 Resource specifications 

PBS command SGE command
Queue #PBS -q [queue] #$ -q [queue]
Processors (Single host) #PBS -l select=1:ncpus=[#] #$ -pe smp [#]
Wall clock limit #PBS -l walltime=[hh:mm:ss] #$ -l time=[hh:mm:ss]
Standard output file #PBS -o [file] #$ -o [path]
Standard error #PBS -e [file] #$ -e [path]
Array job #PBS -J [# - #] #$ -t [# - #]
Array number Variable name${PBS_ARRAY_INDEX}${SGE_TASK_ID}
Copy environment #PBS -V #$ -V
Notification event #PBS -m abe #$ -m abe
Email address #PBS -M [email] #$ -M [email]
Job name #PBS -N [name] #$ -N [name]
Job restart #PBS -r [y|n] #$ -r [yes|no]
Move current directory n/a #$ -cwd
Memory requirement #PBS -l mem=XXXXmb #$ -mem [#]G


  • -cwd が使えなくなる
  • 代替の記述
cd ${PBS_O_WORKDIR}

スクリプトファイル SGE -> PBS

  • sge
#!/bin/bash
#$ -q medium
#$ -cwd
#$ -S /bin/sh
#$ -t 1-10
./myprogram -input=file-${SGE_TASK_ID}
  • pbs
#!/bin/bash
#PBS -q medium
#PBS -S /bin/sh
#PBS -J 1-10
cd ${PBS_O_WORKDIR} ## instead of "#$ -cwd"
./myprogram -input=file-${PBS_ARRAY_INDEX}

SGE -> PBS 変換用 Perl スクリプト

sge2pbs.pl

  • 結果は保障しません...
perl sge2pbs.pl sge_script_file > pbs_script_file