close

http://www3.stat.sinica.edu.tw/io/statcluster.htm
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), 存放於目前的目錄

my example
丟job到cluster
 1.make test (得到test綠色執行檔)
    (change the contex of makefile=>  test : test.o)
2.vi test.sh ( 編輯sh)
    #!/bin/sh
    cd $PBS_O_WORKDIR
      ./test  > test.out
3.chmod 755 test.sh
4.qsub test.sh
5.qstat

   


全站熱搜
創作者介紹

quantum2nd 發表在 痞客邦 留言(0) 人氣()