Skip to content

Commit

Permalink
Fix qfds for SLURM at CSC(Finland)
Browse files Browse the repository at this point in the history
  • Loading branch information
shostikk committed Nov 14, 2017
1 parent f5a1dcd commit 1925a17
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions Utilities/Scripts/qfds.sh
Expand Up @@ -247,10 +247,12 @@ shift $(($OPTIND-1))

# ^^^^^^^^^^^^^^^^^^^^^^^^parse options^^^^^^^^^^^^^^^^^^^^^^^^^

if [ "$RESOURCE_MANAGER" == "SLURM" ]; then
walltime=99-99:99:99
else
walltime=999:0:0
if [ "$walltime" == "" ]; then
if [ "$RESOURCE_MANAGER" == "SLURM" ]; then
walltime=99-99:99:99
else
walltime=999:0:0
fi
fi
if [ "$nodelist" != "" ]; then
nodelist="-l nodes=$nodelist"
Expand Down Expand Up @@ -365,6 +367,10 @@ let "nodes=($nmpi_processes-1)/$nmpi_processes_per_node+1"
if test $nodes -lt 1 ; then
nodes=1
fi
if [ "$RESOURCE_MANAGER" == "SLURM" ]; then
nodes=""
fi


# define processes per node

Expand Down Expand Up @@ -542,6 +548,7 @@ fi

if [ "$RESOURCE_MANAGER" == "SLURM" ]; then
QSUB="sbatch -p $queue --ignore-pbs"
MPIRUN='srun'
fi

# Set walltime parameter only if walltime is specified as input argument
Expand All @@ -567,10 +574,16 @@ if [ "$queue" != "none" ]; then
#SBATCH -o $outlog
#SBATCH -p $queue
#SBATCH -n $nmpi_processes
#SBATCH --nodes=$nodes
####SBATCH --nodes=$nodes
#SBATCH --cpus-per-task=$nopenmp_threads
$SLURM_MEM
EOF
if [ "$walltimestring_slurm" != "" ]; then
cat << EOF >> $scriptfile
#SBATCH $walltimestring_slurm
EOF
fi

else
cat << EOF >> $scriptfile
#PBS -N $JOBPREFIX$TITLE
Expand Down

0 comments on commit 1925a17

Please sign in to comment.