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:56] – [Submission script] tjiang | faq:chimie:vasp [2021/10/08 13:48] – [Submission script] tjiang | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== VASP ====== | ====== VASP ====== | ||
+ | ===== Submission script ===== | ||
+ | <code bash 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 / | ||
+ | |||
+ | #choose a version of vasp by uncommenting the corresponding section below | ||
+ | |||
+ | # vasp 5.4.1 | ||
+ | module load vasp/ | ||
+ | |||
+ | #For vasp 5.4.4, we need to source the intel mpi mpivars script to properly set environment | ||
+ | #module load vasp/ | ||
+ | #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 | ||
+ | export OMP_NUM_THREADS=" | ||
+ | export MKL_NUM_THREADS=" | ||
+ | #ulimit -l unlimited | ||
+ | |||
+ | # Where are we | ||
+ | HOMEDIR=" | ||
+ | |||
+ | # stuff for parallel computing | ||
+ | HOSTFILE=" | ||
+ | |||
+ | # save nodelist (optional) | ||
+ | #/bin/cat " | ||
+ | |||
+ | # Check which scratch to use | ||
+ | if [[ -d "/ | ||
+ | then | ||
+ | SCRATCHDIR="/ | ||
+ | elif [[ -d "/ | ||
+ | then | ||
+ | SCRATCHDIR="/ | ||
+ | elif [[ -d "/ | ||
+ | then | ||
+ | SCRATCHDIR="/ | ||
+ | |||
+ | else | ||
+ | echo "/ | ||
+ | exit 1 | ||
+ | fi | ||
+ | # Using /tmp as scratch instead | ||
+ | # | ||
+ | mkdir -p " | ||
+ | echo " | ||
+ | |||
+ | |||
+ | cd " | ||
+ | #for normal calculation | ||
+ | /bin/cp -f INCAR KPOINTS POTCAR POSCAR WAVECAR " | ||
+ | #for neb calculation, | ||
+ | #/bin/cp -rf INCAR KPOINTS POTCAR POSCAR WAVECAR 00 01 02 " | ||
+ | # If starting wavecar and chgcar exists, uncomment the following line | ||
+ | #/bin/cp -f -- " | ||
+ | |||
+ | # go to scratch (instead of SGE workdir) | ||
+ | cd " | ||
+ | echo " | ||
+ | |||
+ | # The line for computing | ||
+ | mpirun | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # Get back the results | ||
+ | # Full copy back | ||
+ | #cp -- WAVECAR CHG* OUTCAR POSCAR OSZICAR XDATCAR CONTCAR vasprun.xml " | ||
+ | # Minimum copy back | ||
+ | cp -rf OUTCAR POSCAR OSZICAR XDATCAR CONTCAR " | ||
+ | # copy back for neb calculation, | ||
+ | #cp -rf OUTCAR POSCAR OSZICAR XDATCAR CONTCAR 00 01 02 " | ||
+ | # Zip OUTCAR to save space | ||
+ | cd " | ||
+ | bzip2 OUTCAR | ||
+ | #gzip OUTCAR | ||
+ | |||
+ | # Cleaning up | ||
+ | # there should be a test here, what if ${SCRATCHDIR} = ${SGE_O_WORKDIR}? | ||
+ | rm -rf " | ||
+ | |||
+ | # The following part is only useful for users from the chemistry lab of ens-lyon. | ||
+ | # Importing finished calculation into database | ||
+ | #if [ ! -d "/ | ||
+ | # mkdir "/ | ||
+ | #fi | ||
+ | #export PYTHONPATH="/ | ||
+ | #export PATH="/ | ||
+ | # | ||
+ | |||
+ | </ | ||