STAT Cluster 使用說明
- 系統環境: Linux Fedora Core 2 (Kernel 2.6.5)
- 硬體環境:
- Server: CPU Pentium 3.4 GHz RAM 4GB HD 140GB
- Computing node: CPU Pentium 3.4 GHz RAM 4GB HD 80GB
- Number of computing nodes: 32
- Server IP Address: 140.109.72.224
- 登入帳號: 需預先向資訊室申請
- 連線方式: Exceed or Putty
- Exceed: Query模式, 設定IP Address: 140.109.72.224, 選擇node00 (請向資訊室取得光碟安裝)
- Putty: 請至其網頁下載安裝
- 檔案上傳及下載方式: Windows網芳, Secure File Transfer Client
- Windows網芳: [開始]-->[執行]後, 於小視窗的[開啟]欄位輸入\\140.109.72.224, 按確定, 之後會出現一個對話框, 於對話框內輸入CLUSTER\使用者名稱及密碼, 即可進入個人的資料夾.
- Secure File Transfer Client: 使用過程類似一般ftp軟體, 請至其網頁下載安裝
- 程式語言Compiler: f77, gcc, cc, c++, pgf77, pgf90, pgcc, pgCC, mpif77, mpif90, mpicc, mpicxx
- 軟體: R, Maple and Matlab
- Distributive Processing處理原則:當user submit job以後, 系統會由32個computing nodes中, 自動選擇一個free的computing node, dedicated to user's job. 如果目前沒有free的computing node, user's job將會排隊等候!
- shell file編輯方式僅限於以下方法:
- copy form test.sh
- vi in the server
- text editor in the server
- Distributive Processing使用程序:
- Example for Frotran programs:
- 將Fortran程式Compile成執行檔(如testpgm, 檔名可自取), 指令如后:
pgf77 -o testpgm testpgm.f (for Fortran 77 program)
pgf90 -o testpgm testpgm.f90 (for Fortran 90 program)
- 如果要 link nag library 則需執行以步驟:
pgf77 -o testpgm testpgm.f -lnag (for Fortran 77 program)
pgf90 -o testpgm testpgm.f90 -lnag (for Fortran 90 program)
- 如果要 link imsl library 則需執行以步驟:
. /usr/local/vni/CTT4.0/ctt/bin/cttsetup.sh
$FC $FFLAGS –o testpgm testpgm.f $LINK_FNL_STATIC (for Fortran 77 program)
$F90 $F90FLAGS –o testpgm testpgm.f90 $LINK_F90_STATIC (for Fortran 90 program)
- 編輯一個shell file (如test.sh, 檔名可自取), 內容如后:
#!/bin/sh
#PBS -l walltime=9999:00:00
cd $PBS_O_WORKDIR
./testpgm
- Submit Job, 指令如后:
qsub -l nodes=1 test.sh
執行後, 螢幕會立即顯示訊息 XXX.node00.cluster (XXX 為Job number ID)
- 程式執行完畢後, Screen Output 會存成 test.sh.oXXX (XXX 為Job number ID), 存放於目前的目錄
- Example for MPI C programs:
- 將C程式Compile成執行檔(如testpgm, 檔名可自取), 指令如后:
mpicc -o testpgm testpgm.c (for C program)
mpicxx -o testpgm testpgm.c (for C++ program)
- 請於Server上編輯一個shell file (如test.sh, 檔名可自取), 內容如后:
#!/bin/sh
#PBS -l walltime=9999:00:00
cd $PBS_O_WORKDIR
/opt/mpich/bin/mpirun -np n testpgm
- Submit Job, 指令如后:
qsub -l nodes=n test.sh
執行後, 螢幕會立即顯示訊息 XXX.node00.cluster (XXX 為Job number ID)
- 程式執行完畢後, Screen Output 會存成 test.sh.oXXX (XXX 為Job number ID), 存放於目前的目錄
- Example for MPI Fortran programs:
- 將Fortran程式Compile成執行檔(如testpgm, 檔名可自取), 指令如后:
mpif77 -o testpgm testpgm.f (for Fortran77 program)
mpif90 -o testpgm testpgm.f (for Fortran90 program)
- 請於Server上編輯一個shell file (如test.sh, 檔名可自取), 內容如后:
#!/bin/sh
#PBS -l walltime=9999:00:00
cd $PBS_O_WORKDIR
/opt/mpich/bin/mpirun -np n testpgm
- Submit Job, 指令如后:
qsub -l nodes=n test.sh
執行後, 螢幕會立即顯示訊息 XXX.node00.cluster (XXX 為Job number ID)
- 程式執行完畢後, Screen Output 會存成 test.sh.oXXX (XXX 為Job number ID), 存放於目前的目錄
- Example for R batch job:
- 編輯R的Batch檔(如test.R, 檔名可自取)
- 請於Server上編輯一個shell file (如test.sh, 檔名可自取), 內容如后:
#!/bin/sh
#PBS -l walltime=9999:00:00
cd $PBS_O_WORKDIR
/opt/R-2.1.1/bin/R CMD BATCH test.R
- Submit Job, 指令如后:
qsub -l nodes=1 test.sh
執行後, 螢幕會立即顯示訊息 XXX.node00.cluster (XXX 為Job number ID)
- 程式執行完畢後, Screen Output 會存成 test.Rout, 存放於目前的目錄
- Example for Maple batch job:
- 編輯Maple的Batch檔(如maple.in, 檔名可自取)
- 請於Server上編輯一個shell file (如test.sh, 檔名可自取), 內容如后:
#!/bin/sh
#PBS -l walltime=9999:00:00
cd $PBS_O_WORKDIR
/opt/maple9/bin/maple < maple.in > maple.out
- Submit Job, 指令如后:
qsub -l nodes=1 test.sh
執行後, 螢幕會立即顯示訊息 XXX.node00.cluster (XXX 為Job number ID)
- 程式執行完畢後, Screen Output 會存成 maple.out, 存放於目前的目錄
- Example for Matlab batch job:
- 編輯Matlab的Batch檔(如poly.m, 檔名可自取)
- 請於Server上編輯一個shell file (如test.sh, 檔名可自取), 內容如后:
#!/bin/sh
#PBS -l walltime=9999:00:00
cd $PBS_O_WORKDIR
/opt/matlabr14sp1/bin/matlab < poly.m > poly.out
- Submit Job, 指令如后:
qsub -l nodes=1 test.sh
執行後, 螢幕會立即顯示訊息 XXX.node00.cluster (XXX 為Job number ID)
- 程式執行完畢後, Screen Output 會存成 poly.out, 存放於目前的目錄
- Example for Python batch job:
- 編輯Python的Batch檔(如gc.py, 檔名可自取)
- 請於Server上編輯一個shell file (如python.sh, 檔名可自取), 內容如后:
#!/bin/sh
#PBS -l walltime=9999:00:00
cd $PBS_O_WORKDIR
/opt/Python-2.3.4/python gc.py
- Submit Job, 指令如后:
qsub -l nodes=1 python.sh
執行後, 螢幕會立即顯示訊息 XXX.node00.cluster (XXX 為Job number ID)
- 程式執行完畢後, Screen Output 會存成 python.sh.oXXX (XXX 為Job number ID), 存放於目前的目錄
- 程式執行完畢後, 錯誤訊息會存成 test.sh.eXXX (XXX 為Job number ID), 存放於目前的目錄
- 可利用指令qstat -ans, 查看Job執行狀態
- 可利用指令qdel XXX (XXX 為Job number ID), 刪除Job