2015-10-28 4 views
5

SGE/PBSでは、私はローカルと同じようにバイナリ実行可能ファイルをクラスタに送信できます。たとえば、SLURMのトップレベルスクリプトを持たないバイナリを実行する

qsub -b y -cwd echo hello 

出力ファイルに「hello」という単語を書き込むechoという名前のジョブを送信します。

同様のジョブをSLURMに提出する方法を教えてください。このファイルには、最初の行にハッシュ・バング・インタプリタがあると想定しています。 SLURMに私は

$ sbatch echo hello 
sbatch: error: This does not look like a batch script. The first 
sbatch: error: line must start with #! followed by the path to an interpreter. 
sbatch: error: For instance: #!/bin/sh 

またはpseuodoのqsubの使用して取得:私はスクリプトを記述する必要はありません

$ qsub echo hello 
There was an error running the SLURM sbatch command. 
The command was: 
'/cm/shared/apps/slurm/14.11.3/bin/sbatch echo hello 2>&1' 
and the output was: 
'sbatch: error: This does not look like a batch script. The first 
sbatch: error: line must start with #! followed by the path to an interpreter. 
sbatch: error: For instance: #!/bin/sh 
' 

を、上部に#!/bin/bashを入れて、次の行で私のコマンドと、その後に提出sbatch。この余分な仕事を避ける方法はありますか?より生産的な方法が必要です。

答えて

7

--wrapパラメータを使用すると、コマンドをスクリプトで自動的にラップすることができます。以下のような

何か:

sbatch --wrap="echo hello"

+0

グレート!できます。 – highBandWidth

+0

'srun'に' --wrap'のようなものがありますか?私の使用例では、私はブロッキングコマンドが必要です。 – landau

関連する問題