PBS for VASP
1#!/bin/bash
2
3#PBS -N opt
4#PBS -l nodes=1:ppn=20
5#PBS -l walltime=999:00:00
6#PBS -q n56
7#PBS -r n
8#PBS -e err
9#PBS -o out
10
11# export OMP_NUM_THREADS=2
12
13echo Time is `date`
14echo Working dir is $PBS_O_WORKDIR
15cd $PBS_O_WORKDIR
16
17NPROCS=`wc -l < ${PBS_NODEFILE}`
18N_NODE=`uniq ${PBS_NODEFILE}|wc -l`
19
20echo This job has allocated ${N_NODE} nodes with ${NPROCS} processors
21echo Running on host `hostname`
22echo This jobs runs on the following processors:
23echo "**Start"
24
25echo $PBS_O_WORKDIR > work.txt
26echo ${PBS_NODEFILE} > nodefile.txt
27echo $NPROCS > cpucore.txt
28echo $N_NODE > node.txt
29
30source /share/apps/intel/intel-2018up4/compilers_and_libraries_2018.5.274/linux/mkl/bin/mklvars.sh intel64 && \
31source /share/apps/intel/intel-2018up4/compilers_and_libraries_2018.5.274/linux/bin/ifortvars.sh intel64 && \
32source /share/apps/intel/intel-2018up4/compilers_and_libraries_2018.5.274/linux/bin/iccvars.sh intel64 && \
33source /share/apps/intel/intel-2018up4/compilers_and_libraries_2018.5.274/linux/mpi/intel64/bin/mpivars.sh intel64
34
35export GNU_HOME=/opt/ohpc/pub/compiler/gcc/8.3.0 && \
36export PATH=$GNU_HOME/bin:$PATH && \
37export LD_LIBRARY_PATH=$GNU_HOME/lib:$GNU_HOME/lib64:$LD_LIBRARY_PATH && \
38export INCLUDE=$GNU_HOME/include:$INCLUDE
39
40export CUDA_HOME=/share/apps/nvidia/cuda/cuda-11.1 && \
41export PATH=$CUDA_HOME/bin:$PATH && \
42export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH && \
43export INCLUDE=$CUDA_HOME/include:$INCLUDE
44
45mpirun -n $NPROCS /share/apps/vasp/intel-vasp/5.4.4.pl2/bin/vasp_std >& screen.log
46#mpirun -n $NPROCS /share/apps/vasp/intel-vasp/6.1.0/bin/vasp_std >& screen.log
47
48echo "**Finished!"