24小时热门版块排行榜    

查看: 539  |  回复: 1

luqing6879

木虫 (著名写手)

[求助] cshell脚本求助

我在mac os x 10.8.4上运行gamess, VERNO=May12013R1。

如果在命令行输入gms 文件名,没有任何问题。现在我想把它写到脚本文件中,如下:
#!/bin/csh

set base=`pwd`

set suffix=_1
set ibase=`echo $1 | sed 's/\.[a-zA-Z4-9]*$//'`
set kbase=`echo $ibase | sed 's/\_/ /' | sed 's/\-/ /' | sed 's/\+/ ,/'`
if ( -w $ibase.out && $?suffix ) then
  if ( -w $ibase.out$suffix ) then
    cat $ibase.out >> $ibase.out$suffix
    rm -f $ibase.out
  else
    mv $ibase.out $ibase.out$suffix
  endif
endif

set title=j$kbase[1]
set input=$1

set cpuct=1
if ( $#argv == 2 ) then
set cpuct = `echo $argv[2]`
endif


cat > pbs.$$ <<EOF
### I want 1 node(s) with $cpuct cpu(s) each
#PBS -l nodes=1:ppn=$cpuct
###
#PBS -N $title
#PBS -r n
#PBS -c n
#PBS -m n
#PBS -joe
#PBS -koe
#PBS -V
#PBS -S /bin/csh
#PBS -q default

cd $base
set np=\`cat \$PBS_NODEFILE | wc -l\`
cat \$PBS_NODEFILE

/Users/qinglu/Documents/gamess/gms $input  

EOF

qsub pbs.$$
## clean-up
rm pbs.$$

可以正常提交,但是无法正确生成/scratch/$PBS_JOBID文件夹。得到以下错误信息:
df: /scratch/3265: No such file or directory
GAMESS temporary binary files will be written to /scratch/3265.
GAMESS supplementary output files will be written to ./
Copying input file exam01.inp to your run's scratch directory...
cp exam01.inp /scratch/3265


请问哪里出问题了?
谢谢。
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

cishan.goodweb.cn/慈善点击,点滴帮助。
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

luqing6879

木虫 (著名写手)

搞定了。问题没有出在cshell脚本。
cishan.goodweb.cn/慈善点击,点滴帮助。
2楼2014-04-22 13:57:50
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 luqing6879 的主题更新
信息提示
请填处理意见