[cig-commits] commit: Reduce requested runtime down to 24 hours
Mercurial
hg at geodynamics.org
Mon Oct 24 11:39:14 PDT 2011
changeset: 37:5cb56a35cfdb
user: Walter Landry <wlandry at caltech.edu>
date: Mon Oct 24 11:35:53 2011 -0700
files: backend/specfem_launcher.sh
description:
Reduce requested runtime down to 24 hours
diff -r 3e88a5e513ba -r 5cb56a35cfdb backend/specfem_launcher.sh
--- a/backend/specfem_launcher.sh Mon Jul 04 16:42:32 2011 -0700
+++ b/backend/specfem_launcher.sh Mon Oct 24 11:35:53 2011 -0700
@@ -62,6 +62,13 @@ hours=`echo "$run_time/60" | bc`
hours=`echo "$run_time/60" | bc`
minutes=`echo "$run_time%60/1" | bc | xargs -n 1 printf "%02d"`
+# if asking for more than 24 hours, truncate to 24 hours
+
+if [ $hours -ge 24 ]; then
+ hours=24
+ minutes=00
+fi
+
perl -pi -e s/RUNID/${run_id}/ sge_script
perl -pi -e s/HOURS/${hours}/ sge_script
perl -pi -e s/MINUTES/${minutes}/ sge_script
More information about the CIG-COMMITS
mailing list