串行程序PBS脚本

#!/bin/bash
#PBS -N EXCMG32

#PBS -l vmem=63gb 

#PBS -q smp
#PBS -l nodes=1:ppn=1
#PBS -j oe
#PBS -M kjpan@yahoo.cn
echo "This jobs is on " $PBS_O_HOST
cd $PBS_O_WORKDIR
ifort Console1.f90 -heap-arrays 1024 -mkl -openmp -O3 -fast -parallel -ipo -o main32 && ./main32>32.results

NOTE: For AVX support, compile with the -xHOST option. Note that -xHOST alone does not enable aggressive optimization, so compilation with -O3 is also suggested. The -fast flag invokes -xHOST, but should be avoided since it also turns on interprocedural optimization (-ipo), which may cause problems in some instances.

Remark:

1)、 #PBS -l vmem=63gb 申请大内存

2)、 ifort -heap-arrays 1024 ... 避开linux中“Stack Overflows in Fortran” 或采用命令:   ulimit -s unlimited

3)、 ifort -static-intel  ...  Causes Intel-provided libraries to be linked in statically

4)、Vim常用4操作:Esc(切换命令模式)   Insert(切换插入模式)   :wq(退出并保存)   :q!(退出不保存)  

                         gg:回到文件首行, G:回到文件尾行,  dd:删除光标所在行, D:删除光标到行尾的内

5)、PBS常用4命令:pbsnodesqstatqsubqdel

6)、Linux常用命令:ssh, free, passwd, mkdir, touch, rm -rf, mv

Problem : compiling with -fast or -static causes a linker error "ld: cannot find -lm"

Possible workarounds are:

1) Specify library location using -L option
ifort -static hello.f90 -L /usr/lib/x86_64-redhat-linux5E/lib64/

2) Add the location of libraries to LIBRARY_PATH variable

posted @ 2013-07-16 07:48  Kejia Pan  阅读(1153)  评论(0编辑  收藏  举报