VOID THIS PAGE
On this page are several scripts that can be used as a starting template for building your own SLURM submission scripts.
Simple Python Script
#!/bin/bash
#SBATCH --ntasks=1 # Run on a single CPU
#SBATCH --time=00:05:00 # Time limit hrs:min:sec
#SBATCH --account="accountID"
JOBID=$( echo ${PBS_JOBID} | cut -f1 -d. )
module load Miniforge3
eval "$(conda shell.bash hook)"
conda activate myenv
# Change Directory to the working directory
cd ${PBS_O_WORKDIR}
# Run your code
python path/to/your/python_file.py
Usage
Python Script
On this page are several scripts that can be used as a starting template for building your own SLURM submission scripts.
Generic Python Script
#!/bin/bash
#SBATCH --job-name=serial_job_test # Job name
#SBATCH --mail-type=END,FAIL # Mail events (NONE, BEGIN, END, FAIL, ALL)
#SBATCH --mail-user=NetID@kennesaw.edu # Where to send mail
#SBATCH --ntasks=1 # Run on a single CPU
#SBATCH --mem=1gb # Job memory request
#SBATCH --time=00:05:00 # Time limit hrs:min:sec
#SBATCH --output=serial_test_%j.log # Standard output and error log
pwd; hostname; date
JOBID=$( echo ${PBS_JOBID} | cut -f1 -d. )
module load MIniforge3
eval "$(conda shell.bash hook)"
conda activate myenv
# Change Directory to the working directory
cd ${PBS_O_WORKDIR}
# Run your code
python path/to/your/python_file.py
date
Usage
Gaussian Script
#!/usr/bin/env bash
#PBS -q batch #PBS -l nodes=1:ppn=16
#PBS -l walltime=01:00:00
#PBS -V #PBS -m abe
#PBS -M netid@kennesaw.edu
# Load the Gaussian Modules
module load Gaussian/16_B01
export WORK_DIR=$PBS_O_WORKDIR
cd $WORK_DIR
datestamp=$(date +%Y-%m-%d.%H%M%S) g16 < ${FILE} > ${FILE%.*}.${datestamp}.out
Usage
[barney@hpc ~]$ qsub run_gaussian.pbs -vFILE=${PWD}/mpi_script.com