Ceci est une ancienne révision du document !
#!/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}, fall back to current directory" SCRATCHDIR="${SGE_O_WORKDIR}/scratch/" 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}"