Frequently Asked Question
Script base de Slurm para gaussian
Last Updated 2 years ago
#!/bin/bash #SBATCH --nodes=1 #SBATCH --cpus-per-task=20 #SBATCH --partition=lusitania #SBATCH --job-name=JOB-NAME #Nombre del fichero de entrada input=Reactivos1-2b echo "name of the input file without the .com extention:" echo ${input}.com #Carga de modulos necesarios module load intel16 #División del directorio actual entre los 6 OST. lfs setstripe -c 6 . echo "create scratch space for the job:" export GAUSS_SCRDIR=/scratch/${USER}/${SLURM_JOB_ID} tempdir=${GAUSS_SCRDIR} mkdir -p ${tempdir} echo ${tempdir} echo "copy input and checkpoint file to scratch directory" cp ${SLURM_SUBMIT_DIR}/${input}.com ${tempdir} if [ -f "${SLURM_SUBMIT_DIR}/${input}.chk" ]; then cp ${SLURM_SUBMIT_DIR}/${input}.chk ${tempdir} fi echo "run the code:" echo "cd ${tempdir}" echo "time g16 ${input}.com" cd ${tempdir} #Lanzamos el comando de Gaussian g16 ${input}.com ${input}.log echo "copy output and checkpoint file back" cp ${input}.chk ${SLURM_SUBMIT_DIR} cp ${input}.log ${SLURM_SUBMIT_DIR} cp ${input}.wfn ${SLURM_SUBMIT_DIR} echo "remove the scratch directory after the job is done" cd ${SLURM_SUBMIT_DIR} rm -rf /scratch/${USER}/${SLURM_JOB_ID} exit 0