[cig-commits] r20386 - in cs/batlab/trunk: citcom/scripts citcom/scripts/svn specfem/scripts specfem/scripts/svn

alex at geodynamics.org alex at geodynamics.org
Tue Jun 19 14:43:47 PDT 2012


Author: alex
Date: 2012-06-19 14:43:47 -0700 (Tue, 19 Jun 2012)
New Revision: 20386

Added:
   cs/batlab/trunk/specfem/scripts/svn/compute.py
Modified:
   cs/batlab/trunk/citcom/scripts/README.txt
   cs/batlab/trunk/citcom/scripts/svn/simple-make.run-spec
   cs/batlab/trunk/specfem/scripts/README.txt
   cs/batlab/trunk/specfem/scripts/svn/build.sh
   cs/batlab/trunk/specfem/scripts/svn/simple-make.run-spec
Log:
specfem is finished.
citcom is finished.
relax is finished.
project is now done as of 6/19/2012

this is a backup before changing operating systems on the local side.


Modified: cs/batlab/trunk/citcom/scripts/README.txt
===================================================================
--- cs/batlab/trunk/citcom/scripts/README.txt	2012-06-19 12:30:54 UTC (rev 20385)
+++ cs/batlab/trunk/citcom/scripts/README.txt	2012-06-19 21:43:47 UTC (rev 20386)
@@ -10,3 +10,6 @@
 NOTE: citcom requires MPI which is not on the batlab as of 6/8/2012.  As of now we are simply building a common script, but expecting only to test on ubuntu 10.04.  We are beginning to build our own set of virtual machines on which to test, so that we can install things like MPI as needed.
 
 Currently, the scripts run once a day at midnight.  
+
+We've dropped the following platforms because they do not have MPI:
+x86_64_sol_5.11, x86_64_rhap_6.2, x86_64_sl_6.2, x86_64_deb_6.0, x86_64_macos_10.7, x86_freebsd_7.4, x86_64_fedora_16, x86_64_fedora_15, x86_64_deb_5.0, x86_64_macos_10.7, x86_64_opensuse_11.4, x86_64_rhap_5.7, x86_sl_5.8

Modified: cs/batlab/trunk/citcom/scripts/svn/simple-make.run-spec
===================================================================
--- cs/batlab/trunk/citcom/scripts/svn/simple-make.run-spec	2012-06-19 12:30:54 UTC (rev 20385)
+++ cs/batlab/trunk/citcom/scripts/svn/simple-make.run-spec	2012-06-19 21:43:47 UTC (rev 20386)
@@ -2,7 +2,7 @@
 run_type = build
 inputs = simple-make.scp, svn-make.svn
 remote_task = build.sh
-platforms = x86_64_ubuntu_10.04.4, x86_64_sol_5.11, x86_64_rhap_6.2, x86_64_sl_6.2, x86_64_deb_6.0, x86_64_macos_10.7, x86_freebsd_7.4, x86_64_fedora_16, x86_64_fedora_15, x86_64_deb_5.0, x86_64_macos_10.7, x86_64_opensuse_11.4, x86_64_rhap_5.7, x86_sl_5.8
+platforms = x86_64_ubuntu_10.04.4
 
 cron_hour = 0
 cron_minute = 0

Modified: cs/batlab/trunk/specfem/scripts/README.txt
===================================================================
--- cs/batlab/trunk/specfem/scripts/README.txt	2012-06-19 12:30:54 UTC (rev 20385)
+++ cs/batlab/trunk/specfem/scripts/README.txt	2012-06-19 21:43:47 UTC (rev 20386)
@@ -5,6 +5,13 @@
 
 svn script build.sh contains not only the instructions for installation and compilation, but tests with debugging markers, which show up in the batlab error messages.  If there is a problem, notification emails are sent out to emails listed in svn/simple-make.run-spec
 
+
+Currently, the scripts run once a day at midnight.  
+
+
 NOTE: specfem_Globe3D requires MPI which is not on the batlab as of 6/8/2012.  As of now we are simply building a common script, but expecting only to test on ubuntu 10.04.  We are beginning to build our own set of virtual machines on which to test, so that we can install things like MPI as needed.
 
-Currently, the scripts run once a day at midnight.  
+Also, debian 5 seems to be running a version of svn before 1.6, and as such cannot download the necessary files from cig
+
+We've temporarily dropped the following platforms because they do not have MPI:
+x86_64_sol_5.11, x86_64_rhap_6.2, x86_64_sl_6.2, x86_64_deb_6.0, x86_64_macos_10.7, x86_freebsd_7.4, x86_64_fedora_16, x86_64_fedora_15, x86_64_deb_5.0, x86_64_macos_10.7, x86_64_opensuse_11.4, x86_64_rhap_5.7, x86_sl_5.8

Modified: cs/batlab/trunk/specfem/scripts/svn/build.sh
===================================================================
--- cs/batlab/trunk/specfem/scripts/svn/build.sh	2012-06-19 12:30:54 UTC (rev 20385)
+++ cs/batlab/trunk/specfem/scripts/svn/build.sh	2012-06-19 21:43:47 UTC (rev 20386)
@@ -21,33 +21,37 @@
 
 if [ $? != 0 ]			
 then
-    echo "problem building and testing"
+    echo "problem building and running"
     exit 1
 fi
 
 # run a script to parse the file input and to determine whether an email needs to be sent
 results="OUTPUT_FILES/BEKI.YL.MXE.sem.ascii"
-awk '{print (/^\// ? $1 : $2) }' $results > temp
+awk '{print (/^\// ? $1 : $2) }' $results > temp # create a column of just the results to be tested and put that in temp
 length=`cat temp | wc -l`
 email=0				# default to not send email
+touch errors			# create an empty errors file
+cp ../../../compute.py ./	# move the script into the working directory
+cp ../../../reference ./	# move the reference file into the working directory
+python compute.py > errors # return a list of the errors, which is ideally empty
 
-# create a file of the absolute value of the percentage differences, multiplied by 100000
-paste temp ../../../reference | awk '{diff=($1-$2)/$2*100000; if(diff<0) diff=-diff; printf "%1.0f\n", diff}' > test 
+if [ $? != 0 ]			
+then
+    echo "problem testing with compute.py"
+    exit 1
 
-for ((c=1; c<=$length; c++))
-do
-    val=`head -n $c test | tail -n 1`
-    echo "this is diff: $val"	# debugging
-    if [ $val -gt 1 ] 
-    then
-	email=$c;	# we need to send an email
-	echo "problem at line $c of results" >> errors 
-    fi
-done
+fi
+cat errors			# debugging
+problems=`wc -l errors | cut -f 1 -d ' '`
 
+if [ $problems -gt 0 ] 
+then
+    email=1;	# we need to send an email
+fi
+
 # append the hostname to the resutls file, append the errors, and append the date and time of the run.
 hostname >> $results \
-&& cat errors >> $results \
+    && cat errors >> $results \
     && date >> $results
 
 # send an email if it needs to be sent with the resulting data, platform/date, and lines containing errors

Added: cs/batlab/trunk/specfem/scripts/svn/compute.py
===================================================================
--- cs/batlab/trunk/specfem/scripts/svn/compute.py	                        (rev 0)
+++ cs/batlab/trunk/specfem/scripts/svn/compute.py	2012-06-19 21:43:47 UTC (rev 20386)
@@ -0,0 +1,9 @@
+# read in the values and the reference values
+values=open('temp').read().splitlines();
+reference=open('reference').read().splitlines();
+
+# calculate the percentage difference between the two and return the list of differences to the file test
+for i in range(len(values)):
+    diff = abs((float(values[i])-float(reference[i]))/float(reference[i]));
+    if diff > 1E-5: # if there's a problem, record the index and the value and return it
+        print "problem at line ", i, "; value is ", values[i], "; reference value is ", reference[i], "diff: ", diff;

Modified: cs/batlab/trunk/specfem/scripts/svn/simple-make.run-spec
===================================================================
--- cs/batlab/trunk/specfem/scripts/svn/simple-make.run-spec	2012-06-19 12:30:54 UTC (rev 20385)
+++ cs/batlab/trunk/specfem/scripts/svn/simple-make.run-spec	2012-06-19 21:43:47 UTC (rev 20386)
@@ -2,7 +2,7 @@
 run_type = build
 inputs = simple-make.scp, svn-make.svn
 remote_task = build.sh
-platforms = x86_64_ubuntu_10.04.4, x86_64_sol_5.11, x86_64_rhap_6.2, x86_64_sl_6.2, x86_64_deb_6.0, x86_64_macos_10.7, x86_freebsd_7.4, x86_64_fedora_16, x86_64_fedora_15, x86_64_deb_5.0, x86_64_macos_10.7, x86_64_opensuse_11.4, x86_64_rhap_5.7, x86_sl_5.8
+platforms = x86_64_ubuntu_10.04.4
 
 cron_hour = 0
 cron_minute = 0



More information about the CIG-COMMITS mailing list