Ceci est une ancienne révision du document !


VASP

Submission script

submission_script
#!/bin/bash
#$ -S /bin/bash
#$ -N vasp_ompi_8
#$ -q E5-2667v2*
#$ -pe mpi8_debian 8
#$ -V
#$ -cwd
# Choose the version of vasp by loading the module file accordingly
module use /home/tjiang/modules/lmod/
module load vasp/5.4.1
#module load vasp/5.3.5
 
# for OpenMP + multithreaded MKL
export OMP_NUM_THREADS=1
export MKL_NUM_THREADS=1
#ulimit -l unlimited
# Where are we
HOMEDIR=$SGE_O_WORKDIR
 
# stuff for parallel computing
HOSTFILE=$TMPDIR/machines
 
# save nodelist (optional)
#/bin/cat $TMPDIR/machines > $HOMEDIR/tmp
 
# Copy from home to scratch
QUEUE=$QUEUE
SCRATCHDIR=/scratch/E5/$USER/$JOB_ID/
# Using ramdisk as scratch instead
# SCRATCHDIR=/dev/shm/$USER/$JOB_ID/
# Using /tmp as scratch instead
# SCRATCHDIR=/tmp/$USER/$JOB_ID/
 
echo $SCRATCHDIR
/bin/mkdir -p $SCRATCHDIR
cd ${HOMEDIR}
#for normal calculation
/bin/cp -f INCAR KPOINTS POTCAR  POSCAR WAVECAR ${SCRATCHDIR}/
#for neb calculation, numbering depends on the number of images
#/bin/cp -rf INCAR KPOINTS POTCAR  POSCAR WAVECAR  00 01 02 ${SCRATCHDIR}/
# If starting wavecar and chgcar exists, uncomment the following line
#/bin/cp -f $HOMEDIR/CHG* $HOMEDIR/WAVECAR
 
# go to scratch (instead of SGE workdir)
cd ${SCRATCHDIR}
echo ${HOMEDIR} > homedir
 
# The line for computing
mpirun  -hostfile $HOSTFILE -np ${NSLOTS} vasp_std > ${HOMEDIR}/out
#mpirun  -hostfile $HOSTFILE -np ${NSLOTS} vasp_gam > ${HOMEDIR}/out
#mpirun  -hostfile $HOSTFILE -np ${NSLOTS} vasp_ncl > ${HOMEDIR}/out
 
# Get back the results
# Full copy back
#cp WAVECAR CHG* OUTCAR POSCAR OSZICAR XDATCAR CONTCAR vasprun.xml $HOMEDIR/
# Minimum copy back
cp -rf OUTCAR POSCAR OSZICAR XDATCAR CONTCAR $HOMEDIR/
# copy back for neb calculation, numbering depends on the number of images
#cp -rf OUTCAR POSCAR OSZICAR XDATCAR CONTCAR 00 01 02 $HOMEDIR/
# Zip OUTCAR to save space
cd $HOMEDIR
bzip2 OUTCAR
#gzip OUTCAR
 
# Cleaning up
rm -rf ${SCRATCHDIR}
 
# The following part is only useful for users from the chemistry lab of ens-lyon. 
# Importing finished calculation into database
if [ ! -d /home/${USER}/.chimie_db/ ]; then
    mkdir /home/${USER}/.chimie_db/
fi
export PYTHONPATH=/home/tjiang/usr/lib/python2.7/site-package/:$PYTHONPATH
export PATH=/home/tjiang/chimie4psmn/database/:$PATH
import_vasp_calc -p -u ${USER} -n 1 -d /home/${USER}/.chimie_db/${USER}.db ${HOMEDIR}
faq/chimie/vasp.1560948579.txt.gz · Dernière modification : 2020/08/25 15:58 (modification externe)