24小时热门版块排行榜    

查看: 974  |  回复: 1

bjwang

铁杆木虫 (正式写手)

[求助] wien2k运行脚本如何修改--sge(openmpi)?

官网上给的脚本例子是tcsh的Script for "sge" ,http://www.wien2k.at/reg_user/faq/sge.job 我打算用bash的。
在网上找了个bash下用在sge上的wien2k脚本,不知道需要修改哪些位置可以为己所用,有用sge的同学能否指点一下。能提供个直接可用的更好,谢谢!
#! /bin/bash
#
# Sample wien2k script for use with sge in ITP
# adopted from the tcsh version in wien2k/qsub-job0-sge
#
#   $NSLOTS
#       the number of tasks to be used
#   $TMPDIR/machines
#       a valid machine file to be passed to mpirun
#
# Options passed to qsub (denoted by #$) :
#
# Pass your environment to job
#$ -V
#
# Run in current working directory (in most cases a good idea)
#$ -cwd
# Rename the STDOUT und STDERR Stream to an friendly name
#$ -o job.out
#$ -e job.err

# select a queue
#$ -q dwarfs
#
# How many resources do I need (per slot)
# Lightly overcommit the memory, that it runs on 8GB machine
#$ -l h_vmem=2G,virtual_free=1800G
#
# Selected parallel environment and number of slots/processes
# mpi is needed, although we do not start a mpi job
#$ -pe mpil 6      换成#$ -pe ompi  6  ?
# define the environment, eventually not needed
export WIENROOT="/home/wien2k/wien2k"
export PATH="$WIENROOT:$PATH"
export SCRATCH="/tmp"

# Set internal parallelization code in mkl to only use
# on thread per process.
export OMP_NUM_THREADS=1

# some information
echo "Got $NSLOTS slots." >> job.out
echo "Got $NSLOTS slots." >> job.err

# read the mpi machines files (generated by the sge)
proclist=(`cat $TMPDIR/machines`)
nproc=$NSLOTS
echo $nproc nodes for this job: $proclist

rm .machines

# Convert proclist to one line per slot/k-point.
# In a single queue all nodes have equal performance.
for a in ${proclist
  • }; do
        echo 1:$a >> .machines
    done

    #This line would force the mpi version
    #echo 1:$proclist  >> .machines

    echo 'granularity:1' >>.machines
    echo 'extrafine:1' >>.machines

    # Run your caclulation
    x lapw1 –p

    [ Last edited by bjwang on 2012-5-16 at 16:10 ]
  • 回复此楼

    » 猜你喜欢

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

    It is a shame for the soul to be first to give way in this life,when thy body does not give way.
    已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

    bjwang

    铁杆木虫 (正式写手)

    没有同学给些建议吗?自己顶起,希望各位帮忙。谢谢!
    It is a shame for the soul to be first to give way in this life,when thy body does not give way.
    2楼2012-10-28 09:40:51
    已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
    相关版块跳转 我要订阅楼主 bjwang 的主题更新
    信息提示
    请填处理意见