CP2K

Submission script

sub_cp2k.sh
#!/bin/bash
#$ -S /bin/bash
#$ -N cp2kjob          # The name of the job can be changed here
#$ -q E5-2667v4deb256A
#$ -pe mpi16_debian 16
#$ -V
#$ -cwd
 
module purge
module use /home/tjiang/modules/lmod
module load cp2k/5.1_gcc7.2_avx_pclabaut
 
cat $TMPDIR/machines
cd "${SGE_O_WORKDIR}" || { echo "cannot cd to ${SGE_O_WORKDIR}"; exit 1; }
 
echo NSLOTS="${NSLOTS}"
 
if [[ -d "/scratch/Chimie" ]]
then
    SCRATCHDIR="/scratch/Chimie/${USER}/${JOB_ID}/"
elif [[ -d "/scratch/Lake" ]]
then
    SCRATCHDIR="/scratch/Lake/${USER}/${JOB_ID}/"
elif [[ -d "/scratch/E5N" ]]
then
    SCRATCHDIR="/scratch/E5N/${USER}/${JOB_ID}/"
else
    echo "/scratch not found, cannot create ${SCRATCHDIR}"
    exit 1
fi
# Using /tmp as scratch instead
# SCRATCHDIR="/tmp/${USER}/${JOB_ID}/"
 
/bin/mkdir -p "${SCRATCHDIR}"
 
cp md.inp "${SCRATCHDIR}"
cd "${SCRATCHDIR}" || { echo "cannot cd to ${SCRATCHDIR}"; exit 1; }
mpirun -x LD_RUN_PATH -x LIBRARY_PATH -x CPATH -x LD_LIBRARY_PATH -hostfile $TMPDIR/machines -np $NSLOTS cp2k.popt -i md.inp > md.out
cp -- * "${SGE_O_WORKDIR}"
rm -rf "${SCRATCHDIR}"
faq/chimie/cp2k.txt · Dernière modification: 2021/10/08 15:49 par tjiang