Commit 5a1acd54 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

* Added memory usage to schedule script

parent 4108ff03
......@@ -18,6 +18,9 @@ SERVER=mars
# Expected runtime of one execution, the format is hh::mm
WTIME=1:00
# Memory usage of the program in MByte
MEM=4000
# Define the output file to which all output (standard and error) will be written.
OUTFILE=out
......@@ -72,7 +75,7 @@ case "$1" in
-c )
date > $OUTFILE 2>&1
printf "Schedule-Skript: Submitted programm to the batch system\n" >> $OUTFILE 2>&1
bsub -n $NUMBER_PROC -W $WTIME $SCRIPT_NAME -rs >> $OUTFILE 2>&1
bsub -n $NUMBER_PROC -W $WTIME -R "rusage[mem=$MEM]" $SCRIPT_NAME -rs >> $OUTFILE 2>&1
if [ $? -eq 0 ] ; then
printf "Submitted program to the batch system!\n"
printf "Submitted program to the batch system!\n" >> $OUTFILE 2>&1
......@@ -87,7 +90,7 @@ case "$1" in
# First scheduling of the program
date > $OUTFILE 2>&1
printf "Schedule-Skript: Submitted programm to the batch system\n" >> $OUTFILE 2>&1
bsub -n $NUMBER_PROC -W $WTIME $SCRIPT_NAME -s >> $OUTFILE 2>&1
bsub -n $NUMBER_PROC -W $WTIME -R "rusage[mem=$MEM]" $SCRIPT_NAME -s >> $OUTFILE 2>&1
if [ $? -eq 0 ] ; then
printf "Submitted program to the batch system!\n"
printf "Submitted program to the batch system!\n" >> $OUTFILE 2>&1
......@@ -106,7 +109,7 @@ if [ $ERROR_CODE -eq $SCHEDULE_ERROR_CODE ] ; then
# Error code indicates that the program has been terminated in order to be rescheduled.
date >> $OUTFILE 2>&1
printf "Schedule-Skript: Submitted programm to the batch system\n" >> $OUTFILE 2>&1
bsub -n $NUMBER_PROC -W $WTIME $SCRIPT_NAME -rs >> $OUTFILE 2>&1
bsub -n $NUMBER_PROC -W $WTIME -R "rusage[mem=$MEM]" $SCRIPT_NAME -rs >> $OUTFILE 2>&1
exit 0
elif [ $ERROR_CODE -eq 0 ] ; then
# The program terminated successfully.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment