PC Cluster 使用說明
  1. 系統環境: Linux Red Hat 7.1 (Kernel 2.4.9)
  2. 硬體環境:
  3. Server IP Address: 140.109.73.31
  4. 登入帳號: 需預先向資訊室申請
  5. 連線方式: Exceed(選擇node00) or Putty
    (如欲安裝Putty, 請至其網頁, 如需安裝Exceed, 請與資訊室聯絡)
  6. 程式語言Compiler: f77, gcc, cc, c++, pgf77, pgf90, pgcc, pgCC, mpif77, mpif90, mpicc, mpiCC
  7. 軟體: R, Maple and Matlab
  8. Distributive Processing處理原則:當user submit job以後, 系統會由16個computing nodes中, 自動選擇一個free的computing node, dedicated to user's job. 如果目前沒有free的computing node, user's job將會排隊等候!
  9. 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)
      • 編輯一個shell file (如test.sh, 檔名可自取), 內容如后:
        #!/bin/sh
        #PBS -l walltime=99: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)
        mpiCC -o testpgm testpgm.c (for C++ program)
      • 編輯一個shell file (如test.sh, 檔名可自取), 內容如后:
        #!/bin/sh
        #PBS -l walltime=99:00:00
        cd $PBS_O_WORKDIR
        /opt/mpich-pgi/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)
      • 編輯一個shell file (如test.sh, 檔名可自取), 內容如后:
        #!/bin/sh
        #PBS -l walltime=99:00:00
        cd $PBS_O_WORKDIR
        /opt/mpich-pgi/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, 檔名可自取)
      • 編輯一個shell file (如test.sh, 檔名可自取), 內容如后:
        #!/bin/sh
        #PBS -l walltime=99:00:00
        cd $PBS_O_WORKDIR
        /usr/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, 檔名可自取)
      • 編輯一個shell file (如test.sh, 檔名可自取), 內容如后:
        #!/bin/sh
        #PBS -l walltime=99:00:00
        cd $PBS_O_WORKDIR
        /usr/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, 檔名可自取)
      • 編輯一個shell file (如test.sh, 檔名可自取), 內容如后:
        #!/bin/sh
        #PBS -l walltime=99:00:00
        cd $PBS_O_WORKDIR
        /opt/Matlab6p5/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, 存放於目前的目錄
  10. 程式執行完畢後, 錯誤訊息會存成 test.sh.eXXX (XXX 為Job number ID), 存放於目前的目錄
  11. 可利用指令qstat -ans, 查看Job執行狀態
  12. 可利用指令qdel XXX (XXX 為Job number ID), 刪除Job