diff --git a/AMDiS/other/scripts/schedule b/AMDiS/other/scripts/schedule index f11de3443ce4398f081016e05b0d3304e3c3de1c..f1a6c70a30ef02c1fedf94f19e29f95fcbfd469f 100755 --- a/AMDiS/other/scripts/schedule +++ b/AMDiS/other/scripts/schedule @@ -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.