コンテンツにスキップ

5. Univa Grid Engineによるバッチ実行方法

Univa Grid Engine(UGE)によるバッチ実行方法について説明します。 以下のモジュールが対応しています。

  • Amorphous Cell
  • CASTEP
  • DMol3
  • Cantera
  • ONETEP
  • QMERA
  • GULP
  • VAMP
  • DFTB+
  • MesoDyn

ここでは、「DMol3」を例にしてバッチ実行方法を紹介します。
他のモジュールも同様の手順で実行できます。 その際はモジュール名を読み替えて実行してください。

5.1. バッチ実行用入力ファイルの作成

まず、計算したい入力データ(モデル)を作成します。
作成が終わったら、「Modules」→「DMol3」→「Calculation」をクリックしてDMol3 Calculationダイアログを表示します。

意図する条件を設定した後、「File」をクリックします。

DMol3 Job Filesウィンドウが立ち上がります。 「Save Files」ボタンをクリックします。

バッチ実行用の入力データが作成されたことを確認します。

左ペインのプロジェクトツリーから入力データの一つを右クリックし、「Open Containing Folder」をクリックしてエクスプローラーを開き、ファイルを確認します。

ここでは、必ずエクスプローラーの表示オプションで隠しファイルを表示するように設定してください。(以下はWindows10の場合の例)

今回行うDMol3による構造最適化計算では「.input」「.car」「.mdf」の3ファイルが必要です。

モジュールや計算内容により必要になるファイルは異なります。 必要なファイルは以下のように確認して下さい。

  1. Materials Studioの「Help」→「Help Topics」を表示します。
  2. 検索ボックスに「Running <モジュール名> in standalone mode」と入力し、検索を実行します。
  3. 該当するリンクをクリックし、内容を確認します。バッチ実行の概要が記載されているページになります。

5.2. UGEによるバッチ実行

(1) バッチ実行用ファイルの転送
作成したバッチ実行用入力ファイルをTSUBAMEに転送します。

(2) ファイルフォーマットの変更
入力ファイルを転送した状態では、改行コードが「CRLF」になっています。改行コードはfileコマンドで確認できます。

表示例

$ file C60.car C60.input C60.mdf
C60.car:   ASCII text, with CRLF line terminators
C60.input: ASCII text, with CRLF line terminators
C60.mdf:   ASCII text, with CRLF line terminators

この状態で計算を実行するとファイルフォーマットの関係でエラー終了します。 そこで、改行コードを「CRLF」から「LF」に変換する必要があります。 変換には、dos2unixコマンドを使用します。

使用例

$ dos2unix C60.car C60.input C60.mdf
dos2unix: converting file C60.car to Unix format …
dos2unix: converting file C60.input to Unix format …
dos2unix: converting file C60.mdf to Unix format …
$ file C60.car C60.input C60.mdf
C60.car:   ASCII text
C60.input: ASCII text
C60.mdf:   ASCII text

(3) UGEを利用したバッチ実行方法
ジョブの投入は次のように行います。

Warning

バージョン2018より、インストールディレクトリ、ライセンスマネージャインストールパス、設定すべき環境変数名が変更しているためご注意下さい

(a) DMol3モジュール実行用のスクリプトをコピー

$ cp /apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio23.1/etc/DMol3/bin/RunDMol3.sh ./
$ cp /apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio22.1/etc/DMol3/bin/RunDMol3.sh ./
$ cp /apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio18.1/etc/DMol3/bin/RunDMol3.sh ./
$ cp /apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio17.2/etc/DMol3/bin/RunDMol3.sh ./

各モジュールのスクリプトは以下になります。

・Amorphous Cell
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio23.1/etc/AmorphousCell/bin/RunAmorphousCell.sh
・CASTEP
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio23.1/etc/CASTEP/bin/RunCASTEP.sh
・DMol3
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio23.1/etc/DMol3/bin/RunDMol3.sh
・Cantera
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio23.1/etc/Cantera/bin/RunCantera.sh
・ONETEP
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio23.1/etc/ONETEP/bin/RunONETEP.sh
・QMERA
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio23.1/etc/QMERA/bin/RunQMERA.sh
・GULP
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio23.1/etc/GULP/bin/RunGULP.sh
・VAMP
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio23.1/etc/VAMP/bin/RunVAMP.sh
・DFTB
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio23.1/etc/DFTB/bin/RunDFTB.sh
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio23.1/etc/DFTBpara/bin/RunDFTBpara.sh
・MesoDyn
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio23.1/etc/MesoDyn/bin/RunMesoDyn.sh
・Amorphous Cell
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio22.1/etc/AmorphousCell/bin/RunAmorphousCell.sh
・CASTEP
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio22.1/etc/CASTEP/bin/RunCASTEP.sh
・DMol3
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio22.1/etc/DMol3/bin/RunDMol3.sh
・Cantera
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio22.1/etc/Cantera/bin/RunCantera.sh
・ONETEP
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio22.1/etc/ONETEP/bin/RunONETEP.sh
・QMERA
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio22.1/etc/QMERA/bin/RunQMERA.sh
・GULP
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio22.1/etc/GULP/bin/RunGULP.sh
・VAMP
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio22.1/etc/VAMP/bin/RunVAMP.sh
・DFTB
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio22.1/etc/DFTB/bin/RunDFTB.sh
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio22.1/etc/DFTBpara/bin/RunDFTBpara.sh
・MesoDyn
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio22.1/etc/MesoDyn/bin/RunMesoDyn.sh
・Amorphous Cell
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio18.1/etc/AmorphousCell/bin/RunAmorphousCell.sh
・CASTEP
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio18.1/etc/CASTEP/bin/RunCASTEP.sh
・DMol3
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio18.1/etc/DMol3/bin/RunDMol3.sh
・Cantera
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio18.1/etc/Cantera/bin/RunCantera.sh
・ONETEP
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio18.1/etc/ONETEP/bin/RunONETEP.sh
・QMERA
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio18.1/etc/QMERA/bin/RunQMERA.sh
・GULP
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio18.1/etc/GULP/bin/RunGULP.sh
・VAMP
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio18.1/etc/VAMP/bin/RunVAMP.sh
・DFTB
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio18.1/etc/DFTB/bin/RunDFTB.sh
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio18.1/etc/DFTBpara/bin/RunDFTBpara.sh
・MesoDyn
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio18.1/etc/MesoDyn/bin/RunMesoDyn.sh
・Amorphous Cell
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio17.2/etc/AmorphousCell/bin/RunAmorphousCell.sh
・CASTEP
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio17.2/etc/CASTEP/bin/RunCASTEP.sh
・DMol3
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio17.2/etc/DMol3/bin/RunDMol3.sh
・Cantera
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio17.2/etc/Cantera/bin/RunCantera.sh
・ONETEP
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio17.2/etc/ONETEP/bin/RunONETEP.sh
・QMERA
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio17.2/etc/QMERA/bin/RunQMERA.sh
・GULP
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio17.2/etc/GULP/bin/RunGULP.sh
・VAMP
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio17.2/etc/VAMP/bin/RunVAMP.sh
・DFTB
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio17.2/etc/DFTB/bin/RunDFTB.sh
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio17.2/etc/DFTBpara/bin/RunDFTBpara.sh
・MesoDyn
/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio17.2/etc/MesoDyn/bin/RunMesoDyn.sh

投入シェルスクリプト準備(スクリプト名: test_rundmol3.sh)

#!/bin/bash
#$ -V
#$ -cwd
#$ -l h_node=1
#$ -l h_rt=0:10:0
#$ -v LD_LIBRARY_PATH=/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio23.1/lib:/apps/t3/sles12sp2/isv/ds/BIOVIA_LicensePack
#$ -v BIOVIA_LIC_PACK_DIR=/apps/t3/sles12sp2/isv/ds/BIOVIA_LicensePack/

./RunDMol3.sh C60
#!/bin/bash
#$ -V
#$ -cwd
#$ -l h_node=1
#$ -l h_rt=0:10:0
#$ -v LD_LIBRARY_PATH=/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio22.1/lib:/apps/t3/sles12sp2/isv/ds/BIOVIA_LicensePack
#$ -v BIOVIA_LIC_PACK_DIR=/apps/t3/sles12sp2/isv/ds/BIOVIA_LicensePack/

./RunDMol3.sh C60
#!/bin/bash
#$ -V
#$ -cwd
#$ -l h_node=1
#$ -l h_rt=0:10:0
#$ -v LD_LIBRARY_PATH=/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio18.1/lib:/apps/t3/sles12sp2/isv/ds/BIOVIA_LicensePack
#$ -v BIOVIA_LIC_PACK_DIR=/apps/t3/sles12sp2/isv/ds/BIOVIA_LicensePack/

./RunDMol3.sh C60
#!/bin/bash
#$ -V
#$ -cwd
#$ -l h_node=1
#$ -l h_rt=0:10:0
#$ -v LD_LIBRARY_PATH=/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio17.2/lib:/apps/t3/sles12sp2/isv/ds/LicensePack
#$ -v ACCELRYS_LIC_PACK_DIR=/apps/t3/sles12sp2/isv/ds/LicensePack/

./RunDMol3.sh C60

並列実行の場合は、以下のようにします。

#!/bin/bash
#$ -V
#$ -cwd
#$ -l h_node=1
#$ -l h_rt=0:10:0
#$ -v LD_LIBRARY_PATH=/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio23.1/lib:/apps/t3/sles12sp2/isv/ds/BIOVIA_LicensePack
#$ -v BIOVIA_LIC_PACK_DIR=/apps/t3/sles12sp2/isv/ds/BIOVIA_LicensePack/

./RunDMol3.sh -np 28 C60
#!/bin/bash
#$ -V
#$ -cwd
#$ -l h_node=1
#$ -l h_rt=0:10:0
#$ -v LD_LIBRARY_PATH=/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio22.1/lib:/apps/t3/sles12sp2/isv/ds/BIOVIA_LicensePack
#$ -v BIOVIA_LIC_PACK_DIR=/apps/t3/sles12sp2/isv/ds/BIOVIA_LicensePack/

./RunDMol3.sh -np 28 C60
#!/bin/bash
#$ -V
#$ -cwd
#$ -l h_node=1
#$ -l h_rt=0:10:0
#$ -v LD_LIBRARY_PATH=/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio18.1/lib:/apps/t3/sles12sp2/isv/ds/BIOVIA_LicensePack
#$ -v BIOVIA_LIC_PACK_DIR=/apps/t3/sles12sp2/isv/ds/BIOVIA_LicensePack/

./RunDMol3.sh -np 28 C60
#!/bin/bash
#$ -V
#$ -cwd
#$ -l h_node=1
#$ -l h_rt=0:10:0
#$ -v LD_LIBRARY_PATH=/apps/t3/sles12sp2/isv/materialsstudio/MaterialsStudio17.2/lib:/apps/t3/sles12sp2/isv/ds/LicensePack
#$ -v ACCELRYS_LIC_PACK_DIR=/apps/t3/sles12sp2/isv/ds/LicensePack/

./RunDMol3.sh -np 28 C60

入力ファイル名は、拡張子を外して指定(C60.inputの場合はC60と指定)します。

実行権限付与

$ chmod +x test_rundmol3.sh

ジョブ投入

$ qsub -g <グループ名> test_rundmol3.sh