Skip to main content

Job submission

Submit a job on Fornax

Prepare inputs

  • Submission script: PBS Pro (job scheduling system) for the relaxations of initial and final images
#!/bin/sh --login
#PBS -N Relaxation #job name
#PBS -l walltime=72:00:00 #time request hr:min:sec
#PBS -q largemem #queue, can be checked using qstat -q
#PBS -j oe # generate standard output (*.o[JOBID]) and error (*.e[JOBID])
#PBS -l select=16:ncpus=8:mpiprocs=8 #resource to be requested
#PBS -l place=excl # occupy the node exclusively

module load vasp/vasp.6.3.2 # load VASP to environment; module avail; module purge

#! DO NOT CHANGE THIS UNLESS YOU KNOW WHAT YOU'RE DOING
#export OMP_NUM_THREADS=1

cd ${PBS_O_WORKDIR} # $ means variable; ${PBS_O_WORKDIR} is your submission directory

# Recursive relaxation to get rid of pulay stress
echo `date` "Starting job ..." > status.txt
if [ ! -f vasprun.xml.relaxed.gz ]
then
cp INCAR INCAR.orig
cp POSCAR POSCAR.orig
cp KPOINTS KPOINTS.orig
echo `date` "Running VASP using 1 nodes..." >> status.txt
mpiexec vasp_std >& ${PBS_O_WORKDIR}/vasp.out # mpiexec execute VASP using MPI
echo `date` `tail -n -1 OSZICAR` >> status.txt

rel=`tail -1 OSZICAR | cut -c 1-4` # OSZICAR stores energies
while [ ${rel} -ne 1 ]; do
cp CONTCAR POSCAR
rm WAVECAR CHG*
echo `date` "Running VASP using 1 nodes..." >> status.txt
mpiexec vasp_std >& ${PBS_O_WORKDIR}/vasp.out
echo `date` `tail -n -1 OSZICAR` >> status.txt
rel=`grep -v '^$' OSZICAR| tail -1 | cut -c 1-4`
if [ ${rel} -ne 1 ]
then
echo `date` "No. of ionic steps ${rel} doesn't meet the requirement (=1), restarting ....." >> status.txt
fi
done

if [ ${rel} -eq 1 ]
then
echo `date` "Calculation finished!" >> status.txt
mv CONTCAR CONTCAR.relaxed
mv DOSCAR DOSCAR.relaxed
mv EIGENVAL EIGENVAL.relaxed
mv IBZKPT IBZKPT.relaxed
mv INCAR INCAR.relaxed
mv KPOINTS KPOINTS.relaxed
mv OSZICAR OSZICAR.relaxed
mv OUTCAR OUTCAR.relaxed
mv POSCAR POSCAR.relaxed
mv PROCAR PROCAR.relaxed
mv vasprun.xml vasprun.xml.relaxed
mv vasp.out vasp.out.relaxed
rm WAVECAR CHG*
echo `date` "Ending job ..." >> status.txt
gzip -f * # compuress all files
exit 0

else
echo `date` "Error or unfinished job!" >> status.txt
exit 1
fi

else
echo `date` "vasprun.xml.relaxed.gz exist, skip this calculation ....." >> status.txt
exit 0
fi

NEB Job (after relaxation of initial and final images)

Difference compared to a regular VASP calculation

  • You should use a different VASP binary in script folder

Directory

  • NEB_ROOT- initial / final: relaxations of initial and final images
  • 00 01 02 ... N_images-1 : NEB images to be created by interpola3.py
  • submission_script for NEB : this should be put in the NEB_ROOT directory
  • INCAR POTCAR KPOINTS are put in the NEB_ROOT directory while POSCARs are put in image folder
  • standard outputs for each image can be found in each image folder
#!/bin/sh --login
#PBS -N NEB #job name
#PBS -l walltime=24:00:00 #time request hr:min:sec, for NSCC 24hrs maximum
#PBS -P [PROJECT_CODE] # Project code
#PBS -l select=[N_image*Resource_each_image]:ncpus=24:mpiprocs=24 #resource to be requested

#! DO NOT CHANGE THIS UNLESS YOU KNOW WHAT YOU'RE DOING
#export OMP_NUM_THREADS=1
VASP=xxxx # the place for VASP binary (NEB version) vasp_std
cd ${PBS_O_WORKDIR} # $ means variable; ${PBS_O_WORKDIR} is your submission directory

mpirun ${VASP} >& ${PBS_O_WORKDIR}/vasp.out # run VASP-NEB

To do

  • Use scp command upload initial and final folders to fornax or just use git clone on fornax
  • Be careful, you should remove CHG CHGCAR WAVECAR before commit and push to git repository
  • Relax initial and final images in test on fornax
  • Use interpola3.0.py to get interpolation