#!/bin/bash

#-------------------------------------------------------------------------------
#
# Batch options for SLURM (Simple Linux Utility for Resource Management)
# =======================
#

#unset module

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=2
#SBATCH --cpus-per-task=1
#SBATCH --time=01:00:00
#SBATCH --mem-per-cpu=4096 # megabytes

#SBATCH --output=out/job_%j.out.log
#SBATCH --error=out/job_%j.err.log
#SBATCH --job-name=CS_CFD
#SBATCH --partition=batch
#
#SBATCH --mail-user=rodolphe.vancoillie@student.uclouvain.be
#SBATCH --mail-type=ALL
#
#SBATCH --comment=SpentFuelPool


#
#  -t<time>, --time=<time>            : walltime in minutes, minutes:seconds,
#                                       hours:minutes:seconds, days-hours,
#                                       days-hours:minutes, or
#                                       days-hours:minutes:seconds
#  -N, --nodes=<minnodes[-maxnodes]>  : number of allocated nodes
#  --ntasks=24, -n24                  : number of total tasks
#  --ntasks-per-node=<ntasks>         : number of tasks per node
#  --ntasks-per-socket=<ntasks>       : number of tasks per socket
#  --ntasks-per-core=<ntasks>         : number of tasks per core
#  --cpus-per-task=<nthreads>         : number of threads per task
#  --cpuind=cores, sockets          : bind CPUs to cores or sockets
#  --mem-bind=local
#  --qos=<qos>                        : request given quality of service
#                                       (for example "debug")
#  --contiguous                       : use contiguous nodes for minimal latency
#  --exclusive                        : do not share nodes with other jobs
#  --switches=<count>[@max-delay]     : try to run on no more than count
#                                       switches (for better performance)
#  --partition=<name>, -p<name>       : partition (queue) (run "sinfo -s"
#                                       for list of partitions)
#  --reservation=<name>               : allocate resources from reservation
#  -o<pattern>, --output=<pattern>    : output file name pattern
#  -e<pattern>, --error=<pattern>     : error file name pattern
#  -J<jobname>, --job-name=<jobname>  : job name
#
#-------------------------------------------------------------------------------

# Change to submission directory
if test -n "$SLURM_SUBMIT_DIR" ; then cd $SLURM_SUBMIT_DIR ; fi

# Ensure the correct command is found:
export PATH=/home/ucl/tfl/rvanco/Code_Saturne/6.0.6/code_saturne-6.0.6/arch/Linux_x86_64/bin:$PATH

# Run command:
\code_saturne run --coupling coupling_parameters.py
