#!/bin/bash #set -x ######################################################################## # SUN Grid Engine job wrapper # parallel job on opteron queue ######################################################################## #$ -N ncg_oca #$ -pe mpi2 4-12 #$ -q wp08 #$ -j y #$ -M pezzoli@physics.rutgers.edu #$ -m n #$ -v WIEN_DMFT_ROOT,LD_LIBRARY_PATH ######################################################################## # DON'T remove the following line! source $TMPDIR/sge_init.sh ######################################################################## export SMPD_OPTION_NO_DYNAMIC_HOSTS=1 ######################################################################## # WIEN2K # function w2k { export PATH=/home/pezzoli/wien2k:$PATH # Create subdirectory with same name as job = input filename = case name # and move all files into subdir. echo $JOBNAME mkdir $JOBNAME cp * $JOBNAME cd $JOBNAME # create .machines file for WIEN2k echo '#' > .machines for nodes in `cat $TMPDIR/machines` do echo "1: " "$nodes " >> .machines done # in case we forgot, clean up old run (-s for no interactive prompt) clean_lapw -s # run WIEN2k with k-point parallelization run -p -so -in1new 3 x qtl -p -so # now run one cycle to get non-parallelized files clean_lapw -s run -i 1 -so # move all files back into main dir, and delete subdir mv * .. cd .. rm -r $JOBNAME } ######################################################################## # DMFT # function initdmft { export WIEN_DMFT_ROOT=/home/pezzoli/dmft_w2k/bin export PATH=$PATH:$WIEN_DMFT_ROOT export SCRATCH="." export SMPD_OPTION_NO_DYNAMIC_HOSTS=1 # export PYTHONPATH=/home/chuckyee/dmft_w2k/bin echo "/opt/mpich2/intel/11.1/bin/mpiexec -env LD_LIBRARY_PATH /opt/intel/Compiler/11.1/072/mkl/lib/em64t:/opt/intel/Compiler/11.1/072/lib/intel64 -env SMPD_OPTION_NO_DYNAMIC_HOSTS 1 -port $port -np $NSLOTS -machinefile $TMPDIR/machines" > mpi_prefix.dat } function dmft { initdmft echo echo "RUNNING DMFT" echo run_dmft.py > wnohup.dat 2>&1 } ######################################################################## # MAIN # JOBNAME="ncg" # must be equal to case name source /opt/intel/Compiler/11.1/072/bin/ifortvars.sh intel64 export WIENROOT=/home/pezzoli/wien2k export PATH=$PATH:$WIENROOT #w2k run_lapw -so -s lapw0 -e lcore -f ncg >lnohup.dat 2>&1 dmft