#/root/Code_Saturne/
#tar -xvzf code_saturne-5.0.9.tar.gz
#mkdir /root/Code_Saturne/code_saturne-5.0.9.build
#cd /root/Code_Saturne/code_saturne-5.0.9.build
#../code_saturne-5.0.9/configure --prefix=/work/projects/Code_Saturne/test CC=/shared/v2/libraries/mpi/openmpi/2.1.1-slurm-gcc4.8.5/bin/mpicc CXX=/shared/v2/libraries/mpi/openmpi/2.1.1-slurm-gcc4.8.5/bin/mpicxx FC=gfortran --disable-gui --disable-frontend --with-hdf5=/work/projects/Code_Saturne/hdf5-1.8.17/arch/Linux_x86_64 --with-cgns=/work/projects/Code_Saturne/cgnslib-3.2.1/arch/Linux_x86_64 --with-med=/work/projects/Code_Saturne/med-3.2.1/arch/Linux_x86_64 --with-metis=/work/projects/Code_Saturne/parmetis-4.0.3/arch/Linux_x86_64 --with-scotch=/work/projects/Code_Saturne/scotch-6.0.4/arch/Linux_x86_64 PYTHON=/bin/python --enable-debug

#make
#make install

#cp /work/projects/Code_Saturne/test/etc/code_saturne.cfg.template /work/projects/Code_Saturne/test/etc/code_saturne.cfg
#vim /work/projects/Code_Saturne/test/etc/code_saturne.cfg

	[install]
	batch = SLURM
	[run]
	scratchdir = /scratch/%(user)s
	[mpi]
	bindir = /shared/v2/libraries/mpi/openmpi/2.1.1-slurm-gcc4.8.5/bin
	mpiexec = mpiexec

#vim /work/projects/Code_Saturne/test/share/code_saturne/batch/batch.SLURM

	#-------------------------------------------------------------------------------
	#
	# Batch options for SLURM (Simple Linux Utility for Resource Management)
	# =======================
	#
	#SBATCH --ntasks-per-node=28
	#SBATCH --ntasks-per-core=1
	#SBATCH --time=0:30:00
	#SBATCH --output=nameandcase%j
	#SBATCH --error=nameandcase%j
	#SBATCH --job-name=nameandcase
	#
	#  -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
	#  --cpu-bind=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
