這是在linux底下用ifc compile NWCHEM 4.5的筆記

MPI版

  1. MPI似乎不能用; NWCHEM網站建議用LAM MPI;
    先用ifc/icc compiled LAM MPI 7.0.3, 再跑lamtest看是否能normally finish all tests
  2. 把LAM MPI的PATH加入環境變數中; 建議用tcsh, 加在.tcshrc裡面
  3. 設好NWCHEM的compile-time environment variables
    successful example of environment
  4. tar jxf nwchem-4.5.tgz ; cd nwchem-4.5/src
    make FC=ifc CC=icc NWCHEM_MODULES=all nwchem_config
    之後edit src/tools/config/makefile.h , 找ifc的-O4 -prefetch這行, 把-O4改成-O3, 以及-tpp6 -xK改成-tpp7 -xW (for Pentium4/Xeon, 因其判斷P3予P4的部分有問題,設CPU 為i786也沒用, 所以要用手改
    make FC=ifc CC=icc NWCHEM_MODULES=all >& make.log &
  5. make完成後檢查make.log看是否一切正常; bin//nwchem要link成static
    若用ATLAS, ldd nwchem的結果要是 not a dynamic executable
    若用GOTO , ldd nwhcem的結果要只剩下libgoto.so
    /opt/lib/libgoto.so => /opt/lib/libgoto.so (0x40014000)
  6. Install library, refer to INSTALL file.
       cd $NWCHEM_TOP/src/basis                
       cp -r libraries /usr/local/NWChem/data
       cd $NWCHEM_TOP/src/       
       cp -r data /usr/local/NWChem
       cd $NWCHEM_TOP/src/nwpw/libraryps
       cp -r library1 /usr/local/NWChem/data
       cp -r library2 /usr/local/NWChem/data
    
  7. 試跑testfile, 先boot一些LAM nodes
    lamboot ./bhost
    example of bhost file
  8. 建立$HOME/.nwchemrc, 此處可以overwrite掉原先compile-time的設定
    successful example of .nwchemrc
    mpirun -np #CPU nwchem input.nw >& input.out &
  9. input.nw裡面可以overwrite掉scratch directory 和pernament directory的設定
    example