#!/bin/bash 
########### Begin SLURM header ###########
#Partition
#SBATCH --partition=cpu-single
# Request number of nodes and CPU cores per node for job
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=10
#SBATCH --mem=2G 
# Estimated wallclock time for job
#SBATCH --time=00:30:00
#SBATCH --job-name=simulation 
#SBATCH --error=simulation.err
#SBATCH --output=simulation.out 

########### End SLURM header ##########

echo "Working Directory:                    $PWD"
echo "Running on host                       $HOSTNAME"
echo "Job id:                               $SLURM_JOB_ID"
echo "Job name:                             $SLURM_JOB_NAME"
echo "Number of nodes allocated to job:     $SLURM_JOB_NUM_NODES"
echo "Number of cores allocated to job:     $SLURM_JOB_CPUS_PER_NODE"


# Load module 
module load math/matlab/R2023a

echo Directory is `pwd`
echo "Initiating Job..."

# Start a Matlab program
matlab -nodisplay -nosplash -r "ExtractingKRoton"

# notice for tests
echo "Job terminated successfully"

exit
