#!/bin/sh
#mpdboot
#PBS -N submit.sh
### Output files
#PBS -e parallel.err
#PBS -o parallel.log
### Mail to user
#PBS -m ae
####### walltime for running #####################
#PBS -q VASP
#PBS -l walltime=01:00:00
####### node and cpu (ppn) for running #####################
#PBS -l nodes=1:gold:ppn=8
#################################################
# This job's working directory
echo Working directory is $PBS_O_WORKDIR
cd $PBS_O_WORKDIR
echo Running on host `hostname`
echo Time is `date`
echo Directory is `pwd`
echo This jobs runs on the following processors:
echo `cat $PBS_NODEFILE`
cat $PBS_NODEFILE > $PBS_O_WORKDIR/nodes.txt
# Define number of processors
NPROCS=`wc -l < $PBS_NODEFILE`
echo This job has allocated $NPROCS nodes
# Load compiler and mpi environment
module load rocks-gnu-compiler
module load rocks-openmpi
# intel
export LD_LIBRARY_PATH=/share/apps/intel/compiler/2022.0.1/linux/compiler/lib/intel64_lin/:$LD_LIBRARY_PATH
cat $PBS_NODEFILE > machinefile
./calypso.x > caly.log
# Run vasp with mpi
mpirun -np $NPROCS --mca btl_base_warn_component_unused 0 /share/apps/vasp/5.4.1/bin/vasp_std > vasp.log 2>/dev/null