[cig-commits] r20255 - in cs/batlab: . trunk/relax/scripts trunk/relax/scripts/hg trunk/specfem trunk/specfem/scripts

alex at geodynamics.org alex at geodynamics.org
Thu May 31 16:45:47 PDT 2012


Author: alex
Date: 2012-05-31 16:45:46 -0700 (Thu, 31 May 2012)
New Revision: 20255

Added:
   cs/batlab/trunk/relax/scripts/hg/
   cs/batlab/trunk/relax/scripts/hg/build.sh
   cs/batlab/trunk/relax/scripts/hg/hg-make.hg
   cs/batlab/trunk/relax/scripts/hg/run
   cs/batlab/trunk/relax/scripts/hg/run1.input
   cs/batlab/trunk/relax/scripts/hg/simple-make.run-spec
   cs/batlab/trunk/relax/scripts/hg/simple-make.scp
   cs/batlab/trunk/specfem/scripts/
   cs/batlab/trunk/specfem/scripts/README.txt
   cs/batlab/trunk/specfem/scripts/wgetInstallScript
   cs/batlab/trunk/specfem/specfem/
Removed:
   cs/batlab/svn-commit.tmp
Log:
citcom is done, but waiting on mpi still
relax is done, but some platforms with older versions of gfortran are missing.
starting work on specfem

NOTE: currently the batlab only has x86_64 platforms available.  We may create our own batlab to test AMD chip architectures and 32 bit architectures.

fixed a couple svn problems with the previous commit:
added in specfem directories,
fixed the trunk/relax/scripts/svn directory to now point to trunk/relax/scripts/hg
trunk/relax/scripts/hg now holds the correct scripts



Deleted: cs/batlab/svn-commit.tmp
===================================================================
--- cs/batlab/svn-commit.tmp	2012-05-31 23:30:05 UTC (rev 20254)
+++ cs/batlab/svn-commit.tmp	2012-05-31 23:45:46 UTC (rev 20255)
@@ -1,5 +0,0 @@
-citcom is done, but waiting on mpi still
-relax is done, but some platforms with older versions of gfortran are missing.
-starting work on specfem
-
-NOTE: currently the batlab only has x86_64 platforms available.  We may create our own batlab to test AMD chip architectures and 32 bit architectures.
\ No newline at end of file

Added: cs/batlab/trunk/relax/scripts/hg/build.sh
===================================================================
--- cs/batlab/trunk/relax/scripts/hg/build.sh	                        (rev 0)
+++ cs/batlab/trunk/relax/scripts/hg/build.sh	2012-05-31 23:45:46 UTC (rev 20255)
@@ -0,0 +1,117 @@
+#!/bin/sh
+#
+# We don't proceed unless the preceding step succeeded, and we return the success or failure of the sequence.
+#should already be untarred from the wget script.
+
+# download gmt libraries and install
+wget  ftp://ftp.iris.washington.edu/pub/gmt/gmt-4.5.8.tar.bz2
+tar xvjf gmt-*
+# GMT needs proj.4 library, , which needs netcdf, so install them here
+# netcdf:
+wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf.tar.gz
+gunzip netcdf*
+tar xvf netcdf*
+rm netcdf.tar
+cd netcdf* \
+    && ./configure --disable-netcdf-4 --disable-doxygen --prefix=`pwd`/../local \
+    && make check install
+
+if [ $? != 0 ]			
+then
+    echo "problem building and testing netcdf"
+    exit 1
+fi
+
+# set location of netcdf headers for GMT
+export NETCDF_INC=`pwd`/../local/include/
+export NETCDF_LIB=`pwd`/../local/lib/
+
+# proj.4
+cd ../
+wget http://download.osgeo.org/proj/proj-4.8.0.tar.gz
+gunzip proj-*
+tar xvf proj*
+rm proj-4.8.0.tar
+cd proj-* \
+    && ./configure --with-jni=no --prefix=`pwd`/../local \
+    && make install
+
+if [ $? != 0 ]			
+then
+    echo "problem building and testing proj.4"
+    exit 1
+fi
+
+
+# GMT needs FFTW, so install it here:
+cd ../
+wget www.fftw.org/fftw-3.3.2.tar.gz
+gunzip fftw-*
+tar xvf fftw-*
+rm fftw-*.tar
+cd fftw-* \
+    && ./configure --prefix=`pwd`/../local --enable-float --enable-threads \
+    && make install
+
+if [ $? != 0 ]			
+then
+    echo "problem building and testing fftw"
+    exit 1
+fi
+
+
+# install gmt libraries
+cd ../GMT* \
+    && ./configure --without-x --prefix=`pwd`/../local \
+    && make \
+    && make install-gmt \
+    && make install-data \
+    && make clean
+
+if [ $? != 0 ]			
+then
+    echo "problem building and testing GMT"
+    exit 1
+fi
+
+# build and test program
+# need to replace run1.input to either test only first coseismic event, or limit integration to a certain number of iterations
+# grep records only the tenth iteration on the first coseismic event, puts it in results
+cd ../relax
+./waf configure --use-fftw --proj-dir=`pwd`/../local --gmt-dir=`pwd`/../local --fftw-dir=`pwd`/../local \
+    && ./waf \
+    && cd examples/tutorials \
+    && mkdir output1 \
+    && ../../build/relax $* < ../../../run1.input > ../../../results.tar.gz \
+    && grep "009" -m1 ../../../results.tar.gz | tee results
+# return results.tar.gz incase there's a problem
+# stop after 10 runs, and test the power numbers
+
+if [ $? != 0 ]			
+then
+    echo "problem building and testing"
+    exit 1
+fi
+
+# run a script to parse the file input and to determine whether an email needs to be sent
+val=`cut -f 7 -d " " results`	# store power result from iteration 009 in val
+email=0				# default to not send email
+
+echo "this is val: $val"	# debugging
+if [ $val != 7.72E-01 ]		# 7.72E-01 is power reading from benchmarks for coseismic event 1, iteration 009
+then
+    email=1;	# we need to send an email
+    echo "$val is the power at iteration 009 of coseismic event 1, instead of 7.72E-01" >> errors 
+fi
+
+# append the hostname and date to the results file
+hostname >> errors \
+    && date >> errors
+
+# send an email if it needs to be sent with the power data, platform, and date
+if [ $email != 0 ]
+then
+    cat errors | mailx -s ErrorOverBound alex at geodynamics.org, emheien at geodynamics.org    # send email containing errors
+fi
+
+exit $?
\ No newline at end of file


Property changes on: cs/batlab/trunk/relax/scripts/hg/build.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: cs/batlab/trunk/relax/scripts/hg/hg-make.hg
===================================================================
--- cs/batlab/trunk/relax/scripts/hg/hg-make.hg	                        (rev 0)
+++ cs/batlab/trunk/relax/scripts/hg/hg-make.hg	2012-05-31 23:45:46 UTC (rev 20255)
@@ -0,0 +1,7 @@
+method = hg
+url = http://geodynamics.org/hg/short/3D/relax
+path = relax
+
+# method = url
+# url = www.geodynamics.org/cig/software/citcoms/CitcomS-3.2.0.tar.gz
+# untar = true
\ No newline at end of file

Added: cs/batlab/trunk/relax/scripts/hg/run
===================================================================
--- cs/batlab/trunk/relax/scripts/hg/run	                        (rev 0)
+++ cs/batlab/trunk/relax/scripts/hg/run	2012-05-31 23:45:46 UTC (rev 20255)
@@ -0,0 +1,2 @@
+#!/bin/sh
+nmi_submit ~/scripts/simple-make.run-spec
\ No newline at end of file


Property changes on: cs/batlab/trunk/relax/scripts/hg/run
___________________________________________________________________
Name: svn:executable
   + *

Added: cs/batlab/trunk/relax/scripts/hg/run1.input
===================================================================
--- cs/batlab/trunk/relax/scripts/hg/run1.input	                        (rev 0)
+++ cs/batlab/trunk/relax/scripts/hg/run1.input	2012-05-31 23:45:46 UTC (rev 20255)
@@ -0,0 +1,69 @@
+# use '#' character to include comments in your input file
+# grid size (sx1,sx2,sx3)
+256 256 256
+# sampling size (in unit of length), smoothing (0-0.5) & nyquist (dx1,dx2,dx3,beta,nq)
+0.05 0.05 0.05 0.2 2
+# origin position & rotation
+0 0 0
+# geographic origin (longitude and latitude), UTM zone and real length unit (usually m or km)
+# displacements and stress are converted to lon/lat geographic coordinates
+# unit corresponds to a scaling from dx1,dx2,dx3 to real unit
+# use unit = 1   if dimensions are described in units of m
+# use unit = 1e3 if dimensions are described in units of km
+120 22 51 1e3
+# observation depth for displacement and for stress (stress in only exported in GRD)
+0 0.5
+# output directory (all output written here)
+output1
+# elastic parameters and gamma = (1-nu) rho g / mu = 8.33e-7 /m = 8.33e-4 /km
+1 1 8.33e-4
+# integration time (in unit of time), step (negative for automatic) and scaling of computed value
+1 -1 1
+# number of observation planes
+1
+# no x1 x2 x3 length width strike dip
+   1  0 -3  0      6     6     90  90
+# number of observation points
+0
+# number of Coulomb patches
+0
+# number of prestress interfaces
+0
+# number of linear viscous interfaces (where viscosity changes)
+2
+# no depth gammadot0 cohesion (gammadot0 is shear modulus divided by viscosity)
+   1   3.0       1.0      0.0
+   2   9.0       1.0      0.0
+# number of linear ductile zones
+0
+# number of powerlaw viscous interfaces
+0
+# number of friction faults
+0
+# number of interseismic loading strike-slip and opening
+0
+0
+# number of coseismic events (when slip distribution is prescribed)
+1
+# number of shear dislocations (strike-slip and dip-slip faulting)
+1
+# no slip x1 x2 x3 length width strike dip rake
+   1    1 -1  0  0      1     1      0  90    0
+# number of tensile cracks
+0
+# number of dilatation sources
+0
+# number of surface traction
+0
+# # time of second event
+# 1
+# # number of shear dislocations
+# 1
+# # no slip x1 x2 x3 length width strike dip rake
+#    1    1  0  0  0      1     1      0  90    0
+# # number of tensile cracks
+# 0
+# # number of dilatation sources
+# 0
+# # number of surface traction
+# 0

Added: cs/batlab/trunk/relax/scripts/hg/simple-make.run-spec
===================================================================
--- cs/batlab/trunk/relax/scripts/hg/simple-make.run-spec	                        (rev 0)
+++ cs/batlab/trunk/relax/scripts/hg/simple-make.run-spec	2012-05-31 23:45:46 UTC (rev 20255)
@@ -0,0 +1,10 @@
+run_type = build
+inputs = simple-make.scp, hg-make.hg
+remote_task = build.sh
+project = cig
+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
+
+cron_hour = 1
+cron_minute = 0
+
+notify = alex at geodynamics.org, emheien at geodynamics.org

Added: cs/batlab/trunk/relax/scripts/hg/simple-make.scp
===================================================================
--- cs/batlab/trunk/relax/scripts/hg/simple-make.scp	                        (rev 0)
+++ cs/batlab/trunk/relax/scripts/hg/simple-make.scp	2012-05-31 23:45:46 UTC (rev 20255)
@@ -0,0 +1,3 @@
+method = scp
+scp_file = ~/scripts/*
+recursive = true
\ No newline at end of file

Added: cs/batlab/trunk/specfem/scripts/README.txt
===================================================================
--- cs/batlab/trunk/specfem/scripts/README.txt	                        (rev 0)
+++ cs/batlab/trunk/specfem/scripts/README.txt	2012-05-31 23:45:46 UTC (rev 20255)
@@ -0,0 +1,9 @@
+svn contains scripts for batlab testing using svn to get the source
+wget contains scripts for batlab testing using wget to get the source
+
+svn scripts are up-to date
+wget scripts may be copies of svn scripts, but haven't been updated as they are low priority and were used as preliminary tests
+
+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.  

Added: cs/batlab/trunk/specfem/scripts/wgetInstallScript
===================================================================
--- cs/batlab/trunk/specfem/scripts/wgetInstallScript	                        (rev 0)
+++ cs/batlab/trunk/specfem/scripts/wgetInstallScript	2012-05-31 23:45:46 UTC (rev 20255)
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# set up directories
+
+currentVersion=CitcomS-3.2.0
+cigDirectory=/home/at/cig
+wgetLogFile=/home/at/cig/wgetLogFile
+configureLogFile=/home/at/cig/$currentVersion/configureLogFile
+makeLogFile=/home/at/cig/$currentVersion/makeLogFile
+testLogFile=$cigDirectory/$currentVersion/examples/Cookbook1/testLogFile
+webAddress=www.geodynamics.org/cig/software/citcoms
+citcomS=$currentVersion.tar.gz
+cookbooks=$cigDirectory/examples/
+
+# clean up to prepare for install
+
+cd $cigDirectory/
+rm -r CitcomS-*
+mpd&				# run mpd in background ##todo shut off mpd after this is finished, and ignore error here if there's a prolllem
+
+set -e				# kills program if there's an error
+
+# download, unpack, remove zip
+wget -r --output-file=$wgetLogFile --output-document=$cigDirectory/$citcomS $webAddress/$citcomS
+tar -xzvf $cigDirectory/$citcomS
+rm $cigDirectory/$citcomS
+mv $wgetLogFile $cigDirectory/$currentVersion/
+
+cd $currentVersion/
+
+# configure and make
+./configure --without-pyre >> $configureLogFile
+make >> $makeLogFile
+
+# test Regional input.sample
+cd $cigDirectory/$currentVersion/examples/Regional/
+# update the input.sample file to work
+sed -i 's|datadir="/scratch"|datadir="./scratch"|g' input.sample 
+sed -i 's|nprocx=2|nprocx=1|g' input.sample
+sed -i 's|nprocy=2|nprocy=1|g' input.sample
+$cigDirectory/$currentVersion/bin/CitcomSRegional input.sample >> testLogFile
\ No newline at end of file


Property changes on: cs/batlab/trunk/specfem/scripts/wgetInstallScript
___________________________________________________________________
Name: svn:executable
   + *



More information about the CIG-COMMITS mailing list