Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteProchaine révisionLes deux révisions suivantes | ||
faq:chimie:vasp [2018/07/23 14:58] – [Submission script] tjiang | faq:chimie:vasp [2021/10/08 13:48] – [Submission script] tjiang | ||
---|---|---|---|
Ligne 9: | Ligne 9: | ||
#$ -V | #$ -V | ||
#$ -cwd | #$ -cwd | ||
+ | |||
# Choose the version of vasp by loading the module file accordingly | # Choose the version of vasp by loading the module file accordingly | ||
module use / | module use / | ||
- | module load vasp/5.4.1 | + | |
- | #module load vasp/5.3.5 | + | #choose a version of vasp by uncommenting the corresponding section below |
+ | |||
+ | # vasp 5.4.1 | ||
+ | module load vasp/5.4.1_ompi1.8.8_intel15.0.2 | ||
+ | |||
+ | #For vasp 5.4.4, we need to source the intel mpi mpivars script to properly set environment | ||
+ | #module load vasp/5.4.4_intel_suite2019.5 | ||
+ | #source / | ||
+ | |||
+ | #For vasp 6.2.0, we need to source the intel mpi mpivars script to properly set environment | ||
+ | #module load vasp/ | ||
+ | #source / | ||
# for OpenMP + multithreaded MKL | # for OpenMP + multithreaded MKL | ||
- | export OMP_NUM_THREADS=1 | + | export OMP_NUM_THREADS="1" |
- | export MKL_NUM_THREADS=1 | + | export MKL_NUM_THREADS="1" |
#ulimit -l unlimited | #ulimit -l unlimited | ||
+ | |||
# Where are we | # Where are we | ||
- | HOMEDIR=$SGE_O_WORKDIR | + | HOMEDIR="${SGE_O_WORKDIR}" |
# stuff for parallel computing | # stuff for parallel computing | ||
- | HOSTFILE=$TMPDIR/ | + | HOSTFILE="${TMPDIR}/machines" |
# save nodelist (optional) | # save nodelist (optional) | ||
- | #/bin/cat $TMPDIR/ | + | #/ |
- | # Copy from home to scratch | + | # Check which scratch |
- | QUEUE=$QUEUE | + | if [[ -d "/scratch/ |
- | SCRATCHDIR=/ | + | then |
- | echo $SCRATCHDIR | + | SCRATCHDIR="/ |
- | /bin/mkdir -p $SCRATCHDIR | + | elif [[ -d "/ |
- | cd ${HOMEDIR} | + | then |
+ | SCRATCHDIR="/scratch/Lake/${USER}/${JOB_ID}/" | ||
+ | elif [[ -d "/ | ||
+ | then | ||
+ | SCRATCHDIR="/ | ||
+ | |||
+ | else | ||
+ | | ||
+ | exit 1 | ||
+ | fi | ||
+ | # Using /tmp as scratch instead | ||
+ | # | ||
+ | mkdir -p "${SCRATCHDIR}" | ||
+ | echo " | ||
+ | |||
+ | |||
+ | cd " | ||
#for normal calculation | #for normal calculation | ||
- | /bin/cp -f INCAR KPOINTS POTCAR | + | /bin/cp -f INCAR KPOINTS POTCAR POSCAR WAVECAR |
#for neb calculation, | #for neb calculation, | ||
- | #/bin/cp -rf INCAR KPOINTS POTCAR | + | #/bin/cp -rf INCAR KPOINTS POTCAR POSCAR WAVECAR 00 01 02 "${SCRATCHDIR}/ |
# If starting wavecar and chgcar exists, uncomment the following line | # If starting wavecar and chgcar exists, uncomment the following line | ||
- | #/bin/cp -f $HOMEDIR/ | + | #/bin/cp -f -- "${HOMEDIR}/CHG*" "${HOMEDIR}/WAVECAR" " |
# go to scratch (instead of SGE workdir) | # go to scratch (instead of SGE workdir) | ||
- | cd ${SCRATCHDIR} | + | cd "${SCRATCHDIR}" || { echo " |
- | echo ${HOMEDIR} > homedir | + | echo "${HOMEDIR}" |
# The line for computing | # The line for computing | ||
- | mpirun | + | mpirun |
- | # | + | # |
- | # | + | # |
# Get back the results | # Get back the results | ||
# Full copy back | # Full copy back | ||
- | #cp WAVECAR CHG* OUTCAR POSCAR OSZICAR XDATCAR CONTCAR vasprun.xml $HOMEDIR/ | + | #cp -- WAVECAR CHG* OUTCAR POSCAR OSZICAR XDATCAR CONTCAR vasprun.xml |
# Minimum copy back | # Minimum copy back | ||
- | cp -rf OUTCAR POSCAR OSZICAR XDATCAR CONTCAR $HOMEDIR/ | + | cp -rf OUTCAR POSCAR OSZICAR XDATCAR CONTCAR |
# copy back for neb calculation, | # copy back for neb calculation, | ||
- | #cp -rf OUTCAR POSCAR OSZICAR XDATCAR CONTCAR 00 01 02 $HOMEDIR/ | + | #cp -rf OUTCAR POSCAR OSZICAR XDATCAR CONTCAR 00 01 02 "${HOMEDIR}/" |
# Zip OUTCAR to save space | # Zip OUTCAR to save space | ||
- | cd $HOMEDIR | + | cd "${HOMEDIR}/" || { echo " |
bzip2 OUTCAR | bzip2 OUTCAR | ||
#gzip OUTCAR | #gzip OUTCAR | ||
# Cleaning up | # Cleaning up | ||
- | rm -rf ${SCRATCHDIR} | + | # there should be a test here, what if ${SCRATCHDIR} = ${SGE_O_WORKDIR}? |
+ | rm -rf "${SCRATCHDIR}" | ||
- | # The following part is only useful for users from the chemistry lab of ens-lyon. | + | # The following part is only useful for users from the chemistry lab of ens-lyon. |
# Importing finished calculation into database | # Importing finished calculation into database | ||
- | if [ ! -d / | + | #if [ ! -d "/ |
- | mkdir / | + | # |
- | fi | + | #fi |
- | export PYTHONPATH=/ | + | #export PYTHONPATH="/ |
- | export PATH=/ | + | #export PATH="/ |
- | import_vasp_calc -p -u ${USER} -n 1 -d / | + | #import_vasp_calc -p -u "${USER}" |
</ | </ | ||