[Wien] job submission script for grid engine

tasaka at affinity-science.com tasaka at affinity-science.com
Thu Oct 18 16:14:36 CEST 2012


Hello,

I wrote a simple script to submit wien2k's parallel job into grid
engine queueing system. I suppose it works without errors,
but I don't have a sufficient testing environment now(only single node).
so, I would appreciate if anyone could check the following and fix if it
's wrong.

Thanks in advance, with best regards,
Tomo


#!/bin/csh
#$ -S /bin/csh
#$ -N WIEN2k_JOB
#$ -cwd
#$ -q all.q
#$ -V 
#$ -j y
#$ -o sge.out
#$ -pe mpi 16
set core = 4
set kdiv = 4

@ node_per_k = ${NSLOTS} / ${core} / ${kdiv}

#date
echo "NSLOTS:" $NSLOTS
echo "kdiv x node_per_k, core:" $kdiv "x" $node_per_k, $core
#cat $PE_HOSTFILE
#uniq -c $PE_HOSTFILE
#/bin/echo -e $NSLOTS

if ( -e .machines ) then
#    cp .machines .machines_old
    rm .machines
endif

echo -n 'lapw0: ' >> .machines
cat $PE_HOSTFILE | awk '{printf $1":"$2" "}' >> .machines
echo "" >> .machines

cat $PE_HOSTFILE | awk '{if('${core}' > $2) \
    { print "Check $core or alloc.rule!"} \
    i=1 \
    while(i <= $2/'${core}' ) \
        { printf $1":"'${core}'"\n" \
    i++ } \
   }' >> .machines_tmp_$$

cat .machines_tmp_$$ | awk '{if(NR%'${node_per_k}') ORS=" " \
    else ORS="\n"; print}' | sed -e 's/^/1\:/g' >> .machines

rm .machines_tmp_$$ 

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

# write down wien2k-job
#init_lapw -red 2 -vxc 13 -rkmax 6.5 -numk 200 -b
#testpara
#run_lapw -I -i 40 -p
#x_lapw lapw1 -up -p
#x_lapw qtl -up -p





More information about the Wien mailing list