STAT Cluster 使用說明
  1. 系統環境: Linux Fedora Core 2 (Kernel 2.6.5)
  2. 硬體環境:
  3. Server IP Address: 140.109.72.224
  4. 登入帳號: 需預先向資訊室申請
  5. 連線方式: Exceed or Putty
  6. 檔案上傳及下載方式: Windows網芳, Secure File Transfer Client
  7. 程式語言Compiler: f77, gcc, cc, c++, pgf77, pgf90, pgcc, pgCC, mpif77, mpif90, mpicc, mpicxx
  8. 軟體: R, Maple and Matlab
  9. Distributive Processing處理原則:當user submit job以後, 系統會由32個computing nodes中, 自動選擇一個free的computing node, dedicated to user's job. 如果目前沒有free的computing node, user's job將會排隊等候!
  10. shell file編輯方式僅限於以下方法:
    1. copy form test.sh
    2. vi in the server
    3. text editor in the server
  11. Distributive Processing使用程序:
    1. 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), 存放於目前的目錄
    2. 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), 存放於目前的目錄
    3. 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), 存放於目前的目錄
    4. 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, 存放於目前的目錄
    5. 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, 存放於目前的目錄
    6. 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, 存放於目前的目錄
    7. 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), 存放於目前的目錄
  12. 程式執行完畢後, 錯誤訊息會存成 test.sh.eXXX (XXX 為Job number ID), 存放於目前的目錄
  13. 可利用指令qstat -ans, 查看Job執行狀態
  14. 可利用指令qdel XXX (XXX 為Job number ID), 刪除Job