From lgadelha at ci.uchicago.edu Tue Jan 3 04:47:28 2012 From: lgadelha at ci.uchicago.edu (lgadelha at ci.uchicago.edu) Date: Tue, 3 Jan 2012 04:47:28 -0600 (CST) Subject: [Swift-commit] r5479 - provenancedb Message-ID: <20120103104728.1C7A99CCB6@svn.ci.uchicago.edu> Author: lgadelha Date: 2012-01-03 04:47:26 -0600 (Tue, 03 Jan 2012) New Revision: 5479 Modified: provenancedb/ProvSQL.g Log: Minor changes Modified: provenancedb/ProvSQL.g =================================================================== --- provenancedb/ProvSQL.g 2011-12-30 15:21:09 UTC (rev 5478) +++ provenancedb/ProvSQL.g 2012-01-03 10:47:26 UTC (rev 5479) @@ -308,17 +308,29 @@ { System.out.print(" ORDER BY "); } + ( c=entityAndAttribute { System.out.print($c.text); } + | + COUNT { System.out.print(" COUNT "); } + | + e=AGGRFUN { System.out.print(" " + $e.text + " "); } + ) ( - COLON + COLON { System.out.print(","); } + ( d=entityAndAttribute { - System.out.print(","); System.out.print($d.text); } + | + COUNT { System.out.print(" COUNT "); } + | + f=AGGRFUN { System.out.print(" " + $f.text + " "); } + + ) )* ( DESC { System.out.print(" DESC "); } @@ -332,6 +344,7 @@ ')' { System.out.print(")"); } ; + selectAtom : a=entityAttribute { @@ -355,7 +368,25 @@ } ')' { selectClause+=")"; } | - builtInProcedureAttribute + d=COUNT + { + selectClause+=$d.text; + } + '(' { selectClause+="("; } + ( + e=entityAttribute + { + selectClause += $e.text; + relations.add($e.text.split("\\.")[0]); + if($e.text.split("\\.").length == 1) + selectClause += ".*"; + } + | + '*' { selectClause+="*"; } + ) + ')' { selectClause+=")"; } + | + builtInProcedureAttribute ; selectExpression @@ -657,8 +688,10 @@ BY : 'by'; -AGGRFUN : 'avg' | 'max' | 'min' | 'count' | 'sum'; +AGGRFUN : 'avg' | 'max' | 'min' | 'sum'; +COUNT : 'count'; + SELECT : 'select'; DESC : 'desc'; From davidk at ci.uchicago.edu Tue Jan 3 10:42:59 2012 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Tue, 3 Jan 2012 10:42:59 -0600 (CST) Subject: [Swift-commit] r5480 - in www: downloads inc main Message-ID: <20120103164259.7D08F9CCB6@svn.ci.uchicago.edu> Author: davidk Date: 2012-01-03 10:42:59 -0600 (Tue, 03 Jan 2012) New Revision: 5480 Modified: www/downloads/index.php www/inc/downloads_sidebar.php www/main/index.php Log: Update swift version Modified: www/downloads/index.php =================================================================== --- www/downloads/index.php 2012-01-03 10:47:26 UTC (rev 5479) +++ www/downloads/index.php 2012-01-03 16:42:59 UTC (rev 5480) @@ -37,15 +37,15 @@

Latest Release

-

Swift 0.93 RC5 - 2011/11/14

+

Swift 0.93 RC6 - 2012/01/03

For the majority of users, this is the version you will want to download. This package contains the latest Stable release of Swift. Since Swift is written in Java, this package will run on all supported platforms with Java Runtime Environment 1.5 or greater.

Precompiled binary distribution -[swift-0.93RC5.tar.gz] +[swift-0.93RC6.tar.gz]

Source Code

Modified: www/inc/downloads_sidebar.php =================================================================== --- www/inc/downloads_sidebar.php 2012-01-03 10:47:26 UTC (rev 5479) +++ www/inc/downloads_sidebar.php 2012-01-03 16:42:59 UTC (rev 5480) @@ -1,7 +1,7 @@

Latest Release

-
Download Now
-0.93 RC5 current version
2011/11/14 +
Download Now
+0.93 RC6 current version
2012/01/03

 

Modified: www/main/index.php =================================================================== --- www/main/index.php 2012-01-03 10:47:26 UTC (rev 5479) +++ www/main/index.php 2012-01-03 16:42:59 UTC (rev 5480) @@ -62,7 +62,7 @@
-
0.93 RC5 current version
2011/11/14 +
0.93 RC6 current version
2012/01/03
Read our Quick Start Guide and start using Swift today!
From davidk at ci.uchicago.edu Tue Jan 3 16:02:39 2012 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Tue, 3 Jan 2012 16:02:39 -0600 (CST) Subject: [Swift-commit] r5481 - in branches/release-0.93: docs docs/siteguide docs/siteguide/.cache docs/userguide/.cache etc libexec tests/sites/mcs Message-ID: <20120103220239.79C459CCB6@svn.ci.uchicago.edu> Author: davidk Date: 2012-01-03 16:02:39 -0600 (Tue, 03 Jan 2012) New Revision: 5481 Modified: branches/release-0.93/docs/build_docs.sh branches/release-0.93/docs/siteguide/.cache/siteguide.txt branches/release-0.93/docs/siteguide/siteguide.txt branches/release-0.93/docs/userguide/.cache/userguide.txt branches/release-0.93/etc/coaster-service.conf branches/release-0.93/libexec/release.txt branches/release-0.93/tests/sites/mcs/coaster-service.conf Log: Various doc updates Modified: branches/release-0.93/docs/build_docs.sh =================================================================== --- branches/release-0.93/docs/build_docs.sh 2012-01-03 16:42:59 UTC (rev 5480) +++ branches/release-0.93/docs/build_docs.sh 2012-01-03 22:02:39 UTC (rev 5481) @@ -40,7 +40,7 @@ do pushd $directory > /dev/null 2>&1 FILES=`ls -1 *.txt 2>/dev/null` - CONTENTFILES=`/bin/ls -l | grep ^- | awk '{print $9}' | grep -v "\."` + CONTENTFILES=`find . -maxdepth 1 -type f ! -iname *.pdf` for file in $FILES do @@ -53,11 +53,6 @@ doflag=1 fi done - #diff $file .cache/$file >/dev/null 2>/dev/null - #if [ $? -ne 0 ] - #then - # echo "updating cache" - # cp $file .cache if [ $doflag -eq 1 ] then echo "updating cache" Modified: branches/release-0.93/docs/siteguide/.cache/siteguide.txt =================================================================== --- branches/release-0.93/docs/siteguide/.cache/siteguide.txt 2012-01-03 16:42:59 UTC (rev 5480) +++ branches/release-0.93/docs/siteguide/.cache/siteguide.txt 2012-01-03 22:02:39 UTC (rev 5481) @@ -8,14 +8,17 @@ include::prereqs[] -include::pads[] +include::bag_of_workstations[] +include::beagle[] + include::fusion[] -include::beagle[] - include::futuregrid[] +include::intrepid[] + include::mcs[] -include::intrepid[] +include::pads[] + Modified: branches/release-0.93/docs/siteguide/siteguide.txt =================================================================== --- branches/release-0.93/docs/siteguide/siteguide.txt 2012-01-03 16:42:59 UTC (rev 5480) +++ branches/release-0.93/docs/siteguide/siteguide.txt 2012-01-03 22:02:39 UTC (rev 5481) @@ -8,14 +8,17 @@ include::prereqs[] -include::pads[] +include::bag_of_workstations[] +include::beagle[] + include::fusion[] -include::beagle[] - include::futuregrid[] +include::intrepid[] + include::mcs[] -include::intrepid[] +include::pads[] + Modified: branches/release-0.93/docs/userguide/.cache/userguide.txt =================================================================== --- branches/release-0.93/docs/userguide/.cache/userguide.txt 2012-01-03 16:42:59 UTC (rev 5480) +++ branches/release-0.93/docs/userguide/.cache/userguide.txt 2012-01-03 22:02:39 UTC (rev 5481) @@ -39,3 +39,5 @@ include::cdm[] include::log-processing[] + +include::troubleshooting[] Modified: branches/release-0.93/etc/coaster-service.conf =================================================================== --- branches/release-0.93/etc/coaster-service.conf 2012-01-03 16:42:59 UTC (rev 5480) +++ branches/release-0.93/etc/coaster-service.conf 2012-01-03 22:02:39 UTC (rev 5481) @@ -1,6 +1,3 @@ -# Keep all interesting settings in one place -# User should modify this to fit environment - # Location of SWIFT. If empty, PATH is searched export SWIFT= @@ -31,7 +28,7 @@ # This is the IP address to which the workers will connect # If not given, start-coaster-service tries to automatically detect -# the IP address of this system via ifconfig +# the IP address of this system via ifconfig # Specify this if you have multiple network interfaces export IPADDR= @@ -40,6 +37,3 @@ # Swift information for creating sites.xml export WORK=$HOME/swiftwork -export QUEUE=prod-devel -export MAXTIME=20 -export NODE=64 Modified: branches/release-0.93/libexec/release.txt =================================================================== --- branches/release-0.93/libexec/release.txt 2012-01-03 16:42:59 UTC (rev 5480) +++ branches/release-0.93/libexec/release.txt 2012-01-03 22:02:39 UTC (rev 5481) @@ -1 +1 @@ -0.93RC5 +0.93RC6 Modified: branches/release-0.93/tests/sites/mcs/coaster-service.conf =================================================================== --- branches/release-0.93/tests/sites/mcs/coaster-service.conf 2012-01-03 16:42:59 UTC (rev 5480) +++ branches/release-0.93/tests/sites/mcs/coaster-service.conf 2012-01-03 22:02:39 UTC (rev 5481) @@ -28,9 +28,3 @@ # start-coaster-service tries to automatically detect IP address. # Specify here if auto detection is not working correctly export IPADDR= - -# Below are various settings to give information about how to create sites.xml -export work=$HOME/work -export queue=prod-devel -export maxtime=20 -export nodes=64 From davidk at ci.uchicago.edu Tue Jan 3 16:17:23 2012 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Tue, 3 Jan 2012 16:17:23 -0600 (CST) Subject: [Swift-commit] r5482 - branches/release-0.93/etc Message-ID: <20120103221723.676659CCB6@svn.ci.uchicago.edu> Author: davidk Date: 2012-01-03 16:17:23 -0600 (Tue, 03 Jan 2012) New Revision: 5482 Modified: branches/release-0.93/etc/coaster-service.conf Log: Update default coaster-service with jobs per node and job throttle values Modified: branches/release-0.93/etc/coaster-service.conf =================================================================== --- branches/release-0.93/etc/coaster-service.conf 2012-01-03 22:02:39 UTC (rev 5481) +++ branches/release-0.93/etc/coaster-service.conf 2012-01-03 22:17:23 UTC (rev 5482) @@ -37,3 +37,10 @@ # Swift information for creating sites.xml export WORK=$HOME/swiftwork + +# Jobs per node is usually equal to the number of CPUs per node +export JOBS_PER_NODE=2 + +# To calculate job throttle: +# jobs per node * nodes - 0.1 / 100 +export JOB_THROTTLE=0.059 From davidk at ci.uchicago.edu Tue Jan 3 16:19:15 2012 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Tue, 3 Jan 2012 16:19:15 -0600 (CST) Subject: [Swift-commit] r5483 - branches/release-0.93/docs/siteguide Message-ID: <20120103221915.295FB9CCB6@svn.ci.uchicago.edu> Author: davidk Date: 2012-01-03 16:19:14 -0600 (Tue, 03 Jan 2012) New Revision: 5483 Added: branches/release-0.93/docs/siteguide/bag_of_workstations Log: Add siteguide entry for bag of workstations configuration Added: branches/release-0.93/docs/siteguide/bag_of_workstations =================================================================== --- branches/release-0.93/docs/siteguide/bag_of_workstations (rev 0) +++ branches/release-0.93/docs/siteguide/bag_of_workstations 2012-01-03 22:19:14 UTC (rev 5483) @@ -0,0 +1,109 @@ +?Bag of Workstations +------------------- +"Bag of workstations" refers to a collection of machines that are not connected +together as part of a cluster or supercomputer. + +Prerequisites +~~~~~~~~~~~~~ +In order to run Swift on a bag of workstations, the following prerequisites must +be met: + +- The machines must be running Linux +- The machines must have Perl available +- A user account must be created on each machine (the username you create must be the same on each machine) +- You must be able to SSH into the accounts without being prompted for a password. This usually involves creating an SSH key and setting up your authorized_keys. More information on how to do this can be found at http://www.openssh.org. + +Create a coaster-service.conf +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To begin, copy the text below and paste it into the directory +where your swift script is located. Name this file coaster-service.conf. + +----- +include::../../etc/coaster-service.conf[] +----- + +Modify coaster-service.conf +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The coaster-service.conf file contains information about your setup. +There are a few settings you must customize. + +The first is the name of the machines which will be used as workers. Modify +the line below to reflect the names of the machines you want to use. +----- +export WORKER_HOSTS="myhost1.mydomain myhost2.mydomain" +----- + +Update the value for JOBS_PER_NODE to reflect the number of CPUs available per node. + +The JOB_THROTTLE setting determines the maximum number of active jobs. Use the formula +to determine the ideal value: + +jobs per node * number of nodes - 0.1 / 100 + +Example: Suppose you have 10 machines each with 8 cores +----- +8 jobs per node * 10 cores = 80 +80 - 0.1 = 79.9 +79.9 / 100 = 0.799 +----- + +In this example, you would set the job throttle to 0.799 +----- +export JOB_THROTTLE=0.799 +----- + +By default, this setup assumes there are no firewall rescrictions. If there +is a firewall rescricting SSH access, set tunneling to true with this command + +----- +export SSH_TUNNELING=yes +----- + +This setup also assumes that these machines are not using a shared filesystem (NFS/AFS/CIFS, etc). +If these systems are all sharing a common filesystem, add the setting below. + +----- +export SHARED_FILESYSTEM=no +----- + +Starting the Coaster Service +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Change directories to the location where you would like to run a +Swift script and start the coaster service with this +command: + +----- +start-coaster-service +----- + +This will create a configuration file that Swift needs +called sites.xml. + +WARNING: Any existing sites.xml files in this directory +will be overwritten. Be sure to make a copy of any +custom configuration files you may have. + +Run Swift +~~~~~~~~~ + +Next, run Swift. If you do not have a particular script +in mind, you can test Swift by using a Swift script in +the examples/ directory. + +Run the following command to run the script: +----- +swift -sites.file sites.xml -tc.file tc.data yourscript.swift +----- + +Stopping the Coaster Service +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The coaster service will run indefinitely. The stop-coaster-service +script will terminate the coaster service. + +----- +$ stop-coaster-service +----- + +This will kill the coaster service and kill the worker scripts on remote systems. + From davidk at ci.uchicago.edu Thu Jan 5 12:15:46 2012 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Thu, 5 Jan 2012 12:15:46 -0600 (CST) Subject: [Swift-commit] r5484 - branches/release-0.93/libexec Message-ID: <20120105181546.D0C629CFD2@svn.ci.uchicago.edu> Author: davidk Date: 2012-01-05 12:15:46 -0600 (Thu, 05 Jan 2012) New Revision: 5484 Modified: branches/release-0.93/libexec/release.txt Log: Updating release Modified: branches/release-0.93/libexec/release.txt =================================================================== --- branches/release-0.93/libexec/release.txt 2012-01-03 22:19:14 UTC (rev 5483) +++ branches/release-0.93/libexec/release.txt 2012-01-05 18:15:46 UTC (rev 5484) @@ -1 +1 @@ -0.93RC6 +0.93 From davidk at ci.uchicago.edu Thu Jan 5 12:31:14 2012 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Thu, 5 Jan 2012 12:31:14 -0600 (CST) Subject: [Swift-commit] r5485 - in www: downloads inc main Message-ID: <20120105183114.9FF0C9CFD2@svn.ci.uchicago.edu> Author: davidk Date: 2012-01-05 12:31:14 -0600 (Thu, 05 Jan 2012) New Revision: 5485 Modified: www/downloads/index.php www/inc/downloads_sidebar.php www/main/index.php Log: Update version Modified: www/downloads/index.php =================================================================== --- www/downloads/index.php 2012-01-05 18:15:46 UTC (rev 5484) +++ www/downloads/index.php 2012-01-05 18:31:14 UTC (rev 5485) @@ -37,15 +37,15 @@

Latest Release

-

Swift 0.93 RC6 - 2012/01/03

+

Swift 0.93 - 2012/01/05

For the majority of users, this is the version you will want to download. This package contains the latest Stable release of Swift. Since Swift is written in Java, this package will run on all supported platforms with Java Runtime Environment 1.5 or greater.

Precompiled binary distribution -[swift-0.93RC6.tar.gz] +[swift-0.93.tar.gz]

Source Code

Modified: www/inc/downloads_sidebar.php =================================================================== --- www/inc/downloads_sidebar.php 2012-01-05 18:15:46 UTC (rev 5484) +++ www/inc/downloads_sidebar.php 2012-01-05 18:31:14 UTC (rev 5485) @@ -1,7 +1,7 @@

Latest Release

- -0.93 RC6 current version
2012/01/03 + +0.93 current version
2012/01/05

 

Modified: www/main/index.php =================================================================== --- www/main/index.php 2012-01-05 18:15:46 UTC (rev 5484) +++ www/main/index.php 2012-01-05 18:31:14 UTC (rev 5485) @@ -62,7 +62,7 @@
-
0.93 RC6 current version
2012/01/03 +
0.93 current version
2012/01/05
Read our Quick Start Guide and start using Swift today!
From davidk at ci.uchicago.edu Thu Jan 5 12:41:07 2012 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Thu, 5 Jan 2012 12:41:07 -0600 (CST) Subject: [Swift-commit] r5486 - tags Message-ID: <20120105184107.BED3E9CFD2@svn.ci.uchicago.edu> Author: davidk Date: 2012-01-05 12:41:07 -0600 (Thu, 05 Jan 2012) New Revision: 5486 Removed: tags/release-0.93/ Log: Removing old 0.93 tag From davidk at ci.uchicago.edu Thu Jan 5 12:42:42 2012 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Thu, 5 Jan 2012 12:42:42 -0600 (CST) Subject: [Swift-commit] r5487 - tags Message-ID: <20120105184242.D700B9CFD2@svn.ci.uchicago.edu> Author: davidk Date: 2012-01-05 12:42:42 -0600 (Thu, 05 Jan 2012) New Revision: 5487 Added: tags/release-0.93/ Log: Tagging 0.93 From davidk at ci.uchicago.edu Sat Jan 7 01:48:37 2012 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Sat, 7 Jan 2012 01:48:37 -0600 (CST) Subject: [Swift-commit] r5489 - SwiftApps/modis Message-ID: <20120107074837.76ED09CFAC@svn.ci.uchicago.edu> Author: davidk Date: 2012-01-07 01:48:36 -0600 (Sat, 07 Jan 2012) New Revision: 5489 Added: SwiftApps/modis/cf.local SwiftApps/modis/cf.pads SwiftApps/modis/demo.local SwiftApps/modis/demo.pads SwiftApps/modis/modis.swift SwiftApps/modis/sites.pads.xml SwiftApps/modis/tc.pads Removed: SwiftApps/modis/cf SwiftApps/modis/demo5 SwiftApps/modis/demo5.local SwiftApps/modis/modis5.swift SwiftApps/modis/selectedtiles.txt SwiftApps/modis/tc Log: Some updates to run modis on pads Deleted: SwiftApps/modis/cf =================================================================== --- SwiftApps/modis/cf 2012-01-06 21:39:41 UTC (rev 5488) +++ SwiftApps/modis/cf 2012-01-07 07:48:36 UTC (rev 5489) @@ -1,9 +0,0 @@ -wrapperlog.always.transfer=true -sitedir.keep=true -execution.retries=0 -lazy.errors=false -status.mode=provider -use.provider.staging=false -provider.staging.pin.swiftfiles=false -#throttle.transfers=16 -#throttle.file.operations=16 Added: SwiftApps/modis/cf.local =================================================================== --- SwiftApps/modis/cf.local (rev 0) +++ SwiftApps/modis/cf.local 2012-01-07 07:48:36 UTC (rev 5489) @@ -0,0 +1,9 @@ +wrapperlog.always.transfer=true +sitedir.keep=true +execution.retries=0 +lazy.errors=false +status.mode=provider +use.provider.staging=false +provider.staging.pin.swiftfiles=false +#throttle.transfers=16 +#throttle.file.operations=16 Added: SwiftApps/modis/cf.pads =================================================================== --- SwiftApps/modis/cf.pads (rev 0) +++ SwiftApps/modis/cf.pads 2012-01-07 07:48:36 UTC (rev 5489) @@ -0,0 +1,7 @@ +wrapperlog.always.transfer=true +sitedir.keep=true +execution.retries=0 +lazy.errors=false +status.mode=provider +use.provider.staging=false +provider.staging.pin.swiftfiles=false Added: SwiftApps/modis/demo.local =================================================================== --- SwiftApps/modis/demo.local (rev 0) +++ SwiftApps/modis/demo.local 2012-01-07 07:48:36 UTC (rev 5489) @@ -0,0 +1,15 @@ +# demo4 forest 50 5 pbs + +landtype=${1:-urban} +nfiles=${2:-999} +nselect=${3:-10} +site=${4:-local} + +runid=modis-$(date +%Y.%m%d.%H%M)-$landtype-$nfiles-$nselect + +echo runid=$runid + +swift -tc.file tc.local \ + -sites.file sites.local.xml \ + modis.swift -landtype=$landtype -nfiles=$nfiles -nselect=$nselect -runid=$runid \ + -modisdir=$PWD/data/modis/2002 -webdir=$HOME/public_html/geo Property changes on: SwiftApps/modis/demo.local ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/modis/demo.pads =================================================================== --- SwiftApps/modis/demo.pads (rev 0) +++ SwiftApps/modis/demo.pads 2012-01-07 07:48:36 UTC (rev 5489) @@ -0,0 +1,15 @@ +# demo4 forest 50 5 pbs + +landtype=${1:-urban} +nfiles=${2:-999} +nselect=${3:-10} +site=${4:-local} + +runid=modis-$(date +%Y.%m%d.%H%M)-$landtype-$nfiles-$nselect + +echo runid=$runid + +swift -tc.file tc.pads \ + -sites.file sites.pads.xml \ + modis.swift -config cf.pads -landtype=$landtype -nfiles=$nfiles -nselect=$nselect -runid=$runid \ + -modisdir=$PWD/data/modis/2002 -webdir=$HOME/public_html/geo Property changes on: SwiftApps/modis/demo.pads ___________________________________________________________________ Added: svn:executable + * Deleted: SwiftApps/modis/demo5 =================================================================== --- SwiftApps/modis/demo5 2012-01-06 21:39:41 UTC (rev 5488) +++ SwiftApps/modis/demo5 2012-01-07 07:48:36 UTC (rev 5489) @@ -1,18 +0,0 @@ -# demo4 forest 50 5 pbs - -landtype=${1:-urban} -nfiles=${2:-50} -nselect=${3:-10} -site=${4:-local} - -runid=modis-$(date +%Y.%m%d.%H%M)-$landtype-$nfiles-$nselect - -echo runid=$runid - -swift -tc.file tc.$site \ - -sites.file sites.xml \ - modis5.swift -landtype=$landtype -nfiles=$nfiles -nselect=$nselect -runid=$runid \ - -MODISdir=/home/wilde/bigdata/data/modis/2002 -webdir=/home/wilde/public_html/geo -exit - -swift -tc.file tc.local -sites.file sites.local.xml modis2.swift -landtype=$1 -nfiles=$2 -nselect=$3 Deleted: SwiftApps/modis/demo5.local =================================================================== --- SwiftApps/modis/demo5.local 2012-01-06 21:39:41 UTC (rev 5488) +++ SwiftApps/modis/demo5.local 2012-01-07 07:48:36 UTC (rev 5489) @@ -1,15 +0,0 @@ -# demo4 forest 50 5 pbs - -landtype=${1:-urban} -nfiles=${2:-999} -nselect=${3:-10} -site=${4:-local} - -runid=modis-$(date +%Y.%m%d.%H%M)-$landtype-$nfiles-$nselect - -echo runid=$runid - -swift -tc.file tc.local \ - -sites.file sites.local.xml \ - modis5.swift -landtype=$landtype -nfiles=$nfiles -nselect=$nselect -runid=$runid \ - -modisdir=$PWD/data/modis/2002 -webdir=$HOME/public_html/geo Copied: SwiftApps/modis/modis.swift (from rev 5488, SwiftApps/modis/modis5.swift) =================================================================== --- SwiftApps/modis/modis.swift (rev 0) +++ SwiftApps/modis/modis.swift 2012-01-07 07:48:36 UTC (rev 5489) @@ -0,0 +1,93 @@ +type file; +type imagefile; +type landuse; + +# Define application program interfaces + +app (landuse output) getLandUse (imagefile input, int sortfield) +{ + getlanduse @input sortfield stdout=@output ; +} + +app (file output, file tilelist) analyzeLandUse + (landuse input[], string usetype, int maxnum) +{ + analyzelanduse @output @tilelist usetype maxnum @filenames(input); +} + +app (imagefile output) colorMODIS (imagefile input) +{ + colormodis @input @output; +} + +app (imagefile output) assemble + (file selected, imagefile image[], string webdir) +{ + assemble @output @selected @filename(image[0]) webdir; +} + +app (imagefile grid) markMap (file tilelist) +{ + markmap @tilelist @grid; +} + +# Constants and command line arguments + +int nFiles = @toint(@arg("nfiles","1000")); +int nSelect = @toint(@arg("nselect","12")); +string landType = @arg("landtype","urban"); +string runID = @arg("runid","modis-run"); +string MODISdir= @arg("modisdir","/home/wilde/bigdata/data/modis/2002"); +string webDir = @arg("webdir","/home/wilde/public_html/geo/"); + +string suffix=".tif"; + +# Input Dataset + +imagefile geos[] ; # site=site + +# Compute the land use summary of each MODIS tile + +landuse land[] ; + +foreach g,i in geos { + land[i] = getLandUse(g,1); +} + +# Find the top N tiles (by total area of selected landuse types) + +file topSelected<"topselected.txt">; +file selectedTiles<"selectedtiles.txt">; +(topSelected, selectedTiles) = analyzeLandUse(land, landType, nSelect); + +# Mark the top N tiles on a sinusoidal gridded map + +imagefile gridMap<"markedGrid.gif">; +gridMap = markMap(topSelected); + +# Create multi-color images for all tiles + +imagefile colorImage[] ; + +foreach g, i in geos { + colorImage[i] = colorMODIS(g); +} + +# Assemble a montage of the top selected areas + +imagefile montage ; # @arg +montage = assemble(selectedTiles,colorImage,webDir); + +# future args: + +int selectHiThreshold; +int selectLowThreshold; +string upperLeftTile; +string lowerRightTile; +float imageSizes[]; +string displayOptions; + Deleted: SwiftApps/modis/modis5.swift =================================================================== --- SwiftApps/modis/modis5.swift 2012-01-06 21:39:41 UTC (rev 5488) +++ SwiftApps/modis/modis5.swift 2012-01-07 07:48:36 UTC (rev 5489) @@ -1,93 +0,0 @@ -type file; -type imagefile; -type landuse; - -# Define application program interfaces - -app (landuse output) getLandUse (imagefile input, int sortfield) -{ - getlanduse @input sortfield stdout=@output ; -} - -app (file output, file tilelist) analyzeLandUse - (landuse input[], string usetype, int maxnum) -{ - analyzelanduse @output @tilelist usetype maxnum @filenames(input); -} - -app (imagefile output) colorMODIS (imagefile input) -{ - colormodis @input @output; -} - -app (imagefile output) assemble - (file selected, imagefile image[], string webdir) -{ - assemble @output @selected @filename(image[0]) webdir; -} - -app (imagefile grid) markMap (file tilelist) -{ - markmap @tilelist @grid; -} - -# Constants and command line arguments - -int nFiles = @toint(@arg("nfiles","1000")); -int nSelect = @toint(@arg("nselect","12")); -string landType = @arg("landtype","urban"); -string runID = @arg("runid","modis-run"); -string MODISdir= @arg("modisdir","/home/wilde/bigdata/data/modis/2002"); -string webDir = @arg("webdir","/home/wilde/public_html/geo/"); - -string suffix=".tif"; - -# Input Dataset - -imagefile geos[] ; # site=site - -# Compute the land use summary of each MODIS tile - -landuse land[] ; - -foreach g,i in geos { - land[i] = getLandUse(g,1); -} - -# Find the top N tiles (by total area of selected landuse types) - -file topSelected<"topselected.txt">; -file selectedTiles<"selectedtiles.txt">; -(topSelected, selectedTiles) = analyzeLandUse(land, landType, nSelect); - -# Mark the top N tiles on a sinusoidal gridded map - -imagefile gridMap<"markedGrid.gif">; -gridMap = markMap(topSelected); - -# Create multi-color images for all tiles - -imagefile colorImage[] ; - -foreach g, i in geos { - colorImage[i] = colorMODIS(g); -} - -# Assemble a montage of the top selected areas - -imagefile montage ; # @arg -montage = assemble(selectedTiles,colorImage,webDir); - -# future args: - -int selectHiThreshold; -int selectLowThreshold; -string upperLeftTile; -string lowerRightTile; -float imageSizes[]; -string displayOptions; - Deleted: SwiftApps/modis/selectedtiles.txt =================================================================== --- SwiftApps/modis/selectedtiles.txt 2012-01-06 21:39:41 UTC (rev 5488) +++ SwiftApps/modis/selectedtiles.txt 2012-01-07 07:48:36 UTC (rev 5489) @@ -1,10 +0,0 @@ -/home/wilde/bigdata/data/modis/2002//h30v07.tif -/home/wilde/bigdata/data/modis/2002//h08v04.tif -/home/wilde/bigdata/data/modis/2002//h20v12.tif -/home/wilde/bigdata/data/modis/2002//h19v12.tif -/home/wilde/bigdata/data/modis/2002//h13v13.tif -/home/wilde/bigdata/data/modis/2002//h21v10.tif -/home/wilde/bigdata/data/modis/2002//h10v10.tif -/home/wilde/bigdata/data/modis/2002//h08v06.tif -/home/wilde/bigdata/data/modis/2002//h10v08.tif -/home/wilde/bigdata/data/modis/2002//h24v05.tif Added: SwiftApps/modis/sites.pads.xml =================================================================== --- SwiftApps/modis/sites.pads.xml (rev 0) +++ SwiftApps/modis/sites.pads.xml 2012-01-07 07:48:36 UTC (rev 5489) @@ -0,0 +1,16 @@ + + + + + /autonfs/gpfs-pads/projects/CI-CCR000013/davidk/swiftwork + 3600 + 1 + 64 + 1 + 1 + fast + .6399 + 10000 + KEEP + + Deleted: SwiftApps/modis/tc =================================================================== --- SwiftApps/modis/tc 2012-01-06 21:39:41 UTC (rev 5488) +++ SwiftApps/modis/tc 2012-01-07 07:48:36 UTC (rev 5489) @@ -1,34 +0,0 @@ -#This is the transformation catalog. -# -#It comes pre-configured with a number of simple transformations with -#paths that are likely to work on a linux box. However, on some systems, -#the paths to these executables will be different (for example, sometimes -#some of these programs are found in /usr/bin rather than in /bin) -# -#NOTE WELL: fields in this file must be separated by tabs, not spaces; and -#there must be no trailing whitespace at the end of each line. -# -# site transformation path obsolete fields for compatibility - -localhost echo /bin/echo null null null -localhost cat /bin/cat null null null -localhost ls /bin/ls null null null -localhost grep /bin/grep null null null -localhost sort /bin/sort null null null -localhost paste /bin/paste null null null -localhost pwd /bin/pwd null null null - -# For cluster usage - -pbs convert /usr/bin/convert null null null -pbs getlanduse /home/wilde/swift/demo/modis/bin/getlanduse.sh null null null -pbs analyzelanduse /home/wilde/swift/demo/modis/bin/analyzelandusep1.sh null null null -pbs colormodis /home/wilde/swift/demo/modis/bin/colormodis.sh null null null -pbs assemble /home/wilde/swift/demo/modis/bin/assemble.sh null null null - -# For localhost testing - -#localhost convert /usr/bin/convert null null null -#localhost getlanduse /home/wilde/bigdata/bin/getlanduse.sh null null null -#localhost analyzelanduse /home/wilde/bigdata/bin/analyzelanduse.sh null null null -#localhost colormodis /home/wilde/bigdata/bin/colormodis.sh null null null Added: SwiftApps/modis/tc.pads =================================================================== --- SwiftApps/modis/tc.pads (rev 0) +++ SwiftApps/modis/tc.pads 2012-01-07 07:48:36 UTC (rev 5489) @@ -0,0 +1,26 @@ +#This is the transformation catalog. +# +#It comes pre-configured with a number of simple transformations with +#paths that are likely to work on a linux box. However, on some systems, +#the paths to these executables will be different (for example, sometimes +#some of these programs are found in /usr/bin rather than in /bin) +# +#NOTE WELL: fields in this file must be separated by tabs, not spaces; and +#there must be no trailing whitespace at the end of each line. +# +# site transformation path obsolete fields for compatibility + +localhost echo /bin/echo null null null +localhost cat /bin/cat null null null +localhost ls /bin/ls null null null +localhost grep /bin/grep null null null +localhost sort /bin/sort null null null +localhost paste /bin/paste null null null +localhost pwd /bin/pwd null null null + +# For cluster usage +pads getlanduse /autonfs/gpfs-pads/projects/CI-CCR000013/davidk/modis/bin/getlanduse.sh null null null +pads analyzelanduse /autonfs/gpfs-pads/projects/CI-CCR000013/davidk/modis/bin/analyzelanduse2.sh null null null +pads colormodis /autonfs/gpfs-pads/projects/CI-CCR000013/davidk/modis/bin/colormodis.sh null null null +pads assemble /autonfs/gpfs-pads/projects/CI-CCR000013/davidk/modis/bin/assemble2.sh null null null +pads markmap /autonfs/gpfs-pads/projects/CI-CCR000013/davidk/modis/bin/markmap.sh null null null From davidk at ci.uchicago.edu Mon Jan 9 09:58:22 2012 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Mon, 9 Jan 2012 09:58:22 -0600 (CST) Subject: [Swift-commit] r5490 - SwiftApps/modis Message-ID: <20120109155822.A76339CD18@svn.ci.uchicago.edu> Author: davidk Date: 2012-01-09 09:58:22 -0600 (Mon, 09 Jan 2012) New Revision: 5490 Added: SwiftApps/modis/demo.pads-pbs SwiftApps/modis/sites.pads-pbs.xml Removed: SwiftApps/modis/topselected.txt Log: Config files for PADS with plain pbs provider Added: SwiftApps/modis/demo.pads-pbs =================================================================== --- SwiftApps/modis/demo.pads-pbs (rev 0) +++ SwiftApps/modis/demo.pads-pbs 2012-01-09 15:58:22 UTC (rev 5490) @@ -0,0 +1,15 @@ +# demo4 forest 50 5 pbs + +landtype=${1:-urban} +nfiles=${2:-999} +nselect=${3:-10} +site=${4:-local} + +runid=modis-$(date +%Y.%m%d.%H%M)-$landtype-$nfiles-$nselect + +echo runid=$runid + +swift -tc.file tc.pads \ + -sites.file sites.pads-pbs.xml \ + modis.swift -config cf.pads -landtype=$landtype -nfiles=$nfiles -nselect=$nselect -runid=$runid \ + -modisdir=$PWD/data/modis/2002 -webdir=$HOME/public_html/geo Property changes on: SwiftApps/modis/demo.pads-pbs ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/modis/sites.pads-pbs.xml =================================================================== --- SwiftApps/modis/sites.pads-pbs.xml (rev 0) +++ SwiftApps/modis/sites.pads-pbs.xml 2012-01-09 15:58:22 UTC (rev 5490) @@ -0,0 +1,16 @@ + + + + + /autonfs/gpfs-pads/projects/CI-CCR000013/davidk/swiftwork + 3600 + 1 + 64 + 1 + 1 + fast + .6399 + 10000 + KEEP + + Deleted: SwiftApps/modis/topselected.txt =================================================================== --- SwiftApps/modis/topselected.txt 2012-01-07 07:48:36 UTC (rev 5489) +++ SwiftApps/modis/topselected.txt 2012-01-09 15:58:22 UTC (rev 5490) @@ -1,10 +0,0 @@ -modis-2011.1201.1740-urban-30-10/h30v07.landuse.byfreq 1864 -modis-2011.1201.1740-urban-30-10/h08v04.landuse.byfreq 2541 -modis-2011.1201.1740-urban-30-10/h20v12.landuse.byfreq 3308 -modis-2011.1201.1740-urban-30-10/h19v12.landuse.byfreq 4283 -modis-2011.1201.1740-urban-30-10/h13v13.landuse.byfreq 5022 -modis-2011.1201.1740-urban-30-10/h21v10.landuse.byfreq 5370 -modis-2011.1201.1740-urban-30-10/h10v10.landuse.byfreq 8663 -modis-2011.1201.1740-urban-30-10/h08v06.landuse.byfreq 14824 -modis-2011.1201.1740-urban-30-10/h10v08.landuse.byfreq 19487 -modis-2011.1201.1740-urban-30-10/h24v05.landuse.byfreq 25405 From tga at ci.uchicago.edu Mon Jan 9 11:06:36 2012 From: tga at ci.uchicago.edu (tga at ci.uchicago.edu) Date: Mon, 9 Jan 2012 11:06:36 -0600 (CST) Subject: [Swift-commit] r5491 - SwiftApps/SwiftR Message-ID: <20120109170636.9AD4A9CD18@svn.ci.uchicago.edu> Author: tga Date: 2012-01-09 11:06:36 -0600 (Mon, 09 Jan 2012) New Revision: 5491 Modified: SwiftApps/SwiftR/checkout-swift.sh Log: remove trace from install shell script Modified: SwiftApps/SwiftR/checkout-swift.sh =================================================================== --- SwiftApps/SwiftR/checkout-swift.sh 2012-01-09 15:58:22 UTC (rev 5490) +++ SwiftApps/SwiftR/checkout-swift.sh 2012-01-09 17:06:36 UTC (rev 5491) @@ -1,6 +1,5 @@ #!/bin/sh set -e -set -x COG_SRC=$1 SWIFT_PATCH=$2 SWIFT_TAG=$3 From tga at ci.uchicago.edu Mon Jan 9 11:06:38 2012 From: tga at ci.uchicago.edu (tga at ci.uchicago.edu) Date: Mon, 9 Jan 2012 11:06:38 -0600 (CST) Subject: [Swift-commit] r5492 - SwiftApps/SwiftR/Swift/src Message-ID: <20120109170638.1DD9E9CD18@svn.ci.uchicago.edu> Author: tga Date: 2012-01-09 11:06:38 -0600 (Mon, 09 Jan 2012) New Revision: 5492 Modified: SwiftApps/SwiftR/Swift/src/make.include Log: Switch to using 0.93 swift release Modified: SwiftApps/SwiftR/Swift/src/make.include =================================================================== --- SwiftApps/SwiftR/Swift/src/make.include 2012-01-09 17:06:36 UTC (rev 5491) +++ SwiftApps/SwiftR/Swift/src/make.include 2012-01-09 17:06:38 UTC (rev 5492) @@ -1,13 +1,18 @@ # Variables shared between makefiles # Use 0.92.1 release -SWIFT_SRC_TAG = release-0.92.1 -COG_SRC_TAG = swift_0.92.1 -SWIFT_SRC_NAME = swift-0.92.1-SwiftR-r2 +#SWIFT_SRC_TAG = tags/release-0.92.1 +#COG_SRC_TAG = tags/swift_0.92.1 +#SWIFT_SRC_NAME = swift-0.92.1-SwiftR-r2 -# Use 0.93 release candidate branch +# Use 0.93 release candidate #SWIFT_SRC_TAG = branches/release-0.93 #COG_SRC_TAG = branches/4.1.9/src/cog #SWIFT_SRC_NAME = swift-0.93-SwiftR-r1 +# Use 0.93 release +SWIFT_SRC_TAG = tags/release-0.93 +COG_SRC_TAG = tags/swift-0.93/src/cog +SWIFT_SRC_NAME = swift-0.93-SwiftR-r2 + SWIFT_SRC_PATCH = swift-0.92.1-changes.patch From davidk at ci.uchicago.edu Mon Jan 9 11:44:44 2012 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Mon, 9 Jan 2012 11:44:44 -0600 (CST) Subject: [Swift-commit] r5493 - SwiftApps/modis Message-ID: <20120109174444.474D59CD18@svn.ci.uchicago.edu> Author: davidk Date: 2012-01-09 11:44:44 -0600 (Mon, 09 Jan 2012) New Revision: 5493 Added: SwiftApps/modis/README Log: Add readme file for some instructions on how to run Added: SwiftApps/modis/README =================================================================== --- SwiftApps/modis/README (rev 0) +++ SwiftApps/modis/README 2012-01-09 17:44:44 UTC (rev 5493) @@ -0,0 +1,51 @@ +demo.local +---------- +This script will run the modis demo using only the processors available on the +local machine. Modify tc.local to reflect the path to the modis applications. +Run the demo by running: + +./demo.local + +This will use all 317 input files. To limit the number of task that will be +created, run: + +./demo.local urban + + +demo.pads +--------- +This script will run the demo on PADS using coasters. This should be run +from a PADS login node (login.pads.ci.uchicago.edu) + +Edit the 'swift' application and modify the line +that says: HEAPMAX=256M. Change it to HEAPMAX=1024M. + +Edit tc.pads to reflect the path to the modis applications. + +Make sure that your default PADS project is defined. You can check this +by running the 'projects' command. + +Run the demo with the command: + +nice ./demo.pads + +This will use all 317 input files. to limit the number of tasks that will be +created, run: + +nice ./demo.local urban + + +demo.pads-pbs +------------- +The instructions for running this are the same as for demo.pads. The only +difference between the two is that demo.pads uses coasters while +demo.pads-pbs uses the plain PBS provider. + +nice ./demo.pads-pbs + + +Output +------ +When the script is completed, you should see several output files created in +the landuse directory. Another graphic will be created in the directory +$HOME/public_html/geo. From lgadelha at ci.uchicago.edu Mon Jan 9 12:29:07 2012 From: lgadelha at ci.uchicago.edu (lgadelha at ci.uchicago.edu) Date: Mon, 9 Jan 2012 12:29:07 -0600 (CST) Subject: [Swift-commit] r5494 - provenancedb Message-ID: <20120109182907.870F29CD18@svn.ci.uchicago.edu> Author: lgadelha Date: 2012-01-09 12:29:07 -0600 (Mon, 09 Jan 2012) New Revision: 5494 Modified: provenancedb/prov-init.sql Log: Minor changes Modified: provenancedb/prov-init.sql =================================================================== --- provenancedb/prov-init.sql 2012-01-09 17:44:44 UTC (rev 5493) +++ provenancedb/prov-init.sql 2012-01-09 18:29:07 UTC (rev 5494) @@ -195,6 +195,15 @@ q varchar(2048) ); +create view function as select * from proc natural join app_inv; + +create view dataset as + select file.id, 'mapped' as type, file.name as filename, null as value + from file + union + select in_mem.id, 'primitive' as type, null as filename, in_mem.value + from in_mem; + drop view pgraph_edge; create view pgraph_edge as select proc_id as parent,ds_id as child from ds_out From tga at ci.uchicago.edu Mon Jan 9 22:05:20 2012 From: tga at ci.uchicago.edu (tga at ci.uchicago.edu) Date: Mon, 9 Jan 2012 22:05:20 -0600 (CST) Subject: [Swift-commit] r5495 - SwiftApps/SwiftR/Swift/exec Message-ID: <20120110040521.01C349CD18@svn.ci.uchicago.edu> Author: tga Date: 2012-01-09 22:05:20 -0600 (Mon, 09 Jan 2012) New Revision: 5495 Modified: SwiftApps/SwiftR/Swift/exec/EvalRBatchPersistent.sh Log: Retain user umask Modified: SwiftApps/SwiftR/Swift/exec/EvalRBatchPersistent.sh =================================================================== --- SwiftApps/SwiftR/Swift/exec/EvalRBatchPersistent.sh 2012-01-09 18:29:07 UTC (rev 5494) +++ SwiftApps/SwiftR/Swift/exec/EvalRBatchPersistent.sh 2012-01-10 04:05:20 UTC (rev 5495) @@ -7,7 +7,9 @@ # Set restrictive umask for duration of script # This value prevents any other users from reading # or writing -umask "077" +DEFAULT_UMASK=077 +USER_UMASK=$(umask) +umask $DEFAULT_UMASK #if [ $# != 4 ]; then if [ $# -lt 4 ]; then @@ -90,10 +92,13 @@ echo R_LIBS_USER= $R_LIBS_USER slotdir=$1 + # Use R instead of Rscript due to Rscript issues on some # platforms (e.g. cray xt) + umask $USER_UMASK R --slave --no-restore --file=$RServerScript \ --args $slotdir >> $slotdir/R.log 2>&1 & # launch R server + umask $DEFAULT_UMASK RPID=$! echo $RPID > $SLOTDIR/R.pid echo "$0: INFO: Launched $RServerScript $slotdir Rscript" From davidk at ci.uchicago.edu Tue Jan 10 11:01:34 2012 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Tue, 10 Jan 2012 11:01:34 -0600 (CST) Subject: [Swift-commit] r5496 - in trunk/tests/sites: . ibicluster Message-ID: <20120110170134.81DE69CC42@svn.ci.uchicago.edu> Author: davidk Date: 2012-01-10 11:01:34 -0600 (Tue, 10 Jan 2012) New Revision: 5496 Added: trunk/tests/sites/ibicluster/ trunk/tests/sites/ibicluster/catsn.0001.out.expected trunk/tests/sites/ibicluster/catsn.0002.out.expected trunk/tests/sites/ibicluster/catsn.0003.out.expected trunk/tests/sites/ibicluster/catsn.0004.out.expected trunk/tests/sites/ibicluster/catsn.0005.out.expected trunk/tests/sites/ibicluster/catsn.0006.out.expected trunk/tests/sites/ibicluster/catsn.0007.out.expected trunk/tests/sites/ibicluster/catsn.0008.out.expected trunk/tests/sites/ibicluster/catsn.0009.out.expected trunk/tests/sites/ibicluster/catsn.0010.out.expected trunk/tests/sites/ibicluster/catsn.check.sh trunk/tests/sites/ibicluster/catsn.setup.sh trunk/tests/sites/ibicluster/catsn.swift trunk/tests/sites/ibicluster/catsn.timeout trunk/tests/sites/ibicluster/data.txt trunk/tests/sites/ibicluster/sites.template.xml trunk/tests/sites/ibicluster/tc.template.data trunk/tests/sites/ibicluster/title.txt Log: Add site test for ibicluster Added: trunk/tests/sites/ibicluster/catsn.0001.out.expected =================================================================== --- trunk/tests/sites/ibicluster/catsn.0001.out.expected (rev 0) +++ trunk/tests/sites/ibicluster/catsn.0001.out.expected 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1 @@ +blah blah Added: trunk/tests/sites/ibicluster/catsn.0002.out.expected =================================================================== --- trunk/tests/sites/ibicluster/catsn.0002.out.expected (rev 0) +++ trunk/tests/sites/ibicluster/catsn.0002.out.expected 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1 @@ +blah blah Added: trunk/tests/sites/ibicluster/catsn.0003.out.expected =================================================================== --- trunk/tests/sites/ibicluster/catsn.0003.out.expected (rev 0) +++ trunk/tests/sites/ibicluster/catsn.0003.out.expected 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1 @@ +blah blah Added: trunk/tests/sites/ibicluster/catsn.0004.out.expected =================================================================== --- trunk/tests/sites/ibicluster/catsn.0004.out.expected (rev 0) +++ trunk/tests/sites/ibicluster/catsn.0004.out.expected 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1 @@ +blah blah Added: trunk/tests/sites/ibicluster/catsn.0005.out.expected =================================================================== --- trunk/tests/sites/ibicluster/catsn.0005.out.expected (rev 0) +++ trunk/tests/sites/ibicluster/catsn.0005.out.expected 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1 @@ +blah blah Added: trunk/tests/sites/ibicluster/catsn.0006.out.expected =================================================================== --- trunk/tests/sites/ibicluster/catsn.0006.out.expected (rev 0) +++ trunk/tests/sites/ibicluster/catsn.0006.out.expected 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1 @@ +blah blah Added: trunk/tests/sites/ibicluster/catsn.0007.out.expected =================================================================== --- trunk/tests/sites/ibicluster/catsn.0007.out.expected (rev 0) +++ trunk/tests/sites/ibicluster/catsn.0007.out.expected 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1 @@ +blah blah Added: trunk/tests/sites/ibicluster/catsn.0008.out.expected =================================================================== --- trunk/tests/sites/ibicluster/catsn.0008.out.expected (rev 0) +++ trunk/tests/sites/ibicluster/catsn.0008.out.expected 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1 @@ +blah blah Added: trunk/tests/sites/ibicluster/catsn.0009.out.expected =================================================================== --- trunk/tests/sites/ibicluster/catsn.0009.out.expected (rev 0) +++ trunk/tests/sites/ibicluster/catsn.0009.out.expected 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1 @@ +blah blah Added: trunk/tests/sites/ibicluster/catsn.0010.out.expected =================================================================== --- trunk/tests/sites/ibicluster/catsn.0010.out.expected (rev 0) +++ trunk/tests/sites/ibicluster/catsn.0010.out.expected 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1 @@ +blah blah Added: trunk/tests/sites/ibicluster/catsn.check.sh =================================================================== --- trunk/tests/sites/ibicluster/catsn.check.sh (rev 0) +++ trunk/tests/sites/ibicluster/catsn.check.sh 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1,12 @@ +#!/bin/bash + +set -x + +for count in `seq --format "%04.f" 1 1 10` +do + [ -f catsn.$count.out ] || exit 1 + CONTENTS1=$( cat catsn.$count.out.expected ) + CONTENTS2=$( cat catsn.$count.out ) + [[ $CONTENTS1 == $CONTENTS2 ]] || exit 1 +done +exit 0 Property changes on: trunk/tests/sites/ibicluster/catsn.check.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/sites/ibicluster/catsn.setup.sh =================================================================== --- trunk/tests/sites/ibicluster/catsn.setup.sh (rev 0) +++ trunk/tests/sites/ibicluster/catsn.setup.sh 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1,7 @@ +#!/bin/bash + +cp -v $GROUP/data.txt . || exit 1 +cp -v $GROUP/*expected . || exit 1 + +export QUEUE=normal + Property changes on: trunk/tests/sites/ibicluster/catsn.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: trunk/tests/sites/ibicluster/catsn.swift =================================================================== --- trunk/tests/sites/ibicluster/catsn.swift (rev 0) +++ trunk/tests/sites/ibicluster/catsn.swift 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1,12 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +file out[]; +foreach j in [1:@toint(@arg("n","10"))] { + file data<"data.txt">; + out[j] = cat(data); +} Added: trunk/tests/sites/ibicluster/catsn.timeout =================================================================== --- trunk/tests/sites/ibicluster/catsn.timeout (rev 0) +++ trunk/tests/sites/ibicluster/catsn.timeout 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1 @@ +1800 Added: trunk/tests/sites/ibicluster/data.txt =================================================================== --- trunk/tests/sites/ibicluster/data.txt (rev 0) +++ trunk/tests/sites/ibicluster/data.txt 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1 @@ +blah blah Added: trunk/tests/sites/ibicluster/sites.template.xml =================================================================== --- trunk/tests/sites/ibicluster/sites.template.xml (rev 0) +++ trunk/tests/sites/ibicluster/sites.template.xml 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1,14 @@ + + + + threaded + all.q + 8 + 1 + 2 + 0.159 + 10000 + + _WORK_ + + Added: trunk/tests/sites/ibicluster/tc.template.data =================================================================== --- trunk/tests/sites/ibicluster/tc.template.data (rev 0) +++ trunk/tests/sites/ibicluster/tc.template.data 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1,8 @@ +ibicluster echo /bin/echo INSTALLED INTEL32::LINUX +ibicluster cat /bin/cat INSTALLED INTEL32::LINUX +ibicluster ls /bin/ls INSTALLED INTEL32::LINUX +ibicluster grep /bin/grep INSTALLED INTEL32::LINUX +ibicluster sort /bin/sort INSTALLED INTEL32::LINUX +ibicluster paste /bin/paste INSTALLED INTEL32::LINUX +ibicluster wc /usr/bin/wc INSTALLED INTEL32::LINUX + Added: trunk/tests/sites/ibicluster/title.txt =================================================================== --- trunk/tests/sites/ibicluster/title.txt (rev 0) +++ trunk/tests/sites/ibicluster/title.txt 2012-01-10 17:01:34 UTC (rev 5496) @@ -0,0 +1 @@ +IBICluster SGE Test From tga at ci.uchicago.edu Tue Jan 10 14:21:46 2012 From: tga at ci.uchicago.edu (tga at ci.uchicago.edu) Date: Tue, 10 Jan 2012 14:21:46 -0600 (CST) Subject: [Swift-commit] r5498 - SwiftApps/SwiftR/Swift/exec Message-ID: <20120110202146.05E989CCBF@svn.ci.uchicago.edu> Author: tga Date: 2012-01-10 14:21:45 -0600 (Tue, 10 Jan 2012) New Revision: 5498 Modified: SwiftApps/SwiftR/Swift/exec/EvalRBatchPersistent.sh Log: Make log message a bit more readable Modified: SwiftApps/SwiftR/Swift/exec/EvalRBatchPersistent.sh =================================================================== --- SwiftApps/SwiftR/Swift/exec/EvalRBatchPersistent.sh 2012-01-10 18:43:45 UTC (rev 5497) +++ SwiftApps/SwiftR/Swift/exec/EvalRBatchPersistent.sh 2012-01-10 20:21:45 UTC (rev 5498) @@ -210,8 +210,9 @@ function timeout_handler { echo "Timed out after ${TIMEOUT}s waiting to contact R process" echo 'R log follows:' - echo '=====================' + echo '>>>>>R.log>>>>>' cat $SLOTDIR/R.log + echo '<<<< Author: lgadelha Date: 2012-01-17 10:53:00 -0600 (Tue, 17 Jan 2012) New Revision: 5499 Modified: provenancedb/prov-init.sql Log: New views for schema summarization Modified: provenancedb/prov-init.sql =================================================================== --- provenancedb/prov-init.sql 2012-01-10 20:21:45 UTC (rev 5498) +++ provenancedb/prov-init.sql 2012-01-17 16:53:00 UTC (rev 5499) @@ -195,15 +195,7 @@ q varchar(2048) ); -create view function as select * from proc natural join app_inv; -create view dataset as - select file.id, 'mapped' as type, file.name as filename, null as value - from file - union - select in_mem.id, 'primitive' as type, null as filename, in_mem.value - from in_mem; - drop view pgraph_edge; create view pgraph_edge as select proc_id as parent,ds_id as child from ds_out @@ -214,28 +206,81 @@ -- continue renaming from here -CREATE VIEW run_date AS - SELECT id, log_filename, swift_version, cog_version, final_state, - to_timestamp(start_time) as start_time, duration - FROM run; CREATE VIEW a_t AS SELECT * FROM a_run_t - UNION + UNION ALL SELECT * FROM a_ds_t - UNION + UNION ALL SELECT * FROM a_proc_t; CREATE VIEW a_n AS SELECT * FROM a_run_n - UNION + UNION ALL SELECT * FROM a_ds_n - UNION + UNION ALL SELECT * FROM a_proc_n; +-- views used for queries based on the schema summary + +drop view function_call; + +create view function_call as + select proc.id, proc.type, proc.name, proc.run_id, app_inv.proc_name, to_timestamp(app_inv.start_time), app_inv.duration, app_inv.final_state, app_inv.scratch from proc natural join app_inv; + +drop view variable; + +create view variable as + select file.id, 'mapped' as type, file.name as filename, null as value + from file + union all + select in_mem.id, 'primitive' as type, null as filename, in_mem.value + from in_mem + union all + select ds_cont.out_id as id, 'composite' as type, null as filename, null as value from ds_cont; + +drop view annotation; + +create view annotation as + select a_t.run_id as id, a_t.name as key, a_t.value as string_value, null as numeric_value + from a_t + union all + select a_n.run_id as id, a_n.name as key, null as string_value, a_n.value as numeric_value + from a_n; + +drop view script_run; + +create view script_run as + select id, log_filename, swift_version, cog_version, final_state, + to_timestamp(start_time) as start_time, duration + from run; + + +drop view application_execution; + +create view application_execution as + select id, app_inv_id as function_call_id, to_timestamp(start_time) as start_time, duration, final_state, site + from app_exec; + + +drop view runtime_info; + +create view runtime_info as + select app_exec_id as application_execution_id, tstamp as timestamp, cpu_usage, max_phys_mem, max_virt_mem, io_read, io_write + from rt_info; + +drop view produces; + +create view produces as + select proc_id as function_call_id, ds_id as variable_id, param as parameter from ds_out; + +drop view consumes; + +create view consumes as + select proc_id as function_call_id, ds_id as variable_id, param as parameter from ds_in; From ketan at ci.uchicago.edu Tue Jan 17 11:17:08 2012 From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu) Date: Tue, 17 Jan 2012 11:17:08 -0600 (CST) Subject: [Swift-commit] r5500 - trunk/docs/siteguide Message-ID: <20120117171708.6E2A09CC94@svn.ci.uchicago.edu> Author: ketan Date: 2012-01-17 11:17:08 -0600 (Tue, 17 Jan 2012) New Revision: 5500 Modified: trunk/docs/siteguide/grid Log: siteguide refinements Modified: trunk/docs/siteguide/grid =================================================================== --- trunk/docs/siteguide/grid 2012-01-17 16:53:00 UTC (rev 5499) +++ trunk/docs/siteguide/grid 2012-01-17 17:17:08 UTC (rev 5500) @@ -33,7 +33,7 @@ ~~~~~~~~~~~~~~~~~ *For OSG*: Obtain a DOEGrids certificate and register the certificate in -the OSG "Engage" VO following the procedures at: +the OSG "Engage" VO following the procedure at: https://twiki.grid.iu.edu/bin/view/Engagement/EngageNewUserGuide @@ -91,14 +91,14 @@ $ voms-proxy-init --voms Engage -hours 48 ---- -To run jobs using the procedures documented here you need to be logged +To run jobs using the procedure described here, you need to be logged in to a "submit host" on which you will run Swift and other -grid-related utilities. This can be any host with the OSG client stack -or equivalent tools installed. Such hosts include the OSG Engage -submit host, and the two Swift lab servers +grid-related utilities. A submit host is any host where the OSG client stack +or equivalent tools are installed. Such hosts include the OSG Engage +submit host (engage-submit3.renci.org), and the two Swift lab servers {bridled,communicado}.ci.uchicago.edu. -Obtain a login on engage-submit.renci.org following instructions on +Obtain a login on engage-submit3.renci.org following instructions on the OSG URL above. Obtain a CI login with access to the Swift lab servers by requesting From ketan at ci.uchicago.edu Tue Jan 17 13:44:37 2012 From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu) Date: Tue, 17 Jan 2012 13:44:37 -0600 (CST) Subject: [Swift-commit] r5501 - trunk/docs/siteguide Message-ID: <20120117194437.11CD39CC94@svn.ci.uchicago.edu> Author: ketan Date: 2012-01-17 13:44:36 -0600 (Tue, 17 Jan 2012) New Revision: 5501 Modified: trunk/docs/siteguide/grid Log: siteguide refinements Modified: trunk/docs/siteguide/grid =================================================================== --- trunk/docs/siteguide/grid 2012-01-17 17:17:08 UTC (rev 5500) +++ trunk/docs/siteguide/grid 2012-01-17 19:44:36 UTC (rev 5501) @@ -138,16 +138,18 @@ Depending on your shell type, run: ----- -source /opt/osg/setup.sh +source /opt/osg-/setup.sh or -source /opt/osg/setup.csh +source /opt/osg-/setup.csh ----- +NOTE: This above step is not required on engage-submit3 host. + Create a VOMS Grid proxy ~~~~~~~~~~~~~~~~~~~~~~~~ ----- -$ voms-proxy-init -voms Engage -valid 12:00 +$ voms-proxy-init -voms Engage -valid 72:00 ----- Generating Configuration Files @@ -204,12 +206,37 @@ $ $ foreachsite -resource fork myinstall.sh $ -$ # Wait a file here, then poll for successfully installed apps... +$ # Wait a while here, then poll for successfully installed apps... $ $ grep SUCCEEDED run.89/*/*.stdout $ ----- +Following is an example of the installation script for DSSAT app on OSG: + +----- +#!/bin/bash + +cd ${OSG_APP}/extenci/swift/ + +#pull +wget http://www.ci.uchicago.edu/~ketan/DSSAT.tgz + +#extract +tar zxf DSSAT.tgz + +# test +cd DSSAT/data + +../DSSAT040.EXE A H1234567.MZX > std.OUT + +if [ $? = 0 ]; then + echo INSTALL SUCCEEDED +else + echo INSTALL FAILED +fi +----- + Starting a single coaster service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From wilde at ci.uchicago.edu Fri Jan 20 15:32:59 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Fri, 20 Jan 2012 15:32:59 -0600 (CST) Subject: [Swift-commit] r5503 - SwiftApps Message-ID: <20120120213259.E42B69CD00@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-20 15:32:59 -0600 (Fri, 20 Jan 2012) New Revision: 5503 Added: SwiftApps/SciColSim/ Log: New dir for scientific collaboration network simulator. From hategan at ci.uchicago.edu Sat Jan 21 21:29:59 2012 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 21 Jan 2012 21:29:59 -0600 (CST) Subject: [Swift-commit] r5506 - branches/release-0.93.1/tests Message-ID: <20120122032959.9F22A9CC94@svn.ci.uchicago.edu> Author: hategan Date: 2012-01-21 21:29:59 -0600 (Sat, 21 Jan 2012) New Revision: 5506 Added: branches/release-0.93.1/tests/providers Log: added providers directory (symlink to sites) Added: branches/release-0.93.1/tests/providers =================================================================== --- branches/release-0.93.1/tests/providers (rev 0) +++ branches/release-0.93.1/tests/providers 2012-01-22 03:29:59 UTC (rev 5506) @@ -0,0 +1 @@ +link sites \ No newline at end of file Property changes on: branches/release-0.93.1/tests/providers ___________________________________________________________________ Added: svn:special + * From wilde at ci.uchicago.edu Sun Jan 22 19:50:27 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Sun, 22 Jan 2012 19:50:27 -0600 (CST) Subject: [Swift-commit] r5507 - SwiftApps/SciColSim Message-ID: <20120123015027.BBFB09CCA8@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-22 19:50:27 -0600 (Sun, 22 Jan 2012) New Revision: 5507 Modified: SwiftApps/SciColSim/annealing.swift SwiftApps/SciColSim/math.swift SwiftApps/SciColSim/tc Log: Initial working version of basic swift annealing loop. Modified: SwiftApps/SciColSim/annealing.swift =================================================================== --- SwiftApps/SciColSim/annealing.swift 2012-01-22 03:29:59 UTC (rev 5506) +++ SwiftApps/SciColSim/annealing.swift 2012-01-23 01:50:27 UTC (rev 5507) @@ -19,6 +19,7 @@ } else { nx = x - (random())*dx/(pow(2.0,31.0)-1.0); } + tracef("newx(%f,%f)=%f\n",x,dx,nx); } app (file outfile, file loss) evolve (string args[], file graph) @@ -40,7 +41,7 @@ multi_annealing() multi_loss() evolve() - sumloass() + sumloss() */ (file bestfile, file maxfile) multi_annealing ( @@ -61,7 +62,8 @@ float x[][], dx[][], curr_loss[], curr_sdev[]; Res mlres[][]; - mlres[0][0] = multi_loss( params0, target_innov, evolve_reruns ); // Only done once, not 5x; serves for all evolve-params ??? + mlres[0][0] = multi_loss( 0, 0, params0, target_innov, evolve_reruns ); // Only done once, not 5x; serves for all evolve-params ??? +tracef("in multi_annealing: i=%i j=%i ret vals from iniital multi_loss=(%f,%f)\n",0,0,mlres[0][0].loss,mlres[0][0].sdev); foreach j in [0:NEVOPARAMS-1] { x[0][j]=params0[j]; @@ -74,9 +76,10 @@ foreach i in [1:annealing_cycles] { // set new temperature, rejection threshold, and dx values for this cycle float temperature = T_start*exp( @tofloat(i)*(jlog(T_end)-jlog(T_start))/@tofloat(annealing_cycles)); - tracef("....T =%f\n", temperature); + tracef("in multi_annealing: i=%i T=%f\n", i, temperature); // On each new "major" cycle within the annealing_cycles (other than the first) set new rejection and dx values if ( i %% cycle == 1 && i > 1 ){ + tracef("multi_annealing: new cycle at i=%i\n",i); foreach k in [0:NEVOPARAMS-1] { float newrejection = rejection[i-1][k] / @tofloat(cycle); if (newrejection > 0.0){ @@ -90,47 +93,61 @@ trace ("Recomputed rejection: i=%d k=%d dx[i][k]=%f\n", i, k, dx[i][k]); } } + else { # If not new cycle, set dx from previous dx (i-1) + foreach k in [0:NEVOPARAMS-1] { + dx[i][k] = dx[i-1][k]; + } + } foreach j in [0:NEVOPARAMS-1] { // Try a new value for each non-fixed param; then write results and accept or reject - float try_x[]; + // float try_x[]; int curr = (i * NEVOPARAMS) + j; int prev = curr-1; - if ( FIX_VARIABLES || var_fixed[j]==0) { - foreach k in [0:NEVOPARAMS] { // Select the evolve params to try +tracef("in multi_annealing: i=%i j=%i curr=%i prev=%i\n", i, j, curr, prev); + if ( /*(!FIX_VARIABLES) || */ (var_fixed[j]==0) ) { # fixed=1,1,0,0,0: FIXME: FIX_VARIABLES flag has faulty logic but OK when TRUE + float try_x[]; + foreach k in [0:NEVOPARAMS-1] { // Select the evolve params to try if ( k < j ) { try_x[k] = x[i][k]; // already set x[i][k] } else { if ( k == j ) { - try_x[k] = newx(x[i][j],dx[i][j]); // permute x[i][j] + try_x[k] = newx(x[i-1][j],dx[i-1][j]); // permute x[i-1][j] } - else { + else { // k > j try_x[k] = x[i-1][k]; // use x[i-1][k] (from prior cycle) } } + tracef("in multi_annealing: i=%i j=%i k=%i try_x=%f\n", i, j, k, try_x[k]); + tracef("in multi_annealing: i=%i j=%i k=%i\n", i, j, k); } - - mlres[i][j] = multi_loss(try_x, target_innov, evolve_reruns); - + // Up to here, x[] and dx[] are only set for previous i +tracef("in multi_annealing: i=%i j=%i calling multi_loss\n",i,j); +#tracef("in multi_annealing: i=%i j=%i calling multi_loss try_x=%q\n",i,j,try_x); + mlres[i][j] = multi_loss(i,j,try_x, target_innov, evolve_reruns); # do the N evolve()'s, N=evolve_reruns +tracef("in multi_annealing: i=%i j=%i ret vals from multi_loss=(%f,%f)\n",i,j,mlres[i][j].loss,mlres[i][j].sdev); + // Beyond this point, x[] and dx[] are being set for this i,j float ratio = min(1.0, exp( -(mlres[i][j].loss-curr_loss[prev]) /temperature)); float r = (random()) / (pow(2.0,31.0)-1.0); // why all the 2^31's ??? float ALOT=100000000000.0; // 100,000,000,000. = 10^11 - if (mlres[i][j].loss < ALOT) { // does this ever occur? if so did we want to still do the ratio computation above??? - trace("filestr.open (best_opt_some.txt, ofstream::app);"); + if (mlres[i][j].loss < ALOT) { + tracef("multi_annealing: Writing: filestr.open (best_opt_some.txt, ofstream::app);\n"); # un[0]->get_target() Res.loss un[0]->get_parameter[0:4] Res.error # filestr.open ("max_dist.txt", ofstream::app); } - else { tracef("Loss %f > ALOT at [i][j] = [%d][%d]\n", mlres[i][j].loss, i ,j); } - if (r > ratio) { // Reject + else { // does this ever occur? if so did we want to still do the ratio computation above??? + tracef("multi_annealing: Loss %f > ALOT at [i][j] = [%d][%d]\n", mlres[i][j].loss, i ,j); + } + if (r > ratio) { // Reject new parameter x[i][j] = x[i-1][j]; - rejection[i][j] = rejection[i][j] + 1.0; // Is this correct? incr rejection? + rejection[i][j] = rejection[i-1][j] + 1.0; // Is this correct? incr rejection? curr_loss[curr] = curr_loss[prev]; curr_sdev[curr] = curr_sdev[prev]; } - else { // Accept -trace("Accepting try_x[j],j=",j); - x[i][j] = try_x[j]; # FIXME: is this right? Just assign the j'th try_x, or the whole try_x param set? -trace("Accepting try_x[j],x[i][j]=",x[i][j]); + else { // Accept new parameter +tracef("multi_annealing: Accepting try_x[j], i=%i j=%i\n",i,j); + x[i][j] = try_x[j]; +tracef("multi_annealing: Accepting try_x[j], i=%i j=%i try_x[j]=%f\n",i,j,try_x[j]); curr_loss[curr] = mlres[i][j].loss; curr_sdev[curr] = mlres[i][j].sdev; } @@ -144,9 +161,16 @@ } } -(Res r) multi_loss( float x[], float target_innov, int evolve_reruns ) +(Res r) multi_loss( int ci, int cj, float x[], float target_innov, int evolve_reruns ) { file rfile[]; + tracef("In multi_loss: entered: ci=%i cj=%i target_innov=%f evolve_reruns=%i x=%q\n",ci, cj, target_innov,evolve_reruns,x); + tracef("In multi_loss: entered: ci=%i cj=%i target_innov=%f evolve_reruns=%i\n",ci, cj, target_innov,evolve_reruns); +/* This hangs: + foreach f,i in x { + tracef("In multi_loss: x[]: ci=%i cj=%i x[%i]=%f\n",ci, cj, i, f); + } +*/ foreach i in [1:evolve_reruns] { // repeats of the evolove() - same as n_reruns file outfile; // FIXME: map and save in future string args[] = [ // FIXME: move this to a setargs() function @@ -155,7 +179,7 @@ // n_epochs n_steps evolve_reruns range // "40000", "20", @strcat(evolve_reruns), "2", - "40000", "20", "1", " 2", # Set reruns to 1 for the cpp code; we do the re-runs in Swift for now. + "40000", "20", "1", "2", # Set reruns to 1 for the cpp code; we do the re-runs in Swift for now. // verbose_level "1", @@ -171,23 +195,26 @@ file graph <"movie_graph.txt">; (outfile, rfile[i]) = evolve(args,graph); + tracef("in multi_loss: after evolve: i=%i %k %k\n", i, outfile, rfile[i]); } file sumfile = sumloss(rfile); r = readData(sumfile); - + tracef("in multi_loss: returning: ci=%i cj=%i r.loss=%f r.sdev=%f\n",ci,cj,r.loss,r.sdev); } optimizer_sweep() // Implements logic of python driver script { int minrange=58; - int maxrange=59; + int maxrange=209; + //int maxrange=59; //int maxrange=1009; //int maxrange=209; int rangeinc=50; // fixme: add provision for random priming and random param values when x[i] == -100 (see optimizer.cpp main()) - int nreps=1; # 15 + //int nreps=1; # 15 + int nreps=3; # 15 // file bestfile ; // file maxfile ; @@ -204,8 +231,8 @@ evolve_reruns = 2, starting_jump = 2.3, params0[] = [0.0, 0.0, 4.0, 50.0, -1.0], - @tofloat(@strcat(target_innov)), // fixme: would @tofloat(int) work? - annealing_cycles = 1); // fixme: clarify: annealing repeats, steps, and cycles + @tofloat(target_innov), + annealing_cycles = 1); */ (outfile,lossfile) = multi_annealing( 2.0, @@ -214,8 +241,8 @@ 2, 2.3, [0.0, 0.0, 4.0, 50.0, -1.0], - @tofloat(@strcat(target_innov)), // fixme: would @tofloat(int) work? - 1); // fixme: clarify: annealing repeats, steps, and cycles + @tofloat(target_innov), + 1); } } } @@ -236,7 +263,7 @@ multi_annealing() multi_loss() evolve() - sumloass() + sumloss() Example parameter sets: Modified: SwiftApps/SciColSim/math.swift =================================================================== --- SwiftApps/SciColSim/math.swift 2012-01-22 03:29:59 UTC (rev 5506) +++ SwiftApps/SciColSim/math.swift 2012-01-23 01:50:27 UTC (rev 5507) @@ -38,7 +38,7 @@ else { result = b; } - tracef("min: result=%f\n",result); + tracef("math/min: result=%f\n",result); } (float result) pow (float x, float y) Modified: SwiftApps/SciColSim/tc =================================================================== --- SwiftApps/SciColSim/tc 2012-01-22 03:29:59 UTC (rev 5506) +++ SwiftApps/SciColSim/tc 2012-01-23 01:50:27 UTC (rev 5507) @@ -1,13 +1,15 @@ localhost sh /bin/sh null null null localhost cat /bin/cat null null null + pbs cat /bin/cat null null null mcs cat /bin/cat null null null localhost catnap /home/wilde/swift/lab/catnap.sh null null GLOBUS::maxwalltime="00:01:00" + beagle optimizer /home/wilde/AndreysOptimizer/Optimizer null null GLOBUS::maxwalltime="01:00:00" beagle optimizersh /home/wilde/AndreysOptimizer/optimizer.sh null null GLOBUS::maxwalltime="02:00:00" beagle evolve /home/wilde/AndreysOptimizer/evolve.sh null null GLOBUS::maxwalltime="02:00:00" -localhost evolve /home/wilde/AndreysOptimizer/evolve.sh null null GLOBUS::maxwalltime="02:00:00" +localhost evolve /home/wilde/AndreysOptimizer/src/evolve.sh null null GLOBUS::maxwalltime="02:00:00" beagle sumloss /home/wilde/AndreysOptimizer/evolve.sh null null GLOBUS::maxwalltime="02:00:00" -localhost sumloss /home/wilde/AndreysOptimizer/sumloss.sh null null GLOBUS::maxwalltime="02:00:00" +localhost sumloss /home/wilde/AndreysOptimizer/src/sumloss.sh null null GLOBUS::maxwalltime="02:00:00" From wilde at ci.uchicago.edu Mon Jan 23 12:18:10 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 23 Jan 2012 12:18:10 -0600 (CST) Subject: [Swift-commit] r5509 - SwiftApps/SciColSim Message-ID: <20120123181810.715819CC94@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-23 12:18:10 -0600 (Mon, 23 Jan 2012) New Revision: 5509 Modified: SwiftApps/SciColSim/annealing.swift Log: Add support for color text in messages. Modified: SwiftApps/SciColSim/annealing.swift =================================================================== --- SwiftApps/SciColSim/annealing.swift 2012-01-23 17:06:58 UTC (rev 5508) +++ SwiftApps/SciColSim/annealing.swift 2012-01-23 18:18:10 UTC (rev 5509) @@ -1,4 +1,5 @@ import "math"; +import "colortext"; type file; @@ -121,7 +122,7 @@ tracef("in multi_annealing: i=%i j=%i k=%i\n", i, j, k); } // Up to here, x[] and dx[] are only set for previous i -tracef("in multi_annealing: i=%i j=%i calling multi_loss\n",i,j); +tracef( @strcat(color(3,"in multi_annealing: "),"i=%i j=%i calling multi_loss\n"),i,j); #tracef("in multi_annealing: i=%i j=%i calling multi_loss try_x=%q\n",i,j,try_x); mlres[i][j] = multi_loss(i,j,try_x, target_innov, evolve_reruns); # do the N evolve()'s, N=evolve_reruns tracef("in multi_annealing: i=%i j=%i ret vals from multi_loss=(%f,%f)\n",i,j,mlres[i][j].loss,mlres[i][j].sdev); From wilde at ci.uchicago.edu Mon Jan 23 12:19:35 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 23 Jan 2012 12:19:35 -0600 (CST) Subject: [Swift-commit] r5510 - SwiftApps/SciColSim Message-ID: <20120123181935.3F8819CC94@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-23 12:19:35 -0600 (Mon, 23 Jan 2012) New Revision: 5510 Added: SwiftApps/SciColSim/EMAIL Modified: SwiftApps/SciColSim/README Log: Add notes from email discussions. Added: SwiftApps/SciColSim/EMAIL =================================================================== --- SwiftApps/SciColSim/EMAIL (rev 0) +++ SwiftApps/SciColSim/EMAIL 2012-01-23 18:19:35 UTC (rev 5510) @@ -0,0 +1,474 @@ +==== Email trail (cronological order): + +--------------------------------------------------------------------------------------- + +On 10/15/11 8:30 PM, "Michael Wilde" wrote: + +> Hi Andrey, +> +> I've got a basic serial version of optimizer.cpp running on Beagle (on a login +> node). Now Im trying to parallelize it there, and have some questions: +> +> 1) You set NWorkers to a constant, 24. In multi_loss, you have this code: +> +> for(int i=0; i for(int j=0; j<5; j++){ +> un[i]->set_parameter(params[j],j); +> } +> for(int i=0; i dispatch_group_async(group, CustomQueues[i], ^{ +> un[i]->evolve_to_target_and_save(istart, iend, Results, +> Counters); +> }); +> istart += step; +> iend = min(istart+step,N); +> } +> } +> +> Can you explain the intention here? I think the innermost loop is clear: run +> evolve() 24 times in parallel, partitioning the istart..iend range among the +> 24 workers. But I dont understand the outermost loop, which seems to do the +> entire inner loop 24 (NWorkers) times. I can understand the idea of doing the +> entire inner loop some number of times. But from the above, I presume that +> evolve would be run NWorkers^2 times, or 24*24 times. Was that the intention? +> +> 2) If you had many processors available (as you do on Beagle) would you want +> to run set NWorkers higher? I think you mentioned something in out discussion +> Friday about "a thousand" workers being useful. Ie, NWorkers for the innermost +> loop could be 1000. Was that really what you meant? What would be a +> mathematically/scientifically useful value for the NWorkers in the innermost +> loop? +> +> Further: if you do want an NWorkers >> 24, would you still do the evolve +> NWorkers^2 times? I dont think you'd really want 1000*1000 = 1M evolve calls, +> given how many outer loops you have at higher levels of the code, including in +> the Python wrapper. +> +> 3) We'll need to discuss what values make sense for the outer loops +> (multi_annealing and the .py wrapper) once I have this working in parallel. +> +> 4) Can you give me a sentence or two about what this code is doing? I think I +> understand the outer annealing logic, but I have not dug into the code within +> evolve...() at all. I think you might have explained it once back in January +> (before you recoded in C) but I dont recall. If you have a paper or a web page +> on what youre computing here, that would be interesting for me to read, and to +> help write a slide on this for the Beagle review. + + +----- + + +Re: Status and questions on optimizer code +From : andrey rzhetsky +Subject : Re: Status and questions on optimizer code +To : Michael Wilde +Sun, Oct 16, 2011 08:28 AM +Hi Mike, + +1. I think, you just uncovered a stupid bug on my part -- thank you! There +should be only one loop (the outer one). +2. Yes, of course -- 1000, or even 10000 (I can increase the number of +repeats then). +3. OK +4. The code simulates exploration of a chemical network by a research +community. The five major parameters determine the strategy of exploration, +"target" is the number of new interactions discovered and the loss is the +number of experiments per one new positive finding. I can provide you with +figures and slides, if that would help. + +Thank you! + +With kind regards, + +Andrey + + +--------------------------------------------------------------------------------------- + + +On 10/16/11 9:13 AM, "Michael Wilde" wrote: + +> Hi Andrey, +> +> Looking deeper, I think the bug was simply that the first for() statement +> should have enclosed just the parameter setting loop. In other words, the top +> of multi_loss should start with: +> +> for(int i=0; i for(int j=0; j<5; j++){ +> un[i]->set_parameter(params[j],j); +> } +> } +> +> Then the real work is done by the next loop: +> for(i=0; i +> Can you confirm that this looks correct to you? +> +> I made that change, and the code now seems to run as I would expect. I will +> send you some output as soon as I clean up my debugging output. +> +> Next, I made the code run with 24-way parallelism on a Beagle login node using +> "OpenMP", simply by adding one "pragma" statement in front of the main worker +> loop above. So that part of the code now looks like this: +> +> int i; +> #pragma omp parallel for private (i) +> for(i=0; i +> and each call to evolve...() is now done in parallel (with all the Mac +> dispatch statements commented out). I will test, but I *think* that the same +> code will run just as well in parallel on your multicore Macs, perhaps just a +> *tiny* bit slower than under Grand Central Dispatch (likely not a noticeable +> difference). +> +> Now, we have 2 choices: +> +> 1) I can simply replace the Python driver script with a Swift script, to do +> many runs of the optimizer in parallel. That would give you the ability to +> run *many* 24-core optimization runs in parallel, each using 24 cores. So for +> example, in your current Python script you do this: +> +> for target in range(58,1009,50): +> for i in range(15): +> +> So thats about 20 x 15 = 300 invocations of optimizer. I *think* that each of +> these runs is totally independent and can run in parallel, correct? +> +> So A simple Swift script not much longer than the Python script, along with a +> few beagle-specific configuration files, will enable all 300 jobs to run in +> parallel, giving you 300 x 24 (=7200) cores running in parallel. Of course, +> you can seldom *get* that many cores because the machine is heavily loaded. +> But you may be able to get 10-30 nodes on a daily basis. We'll need to +> experiment with this. +> +> As a *next* step after, we should consider the benefits of changing the value +> of NWorkers to > 24. 24 is the "easy" limit on Beagle because we can get +> 24-way parallelism on each node with just that one "pragma" statement. We can +> get much greater parallelism with Swift in the inner loop, but for that we +> need to break up the program a bit more, to have Swift run the inner loop as a +> separate program, and then return the aggregated results in a file. Even for +> this option, there are two alternative methods: +> +> - we make optimizer call Swift once for each round of parallel annealing. This +> is fairly easy. It is somewhat limiting to overall parallelism, in that only +> one round at a time can run. But It may be very adequate. +> +> - we break the program up further into parallelizable chunks, in which case +> you have a lot of flexibility and the work always gets done in a near-optimal +> manner regardless of the shape of a given optimization run (in terms of the +> various nested loop sizes and evolve() execution times. +> +> I think we'll need to discuss this in person over a whiteboard, but I think I +> have enough knowledge of the program to at least show you a few alternatives. +> +> The main question at the moment, I think, is simply to understand the +> math/science benefits of extending NWorkers beyond the "low hanging fruit" +> limit of 24. What is your assessment of that benefit, Andrey? +> + +----- + +----- Forwarded Message ----- +From: "andrey rzhetsky" +To: "Michael Wilde" +Sent: Sunday, October 16, 2011 12:08:25 PM +Subject: Re: Status and questions on optimizer code + +Mike, + +It would be fantastic to have 1000 or 10000 workers (with larger number of +re-runs -- it would improve precision of my analysis drastically!). + +All the very best, + +Andrey + +--------------------------------------------------------------------------------------- + +On 10/17/11 8:29 AM, "Michael Wilde" wrote: + +> Hi Andrey, +> +> Can we meet today to discuss the optimizer? I'd like to show you what Ive done +> and discuss with you next steps towards getting you running on Beagle. I can +> meet any time from 10:30 to 3:00. +> +> Do you already have a CI and Beagle login and a project set up for Beagle use? +> If not, we should get that started. +> +> On the technical side, I have a question about the the typical shape of your +> optimization runs. +> +> With the sample Python script you gave me, I think we have the following +> nested iterations in the code: +> +> 20 targets (parallel) +> 15 repeats (parallel) +> 100 Annealing_cycles (serial) +> 6 repeats (serial) +> 1000 to 10000 annealing_repeats (parallel) +> evolve() +> +> The main question I have at this point is regarding the strategy for +> increasing the innermost annealing repeats (currently 1,000 divided among 24 +> workers; desired to increase to 10,000). +> +> The outermost loops in my Swift tests are done in parallel. Thus we can have a +> 300 optimizations going in parallel and 24 annealings in parallel for a total +> of 7,200 parallel tasks. +> +> The question is: if you will always have a sizeable number of parallel +> iterations in the outer loops, we dont need to change anything in the inner +> loop to get more parallelism. In other words, we already have more parallelism +> than we have CPUs available. +> +> 7200 CPUs is about 42% of the overall Beagle system. It will be very rare +> that we we could get that many cores all at once. But think we can regularly +> get say 500 to 2000 cores on a daily basis. +> +> On the other hand, if you expect to regularly run tests of *single* annealing +> cycles and want to speed those up, then indeed it may be worth changing the +> code structure. +> +> When me meet I'll try to give you an idea of whats involved. Basically we need +> to change the structure of the annealing loop to create a function +> "multi_loss_setup" as a separate executable which defines the annealing +> parameters and writes them to a file; make multi_loss a separate executable; +> create another executable "multi_loss_summarize" which reduces the results. +> We can probably combine multi_loss_summarize into multi_loss_setup. +> +> This is not very hard to do, but still sounds to me like a week of programming +> to get all all restructured and tested. Before investing that effort, we +> should discuss if it will give you any additional performance gains over just +> running many optimizations in parallel. +> +> I need to run timings on the annealing cycles to see how that change across +> the parameter space, to see if we can just increase the repeats to 10,000 with +> no changes to the code. I think the feasibility of doing this the "easy way" +> is based on how long the longest annealings take at the high end of the +> parameter space. +> +> Regards, +> +> - Mike + +----- + +----- Forwarded Message ----- +From: "Andrey Rzhetsky" +To: "Michael Wilde" +Sent: Monday, October 17, 2011 8:40:17 AM +Subject: Re: Meet today to discuss optimizer? + +Hi Mike, + +The 6 (or more) annealing repeats can be run in parallel too. + +Unfortunately, around 10:15 I have to rush to Evanston to CBC meeting for +the rest of the day (we can chat before, if you have a minute, I am in my +office). + +I don't have Beagle login, unfortunately. + +Typically, I will have a sizeable outer loop, so, probably, the current +24-worker setup is fine. + +Thank you very much for helping me out! + +All the best, + +Andrey + + +--------------------------------------------------------------------------------------- + +On 10/18/11 1:52 PM, "Michael Wilde" wrote: + +> Hi Andrey, +> +> Here's a quick update: +> +> - I am now running the optimizer on Beagle compute nodes under Swift. +> +> I attach a few tar files of sample runs at reduced parameter values (to shrink +> the run time for debugging and learning the code's behavior); +> +> Now Im trying to run some subset of the full-length parameters you gave me in +> the python file. Ive got 3 Beagle compute nodes allocated at the moment (72 +> cores total) and Im seeing these times from multi_loss with N=1000 repeats: +> +> sandbox$ grep multi_ ./jobs/*/*/output/*.out +> ./jobs/0/optimizer-01p7lhhk/output/T408.R1.out:multi_loss(N=1000) elapsed +> time: 122.742 seconds 2.04571 minutes +> ./jobs/0/optimizer-01p7lhhk/output/T408.R1.out:multi_loss(N=1000) elapsed +> time: 123.979 seconds 2.06631 minutes +> ./jobs/0/optimizer-01p7lhhk/output/T408.R1.out:multi_loss(N=1000) elapsed +> time: 123.624 seconds 2.0604 minutes +> ./jobs/t/optimizer-t0p7lhhk/output/T958.R1.out:multi_loss(N=1000) elapsed +> time: 1431.09 seconds 23.8514 minutes +> ./jobs/x/optimizer-x0p7lhhk/output/T708.R1.out:multi_loss(N=1000) elapsed +> time: 627.074 seconds 10.4512 minutes +> ./jobs/x/optimizer-x0p7lhhk/output/T708.R1.out:multi_loss(N=1000) elapsed +> time: 790.652 seconds 13.1775 minutes +> +> +> Each run of optimizer is going to a file name T(target).R(repeat).out +> +> So we're seeing 23.8 mins for 1000 repeats at target=958 and 10-13 mins at +> target=708. The 1000 repeats are spread over 24 cores each. +> +> Whats your time availability later in the week to discuss this further, and to +> see if either (a) I can show you how to run this version or (b) we can get a +> set of production run descriptions from you and you can run them yourself? +> +> In the compressed tar file at http://www.ci.uchicago.edu/~wilde/AR.snap.01.tgz +> you will find: +> +> - the swift script that I use instead of the Python driver to run the +> optimizer in parallel (along beagle.xml that specifies scheduler parameters +> for Beagle like time, cores, queue name and project ID) +> +> - the slightly modified version of optimizer (changes in multi_loss() to +> correct the loops, changes to use OpenMP instead of Grand Central Dispatch, +> and a few changes in output logging). +> +> - a few run directories of runs with shortened parameter settings. +> +> If we continue working together on this, we should set up a way to share code +> using a repository like Subversion (svn). Thats pretty easy once you master a +> few basic commands. +> +> Regards, +> +> - Mike +> +> + +----- + +----- Forwarded Message ----- +From: "Andrey Rzhetsky" +To: "Michael Wilde" +Sent: Tuesday, October 18, 2011 3:57:36 PM +Subject: Re: Meet today to discuss optimizer? + +Mike, + +Thank you! Are you around now? I would be also happy to carve some time +tomorrow, if this works for you. + +With kind regards, + +Andrey + + +--------------------------------------------------------------------------------------- + + +On 10/19/11 12:10 PM, "Michael Wilde" wrote: + +> Hi Andrey, +> +> Im in meetings today till about 3PM. Are you available at say 3:30 or later? +> +> I did a larger run last night. Only one smaller optimizer run *fully* +> finished, but many others made significant progress. The results are at: +> +> http://www.ci.uchicago.edu/~wilde/AR.optimizer.out.2010.1018.tgz +> +> If you have time, could you take a look at that run and see if the +> optimizations look like they have been running as expected? Ive made only a +> few cosmetic changes to your debug output. +> +> I submitted the run at 21:20; it started running at about 21:27; by about +> 23:10 it had acquired 12 nodes (x 24 cores each). It ended about 23:18 when +> the first job exceeded its time limit of 5 hours. Im still trying to calibrate +> how much time each optimizer invocation needs, and whether some of the +> internal iterations can be further spread out. Also how to organize the run +> so that optimizations that time out can be re-run with the smallest +> reasonable failure unit. +> +> + +--------------------------------------------------------------------------------------- + + +----- Forwarded Message ----- +From: "andrey rzhetsky" +To: "Michael Wilde" +Sent: Wednesday, October 26, 2011 8:40:21 PM +Subject: Re: Question on inner annealing loop + +Mike, + + +> Im confused on 3 points here: +> +> - the inner loop would always be done between 1 and 5 times, right? + +Correct. + +> - could each of those times really be done in parallel? (I'll try to determine +> this by inspection). + +Not really -- the acceptance of parameter changes depends on the loss in +between. + +> - when we last met in your office, I *thought* you indicated that this inner +> loop could be done just *once*. Was that what you meant? And if so, for +> which of the 5 vars? + +Nope, has to be repeated over and over. + +All the very best, + +Andrey + + +--------------------------------------------------------------------------------------- + + +On 10/26/11 10:42 PM, "Michael Wilde" wrote: + +> OK, all that makes sense, Andrey. But then do you recall what you suggested +> when we met? +> +> Lets label the loops as follows: +> +> a) 20 targets (parallel) +> b) 15 repeats (parallel) +> c) 100 Annealing_cycles (serial) +> d) 6 repeats (serial) +> e) 1000 to 10000 annealing_repeats (parallel) +> f) evolve() +> +> What I recalled from our last discussion was that I should reduce loop (c) +> from 100 to 50 or 25, and loop (d) to 1. But since reducing loop (d) doesn't +> make sense, do you recall suggesting any other reduction? +> +> If not, no problem, I think I know how to proceed. +> +> Thanks, +> +> - Mike +> +> +----- + +----- Forwarded Message ----- +From: "andrey rzhetsky" +To: "Michael Wilde" +Sent: Thursday, October 27, 2011 2:54:06 AM +Subject: Re: Question on inner annealing loop + +Hi Mike, + +I suggested reducing (b) to 1. + +With kind regards, + +Andrey + + + Modified: SwiftApps/SciColSim/README =================================================================== --- SwiftApps/SciColSim/README 2012-01-23 18:18:10 UTC (rev 5509) +++ SwiftApps/SciColSim/README 2012-01-23 18:19:35 UTC (rev 5510) @@ -1,13 +1,34 @@ +=== Overview + +The code simulates the exploration of a chemical network by a research +community. The five major parameters determine the strategy of +exploration, "target" is the number of new interactions discovered and +"loss" is the number of experiments per one new positive finding. + === Files +Code: + optirun.swift: replaces top-level py script for the outermost loops +Data: + + === How to build +make + === How to Run +./test0.sh +./testO.sh +./test1.sh + +./*.py + + === C++ app flow logic === for target in range(58, 1009 (used 209), 50): // 20 values @@ -36,7 +57,9 @@ 1 initial multi_loss: 1000 to 10000 annealing_repeats 100 Annealing_cycles (groups of 10? : cycle=10 ) (fast:50) 5 repeats (fast: 1) - multi_loss: 1000 to 10000 annealing_repeats + multi_loss: 1000 to 10000 evolve re-runs evolve() => 2 mins to 10 mins === END + + From wilde at ci.uchicago.edu Mon Jan 23 12:30:50 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 23 Jan 2012 12:30:50 -0600 (CST) Subject: [Swift-commit] r5512 - SwiftApps/SciColSim Message-ID: <20120123183050.4EAD19CC94@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-23 12:30:50 -0600 (Mon, 23 Jan 2012) New Revision: 5512 Added: SwiftApps/SciColSim/optimizer.cpp Log: Original version from Andrey: base for re-applying necessary revisions from prototype to create new production code. Added: SwiftApps/SciColSim/optimizer.cpp =================================================================== --- SwiftApps/SciColSim/optimizer.cpp (rev 0) +++ SwiftApps/SciColSim/optimizer.cpp 2012-01-23 18:30:50 UTC (rev 5512) @@ -0,0 +1,1674 @@ +// +// main.cpp +// optimizer +// +// Created by Andrey Rzhetsky on 4/11/11. +// Copyright 2011 University of Chicago. All rights reserved. +// + +#define Nworkers 24 + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define INT_INFINITY 2147483647 + +#define FIX_VARIABLES 1 + +using namespace boost; +using namespace std; +using namespace boost::numeric::ublas; + +static int max_dist=0; + +typedef boost::adjacency_matrix Graph; +typedef std::pair Edge; +typedef boost::graph_traits GraphTraits; +typedef boost::numeric::ublas::triangular_matrix prob; +typedef boost::numeric::ublas::triangular_matrix pathlength; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + +namespace std { + using ::time; +} + +static int var_fixed[5] = {1, 0, 1, 1, 0}; + +typedef boost::minstd_rand base_generator_type; +typedef adjacency_list < listS, vecS, directedS, +no_property, property < edge_weight_t, int > > graph_t; +typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; +typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; + + +//================================================ +string strDouble(double number) +{ + stringstream ss;//create a stringstream + ss << number;//add number to the stream + return ss.str();//return a string with the contents of the stream +} + +//================================================ + +double gaussian(double sigma) +{ + double GaussNum = 0.0; + int NumInSum = 10; + for(int i = 0; i < NumInSum; i++) + { + GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); + } + GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); + + + return GaussNum; + +} + + + +//================================================= +double diffclock(clock_t clock1,clock_t clock2) +{ + double diffticks=clock1-clock2; + double diffms=(diffticks)/CLOCKS_PER_SEC; + return diffms; +} + +//================================================ +//================================================================ +double get_new_x(double x, double dx){ + + double new_x; + // boost::variate_generator > uni(generator, uni_dist); + double r = rand()/(double)(pow(2.,31)-1.); + + if (r > 0.5){ + new_x = x + rand()*dx/(double)(pow(2.,31)-1.); + } else { + new_x = x - rand()*dx/(double)(pow(2.,31)-1.); + } + + return new_x; + +} + + +//=============================================== +string string_wrap(string ins, int mode){ + + std::ostringstream s; + + switch(mode){ + case 0: + s << "\033[1;29m" << ins << "\033[0m"; + break; + case 1: + s << "\033[1;34m" << ins << "\033[0m"; + break; + case 2: + s << "\033[1;44m" << ins << "\033[0m"; + break; + case 3: + s << "\033[1;35m" << ins << "\033[0m"; + break; + case 4: + s << "\033[1;33;44m" << ins << "\033[0m"; + break; + case 5: + s << "\033[1;47;34m" << ins << "\033[0m"; + break; + case 6: + s << "\033[1;1;31m" << ins << "\033[0m"; + break; + case 7: + s << "\033[1;1;33m" << ins << "\033[0m"; + break; + case 8: + s << "\033[1;1;43;34m" << ins << "\033[0m"; + break; + case 9: + s << "\033[1;1;37m" << ins << "\033[0m"; + break; + case 10: + s << "\033[1;30;47m" << ins << "\033[0m"; + break; + default: + s << ins; + } + + return s.str(); +} + + +//=============================================== +string wrap_double(double val, int mode){ + + std::ostringstream s; + s << string_wrap(strDouble(val),mode); + + return s.str(); +} + + + +//=============================================== +const +string i2string(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + return s.str(); + +} + +//=============================================== +char* i2char(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + char* a=new char[s.str().size()+1]; + memcpy(a,s.str().c_str(), s.str().size()); + + return a; +} + +//================================================ +class Universe { + +private: + + double alpha_i; + double alpha_m; + double beta; + double gamma; + double delta; + + double TargetNovelty; + double CumulativeRelativeLoss; + double CRLsquare; + string id; + + + int N_nodes; + int M_edges; + + int N_epochs; + int N_steps; + int N_repeats; + + int current_epoch; + double current_loss; + int current_repeat; + double current_novelty; + + int mode_identify_failed; + int verbose_level; // 0 is silent, higher is more + + double k_max; + + graph_t Full_g; + + double **Prob; + double **Tried; + double **Dist; + double **Final; + double **EdgeIndex; + double *Rank; + + base_generator_type generator; + boost::uniform_real<> uni_dist; + boost::geometric_distribution geo; + +public: + + + + //====== Constructor ====== + Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) + { + //typedef array_type2::index index2; + + + std::ifstream inFile; + //string line; + + //------------------------------- + + base_generator_type gene(42u); + generator = gene; + generator.seed(static_cast(std::time(0))); + boost::uniform_real<> uni_d(0,1); + uni_dist = uni_d; + + //-------------------------------- + + int i, k; + int x, y; + Edge* edge_array_mine; + int num_arcs_mine, num_nodes_mine; + int* weights_mine; + + TargetNovelty = target; + CumulativeRelativeLoss = 0.; + CRLsquare = 0.; + + + N_epochs = Epochs; + N_steps = Steps; + N_repeats = Repeats; + + current_epoch = 0; + current_loss = 0.; + current_repeat = 0; + + id = idd; + + verbose_level = 1; + + mode_identify_failed = identify_failed; + + + //------------------------------- + // The first pass though file with the graph + inFile.open(FileToOpen.c_str()); + if (inFile.fail()) { + cout << "Unable to open file"; + exit(1); // terminate with error + }else { + + if (verbose_level > 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x; + inFile >> y; + + if (verbose_level > 2){ + std::cout << " x: " << x; + std::cout << " y: " << y << std::endl; + } + + if (i==0){ + N_nodes=x; + M_edges=y; + break; + } + i++; + + + } + inFile.close(); + + if (verbose_level == 2){ + std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { + if (i > 0) { + Final[x][y]=1.; + Final[y][x]=1.; + + + if (verbose_level == 2){ + std::cout << "."; + } + } + i++; + + } + if (verbose_level == 2){ + std::cout << std::endl; + } + inFile.close(); + + k=0; + for (int i=0; i 0.){ + EdgeIndex[i][j]=k; + k++; + } + } + } + + + + //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // create graph -- hopefully, we can keep it, just modifying edge weights + + + edge_array_mine = new Edge[2*M_edges]; + num_arcs_mine = 2*M_edges; + num_nodes_mine = N_nodes; + weights_mine = new int[2*M_edges]; + for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} + + k=0; + for(int i=0; i0.){ + edge_array_mine[2*k] =Edge(i,j); + edge_array_mine[2*k+1]=Edge(j,i); + k++; + } + } + } + graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); + + Full_g = g; + delete edge_array_mine; + delete weights_mine; + + //=========================================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + for (int i=0; i 0.){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + + } + + + //===================================================================== + int sample_failed_number(double pfail){ + + //boost::geometric_distribution geo(pfail); + //boost::variate_generator > geom(generator, geo); + + double r, u, g; + + r=0.; + for(int i=0; i=3){ + std::cout << id << " failed " << r << std::endl; + } + return r; + + } + + //============================================= + double get_target(void){ + return TargetNovelty; + } + + //============================================= + void set_target(double target){ + TargetNovelty=target; + } + + //============================================= + int sample(){ + + //boost::variate_generator > uni(generator, uni_dist); + // double r = uni(), Summa = 0.; + + + + double r = rand(), Summa = 0.; + r /= (double)(pow(2.,31)-1.); + int result = 0; + int finished = 0; + + if (verbose_level==4){ + std::cout << id << " sampled " << r << std::endl; + } + + for(int i=0; i r){ + + Tried[i][j]+=1.; + + if (Final[i][j] > 0.){ + result = 1; + } + finished = 1; + } + } + } + + return result; + + } + + //=============================== + void update_current_graph(void){ + + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + //property_map::type weightmap = get(edge_weight, Full_g); + for (int i=0; i 0. && Tried[i][j]>0){ + //s = edge(i, j, Full_g); + boost::graph_traits::edge_descriptor e1,e2; + bool found1, found2; + u = vertex(i, Full_g); + v = vertex(j, Full_g); + tie(e1, found1) = edge(u, v, Full_g); + tie(e2, found2) = edge(v, u, Full_g); + if (!found1 && !found2){ + add_edge(u,v,1,Full_g); + add_edge(v,u,1,Full_g); + } + + } + } + + } + } + + //=============================== + void update_distances(void){ + // put shortest paths to the *Dist[][] + std::vector p(num_vertices(Full_g)); + std::vector d(num_vertices(Full_g)); + vertex_descriptor s; + + + // put shortest paths to the *Dist[][] + for (int j=0; j 0.){ + s = vertex(j, Full_g); + dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); + + //std::cout <<" Vertex "<< j << std::endl; + graph_traits < graph_t >::vertex_iterator vi, vend; + + for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { + + if (p[*vi]!=*vi){ + Dist[*vi][j]=d[*vi]; + Dist[j][*vi]=d[*vi]; + + if (Dist[*vi][j]>max_dist){ + max_dist=Dist[*vi][j]; + } + + + } else { + Dist[*vi][j]=-1.; + Dist[j][*vi]=-1.; + } + } + } + + } + + + } + + //====================================================== + void update_ranks(void){ + + for(int i=0; i0. && Final[i][j] >0.){ + Rank[i]++; + Rank[j]++; + } + } + } + + } + + //==================================================================== + void set_world(double a_i, double a_m, double b, double g, double d){ + + alpha_i=a_i; + alpha_m=a_m; + gamma=g; + beta=b; + delta=d; + + } + + //==================================================================== + void reset_world(){ + + //==================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + + for (int i=0; i 0. && Tried[i][j] > 0){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + //================================================== + + current_loss=0; + current_epoch=0; + current_repeat++; + current_novelty=0; + + for(int i = 0; i < N_nodes; ++i) { + Rank[i]=0.; + for(int j = 0; j < N_nodes; ++j) { + Prob[i][j]=0.; + Dist[i][j]=-1.; + Tried[i][j]=0.; + } + } + } + + + //============================================== + void show_parameters(void){ + + std::cout << "Parameters: " + << alpha_i << " " + << alpha_m << " | " + << beta << " " + << gamma << " | " + << delta << std::endl; + + } + + + + //=============================================== + string file_name(){ + + std::ostringstream s; + s << "world_" + << lexical_cast(alpha_i) << "_" + << lexical_cast(alpha_m) << "_" + << lexical_cast(beta) << "_" + << lexical_cast(gamma) << "_" + << lexical_cast(delta) << "_" + << lexical_cast(N_epochs) << "_" + << lexical_cast(N_steps) << "_" + << lexical_cast(N_repeats) << ".txt"; + + return s.str(); + + } + + + + + //================================================= + void set_verbose(int verbose){ + + verbose_level = verbose; + } + + + //============================================================= + void update_probabilities(void){ + + + //========================= + // Compute sampling probabilities + // first pass: \xi_i,j + for(int i=0; i 0.){ + + double k = Dist[i][j]; + if (k >= k_max){ + k = k_max-1; + } + + bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); + + } else { + bg = delta; + } + + Prob[i][j] = exp(Prob[i][j] + bg); + } + } + + + // second pass: sum + double Summa = 0.; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + + } + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + else { + + double pfail=0.; + int n_failed; + //, n_check = 0; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + } + + current_novelty = novel; + + + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + if (verbose_level == 2){ + std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) + + << " cost=" << cost + << " novel=" << novel + << " rel_loss=" << cost/novel + << std::endl; + } + + current_epoch++; + } + + + //====== Destructor ====== + ~Universe(){ + + delete_2Dmatrix(Final, N_nodes); + delete_2Dmatrix(Dist, N_nodes); + delete_2Dmatrix(Tried, N_nodes); + delete_2Dmatrix(Prob, N_nodes); + delete_2Dmatrix(EdgeIndex, N_nodes); + delete_1Dmatrix(Rank); + } + + //================================================ + // Allocate memory + double** allocate_2Dmatrix(int N, int M) + { + double **pointer; + + if (verbose_level == 2){ + std::cout<< "["< 0){ + + pointer = new double[N]; + + }else { + + pointer = NULL; + } + + return pointer; + + } + + //============================================== + // De-Allocate memory to prevent memory leak + void delete_2Dmatrix(double **pointer, int N){ + + if (pointer != NULL){ + + for (int i = 0; i < N; ++i){ + delete [] pointer[i]; + } + delete [] pointer; + } + } + //==================== + void delete_1Dmatrix(double *pointer){ + + delete [] pointer; + } + + //=========================================== + double get_rel_loss(){ + + return CumulativeRelativeLoss ; + } + + //=========================================== + double get_rel_loss_err(){ + + return CRLsquare ; + } + + + + //================================================================================== + void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ + + double ALOT=100000000000.; + + reset_world(); + + for (int k = istart; k < iend; k++){ + + + for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ + update_world(); + } + + storage[k]=current_loss/current_novelty; + counters[k]=1; + + + reset_world(); + } + + } + //============================================== + int get_reruns(void){ + return N_repeats; + } + + //============================================== + double get_parameter(int i){ + + switch(i){ + case 0: + return alpha_i; + case 1: + return alpha_m; + case 2: + return beta; + case 3: + return gamma; + case 4: + return delta; + default: + + std::cout << "Erroneous parameter id!!!!\n\n\n"; + return 0.; + } + } + + + //============================================== + void evolve_to_target(){ + + reset_world(); + if (beta < -1. || gamma < -1.){ + CumulativeRelativeLoss = 100000000000.; + CRLsquare = 0.; + return; + } + + + for (int k=0; k< N_repeats; k++){ + + + for(int i=0; i 4) {return 0;} + + else { + + switch(position){ + case 0: + alpha_i=value; + return 1; + case 1: + alpha_m=value; + return 1; + case 2: + beta=value; + return 1; + case 3: + gamma=value; + return 1; + case 4: + delta=value; + return 1; + } + + } + + return 0; + } + + + //================================================================= + void try_annealing(double starting_jump, int iterations, + double temp_start, double temp_end, double target_rejection){ + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=alpha_i; + x[1]=alpha_m; + x[2]=beta; + x[3]=gamma; + x[4]=delta; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + + //.......................................... + evolve_to_target(); + std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + //........................................... + + // optimization cycle + for(int i=0; i ratio){ + + std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << alpha_i << " "<< alpha_m << " " + << beta << " " << gamma << " " + << delta << " " << std::endl; + set_parameter(x[j], j); + CumulativeRelativeLoss = 0; + CRLsquare = 0; + + rejection[j]+=1.; + } + + else { + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + x[j] = x_tmp; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) + << " "<< wrap_double(rejection[1], 7) << " " + << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(alpha_i,2) + << " "<< wrap_double(alpha_m, 7) << " " + << wrap_double(beta,5) << " " + << wrap_double(gamma,9) << " " + << wrap_double(delta,6) << " " + << std::endl << std::endl; + + } + //........................................................ + + } + + } + + } + + +}; + +//============================================================ + +std::pair multi_loss(dispatch_group_t group, + Universe* un[], + dispatch_queue_t* CustomQueues, + double* Results, + int* Counters, + double* params){ + + int N = un[0]->get_reruns(); + int step = (int)(double)N/(double)(Nworkers); + int istart=0; + int iend = istart+step; + + double Loss=0., LossSquare=0.; + + for(int i=0; iset_parameter(params[j],j); + } + + + for(int i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); + }); + + istart += step; + iend = min(istart+step,N); + + } + } + dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + //dispatch_release(group); + + for (int i=0; i Res; + Res.first=Loss; + Res.second=two_std; + + return Res; + + +} +//============================================================ + + +//============================================================ +void multi_annealing( dispatch_group_t group, + Universe* un[], + dispatch_queue_t* CustomQueues, + double T_start, double T_end, + double Target_rejection, + int Annealing_repeats, + double starting_jump, + double* Results, + int* Counters, + double* params0, + double annealing_cycles){ + //................................. + // re-implement annealing + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + //boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=params0[0]; + x[1]=params0[1]; + x[2]=params0[2]; + x[3]=params0[3]; + x[4]=params0[4]; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + std::pairRes; + + Res = multi_loss(group, un, CustomQueues, Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + curr_x = Res.first; + curr_err = Res.second; + + // optimization cycle + + for(int i=0; iset_parameter(x_tmp, j); + } + + + Res = multi_loss(group, un, CustomQueues, Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " vs " << ratio << std::endl; + + double ALOT=100000000000.; + + if (Res.first < ALOT) + { + ofstream filestr; + + filestr.open ("best_opt_some.txt", ofstream::app); + + // >> i/o operations here << + filestr << un[0]->get_target() << "," + << Res.first + << "," << un[0]->get_parameter(0) + << "," << un[0]->get_parameter(1) + << "," << un[0]->get_parameter(2) + << "," << un[0]->get_parameter(3) + << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; + + filestr.close(); + + + filestr.open ("max_dist.txt", ofstream::app); + + // >> i/o operations here << + filestr << max_dist << ",\n"; + + filestr.close(); + + } + + + if (r > ratio){ + + std::cout << " "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << un[0]->get_parameter(0) + << " " << un[0]->get_parameter(1) + << " " << un[0]->get_parameter(2) + << " " << un[0]->get_parameter(3) + << " " << un[0]->get_parameter(4) << " " << std::endl; + + x[j]=x_hold; + for(int w=0; wset_parameter(x[j], j); + } + + + //set_parameter(x[j], j); + rejection[j]+=1.; + } + + else { + + curr_x = Res.first; + curr_err = Res.second; + x[j] = x_tmp; + + for(int w=0; wset_parameter(x[j], j); + } + + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) << " " + << wrap_double(rejection[1],7) << " " + << wrap_double(rejection[2],5) << " " + << wrap_double(rejection[3],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << " "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(un[0]->get_parameter(0),2) << " " + << wrap_double(un[0]->get_parameter(1),7) << " " + << wrap_double(un[0]->get_parameter(2),5) << " " + << wrap_double(un[0]->get_parameter(3),9) << " " + << wrap_double(un[0]->get_parameter(4),6) << " " + << std::endl << std::endl; + + + + } + //........................................................ + + } + } + + } + +} + + + +//================================================ +int +main(int argc, char* argv[]) +{ + + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; + string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params1[4] = {300, 50, 1000, 10}; + int params3[5] = { 0, 0, 0, 0, 0}; + + // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + int verbose_level = 2; + const std::string one="one", two="two"; + static Universe* un[Nworkers]; + static dispatch_queue_t CustomQueues[Nworkers]; + + static double* Results; + static int* Counters; + + timeval t1, t2; + double elapsedTime; + // start timer + gettimeofday(&t1, NULL); + + + if (argc < 8) { + std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; + std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; + std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; + + system("pwd"); + + + return(1); + } + else { + for (int nArg=0; nArg < argc; nArg++){ + //std::cout << nArg << " " << argv[nArg] << std::endl; + if (nArg > 0 && nArg < 7){ + params0[nArg-1]= atof(argv[nArg]); + std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; + } + if (nArg > 6 && nArg < 11){ + params1[nArg-7]= atoi(argv[nArg]); + std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; + } + if (nArg == 11){ + verbose_level = atoi(argv[nArg]); + std::cout << "verbose level: " << verbose_level << std::endl; + } + if (nArg > 11 && nArg < 17){ + params2[nArg-12]= atof(argv[nArg]); + std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; + } + if (nArg > 16 && nArg < 22){ + params3[nArg-17]= atof(argv[nArg]); + var_fixed[nArg-17]= atof(argv[nArg]); + std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; + } + + + } + + } + + for (int j=0; j<5; j++){ + + cout << j << " | " << var_fixed[j] << " (fixed) \n"; + } + + target=params0[5]; + range = (double)params1[3]; + int identify_failed = 0; + char* filename= (char *)"movie_graph.txt"; + int n_ep=params1[0], n_st=params1[1], n_rep=params1[2]; + + //............................... + + for(int i=0; i 0){ + + Results = new double[n_rep]; + Counters = new int[n_rep]; + + }else { + + Results = NULL; + Counters = NULL; + std::cout << " Number of reruns should be positive! " << std::endl; + return 0; + + } + //............................... + srand(time(0)); + //srandomdev(); + + { + double r=0; + for (int j=0; j<100; j++){ + + + + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " "; + } + std::cout << "\n "; + } + //random initiation of starting parameters + + if (range > 0.){ + + for (int i=0; i < 5; i++){ + + if (params0[i]==-100.){ + + double r1 = (rand()/(double)(pow(2.,31)-1.)); + double r2 = (rand()/(double)(pow(2.,31)-1.)); + double sign = 1.; + + if(r1 > 0.5){ + sign=-1.; + } + + params0[i] = sign*r2*range; + + std::cout << par_names0[i] << ": " << params0[i] << std::endl; + } + } + + } + + + double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; + int Annealing_repeats = (int) params2[2]; + + + dispatch_group_t group = dispatch_group_create(); + + //............................. + multi_annealing(group, un, CustomQueues, T_start, T_end, Target_rejection, Annealing_repeats, + starting_jump, Results, Counters, params0, Annealing_repeats); + + //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + dispatch_release(group); + //............................. + + + // stop timer + gettimeofday(&t2, NULL); + + // compute and print the elapsed time in millisec + elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms + elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << elapsedTime << " seconds \n .....(" << elapsedTime/60. << " minutes)\n\n"; + + //..................... + + for(int i=0; i 0){ + + delete [] Results; + delete [] Counters; + + } + + return 0; + + + +} + Property changes on: SwiftApps/SciColSim/optimizer.cpp ___________________________________________________________________ Added: svn:executable + * From wilde at ci.uchicago.edu Mon Jan 23 13:13:49 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 23 Jan 2012 13:13:49 -0600 (CST) Subject: [Swift-commit] r5513 - SwiftApps/SciColSim Message-ID: <20120123191349.DA9199CFA1@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-23 13:13:49 -0600 (Mon, 23 Jan 2012) New Revision: 5513 Modified: SwiftApps/SciColSim/Makefile SwiftApps/SciColSim/optimizer.cpp Log: Fix bug in original optimizer which caused the inner loop of multi_loss() to be executed way too many times - N^2 instead of N - (per EMAIL circa Oct 16 2011): > Looking deeper, I think the bug was simply that the first for() statement > should have enclosed just the parameter setting loop. In other words, the top > of multi_loss should start with: > > for(int i=0; i for(int j=0; j<5; j++){ > un[i]->set_parameter(params[j],j); > } > } > > Then the real work is done by the next loop: > for(i=0; iset_parameter(params[j],j); } + } + + for(int i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); - }); + un[i]->evolve_to_target_and_save(istart, iend, Results, Counters); + }); - istart += step; - iend = min(istart+step,N); + std::cout << "queued: i=" << i << " N=" << N << " istart=" << istart << " iend=" << iend << "\n"; + istart += step; + iend = min(istart+step,N); - } } dispatch_group_wait(group, DISPATCH_TIME_FOREVER); //dispatch_release(group); From wilde at ci.uchicago.edu Mon Jan 23 15:05:03 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 23 Jan 2012 15:05:03 -0600 (CST) Subject: [Swift-commit] r5515 - SwiftApps/SciColSim Message-ID: <20120123210503.EDCC09CC94@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-23 15:05:03 -0600 (Mon, 23 Jan 2012) New Revision: 5515 Added: SwiftApps/SciColSim/optimizer.orig-mac.cpp Log: Add cpp file for orginal Mac Grand Central version with only necessary logic fixes beyond original. Added: SwiftApps/SciColSim/optimizer.orig-mac.cpp =================================================================== --- SwiftApps/SciColSim/optimizer.orig-mac.cpp (rev 0) +++ SwiftApps/SciColSim/optimizer.orig-mac.cpp 2012-01-23 21:05:03 UTC (rev 5515) @@ -0,0 +1,1673 @@ +// +// main.cpp +// optimizer +// +// Created by Andrey Rzhetsky on 4/11/11. +// Copyright 2011 University of Chicago. All rights reserved. +// + +#define Nworkers 24 + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define INT_INFINITY 2147483647 + +#define FIX_VARIABLES 1 + +using namespace boost; +using namespace std; +using namespace boost::numeric::ublas; + +static int max_dist=0; + +typedef boost::adjacency_matrix Graph; +typedef std::pair Edge; +typedef boost::graph_traits GraphTraits; +typedef boost::numeric::ublas::triangular_matrix prob; +typedef boost::numeric::ublas::triangular_matrix pathlength; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + +namespace std { + using ::time; +} + +static int var_fixed[5] = {1, 0, 1, 1, 0}; + +typedef boost::minstd_rand base_generator_type; +typedef adjacency_list < listS, vecS, directedS, +no_property, property < edge_weight_t, int > > graph_t; +typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; +typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; + + +//================================================ +string strDouble(double number) +{ + stringstream ss;//create a stringstream + ss << number;//add number to the stream + return ss.str();//return a string with the contents of the stream +} + +//================================================ + +double gaussian(double sigma) +{ + double GaussNum = 0.0; + int NumInSum = 10; + for(int i = 0; i < NumInSum; i++) + { + GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); + } + GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); + + + return GaussNum; + +} + + + +//================================================= +double diffclock(clock_t clock1,clock_t clock2) +{ + double diffticks=clock1-clock2; + double diffms=(diffticks)/CLOCKS_PER_SEC; + return diffms; +} + +//================================================ +//================================================================ +double get_new_x(double x, double dx){ + + double new_x; + // boost::variate_generator > uni(generator, uni_dist); + double r = rand()/(double)(pow(2.,31)-1.); + + if (r > 0.5){ + new_x = x + rand()*dx/(double)(pow(2.,31)-1.); + } else { + new_x = x - rand()*dx/(double)(pow(2.,31)-1.); + } + + return new_x; + +} + + +//=============================================== +string string_wrap(string ins, int mode){ + + std::ostringstream s; + + switch(mode){ + case 0: + s << "\033[1;29m" << ins << "\033[0m"; + break; + case 1: + s << "\033[1;34m" << ins << "\033[0m"; + break; + case 2: + s << "\033[1;44m" << ins << "\033[0m"; + break; + case 3: + s << "\033[1;35m" << ins << "\033[0m"; + break; + case 4: + s << "\033[1;33;44m" << ins << "\033[0m"; + break; + case 5: + s << "\033[1;47;34m" << ins << "\033[0m"; + break; + case 6: + s << "\033[1;1;31m" << ins << "\033[0m"; + break; + case 7: + s << "\033[1;1;33m" << ins << "\033[0m"; + break; + case 8: + s << "\033[1;1;43;34m" << ins << "\033[0m"; + break; + case 9: + s << "\033[1;1;37m" << ins << "\033[0m"; + break; + case 10: + s << "\033[1;30;47m" << ins << "\033[0m"; + break; + default: + s << ins; + } + + return s.str(); +} + + +//=============================================== +string wrap_double(double val, int mode){ + + std::ostringstream s; + s << string_wrap(strDouble(val),mode); + + return s.str(); +} + + + +//=============================================== +const +string i2string(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + return s.str(); + +} + +//=============================================== +char* i2char(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + char* a=new char[s.str().size()+1]; + memcpy(a,s.str().c_str(), s.str().size()); + + return a; +} + +//================================================ +class Universe { + +private: + + double alpha_i; + double alpha_m; + double beta; + double gamma; + double delta; + + double TargetNovelty; + double CumulativeRelativeLoss; + double CRLsquare; + string id; + + + int N_nodes; + int M_edges; + + int N_epochs; + int N_steps; + int N_repeats; + + int current_epoch; + double current_loss; + int current_repeat; + double current_novelty; + + int mode_identify_failed; + int verbose_level; // 0 is silent, higher is more + + double k_max; + + graph_t Full_g; + + double **Prob; + double **Tried; + double **Dist; + double **Final; + double **EdgeIndex; + double *Rank; + + base_generator_type generator; + boost::uniform_real<> uni_dist; + boost::geometric_distribution geo; + +public: + + + + //====== Constructor ====== + Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) + { + //typedef array_type2::index index2; + + + std::ifstream inFile; + //string line; + + //------------------------------- + + base_generator_type gene(42u); + generator = gene; + generator.seed(static_cast(std::time(0))); + boost::uniform_real<> uni_d(0,1); + uni_dist = uni_d; + + //-------------------------------- + + int i, k; + int x, y; + Edge* edge_array_mine; + int num_arcs_mine, num_nodes_mine; + int* weights_mine; + + TargetNovelty = target; + CumulativeRelativeLoss = 0.; + CRLsquare = 0.; + + + N_epochs = Epochs; + N_steps = Steps; + N_repeats = Repeats; + + current_epoch = 0; + current_loss = 0.; + current_repeat = 0; + + id = idd; + + verbose_level = 1; + + mode_identify_failed = identify_failed; + + + //------------------------------- + // The first pass though file with the graph + inFile.open(FileToOpen.c_str()); + if (inFile.fail()) { + cout << "Unable to open file"; + exit(1); // terminate with error + }else { + + if (verbose_level > 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x; + inFile >> y; + + if (verbose_level > 2){ + std::cout << " x: " << x; + std::cout << " y: " << y << std::endl; + } + + if (i==0){ + N_nodes=x; + M_edges=y; + break; + } + i++; + + + } + inFile.close(); + + if (verbose_level == 2){ + std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { + if (i > 0) { + Final[x][y]=1.; + Final[y][x]=1.; + + + if (verbose_level == 2){ + std::cout << "."; + } + } + i++; + + } + if (verbose_level == 2){ + std::cout << std::endl; + } + inFile.close(); + + k=0; + for (int i=0; i 0.){ + EdgeIndex[i][j]=k; + k++; + } + } + } + + + + //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // create graph -- hopefully, we can keep it, just modifying edge weights + + + edge_array_mine = new Edge[2*M_edges]; + num_arcs_mine = 2*M_edges; + num_nodes_mine = N_nodes; + weights_mine = new int[2*M_edges]; + for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} + + k=0; + for(int i=0; i0.){ + edge_array_mine[2*k] =Edge(i,j); + edge_array_mine[2*k+1]=Edge(j,i); + k++; + } + } + } + graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); + + Full_g = g; + delete edge_array_mine; + delete weights_mine; + + //=========================================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + for (int i=0; i 0.){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + + } + + + //===================================================================== + int sample_failed_number(double pfail){ + + //boost::geometric_distribution geo(pfail); + //boost::variate_generator > geom(generator, geo); + + double r, u, g; + + r=0.; + for(int i=0; i=3){ + std::cout << id << " failed " << r << std::endl; + } + return r; + + } + + //============================================= + double get_target(void){ + return TargetNovelty; + } + + //============================================= + void set_target(double target){ + TargetNovelty=target; + } + + //============================================= + int sample(){ + + //boost::variate_generator > uni(generator, uni_dist); + // double r = uni(), Summa = 0.; + + + + double r = rand(), Summa = 0.; + r /= (double)(pow(2.,31)-1.); + int result = 0; + int finished = 0; + + if (verbose_level==4){ + std::cout << id << " sampled " << r << std::endl; + } + + for(int i=0; i r){ + + Tried[i][j]+=1.; + + if (Final[i][j] > 0.){ + result = 1; + } + finished = 1; + } + } + } + + return result; + + } + + //=============================== + void update_current_graph(void){ + + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + //property_map::type weightmap = get(edge_weight, Full_g); + for (int i=0; i 0. && Tried[i][j]>0){ + //s = edge(i, j, Full_g); + boost::graph_traits::edge_descriptor e1,e2; + bool found1, found2; + u = vertex(i, Full_g); + v = vertex(j, Full_g); + tie(e1, found1) = edge(u, v, Full_g); + tie(e2, found2) = edge(v, u, Full_g); + if (!found1 && !found2){ + add_edge(u,v,1,Full_g); + add_edge(v,u,1,Full_g); + } + + } + } + + } + } + + //=============================== + void update_distances(void){ + // put shortest paths to the *Dist[][] + std::vector p(num_vertices(Full_g)); + std::vector d(num_vertices(Full_g)); + vertex_descriptor s; + + + // put shortest paths to the *Dist[][] + for (int j=0; j 0.){ + s = vertex(j, Full_g); + dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); + + //std::cout <<" Vertex "<< j << std::endl; + graph_traits < graph_t >::vertex_iterator vi, vend; + + for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { + + if (p[*vi]!=*vi){ + Dist[*vi][j]=d[*vi]; + Dist[j][*vi]=d[*vi]; + + if (Dist[*vi][j]>max_dist){ + max_dist=Dist[*vi][j]; + } + + + } else { + Dist[*vi][j]=-1.; + Dist[j][*vi]=-1.; + } + } + } + + } + + + } + + //====================================================== + void update_ranks(void){ + + for(int i=0; i0. && Final[i][j] >0.){ + Rank[i]++; + Rank[j]++; + } + } + } + + } + + //==================================================================== + void set_world(double a_i, double a_m, double b, double g, double d){ + + alpha_i=a_i; + alpha_m=a_m; + gamma=g; + beta=b; + delta=d; + + } + + //==================================================================== + void reset_world(){ + + //==================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + + for (int i=0; i 0. && Tried[i][j] > 0){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + //================================================== + + current_loss=0; + current_epoch=0; + current_repeat++; + current_novelty=0; + + for(int i = 0; i < N_nodes; ++i) { + Rank[i]=0.; + for(int j = 0; j < N_nodes; ++j) { + Prob[i][j]=0.; + Dist[i][j]=-1.; + Tried[i][j]=0.; + } + } + } + + + //============================================== + void show_parameters(void){ + + std::cout << "Parameters: " + << alpha_i << " " + << alpha_m << " | " + << beta << " " + << gamma << " | " + << delta << std::endl; + + } + + + + //=============================================== + string file_name(){ + + std::ostringstream s; + s << "world_" + << lexical_cast(alpha_i) << "_" + << lexical_cast(alpha_m) << "_" + << lexical_cast(beta) << "_" + << lexical_cast(gamma) << "_" + << lexical_cast(delta) << "_" + << lexical_cast(N_epochs) << "_" + << lexical_cast(N_steps) << "_" + << lexical_cast(N_repeats) << ".txt"; + + return s.str(); + + } + + + + + //================================================= + void set_verbose(int verbose){ + + verbose_level = verbose; + } + + + //============================================================= + void update_probabilities(void){ + + + //========================= + // Compute sampling probabilities + // first pass: \xi_i,j + for(int i=0; i 0.){ + + double k = Dist[i][j]; + if (k >= k_max){ + k = k_max-1; + } + + bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); + + } else { + bg = delta; + } + + Prob[i][j] = exp(Prob[i][j] + bg); + } + } + + + // second pass: sum + double Summa = 0.; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + + } + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + else { + + double pfail=0.; + int n_failed; + //, n_check = 0; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + } + + current_novelty = novel; + + + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + if (verbose_level == 2){ + std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) + + << " cost=" << cost + << " novel=" << novel + << " rel_loss=" << cost/novel + << std::endl; + } + + current_epoch++; + } + + + //====== Destructor ====== + ~Universe(){ + + delete_2Dmatrix(Final, N_nodes); + delete_2Dmatrix(Dist, N_nodes); + delete_2Dmatrix(Tried, N_nodes); + delete_2Dmatrix(Prob, N_nodes); + delete_2Dmatrix(EdgeIndex, N_nodes); + delete_1Dmatrix(Rank); + } + + //================================================ + // Allocate memory + double** allocate_2Dmatrix(int N, int M) + { + double **pointer; + + if (verbose_level == 2){ + std::cout<< "["< 0){ + + pointer = new double[N]; + + }else { + + pointer = NULL; + } + + return pointer; + + } + + //============================================== + // De-Allocate memory to prevent memory leak + void delete_2Dmatrix(double **pointer, int N){ + + if (pointer != NULL){ + + for (int i = 0; i < N; ++i){ + delete [] pointer[i]; + } + delete [] pointer; + } + } + //==================== + void delete_1Dmatrix(double *pointer){ + + delete [] pointer; + } + + //=========================================== + double get_rel_loss(){ + + return CumulativeRelativeLoss ; + } + + //=========================================== + double get_rel_loss_err(){ + + return CRLsquare ; + } + + + + //================================================================================== + void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ + + double ALOT=100000000000.; + + reset_world(); + + for (int k = istart; k < iend; k++){ + + + for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ + update_world(); + } + + storage[k]=current_loss/current_novelty; + counters[k]=1; + + + reset_world(); + } + + } + //============================================== + int get_reruns(void){ + return N_repeats; + } + + //============================================== + double get_parameter(int i){ + + switch(i){ + case 0: + return alpha_i; + case 1: + return alpha_m; + case 2: + return beta; + case 3: + return gamma; + case 4: + return delta; + default: + + std::cout << "Erroneous parameter id!!!!\n\n\n"; + return 0.; + } + } + + + //============================================== + void evolve_to_target(){ + + reset_world(); + if (beta < -1. || gamma < -1.){ + CumulativeRelativeLoss = 100000000000.; + CRLsquare = 0.; + return; + } + + + for (int k=0; k< N_repeats; k++){ + + + for(int i=0; i 4) {return 0;} + + else { + + switch(position){ + case 0: + alpha_i=value; + return 1; + case 1: + alpha_m=value; + return 1; + case 2: + beta=value; + return 1; + case 3: + gamma=value; + return 1; + case 4: + delta=value; + return 1; + } + + } + + return 0; + } + + + //================================================================= + void try_annealing(double starting_jump, int iterations, + double temp_start, double temp_end, double target_rejection){ + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=alpha_i; + x[1]=alpha_m; + x[2]=beta; + x[3]=gamma; + x[4]=delta; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + + //.......................................... + evolve_to_target(); + std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + //........................................... + + // optimization cycle + for(int i=0; i ratio){ + + std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << alpha_i << " "<< alpha_m << " " + << beta << " " << gamma << " " + << delta << " " << std::endl; + set_parameter(x[j], j); + CumulativeRelativeLoss = 0; + CRLsquare = 0; + + rejection[j]+=1.; + } + + else { + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + x[j] = x_tmp; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) + << " "<< wrap_double(rejection[1], 7) << " " + << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(alpha_i,2) + << " "<< wrap_double(alpha_m, 7) << " " + << wrap_double(beta,5) << " " + << wrap_double(gamma,9) << " " + << wrap_double(delta,6) << " " + << std::endl << std::endl; + + } + //........................................................ + + } + + } + + } + + +}; + +//============================================================ + +std::pair multi_loss(dispatch_group_t group, + Universe* un[], + dispatch_queue_t* CustomQueues, + double* Results, + int* Counters, + double* params){ + + int N = un[0]->get_reruns(); + int step = (int)(double)N/(double)(Nworkers); + int istart=0; + int iend = istart+step; + + double Loss=0., LossSquare=0.; + + for(int i=0; iset_parameter(params[j],j); + } + } + + + for(int i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); + }); + + std::cout << "queued: i=" << i << " N=" << N << " istart=" << istart << " iend=" << iend << "\n"; + istart += step; + iend = min(istart+step,N); + + } + dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + //dispatch_release(group); + + for (int i=0; i Res; + Res.first=Loss; + Res.second=two_std; + + return Res; + + +} +//============================================================ + + +//============================================================ +void multi_annealing( dispatch_group_t group, + Universe* un[], + dispatch_queue_t* CustomQueues, + double T_start, double T_end, + double Target_rejection, + int Annealing_repeats, + double starting_jump, + double* Results, + int* Counters, + double* params0, + double annealing_cycles){ + //................................. + // re-implement annealing + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + //boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=params0[0]; + x[1]=params0[1]; + x[2]=params0[2]; + x[3]=params0[3]; + x[4]=params0[4]; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + std::pairRes; + + Res = multi_loss(group, un, CustomQueues, Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + curr_x = Res.first; + curr_err = Res.second; + + // optimization cycle + + for(int i=0; iset_parameter(x_tmp, j); + } + + + Res = multi_loss(group, un, CustomQueues, Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " vs " << ratio << std::endl; + + double ALOT=100000000000.; + + if (Res.first < ALOT) + { + ofstream filestr; + + filestr.open ("best_opt_some.txt", ofstream::app); + + // >> i/o operations here << + filestr << un[0]->get_target() << "," + << Res.first + << "," << un[0]->get_parameter(0) + << "," << un[0]->get_parameter(1) + << "," << un[0]->get_parameter(2) + << "," << un[0]->get_parameter(3) + << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; + + filestr.close(); + + + filestr.open ("max_dist.txt", ofstream::app); + + // >> i/o operations here << + filestr << max_dist << ",\n"; + + filestr.close(); + + } + + + if (r > ratio){ + + std::cout << " "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << un[0]->get_parameter(0) + << " " << un[0]->get_parameter(1) + << " " << un[0]->get_parameter(2) + << " " << un[0]->get_parameter(3) + << " " << un[0]->get_parameter(4) << " " << std::endl; + + x[j]=x_hold; + for(int w=0; wset_parameter(x[j], j); + } + + + //set_parameter(x[j], j); + rejection[j]+=1.; + } + + else { + + curr_x = Res.first; + curr_err = Res.second; + x[j] = x_tmp; + + for(int w=0; wset_parameter(x[j], j); + } + + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) << " " + << wrap_double(rejection[1],7) << " " + << wrap_double(rejection[2],5) << " " + << wrap_double(rejection[3],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << " "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(un[0]->get_parameter(0),2) << " " + << wrap_double(un[0]->get_parameter(1),7) << " " + << wrap_double(un[0]->get_parameter(2),5) << " " + << wrap_double(un[0]->get_parameter(3),9) << " " + << wrap_double(un[0]->get_parameter(4),6) << " " + << std::endl << std::endl; + + + + } + //........................................................ + + } + } + + } + +} + + + +//================================================ +int +main(int argc, char* argv[]) +{ + + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; + string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params1[4] = {300, 50, 1000, 10}; + int params3[5] = { 0, 0, 0, 0, 0}; + + // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + int verbose_level = 2; + const std::string one="one", two="two"; + static Universe* un[Nworkers]; + static dispatch_queue_t CustomQueues[Nworkers]; + + static double* Results; + static int* Counters; + + timeval t1, t2; + double elapsedTime; + // start timer + gettimeofday(&t1, NULL); + + + if (argc < 8) { + std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; + std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; + std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; + + system("pwd"); + + + return(1); + } + else { + for (int nArg=0; nArg < argc; nArg++){ + //std::cout << nArg << " " << argv[nArg] << std::endl; + if (nArg > 0 && nArg < 7){ + params0[nArg-1]= atof(argv[nArg]); + std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; + } + if (nArg > 6 && nArg < 11){ + params1[nArg-7]= atoi(argv[nArg]); + std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; + } + if (nArg == 11){ + verbose_level = atoi(argv[nArg]); + std::cout << "verbose level: " << verbose_level << std::endl; + } + if (nArg > 11 && nArg < 17){ + params2[nArg-12]= atof(argv[nArg]); + std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; + } + if (nArg > 16 && nArg < 22){ + params3[nArg-17]= atof(argv[nArg]); + var_fixed[nArg-17]= atof(argv[nArg]); + std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; + } + + + } + + } + + for (int j=0; j<5; j++){ + + cout << j << " | " << var_fixed[j] << " (fixed) \n"; + } + + target=params0[5]; + range = (double)params1[3]; + int identify_failed = 0; + char* filename= (char *)"movie_graph.txt"; + int n_ep=params1[0], n_st=params1[1], n_rep=params1[2]; + + //............................... + + for(int i=0; i 0){ + + Results = new double[n_rep]; + Counters = new int[n_rep]; + + }else { + + Results = NULL; + Counters = NULL; + std::cout << " Number of reruns should be positive! " << std::endl; + return 0; + + } + //............................... + srand(time(0)); + //srandomdev(); + + { + double r=0; + for (int j=0; j<100; j++){ + + + + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " "; + } + std::cout << "\n "; + } + //random initiation of starting parameters + + if (range > 0.){ + + for (int i=0; i < 5; i++){ + + if (params0[i]==-100.){ + + double r1 = (rand()/(double)(pow(2.,31)-1.)); + double r2 = (rand()/(double)(pow(2.,31)-1.)); + double sign = 1.; + + if(r1 > 0.5){ + sign=-1.; + } + + params0[i] = sign*r2*range; + + std::cout << par_names0[i] << ": " << params0[i] << std::endl; + } + } + + } + + + double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; + int Annealing_repeats = (int) params2[2]; + + + dispatch_group_t group = dispatch_group_create(); + + //............................. + multi_annealing(group, un, CustomQueues, T_start, T_end, Target_rejection, Annealing_repeats, + starting_jump, Results, Counters, params0, Annealing_repeats); + + //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + dispatch_release(group); + //............................. + + + // stop timer + gettimeofday(&t2, NULL); + + // compute and print the elapsed time in millisec + elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms + elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << elapsedTime << " seconds \n .....(" << elapsedTime/60. << " minutes)\n\n"; + + //..................... + + for(int i=0; i 0){ + + delete [] Results; + delete [] Counters; + + } + + return 0; + + + +} + Property changes on: SwiftApps/SciColSim/optimizer.orig-mac.cpp ___________________________________________________________________ Added: svn:executable + * From wilde at ci.uchicago.edu Mon Jan 23 15:49:09 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 23 Jan 2012 15:49:09 -0600 (CST) Subject: [Swift-commit] r5516 - SwiftApps/SciColSim Message-ID: <20120123214909.6BB259CC94@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-23 15:49:09 -0600 (Mon, 23 Jan 2012) New Revision: 5516 Added: SwiftApps/SciColSim/colortext.swift Log: temporary functions to format printed text in color (to match C++ output for optimizer). Added: SwiftApps/SciColSim/colortext.swift =================================================================== --- SwiftApps/SciColSim/colortext.swift (rev 0) +++ SwiftApps/SciColSim/colortext.swift 2012-01-23 21:49:09 UTC (rev 5516) @@ -0,0 +1,75 @@ +global string e33=@arg("e33"); +global string endEscape = "[0m"; + +global int Black = 0; +global int Blue = 1; +global int BlackOnBlue = 2; +global int Pink = 3; +global int GoldOnBlue = 4; +global int BlueOnGray = 5; +global int Red = 6; +global int Gold = 7; +global int BlueOnGold = 8; +global int Gray = 9; +global int BlackOnGray = 10; + +# Black = 0; +# Blue = 1; +# BlackOnBlue = 2; +# Pink = 3; +# GoldOnBlue = 4; +# BlueOnGray = 5; +# Red = 6; +# Gold = 7; +# BlueOnGold = 8; +# Gray = 9; +# BlackOnGray = 10; + +global string colorCode[] = [ + "[1;29m", # Black = 0; + "[1;34m", # Blue = 1; + "[1;44m", # BlackOnBlue = 2; + "[1;35m", # Pink = 3; + "[1;33;44m", # GoldOnBlue = 4; + "[1;47;34m", # BlueOnGray = 5; + "[1;1;31m", # Red = 6; + "[1;1;33m", # Gold = 7; + "[1;1;43;34m", # BlueOnGold = 8; + "[1;1;37m", # Gray = 9; + "[1;30;47m", # BlackOnGray = 10; +]; + +(string s) color(int c, string ins) +{ + s = @strcat(e33,colorCode[c],ins,e33,endEscape); +} + +(string s) OLDcolor(int c, string ins) +{ + switch(c){ + case 0: + s = @strcat(e33,"[1;29m",ins,e33,"[0m"); + case 1: + s = @strcat(e33,"[1;34m",ins,e33,"[0m"); + case 2: + s = @strcat(e33,"[1;44m",ins,e33,"[0m"); + case 3: + s = @strcat(e33,"[1;35m",ins,e33,"[0m"); + case 4: + s = @strcat(e33,"[1;33;44m",ins,e33,"[0m"); + case 5: + s = @strcat(e33,"[1;47;34m",ins,e33,"[0m"); + case 6: + s = @strcat(e33,"[1;1;31m",ins,e33,"[0m"); + case 7: + s = @strcat(e33,"[1;1;33m",ins,e33,"[0m"); + case 8: + s = @strcat(e33,"[1;1;43;34m",ins,e33,"[0m"); + case 9: + s = @strcat(e33,"[1;1;37m",ins,e33,"[0m"); + case 10: + s = @strcat(e33,"[1;30;47m",ins,e33,"[0m"); + default: + s = ins; + } +} From lgadelha at ci.uchicago.edu Tue Jan 24 12:38:35 2012 From: lgadelha at ci.uchicago.edu (lgadelha at ci.uchicago.edu) Date: Tue, 24 Jan 2012 12:38:35 -0600 (CST) Subject: [Swift-commit] r5517 - provenancedb Message-ID: <20120124183835.CA5DD9CC99@svn.ci.uchicago.edu> Author: lgadelha Date: 2012-01-24 12:38:35 -0600 (Tue, 24 Jan 2012) New Revision: 5517 Added: provenancedb/SPQL.g Modified: provenancedb/prov-init.sql Log: Minor changes Added: provenancedb/SPQL.g =================================================================== --- provenancedb/SPQL.g (rev 0) +++ provenancedb/SPQL.g 2012-01-24 18:38:35 UTC (rev 5517) @@ -0,0 +1,743 @@ +grammar ProvSQL; + + at header { + import java.util.HashSet; + import java.util.HashMap; + import java.util.Iterator; + import org.jgrapht.*; + import org.jgrapht.alg.DijkstraShortestPath; + import org.jgrapht.graph.*; +} + + at members { + String selectClause = new String(); + String fromClause = new String(); + String whereClauseJoinExpressions = new String(); + String whereClause = new String(); + boolean hasWhereJoinExpression; + boolean hasWhereExpression = false; + static boolean hasCompareRunCall = false; + HashSet relations = new HashSet(); + UndirectedGraph schemaGraph; + HashSet joinEdges; + static HashSet compareRunParams = new HashSet();; + + // Ideally it could receive a DB schema in SQL and build the graph automatically + public static UndirectedGraph buildGraph() { + UndirectedGraph schemaGraph = new Multigraph(DefaultEdge.class); + schemaGraph.addVertex("annotation"); + schemaGraph.addVertex("script_run"); + schemaGraph.addVertex("function_call"); + schemaGraph.addVertex("variable"); + schemaGraph.addVertex("application_execution"); + schemaGraph.addVertex("runtime_info"); + schemaGraph.addVertex("contains"); + schemaGraph.addVertex("produces"); + schemaGraph.addVertex("consumes"); + schemaGraph.addVertex("compare_run"); + schemaGraph.addEdge("annotation", "script_run"); + schemaGraph.addEdge("annotation", "function_call"); + schemaGraph.addEdge("annotation", "variable"); + schemaGraph.addEdge("script_run", "function_call"); + schemaGraph.addEdge("function_call", "consumes"); + schemaGraph.addEdge("function_call", "produces"); + schemaGraph.addEdge("function_call", "application_execution"); + schemaGraph.addEdge("application_execution", "runtime_info"); + schemaGraph.addEdge("variable", "variable_containment"); + schemaGraph.addEdge("variable", "variable_containment"); + schemaGraph.addEdge("variable", "consumes"); + schemaGraph.addEdge("variable", "produces"); + + return schemaGraph; + } + + private static HashSet computeJoinEdges( + UndirectedGraph schemaGraph, + HashSet relations) { + HashSet jEdges = new HashSet(); + Iterator i = relations.iterator(); + String first = new String(); + if(i.hasNext()) + first += i.next(); + while(i.hasNext()) { + DijkstraShortestPath sP = new DijkstraShortestPath(schemaGraph, first, i.next()); + Iterator j = (sP.getPathEdgeList()).iterator(); + while(j.hasNext()) + jEdges.add(j.next()); + } + return jEdges; + } + + public static String computeFrom(UndirectedGraph schemaGraph, HashSet joinEdges, HashSet qrels) { + HashSet fromRels = new HashSet(); + String fromq = " FROM "; + Iterator i = joinEdges.iterator(); + Iterator k = qrels.iterator(); + if(qrels.size() == 1) + fromRels.add(k.next()); + else + while(i.hasNext()) { + DefaultEdge aux = i.next(); + // If ds_in or ds_out were not in the original select clause's relations and they are on the the joinEdges + // then one has to make sure that both consumed and produced datasets are considered in the join so there + // is no loss of information. One alternative, implemented here, is to replace these occurrences by the ds + // view, which is an union of ds_in and ds_out. + if(qrels.contains("produces") || qrels.contains("consumes")) { + fromRels.add(schemaGraph.getEdgeSource(aux)); + fromRels.add(schemaGraph.getEdgeTarget(aux)); + } + else { + if(aux.equals(schemaGraph.getEdge("consumes","function_call")) || + aux.equals(schemaGraph.getEdge("consumes","variable")) || + aux.equals(schemaGraph.getEdge("produces","function_call")) || + aux.equals(schemaGraph.getEdge("produces","variable"))) { + fromRels.add("variable"); + fromRels.add("ds_use"); + fromRels.add("function_call"); + } + else { + fromRels.add(schemaGraph.getEdgeSource(aux)); + fromRels.add(schemaGraph.getEdgeTarget(aux)); + } + } + } + Iterator j = fromRels.iterator(); + if(j.hasNext()) + fromq += j.next(); + while(j.hasNext()) + fromq += "," + j.next(); + if(hasCompareRunCall) { + if(fromRels.size() > 0) + fromq += ","; + fromq += "(" + computeCompareRunQuery(compareRunParams) + ") AS compare_run"; + } + return fromq; + } + + + public static String computeJoinExpressions(UndirectedGraph schemaGraph, HashSet jEdges, HashSet qrels) { + + HashMap joinExpressions = new HashMap(); + String joinExpressionsString = new String(); + + joinExpressions.put(schemaGraph.getEdge("annotation", "script_run"), "annotation.script_run_id=script_run.id"); + joinExpressions.put(schemaGraph.getEdge("script_run", "function_call"), "script_run.id=function_call.script_run_id"); + joinExpressions.put(schemaGraph.getEdge("function_call", "annotation"), "function_call.id=annotation.function_call_id"); + joinExpressions.put(schemaGraph.getEdge("function_call", "annotation"), "function_call.id=annotation.function_call_id"); + joinExpressions.put(schemaGraph.getEdge("function_call", "produces"), "function_call.id=produces.function_call_id"); + joinExpressions.put(schemaGraph.getEdge("function_call", "consumes"), "function_call.id=consumes.function_call_id"); + joinExpressions.put(schemaGraph.getEdge("application_execution", "rt_info"), "application_execution.id=rt_info.application_execution_id"); + joinExpressions.put(schemaGraph.getEdge("variable", "consumes"), "variable.id=consumes.variable_id"); + joinExpressions.put(schemaGraph.getEdge("variable", "produces"), "variable.id=produces.variable_id"); + joinExpressions.put(schemaGraph.getEdge("variable", "annotation"), "variable.id=annotation.variable_id"); + joinExpressions.put(schemaGraph.getEdge("variable", "annotation"), "variable.id=annotation.variable_id"); + joinExpressions.put(schemaGraph.getEdge("variable", "file"), "variable.id=file.id"); + joinExpressions.put(schemaGraph.getEdge("variable", "in_mem"), "variable.id=in_mem.id"); + joinExpressions.put(schemaGraph.getEdge("variable", "containment"), "variable.id=containment.containee"); + joinExpressions.put(schemaGraph.getEdge("variable", "containment"), "variable.id=containment.container"); + + Iterator i = jEdges.iterator(); + if(i.hasNext()) { + DefaultEdge aux = i.next(); + if(qrels.contains("consumes") || qrels.contains("produces")) { + joinExpressionsString = joinExpressions.get(aux); + } + else { + if(aux.equals(schemaGraph.getEdge("consumes","function_call")) || aux.equals(schemaGraph.getEdge("produces","function_call"))) + joinExpressionsString = "ds_use.function_call_id=function_call.id"; + else if(aux.equals(schemaGraph.getEdge("consumes","variable")) || aux.equals(schemaGraph.getEdge("produces","variable"))) + joinExpressionsString = "ds_use.variable_id=variable.id"; + else { + joinExpressionsString = joinExpressions.get(aux); + } + + } + } + + + while(i.hasNext()) { + DefaultEdge aux = i.next(); + if(qrels.contains("consumes") || qrels.contains("produces")) { + joinExpressionsString += " AND " + joinExpressions.get(aux); + } + else { + if(aux.equals(schemaGraph.getEdge("consumes","function_call")) || aux.equals(schemaGraph.getEdge("produces","function_call"))) + joinExpressionsString += " AND " + "ds_use.function_call_id=function_call.id"; + else if(aux.equals(schemaGraph.getEdge("consumes","variable")) || aux.equals(schemaGraph.getEdge("produces","variable"))) + joinExpressionsString += " AND " + "ds_use.variable_id=variable.id"; + else { + joinExpressionsString += " AND " + joinExpressions.get(aux); + } + + } + } + return joinExpressionsString; + } + + public static String computeCompareRunQuery(HashSet atoms) { + String compareRunSelectClause = "SELECT script_run_id"; + String compareRunFromClause = "FROM"; + Iterator i = atoms.iterator(); + int nId = 0; + for(String arg: atoms) { + String[] argTokens = arg.split("="); + if(argTokens[0].equals("key_numeric") || + argTokens[0].equals("key_text") || + argTokens[0].equals("parameter")) + { + String key = argTokens[1].split("'")[1]; + nId++; + String sId = "j" + nId; + compareRunSelectClause+=", " + sId + ".value as " + key; + if(nId>1) + compareRunFromClause += " INNER JOIN"; + compareRunFromClause += " compare_run_by_" + argTokens[0] + "(\'" + key + "\') as " + sId; + if(nId>1) + compareRunFromClause += " USING (script_run_id)"; + } + } + String compareRunQuery = compareRunSelectClause + " " + compareRunFromClause; + return compareRunQuery; + } + +} + +query : squery ( + ( + UNION { System.out.println(" UNION "); } + | + INTERSECT { System.out.println(" INTERSECT "); } + | + EXCEPT { System.out.println(" EXCEPT "); } + ) + ( + ALL { System.out.println(" ALL "); } + )? + squery + )* + SEMICOLON + { + System.out.print(";"); + } +; + +squery : SELECT + { + System.out.print("SELECT "); + } + ( + DISTINCT + { + System.out.print("DISTINCT "); + } + )? + selectExpression + { + System.out.print(selectClause); + } + (WHERE whereExpression + { + hasWhereExpression=true; + } + )? + { + schemaGraph = buildGraph(); + joinEdges = computeJoinEdges(schemaGraph, relations); + hasWhereJoinExpression=false; + + fromClause += computeFrom(schemaGraph, joinEdges, relations); + + System.out.print(fromClause); + + whereClauseJoinExpressions += computeJoinExpressions(schemaGraph, joinEdges, relations); + + if(!whereClauseJoinExpressions.isEmpty()) { + hasWhereJoinExpression=true; + System.out.print(" WHERE " + whereClauseJoinExpressions); + } + + if(hasWhereExpression) { + if(hasWhereJoinExpression) + System.out.print(" AND "); + else + System.out.print(" WHERE "); + System.out.print(whereClause); + } + } + ( + GROUP BY + { + System.out.print(" GROUP BY "); + } + a=entityAndAttribute + { + System.out.print($a.text); + } + ( + COLON + b=entityAndAttribute + { + System.out.print(","); + System.out.print($b.text); + } + )* + ( + HAVING { System.out.print(" HAVING "); } + havingExpression + )? + )? + ( + ORDER BY + { + System.out.print(" ORDER BY "); + } + ( + c=entityAndAttribute + { + System.out.print($c.text); + } + | + COUNT { System.out.print(" COUNT "); } + | + e=AGGRFUN { System.out.print(" " + $e.text + " "); } + ) + ( + COLON { System.out.print(","); } + ( + d=entityAndAttribute + { + System.out.print($d.text); + } + | + COUNT { System.out.print(" COUNT "); } + | + f=AGGRFUN { System.out.print(" " + $f.text + " "); } + + ) + )* + ( + DESC { System.out.print(" DESC "); } + | + ASC { System.out.print(" ASC "); } + )? + )? + | + '(' { System.out.print("("); } + squery + ')' { System.out.print(")"); } + ; + + +selectAtom + : a=entityAttribute + { + selectClause += $a.text; + relations.add($a.text.split("\\.")[0]); + if($a.text.split("\\.").length == 1) + selectClause += ".*"; + } + | + b=AGGRFUN + { + selectClause+=$b.text; + } + '(' { selectClause+="("; } + c=entityAndAttribute + { + selectClause += $c.text; + relations.add($c.text.split("\\.")[0]); + if($c.text.split("\\.").length == 1) + selectClause += ".*"; + } + ')' { selectClause+=")"; } + | + d=COUNT + { + selectClause+=$d.text; + } + '(' { selectClause+="("; } + ( + e=entityAttribute + { + selectClause += $e.text; + relations.add($e.text.split("\\.")[0]); + if($e.text.split("\\.").length == 1) + selectClause += ".*"; + } + | + '*' { selectClause+="*"; } + ) + ')' { selectClause+=")"; } + | + builtInProcedureAttribute + ; + +selectExpression + : ( + selectAtom + ) + (COLON { selectClause+=","; } + ( + selectAtom + ) + )* + ; + +whereExpression + : whereAtom + ( + (AND + { + whereClause += " AND "; + } + | OR + { + whereClause += " OR "; + } + ) whereAtom + )* + ; + +whereAtom + : (a=entityAndAttribute + { + relations.add($a.text.split("\\.")[0]); + whereClause += $a.text; + } + | + j=COMPARERUN { whereClause+="comapare_run"; } + DOT + k=ID { whereClause+="."+$k.text; } + ) + ( + NOT + { + whereClause += " NOT "; + } + )? + + ( + b=OP + { + whereClause += $b.text; + } + ( + c=STRING + { + whereClause += $c.text; + } + | + d=INT + { + whereClause += $d.text; + } + | + e=FLOAT + { + whereClause += $e.text; + } + ) + | + BETWEEN + { + whereClause += " BETWEEN "; + } + f=STRING + { + whereClause += $f.text; + } + AND + { + whereClause += " AND "; + } + g=STRING + { + whereClause += $g.text; + } + | + LIKE + { + whereClause += " LIKE "; + } + h=STRING + { + whereClause += $h.text; + } + | + ( + IN + { + whereClause += " IN "; + } + | + i=OP + { + whereClause += $i.text; + } + + ( + ALL + { + whereClause += " ALL "; + } + | + ANY + { + whereClause += " ANY "; + } + ) + + ) + '(' { System.out.print("("); } + squery + ')' { System.out.print(")"); } + ) + ; + +havingExpression + : havingAtom + ( + (AND + { + System.out.print(" AND "); + } + | OR + { + System.out.print(" OR "); + } + ) havingAtom + )* + ; + + +havingAtom + : a=entityAndAttribute + { + System.out.print($a.text); + } + ( + NOT + { + System.out.print(" NOT "); + } + )? + + ( + b=OP + { + System.out.print($b.text); + } + ( + c=STRING + { + System.out.print($c.text); + } + | + d=INT + { + System.out.print($d.text); + } + | + e=FLOAT + { + System.out.print($e.text); + } + ) + | + BETWEEN + { + System.out.print(" BETWEEN "); + } + f=STRING + { + System.out.print($f.text); + } + AND + { + System.out.print(" AND "); + } + g=STRING + { + System.out.print($g.text); + } + | + LIKE + { + System.out.print(" BETWEEN "); + } + h=STRING + { + System.out.print($h.text); + } + | + ( + IN + { + System.out.print(" IN "); + } + | + i=OP + { + System.out.print($i.text); + } + + ( + ALL + { + System.out.print(" ALL "); + } + | + ANY + { + System.out.print(" ANY "); + } + ) + + ) + '(' { System.out.print("("); } + squery + ')' { System.out.print(")"); } + ) + ; + + +entityAttribute : ID (DOT ID)?; + +entityAndAttribute + : ID DOT ID; + + +builtInProcedureAttribute + : COMPARERUN { + boolean hasAttribute = false; + } + { + hasCompareRunCall=true; + } + '(' + a=builtInAtom + { + compareRunParams.add($a.text); + if(relations.size() > 0) + relations.add("script_run"); + } + (COLON + b=builtInAtom + { + compareRunParams.add($b.text); + if(relations.size() > 0) + relations.add("script_run"); + } + )* ')' ( + DOT + { + hasAttribute = true; + } + ( + c=ID + { + selectClause += "compare_run." + $c.text; + } + | '{' + d=ID + { + selectClause += "compare_run." + $d.text; + } + (COLON + e=ID + { + selectClause += ", compare_run." + $e.text; + } + )* '}'))? + { + if(!hasAttribute) + selectClause += "compare_run.*"; + } +; + +builtInAtom + : ('parameter' | 'key_numeric' | 'key_text') OP STRING; + +OP : '=' | '>' | '>=' | '<' | '<='; + +GROUP : 'group'; + +ORDER : 'order'; + +COMPARERUN + : 'compare_run'; + +ANCESTOR: 'ancestor'; + +BY : 'by'; + +AGGRFUN : 'avg' | 'max' | 'min' | 'sum'; + +COUNT : 'count'; + +SELECT : 'select'; + +DESC : 'desc'; + +ASC : 'asc'; + + +DISTINCT + : 'distinct'; + +WHERE : 'where'; + +AND : 'and'; + +OR : 'or'; + +NOT : 'not'; + +IN : 'in'; + +ANY : 'any'; + +UNION : 'union'; + +INTERSECT + : 'intersect'; + +EXCEPT : 'except'; + +ALL : 'all'; + +DOT : '.'; + +COLON : ','; + +BETWEEN : 'between'; + +HAVING : 'having'; + +LIKE : 'like'; + +SEMICOLON : ';'; + +ID : ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'-')* + ; + +INT : '0'..'9'+ + ; + +FLOAT + : ('0'..'9')+ '.' ('0'..'9')* + | '.' ('0'..'9')+ + | ('0'..'9')+ + ; + +STRING + : '\'' ( 'a'..'z' | 'A'..'Z' | '_' | '-' | '0'..'9' | '.' | '%')* '\'' + ; + +NEWLINE : '\r' ? '\n'; + +WS : (' ' |'\t' |'\n' |'\r' )+ + { + skip(); + } + ; Modified: provenancedb/prov-init.sql =================================================================== --- provenancedb/prov-init.sql 2012-01-23 21:49:09 UTC (rev 5516) +++ provenancedb/prov-init.sql 2012-01-24 18:38:35 UTC (rev 5517) @@ -207,32 +207,36 @@ -- continue renaming from here -CREATE VIEW a_t AS - SELECT * - FROM a_run_t - UNION ALL - SELECT * - FROM a_ds_t - UNION ALL - SELECT * - FROM a_proc_t; +create view a_t as + select * + from a_run_t + union all + select * + from a_ds_t + union all + select * + from a_proc_t; -CREATE VIEW a_n AS - SELECT * - FROM a_run_n - UNION ALL - SELECT * - FROM a_ds_n - UNION ALL - SELECT * - FROM a_proc_n; +create view a_n as + select * + from a_run_n + union all + select * + from a_ds_n + union all + select * + from a_proc_n; -- views used for queries based on the schema summary drop view function_call; create view function_call as - select proc.id, proc.type, proc.name, proc.run_id, app_inv.proc_name, to_timestamp(app_inv.start_time), app_inv.duration, app_inv.final_state, app_inv.scratch from proc natural join app_inv; + select proc.id, proc.type, proc.name, proc.run_id, app_inv.proc_name, + to_timestamp(app_inv.start_time), app_inv.duration, app_inv.final_state, app_inv.scratch + from proc + left outer join + app_inv on proc.id=app_inv.id; drop view variable; @@ -261,7 +265,6 @@ to_timestamp(start_time) as start_time, duration from run; - drop view application_execution; create view application_execution as @@ -284,3 +287,9 @@ create view consumes as select proc_id as function_call_id, ds_id as variable_id, param as parameter from ds_in; + +drop view variable_containment; + +create view variable_containment as + select out_id as container, in_id as containee + from ds_cont; From wilde at ci.uchicago.edu Tue Jan 24 13:25:35 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Tue, 24 Jan 2012 13:25:35 -0600 (CST) Subject: [Swift-commit] r5518 - SwiftApps/SciColSim Message-ID: <20120124192535.0D5C19CCFD@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-24 13:25:34 -0600 (Tue, 24 Jan 2012) New Revision: 5518 Added: SwiftApps/SciColSim/testopt1.py Removed: SwiftApps/SciColSim/script-smaller-a.py Modified: SwiftApps/SciColSim/Makefile SwiftApps/SciColSim/optimizer.cpp SwiftApps/SciColSim/optimizer.orig-mac.cpp Log: Integrate cpp mods cleanly into original optimizer code eith #define to select threading model. Rename and clean up test script. Modified: SwiftApps/SciColSim/Makefile =================================================================== --- SwiftApps/SciColSim/Makefile 2012-01-24 18:38:35 UTC (rev 5517) +++ SwiftApps/SciColSim/Makefile 2012-01-24 19:25:34 UTC (rev 5518) @@ -1,10 +1,8 @@ -all: mac-optimizer mac-orig-optimizer +UNAME := $(shell uname) -mac-optimizer: optimizer.cpp - g++ -I boost_1_47_0 -o mac-optimizer optimizer.cpp +ifeq ($(UNAME), Linux) -mac-orig-optimizer: optimizer.orig-mac.cpp - g++ -I boost_1_47_0 -o mac-optimizer optimizer.orig-mac.cpp +all: toptimizer protoall: toptimizer optimizer Optimizer @@ -16,3 +14,24 @@ toptimizer: optimizer.cpp g++ -static -fopenmp -I boost_1_47_0 -o toptimizer optimizer.cpp + +endif + +ifeq ($(UNAME), Darwin) + +all: openmp-optimizer dispatch-optimizer orig-optimizer + +openmp-optimizer: optimizer.cpp + g++ -DP_OPENMP -fopenmp -I boost_1_47_0 -o openmp-optimizer optimizer.cpp + +dispatch-optimizer: optimizer.cpp + g++ -DP_DISPATCH -I boost_1_47_0 -o dispatch-optimizer optimizer.cpp + +orig-optimizer: optimizer.orig-mac.cpp + g++ -I boost_1_47_0 -o orig-optimizer optimizer.orig-mac.cpp + +clean: + rm -rf mac-openmp-optimizer mac-dispatch-optimizer mac-orig-optimizer + +endif + Modified: SwiftApps/SciColSim/optimizer.cpp =================================================================== --- SwiftApps/SciColSim/optimizer.cpp 2012-01-24 18:38:35 UTC (rev 5517) +++ SwiftApps/SciColSim/optimizer.cpp 2012-01-24 19:25:34 UTC (rev 5518) @@ -6,8 +6,16 @@ // Copyright 2011 University of Chicago. All rights reserved. // -#define Nworkers 24 +// Select OpenMP or Grand Central Dispatch for multithreading: +#define MAXNworkers 24 +int Nworkers=MAXNworkers; + +// Add operation code to enable existing code to be used at lower level from Swift scripts: + +char operation = 'n'; // n: normal; m: do one multi_loss (with n_reruns). + // Not used: a: analyze and generate next annealing parameter set. g: tbd + #include #include #include @@ -21,7 +29,10 @@ #include #include +#ifdef P_DISPATCH #include +#endif + #include @@ -1099,7 +1110,7 @@ return 0; } - +#ifdef notdef //================================================================= void try_annealing(double starting_jump, int iterations, double temp_start, double temp_end, double target_rejection){ @@ -1229,17 +1240,26 @@ } +#endif notdef }; //============================================================ +#ifdef P_DISPATCH std::pair multi_loss(dispatch_group_t group, Universe* un[], dispatch_queue_t* CustomQueues, double* Results, int* Counters, double* params){ +#else +std::pair multi_loss(Universe* un[], + double* Results, + int* Counters, + double* params){ + +#endif int N = un[0]->get_reruns(); int step = (int)(double)N/(double)(Nworkers); @@ -1254,7 +1274,7 @@ } } - +#ifdef P_DISPATCH for(int i=0; ievolve_to_target_and_save(i*step, min((i+1)*step,N), Results, Counters); + } +#endif for (int i=0; iRes; - + +#ifdef P_DISPATCH Res = multi_loss(group, un, CustomQueues, Results, Counters, x); +#else + Res = multi_loss( un, Results, Counters, x); +#endif std::cout << Res.first << " +- " << Res.second << std::endl; + if ( operation == 'm' ) { + FILE *f; + int N = un[0]->get_reruns(); + + f = fopen("multi_loss.data","w"); + for(int i=0; iset_parameter(x_tmp, j); } - +#ifdef P_DISPATCH Res = multi_loss(group, un, CustomQueues, Results, Counters, x); +#else + Res = multi_loss( un, Results, Counters, x); +#endif std::cout << Res.first << " +- " << Res.second << std::endl; ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); @@ -1494,6 +1554,8 @@ string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + string par_names4[2] = {"Operation", "Nworkers"}; + int params1[4] = {300, 50, 1000, 10}; int params3[5] = { 0, 0, 0, 0, 0}; @@ -1502,9 +1564,10 @@ int verbose_level = 2; const std::string one="one", two="two"; - static Universe* un[Nworkers]; - static dispatch_queue_t CustomQueues[Nworkers]; - + static Universe* un[MAXNworkers]; +#ifdef P_DISPATCH + static dispatch_queue_t CustomQueues[MAXNworkers]; +#endif static double* Results; static int* Counters; @@ -1548,6 +1611,14 @@ var_fixed[nArg-17]= atof(argv[nArg]); std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; } + if (nArg == 22 ){ + operation = *argv[nArg]; + std::cout << par_names4[0] << ": " << operation << std::endl; + } + if (nArg == 23 ){ + Nworkers = atoi(argv[nArg]); + std::cout << par_names4[1] << ": " << Nworkers << std::endl; + } } @@ -1571,7 +1642,9 @@ un[i] = new Universe((char *)filename,n_ep,n_st, (int)n_rep, identify_failed, target, i2string(i)); +#ifdef P_DISPATCH CustomQueues[i] = dispatch_queue_create(i2char(i), NULL); +#endif } //............................... @@ -1631,7 +1704,7 @@ double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; int Annealing_repeats = (int) params2[2]; - +#ifdef P_DISPATCH dispatch_group_t group = dispatch_group_create(); //............................. @@ -1641,6 +1714,10 @@ //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); dispatch_release(group); //............................. +#else + multi_annealing( un, T_start, T_end, Target_rejection, Annealing_repeats, + starting_jump, Results, Counters, params0, Annealing_repeats); +#endif // stop timer Modified: SwiftApps/SciColSim/optimizer.orig-mac.cpp =================================================================== --- SwiftApps/SciColSim/optimizer.orig-mac.cpp 2012-01-24 18:38:35 UTC (rev 5517) +++ SwiftApps/SciColSim/optimizer.orig-mac.cpp 2012-01-24 19:25:34 UTC (rev 5518) @@ -6,7 +6,7 @@ // Copyright 2011 University of Chicago. All rights reserved. // -#define Nworkers 24 +#define Nworkers 2 #include #include Deleted: SwiftApps/SciColSim/script-smaller-a.py =================================================================== --- SwiftApps/SciColSim/script-smaller-a.py 2012-01-24 18:38:35 UTC (rev 5517) +++ SwiftApps/SciColSim/script-smaller-a.py 2012-01-24 19:25:34 UTC (rev 5518) @@ -1,19 +0,0 @@ -#! /usr/bin/env python -import os - -# FULL for target in range(58,1009,50): -# FAST for target in range(58,209,50): -for target in range(58,209,50): - s = ("%d" % target) - print s - - for i in range(15): -# FAST for i in range(2): - args="./optimizer 0 0 4 50 -1 "+s+" 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) - print("\n\n **** CALLING APP: "+args+"\n\n\n") - os.system(args); -# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") -# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") - - -print "Done!" Copied: SwiftApps/SciColSim/testopt1.py (from rev 5515, SwiftApps/SciColSim/script-smaller-a.py) =================================================================== --- SwiftApps/SciColSim/testopt1.py (rev 0) +++ SwiftApps/SciColSim/testopt1.py 2012-01-24 19:25:34 UTC (rev 5518) @@ -0,0 +1,49 @@ +#! /usr/bin/env python -u +# -u => run unbuffered + +import os + +app = "./orig-optimizer"; # For Mac only: original code (+1 loop fix) using Grnd Central Dispatch +app = "./dispatch-optimizer"; # For Mac only: sing Grand Central Dispatch +app = "./openmp-optimizer"; # For Mac or Linux: Using OpenMP (Default) + +app = "./orig-optimizer"; + +# FULL INITIAL TEST PARAMETERS from Andrey + +startTarget = 58 +endTarget = 1009 +incrTarget = 50 +optimizerRepeats = 15 +evolveReruns = 1000 +annealingSteps = 100 + +# FAST TEST PARAMETERS by Mike + +startTarget = 58 +endTarget = 209 +incrTarget = 50 +optimizerRepeats = 2 +evolveReruns = 10 +annealingSteps = 2 + +# extra (string) parameters for openmp- and dispatch- versions only: + +NWorkers = "2" +operation = "n" # n=normal, m=manual (runs 1 multi_loss call) + +if app == "./orig-optimizer": + NWorkers = "" + operation = "" + +for target in range(startTarget,endTarget,incrTarget): + for i in range(optimizerRepeats): + args = app + " 0 0 4 50 -1 " + str(target) + " 40000 20 " + str(evolveReruns) + \ + " 2 1 2. 0.01 " + str(annealingSteps) + " 0.3 2.3 1 1 0 0 0 " + NWorkers + " " + operation + print("\n**** Calling optimizer: "+args+"\n") + os.system(args); +print "Done!" + +# From older test, using separate file per run: +# args = app + " 0 0 4 50 -1 " + str(target) + " 40000 20 " + str(evolveReruns) + \ +# " 2 1 2. 0.01 " + str(annealingSteps) + " 0.3 2.3 1 1 0 0 0 > out.T"+str(target)+".i"+str(i) From wilde at ci.uchicago.edu Tue Jan 24 14:41:30 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Tue, 24 Jan 2012 14:41:30 -0600 (CST) Subject: [Swift-commit] r5519 - SwiftApps/SciColSim Message-ID: <20120124204130.AE4319CCFD@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-24 14:41:30 -0600 (Tue, 24 Jan 2012) New Revision: 5519 Modified: SwiftApps/SciColSim/optimizer.cpp SwiftApps/SciColSim/testopt1.py Log: Added timings, minor output adjustment. Test script improved. Modified: SwiftApps/SciColSim/optimizer.cpp =================================================================== --- SwiftApps/SciColSim/optimizer.cpp 2012-01-24 19:25:34 UTC (rev 5518) +++ SwiftApps/SciColSim/optimizer.cpp 2012-01-24 20:41:30 UTC (rev 5519) @@ -1268,6 +1268,10 @@ double Loss=0., LossSquare=0.; + timeval startTime, endTime; + double elapsedTime; + gettimeofday(&startTime, NULL); + for(int i=0; iset_parameter(params[j],j); @@ -1316,6 +1320,12 @@ Res.first=Loss; Res.second=two_std; + gettimeofday(&endTime, NULL); + elapsedTime = (endTime.tv_sec - startTime.tv_sec) * 1000.0; // sec to ms + elapsedTime += (endTime.tv_usec - startTime.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << "multi_loss(N=" << N << ", target=" << un[0]->get_target() << ") elapsed time: " << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; + return Res; @@ -1727,7 +1737,7 @@ elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms elapsedTime /= 1000.; - cout << elapsedTime << " seconds \n .....(" << elapsedTime/60. << " minutes)\n\n"; + cout << "\n*** optimizer completed, elapsed time=" << elapsedTime << " seconds " << elapsedTime/60. << " minutes)\n\n"; //..................... Modified: SwiftApps/SciColSim/testopt1.py =================================================================== --- SwiftApps/SciColSim/testopt1.py 2012-01-24 19:25:34 UTC (rev 5518) +++ SwiftApps/SciColSim/testopt1.py 2012-01-24 20:41:30 UTC (rev 5519) @@ -1,13 +1,13 @@ #! /usr/bin/env python -u # -u => run unbuffered -import os +import os, sys app = "./orig-optimizer"; # For Mac only: original code (+1 loop fix) using Grnd Central Dispatch app = "./dispatch-optimizer"; # For Mac only: sing Grand Central Dispatch app = "./openmp-optimizer"; # For Mac or Linux: Using OpenMP (Default) -app = "./orig-optimizer"; +app = "./dispatch-optimizer"; # FULL INITIAL TEST PARAMETERS from Andrey @@ -39,10 +39,10 @@ for target in range(startTarget,endTarget,incrTarget): for i in range(optimizerRepeats): args = app + " 0 0 4 50 -1 " + str(target) + " 40000 20 " + str(evolveReruns) + \ - " 2 1 2. 0.01 " + str(annealingSteps) + " 0.3 2.3 1 1 0 0 0 " + NWorkers + " " + operation + " 2 1 2. 0.01 " + str(annealingSteps) + " 0.3 2.3 1 1 0 0 0 " + operation + " " + NWorkers print("\n**** Calling optimizer: "+args+"\n") os.system(args); -print "Done!" +print sys.argv[0] + " Done!" # From older test, using separate file per run: # args = app + " 0 0 4 50 -1 " + str(target) + " 40000 20 " + str(evolveReruns) + \ From wilde at ci.uchicago.edu Tue Jan 24 14:42:42 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Tue, 24 Jan 2012 14:42:42 -0600 (CST) Subject: [Swift-commit] r5520 - SwiftApps/SciColSim Message-ID: <20120124204242.8FC819CCFD@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-24 14:42:42 -0600 (Tue, 24 Jan 2012) New Revision: 5520 Added: SwiftApps/SciColSim/TODO Modified: SwiftApps/SciColSim/colortext.swift SwiftApps/SciColSim/math.swift Log: small changes and experiments in util functions. Added TODO. Added: SwiftApps/SciColSim/TODO =================================================================== --- SwiftApps/SciColSim/TODO (rev 0) +++ SwiftApps/SciColSim/TODO 2012-01-24 20:42:42 UTC (rev 5520) @@ -0,0 +1,12 @@ +[x] Determine if one evolve() run in the optimizer.cpp code is sufficient. (yes -it does 1 woth reruns = 1 + +Determine if and how to let the optimizer.cpp code do N reruns and how to set NWorkers accordingly (must evenly divide in current code). + +Determine annealing.swift output files needed. + +Align Swift and .cp code and do a correctness test. + +Do performance tests on Beagle and then other platforms (OSG, TG) + +Package code for ExM research. + Modified: SwiftApps/SciColSim/colortext.swift =================================================================== --- SwiftApps/SciColSim/colortext.swift 2012-01-24 20:41:30 UTC (rev 5519) +++ SwiftApps/SciColSim/colortext.swift 2012-01-24 20:42:42 UTC (rev 5520) @@ -1,6 +1,16 @@ -global string e33=@arg("e33"); +global string e33; // = @sprintf("\\e") or @arg("e33"); + +if( @arg("e33","null") == "null" ) { + e33 = @sprintf("\\e"); +} +else { + e33 = @arg("e33"); +} + global string endEscape = "[0m"; +// Color codes used in Andrey's cpp optimizer: + global int Black = 0; global int Blue = 1; global int BlackOnBlue = 2; @@ -44,6 +54,11 @@ s = @strcat(e33,colorCode[c],ins,e33,endEscape); } +(string s) ncolor(int c, string ins) // Can use this version if \\e handling is available in current Swift +{ + s = @sprintf(@strcat("\\e",colorCode[c],ins,"\\e",endEscape)); // sprintf applies \\e escape processing +} + (string s) OLDcolor(int c, string ins) { switch(c){ Modified: SwiftApps/SciColSim/math.swift =================================================================== --- SwiftApps/SciColSim/math.swift 2012-01-24 20:41:30 UTC (rev 5519) +++ SwiftApps/SciColSim/math.swift 2012-01-24 20:42:42 UTC (rev 5520) @@ -51,3 +51,26 @@ result = @java("java.lang.Math","random"); } +// Functions below are exprimental and do not work +// FIXME: fix 0.93 problems casting ints as doubles internally. +// This breaks the @java interface for Swift ints. + +(string result) itos (int i) +{ + result = @java("java.lang.Integer","toString",i); +} + +(string result) itos2 (int i) +{ + result = @java("java.lang.String","valueOf",i); +} + +(string result) ctos (int i) +{ + result = @java("java.lang.Character","valueOf",i); +} + +(string result) format (string f, int c) +{ + result = @java("java.lang.String", "format", f, c ); +} From davidk at ci.uchicago.edu Wed Jan 25 11:29:58 2012 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Wed, 25 Jan 2012 11:29:58 -0600 (CST) Subject: [Swift-commit] r5521 - trunk Message-ID: <20120125172958.799F49CD0F@svn.ci.uchicago.edu> Author: davidk Date: 2012-01-25 11:29:58 -0600 (Wed, 25 Jan 2012) New Revision: 5521 Modified: trunk/build.xml Log: Give x bits to the osg scripts by default Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2012-01-24 20:42:42 UTC (rev 5520) +++ trunk/build.xml 2012-01-25 17:29:58 UTC (rev 5521) @@ -92,6 +92,8 @@ + + From swift at ci.uchicago.edu Tue Jan 10 10:40:12 2012 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Tue, 10 Jan 2012 16:40:12 -0000 Subject: [Swift-commit] Cog update Message-ID: <20120110164009.EEED58D0006A@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3343 | davidkelly999 | 2012-01-10 10:37:52 -0600 (Tue, 10 Jan 2012) | 2 lines Adding SGE modifications from 0.93 to trunk ------------------------------------------------------------------------ Index: modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/QueueInformation.java =================================================================== --- modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/QueueInformation.java (revision 0) +++ modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/QueueInformation.java (revision 3343) @@ -0,0 +1,62 @@ +package org.globus.cog.abstraction.impl.scheduler.sge; + +import java.util.ArrayList; + +/** + * Data structure for defining queue properties + */ +public class QueueInformation { + + private String name; + private ArrayList pe_list = new ArrayList(); + private int slots; + private String walltime; + + /** + * Add data to queue information + * @param data Two dimensional array in the format of {"setting", "value is here"} + */ + public void addData(String[] data) { + if(data.length != 2) return; + if(data[0].equals("h_rt")) setWalltime(data[1]); + if(data[0].equals("qname")) setName(data[1]); + if(data[0].equals("pe_list")) setPe_list(data[1]); + if(data[0].equals("slots")) setSlots(data[1]); + } + + public String getWalltime() { + return walltime; + } + + public void setWalltime(String walltime) { + this.walltime = walltime; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ArrayList getPe_list() { + return pe_list; + } + + public void setPe_list(String list) { + this.pe_list.clear(); + for(String s : list.split(" ")) { + this.pe_list.add(s); + } + } + + public int getSlots() { + return slots; + } + + public void setSlots(String slots) { + String slot_list[] = slots.split(","); + this.slots = Integer.valueOf(slot_list[0]); + } +} Index: modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/QueuePoller.java =================================================================== --- modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/QueuePoller.java (revision 3342) +++ modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/QueuePoller.java (working copy) @@ -10,118 +10,280 @@ package org.globus.cog.abstraction.impl.scheduler.sge; import java.io.BufferedReader; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.io.StringReader; +import java.util.ArrayList; import java.util.HashSet; +import java.util.Hashtable; import java.util.Iterator; import java.util.Map; +import java.util.Scanner; import java.util.Set; +import org.w3c.dom.CharacterData; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; + import org.apache.log4j.Logger; import org.globus.cog.abstraction.impl.scheduler.common.AbstractProperties; import org.globus.cog.abstraction.impl.scheduler.common.AbstractQueuePoller; import org.globus.cog.abstraction.impl.scheduler.common.Job; +/** + * SGE queue poller class + */ public class QueuePoller extends AbstractQueuePoller { - public static final Logger logger = Logger.getLogger(QueuePoller.class); - private Set processed; + private static String[] CMDARRAY; + public static final Logger logger = Logger.getLogger(QueuePoller.class); + private Set processed; + private Hashtable queueInformation; + DocumentBuilder builder; + Document doc; + + public QueuePoller(AbstractProperties properties) { + this("SGE provider queue poller", properties); + } - public QueuePoller(AbstractProperties properties) { - super("SGE provider queue poller", properties); - processed = new HashSet(); - } + public QueuePoller(String name, AbstractProperties properties) { + super(name, properties); + try { + builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + } + catch(Exception e) { + if(logger.isInfoEnabled()) { + logger.info(e.getMessage()); + } + } + processed = new HashSet(); + gatherQueueInformation(); + } + + /** + * getDataFromElement - Make XML parsing a bit easier + * @param e XML Element + * @return XML data as a String + */ + public static String getDataFromElement(Element e) { + try { + Node child = e.getFirstChild(); + if (child instanceof CharacterData) { + CharacterData cd = (CharacterData) child; + return cd.getData(); + } + } + + catch (Exception ex) { + logger.debug("Error in getDataFromElement"); + logger.debug(ex.getMessage()); + logger.debug(ex.getStackTrace()); + } + return ""; + } - private static String[] CMDARRAY; - protected synchronized String[] getCMDArray() { - if (CMDARRAY == null) { - CMDARRAY = new String[] { getProperties().getPollCommand() }; - } - return CMDARRAY; - } + /** + * gatherQueueInformation - Collect information about queues and PEs + */ + private void gatherQueueInformation() { + queueInformation = new Hashtable(); + String command[] = { + ((Properties) this.getProperties()).getConfigCommand(), "-sql" }; - // there's an XML options that the SGE qstat has. It's probably a safer - // way to do this - protected void processStdout(InputStream is) throws IOException { - BufferedReader br = new BufferedReader(new InputStreamReader(is)); - String line; - String header = br.readLine(); - // sge qstat outputs nothing when there are no jobs - if (header != null) { - int jobIDIndex = header.indexOf("job-ID"); - int stateIndex = header.indexOf("state"); - // skip the ----- - br.readLine(); - processed.clear(); - do { - line = br.readLine(); - if (line != null) { - String jobid = parseToWhitespace(line, jobIDIndex); - String state = parseToWhitespace(line, stateIndex); - if (jobid == null || jobid.equals("") || state == null - || state.equals("")) { - throw new IOException("Failed to parse qstat line: " - + line); - } - Job job = getJob(jobid); - if (job == null) { - continue; - } - processed.add(jobid); - if (state.contains("q") || state.contains("w")) { - if (logger.isDebugEnabled()) { - logger.debug(jobid + " is queued"); - } - job.setState(Job.STATE_QUEUED); - } - else if (state.contains("r")) { - if (logger.isDebugEnabled()) { - logger.debug(jobid + " is running"); - } - job.setState(Job.STATE_RUNNING); - } - else if (state.contains("E")) { - job.fail("Job is in an error state. Try running qstat -j " - + jobid + " to see why."); - } - } - } while (line != null); - } - else { - processed.clear(); - } - Iterator i = getJobs().entrySet().iterator(); - while (i.hasNext()) { - Map.Entry e = (Map.Entry) i.next(); - String id = (String) e.getKey(); - Job job = (Job) e.getValue(); - if (!processed.contains(id)) { - if (logger.isDebugEnabled()) { - logger.debug(id + " is done"); - } - job.setState(Job.STATE_DONE); - if (job.getState() == Job.STATE_DONE) { - addDoneJob(id); - } - } - else { - // at least on Ranger the job is done long - // before qstat reports it as done, so check - // if the exit code file is there - File f = new File(job.getExitcodeFileName()); - if (f.exists()) { - job.setState(Job.STATE_DONE); - if (job.getState() == Job.STATE_DONE) { - addDoneJob(id); - } - } - } - } - } + try { + // Get queue names + Process p = Runtime.getRuntime().exec(command); + InputStream is = p.getInputStream(); + try { + p.waitFor(); + } catch (InterruptedException e1) { + logger.error("QueuePoller command failed"); + logger.error(e1.getMessage()); + } - protected void processStderr(InputStream is) throws IOException { - } + InputStreamReader isr = new InputStreamReader(is); + BufferedReader br = new BufferedReader(isr); + String line = ""; + + while ((line = br.readLine()) != null) { + queueInformation.put(line, new QueueInformation()); + } + + // Get info about each queue + for (String queue : queueInformation.keySet()) { + + command = new String[] { + ((Properties) this.getProperties()).getConfigCommand(), + "-sq", queue }; + p = Runtime.getRuntime().exec(command); + try { + p.waitFor(); + } catch (InterruptedException e) { + logger.error("QueuePoller command interrupted"); + logger.error(e.getMessage()); + } + is = p.getInputStream(); + isr = new InputStreamReader(is); + br = new BufferedReader(isr); + + while ((line = br.readLine()) != null) { + String results[] = line.split("\\s+", 2); + queueInformation.get(queue).addData(results); + } + } + } catch (IOException e) { + logger.error("QueuePoller command interrupted"); + logger.error(e.getMessage()); + logger.error(e.getStackTrace()); + } + } + + /** + * getAllQueues - Get a list of queues in a list + * @return ArrayList of queues + */ + public ArrayList getAllQueues() { + ArrayList result = new ArrayList(); + for (String s : queueInformation.keySet()) { + result.add(s); + } + return result; + } + + /** + * getCMDArray - Return poll command + * @return String array contains poll command and flags + */ + protected synchronized String[] getCMDArray() { + if (CMDARRAY == null) { + CMDARRAY = getProperties().getPollCommand().split(" "); + } + return CMDARRAY; + } + + /** + * Return queue information for a requested queue + * @param queue + * String of queue name + * @return QueueInformation for requested queue + */ + public QueueInformation getQueueInformation(String queue) { + return queueInformation.get(queue); + } + + /** + * isValidQueue - Determine if queue is valid on this system + * @param queue Queue name + * @return True if queue exists, false otherwise + */ + public boolean isValidQueue(String queue) { + if (queueInformation.keySet().contains(queue)) + return true; + else + return false; + } + + /** + * processStderr - defines how to handle errors from the queue poller + * @param InputStream + */ + protected void processStderr(InputStream is) throws IOException { + String error = new Scanner(is).useDelimiter("\\A").next(); + if(logger.isDebugEnabled()) { + logger.debug("QueuePoller error: " + error); + } + } + + /** + * processStdout - Process poller output and determine the status of jobs + * Uses XML to parse, which requires SGE 6.0 or later + * @param InputStream is - stream representing output + */ + protected void processStdout(InputStream is) throws IOException { + try { + String xml = new Scanner(is).useDelimiter("\\A").next(); + if(logger.isDebugEnabled()) { + logger.debug("QueuePoller XML: " + xml); + } + InputStream is_copy = new ByteArrayInputStream(xml.getBytes()); + doc = builder.parse(is_copy); + processed.clear(); + NodeList nodes = doc.getElementsByTagName("job_list"); + Job tmpJob; + + for (int i = 0; i < nodes.getLength(); i++) { + Element element = (Element) nodes.item(i); + NodeList nodeList = element.getElementsByTagName("JB_job_number"); + Element line = (Element) nodeList.item(0); + String jobid = getDataFromElement(line); + tmpJob = getJob(jobid); + + if (tmpJob == null) { + continue; + } + + processed.add(jobid); + nodeList = element.getElementsByTagName("state"); + line = (Element) nodeList.item(0); + String state = getDataFromElement(line); + + if (state.contains("q") || state.contains("w")) { + if (logger.isDebugEnabled()) { + logger.debug(jobid + " is queued"); + } + tmpJob.setState(Job.STATE_QUEUED); + } else if (state.contains("r")) { + if (logger.isDebugEnabled()) { + logger.debug(jobid + " is running"); + } + tmpJob.setState(Job.STATE_RUNNING); + } else if (state.contains("E")) { + tmpJob.fail("Job is in an error state. Try running qstat -j " + + jobid + " to see why."); + } + } + + Iterator i = getJobs().entrySet().iterator(); + while (i.hasNext()) { + Map.Entry e = (Map.Entry) i.next(); + String id = (String) e.getKey(); + Job job = (Job) e.getValue(); + if (!processed.contains(id)) { + if (logger.isDebugEnabled()) { + logger.debug(id + " is done"); + } + job.setState(Job.STATE_DONE); + if (job.getState() == Job.STATE_DONE) { + addDoneJob(id); + } else { + // at least on Ranger the job is done long + // before qstat reports it as done, so check + // if the exit code file is there + File f = new File(job.getExitcodeFileName()); + if (f.exists()) { + job.setState(Job.STATE_DONE); + if (job.getState() == Job.STATE_DONE) { + addDoneJob(id); + } + } + } + } + } + } + catch (Exception e) { + if(logger.isDebugEnabled()) { + logger.debug("Exception in processStdout"); + logger.debug(e.getStackTrace()); + } + } + } } Index: modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/Properties.java =================================================================== --- modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/Properties.java (revision 3342) +++ modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/Properties.java (working copy) @@ -9,22 +9,25 @@ */ package org.globus.cog.abstraction.impl.scheduler.sge; -import org.apache.log4j.Logger; import org.globus.cog.abstraction.impl.scheduler.common.AbstractProperties; public class Properties extends AbstractProperties { - private static Logger logger = Logger.getLogger(Properties.class); + private static final long serialVersionUID = 1L; public static final String PROPERTIES = "provider-sge.properties"; - public static final String POLL_INTERVAL = "poll.interval"; public static final String QSUB = "qsub"; public static final String QSTAT = "qstat"; public static final String QDEL = "qdel"; + public static final String QCONF = "qconf"; public static final String DEFAULT_PE = "parallel.environment"; - + public static final String SUBMISSION_DELAY = "submission.delay"; private static Properties properties; + /** + * getProperties - return properties + * @return Properties object representing SGE properties + */ public static synchronized Properties getProperties() { if (properties == null) { properties = new Properties(); @@ -33,33 +36,88 @@ return properties; } - protected void setDefaults() { - setPollInterval(10); - setSubmitCommand("qsub"); - setPollCommand("qstat"); - setRemoveCommand("qdel"); - setDefaultPE("threaded"); + /** + * Get the config command + * @return String with config command + */ + public String getConfigCommand() { + return QCONF; } + /** + * getDefaultPE - Get the default parallel environment + * @return String containing pe + */ + public String getDefaultPE() { + return getProperty(DEFAULT_PE); + } + /** + * getPollCommandName - Get poll command name + * @return String containing poll command + */ public String getPollCommandName() { return QSTAT; } - + /** + * getRemoveCommandName - Get remove command + * @return String of command on how to remove a job + */ public String getRemoveCommandName() { return QDEL; } - + /** + * getSubmissionDelay - Get length to sleep before submitting a job + * Value as a string representing milliseconds + * @return Submission delay as String in milliseconds + */ + public String getSubmissionDelay() { + return getProperty(SUBMISSION_DELAY); + } + + /** + * getSubmitCommandName - Get submit command + * @return String of submit command + */ public String getSubmitCommandName() { return QSUB; } - + + /** + * Set the default config command + * Used for gathering information about the queues + * @param config String with command name + */ + public void setConfigCommand(String config) { + setProperty(QCONF, config); + } + /** + * setDefaultPE - set the default parallel environment + * @param pe String representing pe + */ public void setDefaultPE(String pe) { setProperty(DEFAULT_PE, pe); } - - public String getDefaultPE() { - return getProperty(DEFAULT_PE); + + /** + * setDefault - Reset all SGE options to default + */ + protected void setDefaults() { + setPollInterval(10); + setSubmitCommand("qsub"); + setPollCommand("qstat -xml"); + setRemoveCommand("qdel"); + setDefaultPE("threaded"); + setConfigCommand("qconf"); + setSubmissionDelay("0"); } + + /** + * setSubmissionDelay - set the submission delay + * @param delay String representing milliseconds to sleep + */ + private void setSubmissionDelay(String delay) { + setProperty(SUBMISSION_DELAY, delay); + } } Index: modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/SGEExecutor.java =================================================================== --- modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/SGEExecutor.java (revision 3342) +++ modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/SGEExecutor.java (working copy) @@ -4,15 +4,16 @@ //This message may not be removed or altered. //---------------------------------------------------------------------- -/* - * Created on Oct 11, 2005 - */ package org.globus.cog.abstraction.impl.scheduler.sge; import java.io.BufferedReader; import java.io.CharArrayReader; +import java.io.File; import java.io.IOException; import java.io.Writer; +import java.text.DecimalFormat; +import java.text.NumberFormat; +import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.regex.Matcher; @@ -24,21 +25,279 @@ import org.globus.cog.abstraction.impl.scheduler.common.AbstractProperties; import org.globus.cog.abstraction.impl.scheduler.common.AbstractQueuePoller; import org.globus.cog.abstraction.impl.scheduler.common.Job; +import org.globus.cog.abstraction.impl.scheduler.common.ProcessException; import org.globus.cog.abstraction.impl.scheduler.common.ProcessListener; +import org.globus.cog.abstraction.impl.scheduler.pbs.PBSExecutor; import org.globus.cog.abstraction.interfaces.FileLocation; import org.globus.cog.abstraction.interfaces.JobSpecification; import org.globus.cog.abstraction.interfaces.Task; +import org.globus.gsi.gssapi.auth.AuthorizationException; +import org.ietf.jgss.GSSException; +/** + * Java CoG interface for Sun/Oracle Grid Engine + */ public class SGEExecutor extends AbstractExecutor { - public static final Logger logger = Logger.getLogger(SGEExecutor.class); + public static final Pattern JOB_ID_LINE = Pattern.compile(".*[Yy]our job (\\d+) \\(.*\\) has been submitted"); + public static final Logger logger = Logger.getLogger(SGEExecutor.class); + private static QueuePoller poller; + private static final String[] QSUB_PARAMS = new String[] {}; + private static int unique = 0; + private static NumberFormat IDF = new DecimalFormat("000000"); + public SGEExecutor(Task task, ProcessListener listener) { super(task, listener); + verifyQueueInformation(); } + + /** + * Create a new Job + * @param jobid - String representing SGE job ID + * @param stdout + * @param stdOutputLocation + * @param stderr + * @param stdErrorLocation + * @param exitcode + * @param executor + */ + protected Job createJob(String jobid, String stdout, + FileLocation stdOutputLocation, String stderr, + FileLocation stdErrorLocation, String exitcode, + AbstractExecutor executor) { + return new Job(jobid, stdout, stdOutputLocation, stderr, + stdErrorLocation, exitcode, executor); + } + /** + * Return additional submit parameters + * @return String representing qsub parameters + */ + protected String[] getAdditionalSubmitParameters() { + return QSUB_PARAMS; + } + + /** + * Get an attribute from a job specification + * If the attribute does not exist, return the default value + * @param spec JobSpecification to search + * @param name Attribute to search for + * @param defaultValue This value is return if the attribute is not found + * @return String representing an attribute (if found) or the default value + */ + private String getAttribute(JobSpecification spec, String name, + String defaultValue) { + Object value = spec.getAttribute(name); + if (value == null) { + return defaultValue; + } + else { + return value.toString(); + } + } + + /** + * getName - Return the name of this provider + * @return String representing provider name + */ + protected String getName() { + return "SGE"; + } + + /** + * getProperties - Return SGE properties + * @return Properties as an AbstractProperties object + */ + protected AbstractProperties getProperties() { + return Properties.getProperties(); + } + + /** + * getQueuePoller - return the Queue Poller + * @return AbstractQueuePoller + */ + protected AbstractQueuePoller getQueuePoller() { + synchronized (SGEExecutor.class) { + if (poller == null) { + poller = new QueuePoller(getProperties()); + poller.start(); + } + return poller; + } + } + + /** + * getSGEProperties - Return SGE properties + * @return Properties as a Properties object + */ + protected Properties getSGEProperties() { + return (Properties) getProperties(); + } + + /** + * Create SGE job name + * @param task + * @return String containing task name + */ + private String makeName(Task task) { + String name = task.getName(); + if (name == null) { + int i = 0; + synchronized(SGEExecutor.class) { + i = unique++; + } + name = "cog-" + IDF.format(i); + } + else if (name.length() > 15) { + name = name.substring(0, 15); + } + if (logger.isDebugEnabled()) { + logger.debug("SGE name: for: " + task.getName() + + " is: " + name); + } + return name; + } + + /** + * parseSubmitCommandOutput - Given qsub output, return job ID + * @param out - String that contains qsub output + * @return String containing job id + * @throws IOException + */ + protected String parseSubmitCommandOutput(String out) throws IOException { + // > your job 2494189 ("t1.sub") has been submitted + BufferedReader br = new BufferedReader(new CharArrayReader(out.toCharArray())); + String line = br.readLine(); + while (line != null) { + Matcher m = JOB_ID_LINE.matcher(line); + if (m.matches()) { + String id = m.group(1); + if (logger.isInfoEnabled()) { + logger.info("Job id from qsub: " + id); + } + return id; + } + line = br.readLine(); + } + throw new IOException("None of the qsub lines matches the required patten: " + JOB_ID_LINE); + } + + /** + * @see AbstractExecutor#start() + */ + public void start() throws AuthorizationException, IOException, ProcessException { + try { + Thread.sleep(Integer.valueOf(getSGEProperties().getSubmissionDelay())); + } + catch (InterruptedException e) { + logger.error(e.getStackTrace()); + } + super.start(); + } + + /** + * Check that job specification values are valid for this system + * @throws IllegalArgumentException + */ + private void verifyQueueInformation() { + + // A queue must be defined in order to gather information about it + poller = (QueuePoller) getQueuePoller(); + JobSpecification spec = getSpec(); + String queue = (String) spec.getAttribute("queue"); + if(queue == null) { + logger.error("Error: No queue defined"); + return; + } + + QueueInformation qi = poller.getQueueInformation(queue); + String error=""; + + // Verify the queue is available + if(!poller.isValidQueue(queue)) { + error = "Invalid queue \"" + queue + "\"\nAvailable queues are: "; + for(String s : poller.getAllQueues()) { + error += s + " "; + } + logger.error(error); + return; + } + + // Check that pe is defined + String pe = (String) spec.getAttribute("pe"); + if(pe == null) { + error = "Error: No parallel environment specified"; + logger.error(error); + return; + } + + // Check that pe is available for the queue + if(!qi.getPe_list().contains(pe)) { + error = "Parallel environment " + pe + " is not valid for " + queue + " queue\n"; + error += "Valid PEs are: "; + for(String s : qi.getPe_list()) { + error += s + " "; + } + logger.error(error); + return; + } + + // Check that requested walltime fits into time limits + String maxWalltimeAttribute = (String) spec.getAttribute("maxwalltime"); + if(maxWalltimeAttribute != null) { + int requestedWalltimeSeconds = WallTime.timeToSeconds(maxWalltimeAttribute); + String queueWalltimeString = qi.getWalltime(); + if(!queueWalltimeString.equalsIgnoreCase("INFINITY")) { + int queueWalltime = WallTime.timeToSeconds(queueWalltimeString); + if(requestedWalltimeSeconds > queueWalltime) { + error = "Requested wall time of " + requestedWalltimeSeconds + + " seconds is greater than queue limit of " + queueWalltime; + } + } + } + + // Give a warning if CPUs are being underutilized (this may be intentional due to memory restrictions) + Object jobsPerNodeAttribute = spec.getAttribute("jobsPerNode"); + if(jobsPerNodeAttribute != null) { + String jobsPerNode = String.valueOf(jobsPerNodeAttribute); + if(Integer.valueOf(jobsPerNode) < qi.getSlots()) { + if(logger.isInfoEnabled()) { + logger.info("Requesting only " + jobsPerNode + "/" + qi.getSlots() + " CPUs per node"); + } + } + } + } + + + /** + * writeAttr - Write a specification attribute to a submit file + * If the attribute is not found, use null + * @param attrName Specification attribute to write + * @param arg The SGE argument (eg. -N for the job name) + * @param wr A Writer object representing the submit file + * @throws IOException + */ + protected void writeAttr(String attrName, String arg, Writer wr) + throws IOException { + + writeAttr(attrName, arg, wr, null); + } + + + + /** + * writeAttr - Write a specification attribute to a submit file + * + * @param attrName Specification attribute to write + * @param arg The SGE argument (eg. -N for the job name) + * @param wr A Writer object representing the submit file + * @param defaultValue If the requested attribute is not found, use this default value + * @throws IOException + */ protected void writeAttr(String attrName, String arg, Writer wr, String defaultValue) throws IOException { - Object value = getSpec().getAttribute(attrName); + + Object value = getSpec().getAttribute(attrName); if (value != null) { wr.write("#$ " + arg + String.valueOf(value) + '\n'); } @@ -47,42 +306,64 @@ } } - protected void writeAttr(String attrName, String arg, Writer wr) + /** + * writeMultiJobPreamble - Add multiple jobs to a single submit file + * @param wr Writer A Writer object representing the submit file + * @param exitcodefile Filename where application exit code should be written + * @throws IOException + */ + protected void writeMultiJobPreamble(Writer wr, String exitcodefile) throws IOException { - writeAttr(attrName, arg, wr, null); + wr.write("NODES=`cat $PE_HOSTFILE | awk '{ for(i=0;i<$2;i++){print $1} }'`\n"); + wr.write("ECF=" + exitcodefile + "\n"); + wr.write("INDEX=0\n"); + wr.write("for NODE in $NODES; do\n"); + wr.write(" echo \"N\" >$ECF.$INDEX\n"); + wr.write(" ssh $NODE /bin/bash -c \\\" \""); } - protected void writeWallTime(Writer wr) throws IOException { - Object walltime = getSpec().getAttribute("maxwalltime"); - if (walltime != null) { - wr.write("#$ -l h_rt=" - + WallTime.normalize(walltime.toString(), "sge-native") - + '\n'); - } - } + /** + * writeScript - Write the SGE submit script + * @param wr A Writer object representing the submit file + * @param exitcodefile Filename where exit code will be written + * @param stdout Filename where standard output will be written + * @param stderr Filename where standard error will be written + * @throws IOException + */ protected void writeScript(Writer wr, String exitcodefile, String stdout, String stderr) throws IOException { - Task task = getTask(); + + Task task = getTask(); JobSpecification spec = getSpec(); + String type = (String) spec.getAttribute("jobType"); boolean multiple = false; if ("multiple".equals(type)) { multiple = true; } - + + int count = Integer.valueOf(getAttribute(spec, "count", "1")); + String queue = (String)spec.getAttribute("queue"); + + int coresPerNode = Integer.valueOf(getAttribute(spec, "coresPerNode", + String.valueOf(poller.getQueueInformation(queue).getSlots()))); + int jobsPerNode = Integer.valueOf(getAttribute(spec, "jobsPerNode", + String.valueOf(coresPerNode))); + int coresToRequest = ( count * jobsPerNode + coresPerNode - 1) / coresPerNode * coresPerNode; + wr.write("#!/bin/bash\n"); - wr.write("#$ -N " + task.getName() + '\n'); - // ranger requires this. might as well be default + wr.write("#$ -N " + makeName(task) + '\n'); wr.write("#$ -V\n"); writeAttr("project", "-A ", wr); - - writeAttr("count", "-pe " - + getAttribute(spec, "pe", getSGEProperties().getDefaultPE()) - + " ", wr, "1"); - + writeAttr("queue", "-q ", wr); + + String peValue = "-pe " + getAttribute(spec, "pe", getSGEProperties().getDefaultPE()) + " "; + writeAttr("null", peValue, wr, String.valueOf(coresToRequest)); + writeWallTime(wr); - writeAttr("queue", "-q ", wr); + writeSoftWallTime(wr); + if (spec.getStdInput() != null) { wr.write("#$ -i " + quote(spec.getStdInput()) + '\n'); } @@ -91,9 +372,9 @@ if (!spec.getEnvironmentVariableNames().isEmpty()) { wr.write("#$ -v "); - Iterator i = spec.getEnvironmentVariableNames().iterator(); + Iterator i = spec.getEnvironmentVariableNames().iterator(); while (i.hasNext()) { - String name = (String) i.next(); + String name = i.next(); wr.write(name); wr.write('='); wr.write(quote(spec.getEnvironmentVariable(name))); @@ -107,6 +388,7 @@ if (logger.isDebugEnabled()) { logger.debug("Job type: " + type); } + if (type != null) { String wrapper = Properties.getProperties().getProperty( "wrapper." + type); @@ -122,6 +404,21 @@ logger.debug("Wrapper after variable substitution: " + wrapper); } } + + wr.write("\nwrite_exitcode()\n"); + wr.write("{\n"); + wr.write("echo $1 > " + exitcodefile + "\n"); + wr.write("exit 0\n"); + wr.write("}\n\n"); + + wr.write("# Trap all signals\n"); + wr.write("SIGNAL=1\n"); + wr.write("while [ $SIGNAL -le 30 ];\n"); + wr.write("do\n"); + wr.write(" trap \"echo Received signal $SIGNAL; write_exitcode $SIGNAL\" $SIGNAL\n"); + wr.write(" (( SIGNAL+=1 ))\n"); + wr.write("done\n\n"); + if (spec.getDirectory() != null) { wr.write("cd " + quote(spec.getDirectory()) + " && "); } @@ -129,11 +426,12 @@ if (multiple) { writeMultiJobPreamble(wr, exitcodefile); } + wr.write(quote(spec.getExecutable())); - List args = spec.getArgumentsAsList(); + List args = spec.getArgumentsAsList(); if (args != null && args.size() > 0) { wr.write(' '); - Iterator i = args.iterator(); + Iterator i = args.iterator(); while (i.hasNext()) { wr.write(quote((String) i.next())); if (i.hasNext()) { @@ -145,92 +443,41 @@ if (spec.getStdInput() != null) { wr.write(" < " + quote(spec.getStdInput())); } + if (multiple) { writeMultiJobPostamble(wr); + } else { + wr.write(" &\n"); + wr.write("wait $!\n"); + wr.write("write_exitcode $?\n"); } - else { - wr.write('\n'); - wr.write("/bin/echo $? >" + exitcodefile + '\n'); - } wr.close(); } - - protected void writeMultiJobPreamble(Writer wr, String exitcodefile) - throws IOException { - wr.write("NODES=`cat $PE_HOSTFILE | awk '{ for(i=0;i<$2;i++){print $1} }'`\n"); - wr.write("ECF=" + exitcodefile + "\n"); - wr.write("INDEX=0\n"); - wr.write("for NODE in $NODES; do\n"); - wr.write(" echo \"N\" >$ECF.$INDEX\n"); - wr.write(" ssh $NODE /bin/bash -c \\\" \""); - } - - private String getAttribute(JobSpecification spec, String name, - String defaultValue) { - Object value = spec.getAttribute(name); - if (value == null) { - return defaultValue; + + /** + * writeWallTime - Convert time into correct format and write to submit file + * Use maxtime first is available, otherwise use maxwalltime + * @param wr Writer A Writer object representing the submit file + * @throws IOException + */ + protected void writeWallTime(Writer wr) throws IOException { + Object walltime = getSpec().getAttribute("maxwalltime"); + if (walltime != null) { + wr.write("#$ -l h_rt=" + + WallTime.normalize(walltime.toString(), "sge-native") + + '\n'); } - else { - return value.toString(); - } } - - protected String getName() { - return "SGE"; - } - - protected AbstractProperties getProperties() { - return Properties.getProperties(); - } - protected Properties getSGEProperties() { - return (Properties) getProperties(); + protected void writeSoftWallTime(Writer wr) throws IOException { + String walltime = (String)getSpec().getAttribute("maxwalltime"); + if (walltime != null) { + int walltimeSeconds = WallTime.timeToSeconds(walltime) - 10; + wr.write("#$ -l s_rt=" + + WallTime.format("sge-native", walltimeSeconds) + + '\n'); + } } - public static final Pattern JOB_ID_LINE = Pattern.compile(".*[Yy]our job (\\d+) \\(.*\\) has been submitted"); - protected String parseSubmitCommandOutput(String out) throws IOException { - // > your job 2494189 ("t1.sub") has been submitted - BufferedReader br = new BufferedReader(new CharArrayReader(out.toCharArray())); - String line = br.readLine(); - while (line != null) { - Matcher m = JOB_ID_LINE.matcher(line); - if (m.matches()) { - String id = m.group(1); - if (logger.isInfoEnabled()) { - logger.info("Job id from qsub: " + id); - } - return id; - } - line = br.readLine(); - } - throw new IOException("None of the qsub lines matches the required patten: " + JOB_ID_LINE); - } - - private static final String[] QSUB_PARAMS = new String[] {}; - - protected String[] getAdditionalSubmitParameters() { - return QSUB_PARAMS; - } - - protected Job createJob(String jobid, String stdout, - FileLocation stdOutputLocation, String stderr, - FileLocation stdErrorLocation, String exitcode, - AbstractExecutor executor) { - return new Job(jobid, stdout, stdOutputLocation, stderr, - stdErrorLocation, exitcode, executor); - } - - private static QueuePoller poller; - - protected AbstractQueuePoller getQueuePoller() { - synchronized (SGEExecutor.class) { - if (poller == null) { - poller = new QueuePoller(getProperties()); - poller.start(); - } - return poller; - } - } } From swift at ci.uchicago.edu Wed Jan 11 12:50:06 2012 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Wed, 11 Jan 2012 18:50:06 -0000 Subject: [Swift-commit] Cog update Message-ID: <20120111185005.9A46C8D0006B@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3344 | jmwozniak | 2012-01-11 12:49:37 -0600 (Wed, 11 Jan 2012) | 2 lines Restore localscheduler call to validate() ------------------------------------------------------------------------ Index: modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/cobalt/CobaltExecutor.java =================================================================== --- modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/cobalt/CobaltExecutor.java (revision 3343) +++ modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/cobalt/CobaltExecutor.java (working copy) @@ -23,7 +23,6 @@ import org.globus.cog.abstraction.impl.scheduler.common.AbstractProperties; import org.globus.cog.abstraction.impl.scheduler.common.AbstractQueuePoller; import org.globus.cog.abstraction.impl.scheduler.common.Job; -import org.globus.cog.abstraction.impl.scheduler.common.ProcessException; import org.globus.cog.abstraction.impl.scheduler.common.ProcessListener; import org.globus.cog.abstraction.interfaces.FileLocation; import org.globus.cog.abstraction.interfaces.JobSpecification; @@ -32,8 +31,8 @@ public class CobaltExecutor extends AbstractExecutor { public static final Logger logger = Logger.getLogger(CobaltExecutor.class); - private String cqsub; - private Pattern exitcodeRegexp; + private final String cqsub; + private final Pattern exitcodeRegexp; private static final String[] EMPTY_STRING_ARRAY = new String[0]; @@ -45,7 +44,7 @@ } @Override - protected void validate(Task task) throws ProcessException { + protected void validate(Task task) { JobSpecification spec = (JobSpecification) task.getSpecification(); if (spec.getAttribute("alcfbgpnat") != null) { spec.addEnvironmentVariable("ZOID_ENABLE_NAT", "true"); @@ -53,24 +52,32 @@ super.validate(task); } - - - protected Job createJob(String jobid, String stdout, - FileLocation stdOutputLocation, String stderr, - FileLocation stdErrorLocation, String exitcode, - AbstractExecutor executor) { - return new CobaltJob(jobid, stdout, stderr, getSpec().getStdOutput(), stdOutputLocation, - getSpec().getStdError(), stdErrorLocation, exitcodeRegexp, this); + @Override + protected Job createJob(String jobid, + String stdout, + FileLocation stdOutputLocation, + String stderr, + FileLocation stdErrorLocation, + String exitcode, + AbstractExecutor executor) { + return new CobaltJob(jobid, stdout, stderr, + getSpec().getStdOutput(), + stdOutputLocation, + getSpec().getStdError(), + stdErrorLocation, exitcodeRegexp, this); } + @Override protected String getName() { return "Cobalt"; } + @Override protected AbstractProperties getProperties() { return Properties.getProperties(); } + @Override protected void writeScript(Writer wr, String exitcode, String stdout, String stderr) throws IOException { } @@ -112,6 +119,7 @@ } } + @Override protected String[] buildCommandLine(File jobdir, File script, String exitcode, String stdout, String stderr) throws IOException { List result = new ArrayList(); @@ -157,6 +165,7 @@ return result.toArray(EMPTY_STRING_ARRAY); } + @Override protected String quote(String s) { boolean quotes = false; if (s.indexOf(' ') != -1) { @@ -180,6 +189,7 @@ return sb.toString(); } + @Override protected void cleanup() { super.cleanup(); new File(getStdout()).delete(); @@ -188,6 +198,7 @@ private static AbstractQueuePoller poller; + @Override protected AbstractQueuePoller getQueuePoller() { synchronized(CobaltExecutor.class) { if (poller == null) { Index: modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/common/AbstractExecutor.java =================================================================== --- modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/common/AbstractExecutor.java (revision 3343) +++ modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/common/AbstractExecutor.java (working copy) @@ -26,7 +26,6 @@ import org.globus.cog.abstraction.interfaces.JobSpecification; import org.globus.cog.abstraction.interfaces.Task; import org.globus.gsi.gssapi.auth.AuthorizationException; -import org.ietf.jgss.GSSException; /** * Set log level to DEBUG to not delete generated submit script @@ -59,11 +58,12 @@ this.task = task; this.spec = (JobSpecification) task.getSpecification(); this.listener = listener; + validate(task); } - public void start() - throws AuthorizationException, IOException, ProcessException { - + public void start() + throws AuthorizationException, IOException, ProcessException { + File scriptdir = new File(System.getProperty("user.home") + File.separatorChar + ".globus" + File.separatorChar + "scripts"); @@ -163,9 +163,9 @@ } protected String[] buildCommandLine(File jobdir, File script, - String exitcode, String stdout, String stderr) + String exitcode, String stdout, String stderr) throws IOException { - + writeScript(new BufferedWriter(new FileWriter(script)), exitcode, stdout, stderr); if (logger.isDebugEnabled()) { @@ -216,8 +216,12 @@ throw new TaskSubmissionException("Failed to cancel task", e); } } - - protected void validate(Task task) throws ProcessException { + + /** + Overriding methods may perform miscellaneous Task + processing here + */ + protected void validate(Task task) { } protected abstract AbstractProperties getProperties(); @@ -259,7 +263,7 @@ } protected abstract void writeScript(Writer wr, String exitcode, - String stdout, String stderr) + String stdout, String stderr) throws IOException; protected JobSpecification getSpec() { @@ -283,39 +287,45 @@ } } - public void processCompleted(int exitCode) { + @Override + public void processCompleted(int exitCode) { cleanup(); if (listener != null) { listener.processCompleted(exitCode); } } - public void processFailed(String message) { + @Override + public void processFailed(String message) { cleanup(); if (listener != null) { listener.processFailed(message); } } - public void statusChanged(int status) { + @Override + public void statusChanged(int status) { if (listener != null) { listener.statusChanged(status); } } - public void stderrUpdated(String stderr) { + @Override + public void stderrUpdated(String stderr) { if (listener != null) { listener.stderrUpdated(stderr); } } - public void stdoutUpdated(String stdout) { + @Override + public void stdoutUpdated(String stdout) { if (listener != null) { listener.stdoutUpdated(stdout); } } - public void processFailed(Exception e) { + @Override + public void processFailed(Exception e) { cleanup(); if (listener != null) { listener.processFailed(e); From swift at ci.uchicago.edu Thu Jan 12 00:15:04 2012 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Thu, 12 Jan 2012 00:15:04 -0600 (CST) Subject: [Swift-commit] Cog update Message-ID: <20120112061505.5650A8D0006B@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3345 | hategan | 2012-01-12 00:14:17 -0600 (Thu, 12 Jan 2012) | 1 line made local provider more override-friendly and fixed a wait-for-output-to-be-read bug ------------------------------------------------------------------------ Index: modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java =================================================================== --- modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java (revision 3344) +++ modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java (working copy) @@ -163,23 +163,10 @@ // TODO move away from the multi-threaded approach JobSpecification spec = (JobSpecification) getTask().getSpecification(); - /* - * Run the process in the specified directory or - * in the current directory if the specification - * directory is null - */ - File dir = null; - if (spec.getDirectory() != null) { - dir = new File(spec.getDirectory()); - } - else { - dir = new File("."); - } - + File dir = getJobDir(spec); stageIn(spec, dir); - - process = Runtime.getRuntime().exec(buildCmdArray(spec), buildEnvp(spec), dir); - + + process = startProcess(spec, dir); getTask().setStatus(Status.ACTIVE); /* @@ -234,9 +221,9 @@ * so STDIN processing cannot easily be interwoven * with STDOUT/STDERR processing in a single thread */ - processIN(spec.getStdInput(), dir); + processIN(spec.getStdInput(), dir, process.getOutputStream()); - int exitCode = process.waitFor(); + int exitCode = p.waitFor(); if (logger.isDebugEnabled()) { logger.debug("Exit code was " + exitCode); @@ -272,7 +259,25 @@ } } - private void cleanUp(JobSpecification spec, File dir) throws TaskSubmissionException { + protected Process startProcess(JobSpecification spec, File dir) throws IOException { + return Runtime.getRuntime().exec(buildCmdArray(spec), buildEnvp(spec), dir); + } + + protected File getJobDir(JobSpecification spec) { + /* + * Run the process in the specified directory or + * in the current directory if the specification + * directory is null + */ + if (spec.getDirectory() != null) { + return new File(spec.getDirectory()); + } + else { + return new File("."); + } + } + + protected void cleanUp(JobSpecification spec, File dir) throws TaskSubmissionException { CleanUpSet cs = spec.getCleanUpSet(); if (cs == null || cs.isEmpty()) { return; @@ -304,7 +309,7 @@ } } - private void stageOut(JobSpecification spec, File dir, boolean jobSucceeded) throws Exception { + protected void stageOut(JobSpecification spec, File dir, boolean jobSucceeded) throws Exception { StagingSet s = spec.getStageOut(); if (s == null || s.isEmpty()) { return; @@ -320,7 +325,7 @@ } } - private void stageIn(JobSpecification spec, File dir) throws Exception { + protected void stageIn(JobSpecification spec, File dir) throws Exception { StagingSet s = spec.getStageIn(); if (s == null || s.isEmpty()) { return; @@ -380,7 +385,7 @@ } } - private ServiceContact getServiceContact(URI uri) { + protected ServiceContact getServiceContact(URI uri) { ServiceContact sc = new ServiceContactImpl(); if (uri.getHost() != null) { sc.setHost(uri.getHost()); @@ -405,12 +410,10 @@ return uri; } - protected void processIN(String in, File dir) throws IOException { + protected void processIN(String in, File dir, OutputStream out) throws IOException { byte[] buf = new byte[BUFFER_SIZE]; if (in != null) { - OutputStream out = process.getOutputStream(); - File stdin; if (dir != null) { stdin = new File(dir, in); @@ -426,8 +429,8 @@ read = file.read(buf); } file.close(); - out.close(); } + out.close(); } protected OutputStream prepareOutStream(String out, FileLocation loc, File dir, Task task, @@ -459,7 +462,7 @@ return os; } - private String[] buildCmdArray(JobSpecification spec) { + protected String[] buildCmdArray(JobSpecification spec) { List arguments = spec.getArgumentsAsList(); String[] cmdarray = new String[arguments.size() + 1]; @@ -471,7 +474,7 @@ return cmdarray; } - private String[] buildEnvp(JobSpecification spec) { + protected String[] buildEnvp(JobSpecification spec) { Collection names = spec.getEnvironmentVariableNames(); if (names.size() == 0) { /* @@ -560,6 +563,7 @@ private Process p; private List streamPairs; byte[] buf; + private boolean done; public Processor(Process p, List streamPairs) { this.p = p; @@ -587,8 +591,12 @@ any = false; } if (processDone()) { - processPairs(); + while(processPairs()) {} closePairs(); + synchronized(this) { + done = true; + notifyAll(); + } return; } else { @@ -634,6 +642,15 @@ } return any; } + + public int waitFor() throws InterruptedException { + synchronized(this) { + while (!done) { + wait(); + } + } + return p.waitFor(); + } private boolean processDone() { try { From swift at ci.uchicago.edu Thu Jan 12 00:20:04 2012 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Thu, 12 Jan 2012 00:20:04 -0600 (CST) Subject: [Swift-commit] Cog update Message-ID: <20120112062004.B08C98D0006B@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3347 | hategan | 2012-01-12 00:18:14 -0600 (Thu, 12 Jan 2012) | 1 line removed some debugging stuff and added ability to change ssh command ------------------------------------------------------------------------ Index: modules/provider-ssh/src/org/globus/cog/abstraction/impl/sshcl/execution/JobSubmissionTaskHandler.java =================================================================== --- modules/provider-ssh/src/org/globus/cog/abstraction/impl/sshcl/execution/JobSubmissionTaskHandler.java (revision 3346) +++ modules/provider-ssh/src/org/globus/cog/abstraction/impl/sshcl/execution/JobSubmissionTaskHandler.java (working copy) @@ -26,12 +26,14 @@ protected String[] buildCmdArray(JobSpecification spec) { Service service = getTask().getService(0); + String ssh = (String) getTask().getAttribute("ssh"); + if (ssh == null) { + ssh = "ssh"; + } + List cmdarray = new ArrayList(); - cmdarray.add("ssh"); - //cmdarray.add("/home/mike/soft/bin/tssh"); - //cmdarray.add("-v"); - //cmdarray.add("-v"); - //cmdarray.add("-v"); + cmdarray.add(ssh); + if (spec.getAttribute("username") != null) { cmdarray.add("-l"); cmdarray.add(spec.getAttribute("username").toString()); From swift at ci.uchicago.edu Mon Jan 16 21:30:11 2012 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Mon, 16 Jan 2012 21:30:11 -0600 (CST) Subject: [Swift-commit] Cog update Message-ID: <20120117033011.A48238D00075@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3348 | hategan | 2012-01-16 21:27:38 -0600 (Mon, 16 Jan 2012) | 1 line log stdout/err when job fails ------------------------------------------------------------------------ Index: modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java =================================================================== --- modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java (revision 3347) +++ modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java (working copy) @@ -178,23 +178,14 @@ // TODO a single thread can be used here for all processes List pairs = new LinkedList(); - if (!FileLocation.NONE.equals(spec.getStdOutputLocation())) { - OutputStream os = - prepareOutStream(spec.getStdOutput(), spec.getStdOutputLocation(), dir, - getTask(), STDOUT); - if (os != null) { - pairs.add(new StreamPair(process.getInputStream(), os)); - } - } + OutputStream os; + os = prepareOutStream(spec.getStdOutput(), spec.getStdOutputLocation(), dir, + getTask(), STDOUT); + pairs.add(new StreamPair(process.getInputStream(), os)); - if (!FileLocation.NONE.equals(spec.getStdErrorLocation())) { - OutputStream os = - prepareOutStream(spec.getStdError(), spec.getStdErrorLocation(), dir, - getTask(), STDERR); - if (os != null) { - pairs.add(new StreamPair(process.getErrorStream(), os)); - } - } + os = prepareOutStream(spec.getStdError(), spec.getStdErrorLocation(), dir, + getTask(), STDERR); + pairs.add(new StreamPair(process.getErrorStream(), os)); /* * Start redirecting the streams @@ -245,6 +236,10 @@ } } else { + if (logger.isDebugEnabled()) { + logger.debug("STDOUT: " + pairs.get(0).os.toString()); + logger.debug("STDERR: " + pairs.get(1).os.toString()); + } throw new JobException(exitCode); } } From swift at ci.uchicago.edu Tue Jan 17 17:05:08 2012 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Tue, 17 Jan 2012 17:05:08 -0600 (CST) Subject: [Swift-commit] Cog update Message-ID: <20120117230508.9D5578D00078@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3350 | hategan | 2012-01-17 17:04:04 -0600 (Tue, 17 Jan 2012) | 1 line updated to reflect changes in local provider ------------------------------------------------------------------------ Index: modules/provider-ssh/src/org/globus/cog/abstraction/impl/sshcl/execution/JobSubmissionTaskHandler.java =================================================================== --- modules/provider-ssh/src/org/globus/cog/abstraction/impl/sshcl/execution/JobSubmissionTaskHandler.java (revision 3349) +++ modules/provider-ssh/src/org/globus/cog/abstraction/impl/sshcl/execution/JobSubmissionTaskHandler.java (working copy) @@ -23,7 +23,7 @@ public class JobSubmissionTaskHandler extends org.globus.cog.abstraction.impl.execution.local.JobSubmissionTaskHandler { - protected String[] buildCmdArray(JobSpecification spec) { + protected List buildCmdArray(JobSpecification spec) { Service service = getTask().getService(0); String ssh = (String) getTask().getAttribute("ssh"); @@ -57,10 +57,18 @@ */ cmdarray.add("-s"); - return cmdarray.toArray(new String[0]); + return cmdarray; } @Override + protected void addEnvs(ProcessBuilder pb, JobSpecification spec) { + // override to do nothing. Environment variables are passed + // through the ssh shell + } + + + + @Override protected void processIN(String in, File dir, OutputStream os) throws IOException { JobSpecification spec = (JobSpecification) getTask().getSpecification(); From swift at ci.uchicago.edu Sat Jan 21 20:00:04 2012 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Sat, 21 Jan 2012 20:00:04 -0600 (CST) Subject: [Swift-commit] Cog update Message-ID: <20120122020006.3D9FF8D0007D@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3352 | hategan | 2012-01-21 19:58:57 -0600 (Sat, 21 Jan 2012) | 1 line use properties for figuring out what ssh executable to use ------------------------------------------------------------------------ Index: modules/provider-ssh/src/org/globus/cog/abstraction/impl/sshcl/execution/JobSubmissionTaskHandler.java =================================================================== --- modules/provider-ssh/src/org/globus/cog/abstraction/impl/sshcl/execution/JobSubmissionTaskHandler.java (revision 3351) +++ modules/provider-ssh/src/org/globus/cog/abstraction/impl/sshcl/execution/JobSubmissionTaskHandler.java (working copy) @@ -15,21 +15,37 @@ import java.io.PrintStream; import java.util.ArrayList; import java.util.List; +import java.util.Properties; +import org.apache.log4j.Logger; import org.globus.cog.abstraction.impl.common.task.TaskSubmissionException; import org.globus.cog.abstraction.interfaces.JobSpecification; import org.globus.cog.abstraction.interfaces.Service; public class JobSubmissionTaskHandler extends org.globus.cog.abstraction.impl.execution.local.JobSubmissionTaskHandler { + public static final Logger logger = Logger.getLogger(JobSubmissionTaskHandler.class); + private static Properties props; + + private synchronized static Properties getProperties() { + if (props == null) { + props = new Properties(); + try { + ClassLoader cl = JobSubmissionTaskHandler.class.getClassLoader(); + props.load(cl.getResourceAsStream("provider-sshcl.properties")); + } + catch (Exception e) { + logger.warn("Failed to load properties", e); + } + } + return props; + } + protected List buildCmdArray(JobSpecification spec) { Service service = getTask().getService(0); - String ssh = (String) getTask().getAttribute("ssh"); - if (ssh == null) { - ssh = "ssh"; - } + String ssh = getProperties().getProperty("ssh", "ssh"); List cmdarray = new ArrayList(); cmdarray.add(ssh); From swift at ci.uchicago.edu Sat Jan 21 20:05:04 2012 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Sat, 21 Jan 2012 20:05:04 -0600 (CST) Subject: [Swift-commit] Cog update Message-ID: <20120122020505.70A578D0007D@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3353 | hategan | 2012-01-21 20:04:13 -0600 (Sat, 21 Jan 2012) | 1 line added a bit of an explanation ------------------------------------------------------------------------ Index: modules/provider-ssh/etc/provider-sshcl.properties =================================================================== --- modules/provider-ssh/etc/provider-sshcl.properties (revision 3352) +++ modules/provider-ssh/etc/provider-sshcl.properties (working copy) @@ -1 +1,3 @@ +# the ssh executable to use (either just the name if in PATH +# or the full path) ssh = ssh \ No newline at end of file From wilde at ci.uchicago.edu Sat Jan 28 15:11:00 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Sat, 28 Jan 2012 15:11:00 -0600 (CST) Subject: [Swift-commit] r5522 - SwiftApps/SciColSim Message-ID: <20120128211100.214F89CC94@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-28 15:10:59 -0600 (Sat, 28 Jan 2012) New Revision: 5522 Modified: SwiftApps/SciColSim/Makefile SwiftApps/SciColSim/TODO SwiftApps/SciColSim/annealing.swift SwiftApps/SciColSim/evolve.sh SwiftApps/SciColSim/optimizer.cpp SwiftApps/SciColSim/tc SwiftApps/SciColSim/testopt1.py Log: Getting closer to C++ output for Andrey's graph optimizer. Modified: SwiftApps/SciColSim/Makefile =================================================================== --- SwiftApps/SciColSim/Makefile 2012-01-25 17:29:58 UTC (rev 5521) +++ SwiftApps/SciColSim/Makefile 2012-01-28 21:10:59 UTC (rev 5522) @@ -2,19 +2,14 @@ ifeq ($(UNAME), Linux) -all: toptimizer +all: openmp-optimizer -protoall: toptimizer optimizer Optimizer +openmp-optimizer: optimizer.cpp + g++ -DP_OPENMP -fopenmp -I boost_1_47_0 -o openmp-optimizer optimizer.cpp -optimizer: optimizer.snap01.cpp - g++ -static -fopenmp -I boost_1_47_0 -o optimizer optimizer.snap01.cpp +clean: + rm -rf mac-openmp-optimizer mac-dispatch-optimizer mac-orig-optimizer -Optimizer: optimizer.snap01.cpp - g++ -static -O3 -fopenmp -I boost_1_47_0 -o Optimizer optimizer.snap01.cpp - -toptimizer: optimizer.cpp - g++ -static -fopenmp -I boost_1_47_0 -o toptimizer optimizer.cpp - endif ifeq ($(UNAME), Darwin) Modified: SwiftApps/SciColSim/TODO =================================================================== --- SwiftApps/SciColSim/TODO 2012-01-25 17:29:58 UTC (rev 5521) +++ SwiftApps/SciColSim/TODO 2012-01-28 21:10:59 UTC (rev 5522) @@ -1,12 +1,37 @@ -[x] Determine if one evolve() run in the optimizer.cpp code is sufficient. (yes -it does 1 woth reruns = 1 +[x] Determine if one evolve() run in the optimizer.cpp code is +sufficient. (yes -it does 1 woth reruns = 1 -Determine if and how to let the optimizer.cpp code do N reruns and how to set NWorkers accordingly (must evenly divide in current code). +[ ] Determine correct test parameter sets - and if we are passing these +through correctly. -Determine annealing.swift output files needed. +[ ] Check correctnes of rejection tracking logic and j of k logic for the 5 params -Align Swift and .cp code and do a correctness test. +[ ] address fixme's -Do performance tests on Beagle and then other platforms (OSG, TG) +[ ] deterine how to find max_reject -Package code for ExM research. +[ ] Determine if and how to let the optimizer.cpp code do N reruns and +how to set NWorkers accordingly (must evenly divide in current code). +Check if floor() is correct and how load is partitioned; what N makes +sense in swift usage? +[x] Determine annealing.swift output files needed. + +[_x_ ] Make annealing.swift stdout/err output match that of optimizer.cpp + +[x] Integrate code to start with usec seed + +[x] add code to set secific seed for reproducibiity. Will Swift use same from Java Random? + +[ ] Align Swift and .cp code enough do a correctness test. + +[ ] Enable precision control for %f formatting (to match c++ +output). Why are we getting some long and some short? Is swift +truncating the constant or the tracef output? + +[ ] Do performance tests on Beagle and then other platforms (OSG, TG) +- at scale. Ensure we aredoing 100's to 1000's of evolve() calls in +parallel. + +[ ] Package code for ExM research. + Modified: SwiftApps/SciColSim/annealing.swift =================================================================== --- SwiftApps/SciColSim/annealing.swift 2012-01-25 17:29:58 UTC (rev 5521) +++ SwiftApps/SciColSim/annealing.swift 2012-01-28 21:10:59 UTC (rev 5522) @@ -64,7 +64,7 @@ Res mlres[][]; mlres[0][0] = multi_loss( 0, 0, params0, target_innov, evolve_reruns ); // Only done once, not 5x; serves for all evolve-params ??? -tracef("in multi_annealing: i=%i j=%i ret vals from iniital multi_loss=(%f,%f)\n",0,0,mlres[0][0].loss,mlres[0][0].sdev); + tracef("multi_annealing: AR: %f +- %f\n",mlres[0][0].loss,mlres[0][0].sdev); foreach j in [0:NEVOPARAMS-1] { x[0][j]=params0[j]; @@ -77,7 +77,7 @@ foreach i in [1:annealing_cycles] { // set new temperature, rejection threshold, and dx values for this cycle float temperature = T_start*exp( @tofloat(i)*(jlog(T_end)-jlog(T_start))/@tofloat(annealing_cycles)); - tracef("in multi_annealing: i=%i T=%f\n", i, temperature); + tracef("in multi_annealing: AR: i=%i ....T=%f\n", i, temperature); // On each new "major" cycle within the annealing_cycles (other than the first) set new rejection and dx values if ( i %% cycle == 1 && i > 1 ){ tracef("multi_annealing: new cycle at i=%i\n",i); @@ -93,6 +93,7 @@ } trace ("Recomputed rejection: i=%d k=%d dx[i][k]=%f\n", i, k, dx[i][k]); } + tracef("in multi_annealing: AR: %f %f %f %f %f\n",dx[i][0],dx[i][1],dx[i][2],dx[i][3],dx[i][4],dx[i][5]); } else { # If not new cycle, set dx from previous dx (i-1) foreach k in [0:NEVOPARAMS-1] { @@ -103,8 +104,9 @@ // float try_x[]; int curr = (i * NEVOPARAMS) + j; int prev = curr-1; -tracef("in multi_annealing: i=%i j=%i curr=%i prev=%i\n", i, j, curr, prev); - if ( /*(!FIX_VARIABLES) || */ (var_fixed[j]==0) ) { # fixed=1,1,0,0,0: FIXME: FIX_VARIABLES flag has faulty logic but OK when TRUE + tracef("in multi_annealing: i=%i j=%i curr=%i prev=%i\n", i, j, curr, prev); + if ( /*(!FIX_VARIABLES) || */ (var_fixed[j]==0) ) { + # fixed=1,1,0,0,0: FIXME: FIX_VARIABLES flag has faulty logic but OK when TRUE float try_x[]; foreach k in [0:NEVOPARAMS-1] { // Select the evolve params to try if ( k < j ) { @@ -122,35 +124,65 @@ tracef("in multi_annealing: i=%i j=%i k=%i\n", i, j, k); } // Up to here, x[] and dx[] are only set for previous i -tracef( @strcat(color(3,"in multi_annealing: "),"i=%i j=%i calling multi_loss\n"),i,j); -#tracef("in multi_annealing: i=%i j=%i calling multi_loss try_x=%q\n",i,j,try_x); + tracef( @strcat(color(3,"in multi_annealing: "),"i=%i j=%i calling multi_loss\n"),i,j); + #tracef("multi_annealing: i=%i j=%i calling multi_loss try_x=%q\n",i,j,try_x); mlres[i][j] = multi_loss(i,j,try_x, target_innov, evolve_reruns); # do the N evolve()'s, N=evolve_reruns -tracef("in multi_annealing: i=%i j=%i ret vals from multi_loss=(%f,%f)\n",i,j,mlres[i][j].loss,mlres[i][j].sdev); + tracef("multi_annealing: i=%i j=%i ret vals from multi_loss=(%f,%f)\n",i,j,mlres[i][j].loss,mlres[i][j].sdev); + tracef("in multi_annealing: AR: %f+-%f\n",mlres[i][j].loss,mlres[i][j].sdev); // Beyond this point, x[] and dx[] are being set for this i,j float ratio = min(1.0, exp( -(mlres[i][j].loss-curr_loss[prev]) /temperature)); float r = (random()) / (pow(2.0,31.0)-1.0); // why all the 2^31's ??? + tracef("in multi_annealing: AR: %f vs %f\n", r, ratio); float ALOT=100000000000.0; // 100,000,000,000. = 10^11 if (mlres[i][j].loss < ALOT) { - tracef("multi_annealing: Writing: filestr.open (best_opt_some.txt, ofstream::app);\n"); - # un[0]->get_target() Res.loss un[0]->get_parameter[0:4] Res.error - # filestr.open ("max_dist.txt", ofstream::app); + tracef("multi_annealing: AF: best_opt_some.txt: %f,%f,%f,%f,%f,%f,%f,%f\n", + target_innov,mlres[i][j].loss,try_x[0],try_x[1],try_x[2],try_x[3],try_x[4],mlres[i][j].sdev); + tracef(color(Red,"multi_annealing: AR: max_dist.txt - tbd\n")); + // FIXME: max_dist is global set inside evolve() - need to get to cli - perhaps as 3rd output value } else { // does this ever occur? if so did we want to still do the ratio computation above??? tracef("multi_annealing: Loss %f > ALOT at [i][j] = [%d][%d]\n", mlres[i][j].loss, i ,j); } if (r > ratio) { // Reject new parameter x[i][j] = x[i-1][j]; - rejection[i][j] = rejection[i-1][j] + 1.0; // Is this correct? incr rejection? + rejection[i][j] = rejection[i-1][j] + 1.0; // FIXME: AR: Is this correct? incr rejection? curr_loss[curr] = curr_loss[prev]; curr_sdev[curr] = curr_sdev[prev]; + # FIXME: AR: the following prints seem to replicate values in the .cpp version - please clarify. + tracef("multi_annealing: AR: %i,%i %i Did not accept: %f (%i)\n", i, j, i, try_x[j], j); + tracef("multi_annealing: AR: %f %f %f %f %f\n", try_x[0],try_x[1],try_x[2],try_x[3],try_x[4]); } else { // Accept new parameter -tracef("multi_annealing: Accepting try_x[j], i=%i j=%i\n",i,j); + tracef("multi_annealing: Accepting try_x[j], i=%i j=%i\n",i,j); x[i][j] = try_x[j]; -tracef("multi_annealing: Accepting try_x[j], i=%i j=%i try_x[j]=%f\n",i,j,try_x[j]); + rejection[i][j] = rejection[i-1][j]; // FIXME: AR: Is this correct? no incr of rejection? + tracef("multi_annealing: Accepting try_x[j], i=%i j=%i try_x[j]=%f\n",i,j,try_x[j]); curr_loss[curr] = mlres[i][j].loss; curr_sdev[curr] = mlres[i][j].sdev; + tracef(@strcat("multi_annealing: AR: %i ", color(8,"Rejection counts: "), + color( /* 2 */ 1," %f"), "\n\n"), + i, rejection[i][j] ); // , rejection[i][1], rejection[i][2], rejection[i][3], rejection[i][4]); +# FIXME: determine correct rejection[] values to avoid hanging: +# tracef(@strcat("multi_annealing: AR: %i ", color(8,"Rejection counts: "), +# color( /* 2 */ 1," %f"), color(7," %f"), color(5," %f"), color(9," %f"), color(6," %f"), "\n\n"), +# rejection[i][0], rejection[i][1], rejection[i][2], rejection[i][3], rejection[i][4]); +# END FIXME + float rj[]; + foreach k in [0:NEVOPARAMS-1] { # FIXME!!! + if (k==j) { + rj[k] = rejection[i-1][k]; + } + else { + rj[k] = rejection[i-1][k]; + } + tracef(@strcat("multi_annealing: AR: [%i][%i] ", color(8,"Rejection counts: "), + color(/*2*/ 1," %f"), color(7," %f"), color(5," %f"), color(9," %f"), color(6," %f"), "\n\n"), + i, j, rj[0], rj[1], rj[2], rj[3], rj[4]); + } + tracef(@strcat("multi_annealing: AR: %i ", color(8,"***** Did accept! "), + color(/*2*/ 1," %f"), color(7," %f"), color(5," %f"), color(9," %f"), color(6," %f"), "\n\n"), + i, try_x[0], try_x[1], try_x[2], try_x[3], try_x[4]); } } else { @@ -165,13 +197,8 @@ (Res r) multi_loss( int ci, int cj, float x[], float target_innov, int evolve_reruns ) { file rfile[]; - tracef("In multi_loss: entered: ci=%i cj=%i target_innov=%f evolve_reruns=%i x=%q\n",ci, cj, target_innov,evolve_reruns,x); - tracef("In multi_loss: entered: ci=%i cj=%i target_innov=%f evolve_reruns=%i\n",ci, cj, target_innov,evolve_reruns); -/* This hangs: - foreach f,i in x { - tracef("In multi_loss: x[]: ci=%i cj=%i x[%i]=%f\n",ci, cj, i, f); - } -*/ + tracef("multi_loss: entered: ci=%i cj=%i target_innov=%f evolve_reruns=%i x=%q\n",ci, cj, target_innov,evolve_reruns,x); + foreach i in [1:evolve_reruns] { // repeats of the evolove() - same as n_reruns file outfile; // FIXME: map and save in future string args[] = [ // FIXME: move this to a setargs() function @@ -196,11 +223,11 @@ file graph <"movie_graph.txt">; (outfile, rfile[i]) = evolve(args,graph); - tracef("in multi_loss: after evolve: i=%i %k %k\n", i, outfile, rfile[i]); + tracef("multi_loss: after evolve: i=%i %k %k\n", i, outfile, rfile[i]); } file sumfile = sumloss(rfile); r = readData(sumfile); - tracef("in multi_loss: returning: ci=%i cj=%i r.loss=%f r.sdev=%f\n",ci,cj,r.loss,r.sdev); + tracef("multi_loss: returning: ci=%i cj=%i r.loss=%f r.sdev=%f\n",ci,cj,r.loss,r.sdev); } optimizer_sweep() // Implements logic of python driver script @@ -229,7 +256,7 @@ T_start = 2.0, T_end = 0.01, Target_rejection = 0.3, - evolve_reruns = 2, + evolve_reruns = 10, starting_jump = 2.3, params0[] = [0.0, 0.0, 4.0, 50.0, -1.0], @tofloat(target_innov), @@ -239,7 +266,7 @@ 2.0, 0.01, 0.3, - 2, + 10, 2.3, [0.0, 0.0, 4.0, 50.0, -1.0], @tofloat(target_innov), Modified: SwiftApps/SciColSim/evolve.sh =================================================================== --- SwiftApps/SciColSim/evolve.sh 2012-01-25 17:29:58 UTC (rev 5521) +++ SwiftApps/SciColSim/evolve.sh 2012-01-28 21:10:59 UTC (rev 5522) @@ -2,5 +2,5 @@ datafile=$1 touch multi_loss.data shift 1 -$(dirname $0)/toptimizer $* 2>&1 +$(dirname $0)/openmp-optimizer $* 2>&1 mv multi_loss.data $datafile Modified: SwiftApps/SciColSim/optimizer.cpp =================================================================== --- SwiftApps/SciColSim/optimizer.cpp 2012-01-25 17:29:58 UTC (rev 5521) +++ SwiftApps/SciColSim/optimizer.cpp 2012-01-28 21:10:59 UTC (rev 5522) @@ -16,6 +16,8 @@ char operation = 'n'; // n: normal; m: do one multi_loss (with n_reruns). // Not used: a: analyze and generate next annealing parameter set. g: tbd +unsigned initSeed = 0; + #include #include #include @@ -512,7 +514,7 @@ if (verbose_level>=3){ std::cout << id << " failed " << r << std::endl; } - return r; + return (int) round(r); // FIXME: Andrey: please verify that round() is correct. } @@ -618,9 +620,12 @@ Dist[*vi][j]=d[*vi]; Dist[j][*vi]=d[*vi]; - if (Dist[*vi][j]>max_dist){ - max_dist=Dist[*vi][j]; - } + if ( (int)round(Dist[*vi][j]>max_dist)) { + // FIXME: Andrey: please verify that (int) cast is correct. Do we need to round()? + // also, the indent on this iff statement was way off - + // perhaps due to space v. tab? + max_dist=(int)round(Dist[*vi][j]); + } } else { @@ -1240,7 +1245,7 @@ } -#endif notdef +#endif }; @@ -1262,7 +1267,7 @@ #endif int N = un[0]->get_reruns(); - int step = (int)(double)N/(double)(Nworkers); + int step = (int)floor((double)N/(double)(Nworkers)); // FIXME: Andrey: please check change in cast grouping and use of floor int istart=0; int iend = istart+step; @@ -1296,10 +1301,18 @@ //dispatch_release(group); #else int i; - #pragma omp parallel for private (i) + + // Print debug in serial code to get coherent trace output + for(i=0; ievolve_to_target_and_save(i*step, min((i+1)*step,N), Results, Counters); } #endif @@ -1564,7 +1577,7 @@ string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; - string par_names4[2] = {"Operation", "Nworkers"}; + string par_names4[3] = {"Operation", "Nworkers", "initSeed"}; int params1[4] = {300, 50, 1000, 10}; int params3[5] = { 0, 0, 0, 0, 0}; @@ -1617,8 +1630,8 @@ std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; } if (nArg > 16 && nArg < 22){ - params3[nArg-17]= atof(argv[nArg]); - var_fixed[nArg-17]= atof(argv[nArg]); + params3[nArg-17]= (int)round(atof(argv[nArg])); // FIXME: Andrey: please verify that round() is correct. + var_fixed[nArg-17]= (int)round(atof(argv[nArg])); // FIXME: ditto std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; } if (nArg == 22 ){ @@ -1629,6 +1642,10 @@ Nworkers = atoi(argv[nArg]); std::cout << par_names4[1] << ": " << Nworkers << std::endl; } + if (nArg == 24 ){ + initSeed = atoi(argv[nArg]); + std::cout << par_names4[2] << ": " << initSeed << std::endl; + } } @@ -1672,9 +1689,18 @@ } //............................... - srand(time(0)); + //srand(time(0)); //srandomdev(); + if ( initSeed != 0.0 ) { + srand(initSeed); + } + else { + timeval t; + gettimeofday(&t, NULL); + srand(t.tv_usec); + } + { double r=0; for (int j=0; j<100; j++){ @@ -1684,7 +1710,7 @@ r = rand()/(double)(pow(2.,31)-1.); std::cout << r << " "; } - std::cout << "\n "; + std::cout << "\n"; } //random initiation of starting parameters Modified: SwiftApps/SciColSim/tc =================================================================== --- SwiftApps/SciColSim/tc 2012-01-25 17:29:58 UTC (rev 5521) +++ SwiftApps/SciColSim/tc 2012-01-28 21:10:59 UTC (rev 5522) @@ -11,5 +11,5 @@ beagle evolve /home/wilde/AndreysOptimizer/evolve.sh null null GLOBUS::maxwalltime="02:00:00" localhost evolve /home/wilde/AndreysOptimizer/src/evolve.sh null null GLOBUS::maxwalltime="02:00:00" -beagle sumloss /home/wilde/AndreysOptimizer/evolve.sh null null GLOBUS::maxwalltime="02:00:00" +beagle sumloss /home/wilde/AndreysOptimizer/src/sumloss.sh null null GLOBUS::maxwalltime="02:00:00" localhost sumloss /home/wilde/AndreysOptimizer/src/sumloss.sh null null GLOBUS::maxwalltime="02:00:00" Modified: SwiftApps/SciColSim/testopt1.py =================================================================== --- SwiftApps/SciColSim/testopt1.py 2012-01-25 17:29:58 UTC (rev 5521) +++ SwiftApps/SciColSim/testopt1.py 2012-01-28 21:10:59 UTC (rev 5522) @@ -1,13 +1,24 @@ -#! /usr/bin/env python -u +#! /usr/bin/env python # -u => run unbuffered + + import os, sys + +#_----------- + +unbuffered = os.fdopen(sys.stdout.fileno(), 'w', 0) +sys.stdout = unbuffered + +#-------------- + + app = "./orig-optimizer"; # For Mac only: original code (+1 loop fix) using Grnd Central Dispatch app = "./dispatch-optimizer"; # For Mac only: sing Grand Central Dispatch app = "./openmp-optimizer"; # For Mac or Linux: Using OpenMP (Default) -app = "./dispatch-optimizer"; +app = "./openmp-optimizer"; # FULL INITIAL TEST PARAMETERS from Andrey @@ -31,6 +42,7 @@ NWorkers = "2" operation = "n" # n=normal, m=manual (runs 1 multi_loss call) +seed = "1234567"; if app == "./orig-optimizer": NWorkers = "" @@ -39,7 +51,7 @@ for target in range(startTarget,endTarget,incrTarget): for i in range(optimizerRepeats): args = app + " 0 0 4 50 -1 " + str(target) + " 40000 20 " + str(evolveReruns) + \ - " 2 1 2. 0.01 " + str(annealingSteps) + " 0.3 2.3 1 1 0 0 0 " + operation + " " + NWorkers + " 2 1 2. 0.01 " + str(annealingSteps) + " 0.3 2.3 1 1 0 0 0 " + operation + " " + NWorkers + " " + seed; print("\n**** Calling optimizer: "+args+"\n") os.system(args); print sys.argv[0] + " Done!" From hategan at ci.uchicago.edu Sat Jan 28 22:43:38 2012 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 28 Jan 2012 22:43:38 -0600 (CST) Subject: [Swift-commit] r5523 - in trunk: . docs docs/cookbook libexec libexec/log-processing resources src/org/griphyn/vdl/karajan src/org/griphyn/vdl/karajan/lib src/org/griphyn/vdl/karajan/lib/cache src/org/griphyn/vdl/mapping tests tests/groups tests/language/working tests/language-behaviour/mappers tests/language-behaviour/math tests/language-behaviour/procedures Message-ID: <20120129044338.2703E9CD01@svn.ci.uchicago.edu> Author: hategan Date: 2012-01-28 22:43:37 -0600 (Sat, 28 Jan 2012) New Revision: 5523 Added: trunk/docs/cookbook/cookbook.txt trunk/tests/groups/mcs.sh trunk/tests/groups/providers-fusion.sh trunk/tests/groups/providers-pads.sh trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.timeout trunk/tests/language-behaviour/math/006-add.out.expected trunk/tests/language-behaviour/math/008-add-multiply.out.expected trunk/tests/language-behaviour/math/009-multiply.out.expected trunk/tests/language-behaviour/math/010-divide.out.expected trunk/tests/language-behaviour/math/011-divide-float.out.expected trunk/tests/language-behaviour/math/013-mod.out.expected trunk/tests/language-behaviour/math/014-subtract.out.expected trunk/tests/language-behaviour/math/0145-unary-subtact.out.expected trunk/tests/language-behaviour/math/015-lesseq.out.expected trunk/tests/language-behaviour/math/016-greatereq.out.expected trunk/tests/language-behaviour/math/017-greater.out.expected trunk/tests/language-behaviour/math/018-less.out.expected trunk/tests/language-behaviour/math/019-equals.out.expected trunk/tests/language-behaviour/math/0191-not-equals.out.expected trunk/tests/language-behaviour/math/030-mix-float-int.out.expected trunk/tests/language-behaviour/math/031-add-float.out.expected trunk/tests/language-behaviour/procedures/tc.template.mix.data trunk/tests/language/working/063-filename_extraction.in trunk/tests/language/working/063-filename_extraction.out.expected trunk/tests/language/working/063-filename_extraction.swift Removed: trunk/tests/language-behaviour/math/006-add.check.sh trunk/tests/language-behaviour/math/007-add-in-proc-add.check.sh trunk/tests/language-behaviour/math/008-add-multiply.check.sh trunk/tests/language-behaviour/math/009-multiply.check.sh trunk/tests/language-behaviour/math/010-divide.check.sh trunk/tests/language-behaviour/math/011-divide-float.check.sh trunk/tests/language-behaviour/math/013-mod.check.sh trunk/tests/language-behaviour/math/014-subtract.check.sh trunk/tests/language-behaviour/math/0145-unary-subtact.check.sh trunk/tests/language-behaviour/math/015-lesseq.check.sh trunk/tests/language-behaviour/math/016-greatereq.check.sh trunk/tests/language-behaviour/math/017-greater.check.sh trunk/tests/language-behaviour/math/018-less.check.sh trunk/tests/language-behaviour/math/019-equals.check.sh trunk/tests/language-behaviour/math/0191-not-equals.check.sh trunk/tests/language-behaviour/math/030-mix-float-int.check.sh trunk/tests/language-behaviour/math/031-add-float.check.sh Modified: trunk/ trunk/.classpath trunk/.project trunk/build.xml trunk/docs/build_docs.sh trunk/libexec/_swiftwrap trunk/libexec/_swiftwrap.staging trunk/libexec/log-processing/active-state-transitions trunk/libexec/log-processing/add-runid-as-prefix trunk/libexec/log-processing/affine-transform trunk/libexec/log-processing/aggregate.html.template trunk/libexec/log-processing/all-kickstarts-to-event trunk/libexec/log-processing/all-logs-active-jobsubmissions-count-graph trunk/libexec/log-processing/annotate-karatasks-with-execute2-id trunk/libexec/log-processing/assorted.html.template trunk/libexec/log-processing/autospace-data trunk/libexec/log-processing/b.plot trunk/libexec/log-processing/bars trunk/libexec/log-processing/cli-finished trunk/libexec/log-processing/cli-version trunk/libexec/log-processing/cluster-report trunk/libexec/log-processing/cluster-stats trunk/libexec/log-processing/colour-execute2 trunk/libexec/log-processing/colour-execute2-by-falkon trunk/libexec/log-processing/colour-karatasks trunk/libexec/log-processing/colour.plot.template trunk/libexec/log-processing/coloured-event-plot trunk/libexec/log-processing/combine-execute-start-last-times trunk/libexec/log-processing/combine-start-last-times trunk/libexec/log-processing/combine-start-last-times-to-event trunk/libexec/log-processing/compute-t-inf trunk/libexec/log-processing/create-everylog-vs-versions-data trunk/libexec/log-processing/duration-histogram.plot trunk/libexec/log-processing/duration-of-workflow trunk/libexec/log-processing/error-summary trunk/libexec/log-processing/event-duration-stats trunk/libexec/log-processing/events-in-progress trunk/libexec/log-processing/events-in-progress-first-loop.pl trunk/libexec/log-processing/events-in-progress-second-loop.pl trunk/libexec/log-processing/events-in-progress-third-loop.pl trunk/libexec/log-processing/everylog-active-submissions.plot trunk/libexec/log-processing/everylog-durations-of-workflows trunk/libexec/log-processing/everylog-summary.html trunk/libexec/log-processing/everylog-time-cumulative.plot trunk/libexec/log-processing/everylog-to-event trunk/libexec/log-processing/everylog-version-cumulative.plot trunk/libexec/log-processing/everylog-vs-versions trunk/libexec/log-processing/everylog-vs-versions.plot trunk/libexec/log-processing/everylog.html trunk/libexec/log-processing/execstages-plot trunk/libexec/log-processing/execstages.plot.template trunk/libexec/log-processing/execute.html.template trunk/libexec/log-processing/execute.progress trunk/libexec/log-processing/execute2-by-falkon.channels trunk/libexec/log-processing/execute2-status-from-log trunk/libexec/log-processing/execute2-summary-from-log trunk/libexec/log-processing/execute2.html.template trunk/libexec/log-processing/execution-summaries trunk/libexec/log-processing/extract-activity-for-subthreads-of trunk/libexec/log-processing/extract-activity-for-task trunk/libexec/log-processing/extract-activity-for-thread trunk/libexec/log-processing/extract-completed-time-for-run-id trunk/libexec/log-processing/extract-end-time trunk/libexec/log-processing/extract-execute-start-times trunk/libexec/log-processing/extract-failed-time-for-run-id trunk/libexec/log-processing/extract-jobid-karajanid-bindings trunk/libexec/log-processing/extract-last-time-for-execute trunk/libexec/log-processing/extract-start-time trunk/libexec/log-processing/extract-start-times trunk/libexec/log-processing/falkon-to-event trunk/libexec/log-processing/falkon.html.template trunk/libexec/log-processing/generate-karatasks-event trunk/libexec/log-processing/get-jobid-for-karajanid trunk/libexec/log-processing/get-replicationid-for-execute2id trunk/libexec/log-processing/get-site-for-run-id trunk/libexec/log-processing/get-thread-for-run-id trunk/libexec/log-processing/index.html.template trunk/libexec/log-processing/info-and-karajan-actives trunk/libexec/log-processing/info-and-karajan-actives.2.plot trunk/libexec/log-processing/info-and-karajan-actives.plot trunk/libexec/log-processing/info-to-md5 trunk/libexec/log-processing/info-to-transitions trunk/libexec/log-processing/info-to-zeroed-transitions trunk/libexec/log-processing/info.html.template trunk/libexec/log-processing/iso-to-secs trunk/libexec/log-processing/karajan.html.template trunk/libexec/log-processing/karatasks-coloured.channels trunk/libexec/log-processing/karatasks-coloured.channels.nm trunk/libexec/log-processing/karatasks-only trunk/libexec/log-processing/kickstart.html.template trunk/libexec/log-processing/kickstarts-to-event trunk/libexec/log-processing/kickstarts-to-plot trunk/libexec/log-processing/last-times trunk/libexec/log-processing/last-transition-line trunk/libexec/log-processing/list-known-tasks trunk/libexec/log-processing/list-known-threads trunk/libexec/log-processing/log-to-createdirset-transitions trunk/libexec/log-processing/log-to-dostagein-transitions trunk/libexec/log-processing/log-to-dostageout-transitions trunk/libexec/log-processing/log-to-execute-transitions trunk/libexec/log-processing/log-to-execute2-transitions trunk/libexec/log-processing/log-to-initshareddir-transitions trunk/libexec/log-processing/log-to-karatasks-transitions trunk/libexec/log-processing/logs-for-all trunk/libexec/log-processing/lookup-colour trunk/libexec/log-processing/makefile trunk/libexec/log-processing/makefile.cluster trunk/libexec/log-processing/makefile.errors trunk/libexec/log-processing/makefile.falkon trunk/libexec/log-processing/makefile.implicit trunk/libexec/log-processing/makefile.karatasks trunk/libexec/log-processing/makefile.kickstart trunk/libexec/log-processing/makefile.webpage trunk/libexec/log-processing/max-duration trunk/libexec/log-processing/normalise-event-start-time trunk/libexec/log-processing/normalise-event-start-time-to-any trunk/libexec/log-processing/number-events trunk/libexec/log-processing/number-sites-list trunk/libexec/log-processing/overview-reports.sh trunk/libexec/log-processing/overview.html.template trunk/libexec/log-processing/p1.plot trunk/libexec/log-processing/per-site-execute2-durations trunk/libexec/log-processing/plot-duration-histogram trunk/libexec/log-processing/plot-everylogs trunk/libexec/log-processing/plot1 trunk/libexec/log-processing/q.plot trunk/libexec/log-processing/queue-state-transitions trunk/libexec/log-processing/retrycounts trunk/libexec/log-processing/scheduler.html.template trunk/libexec/log-processing/sec-to-utc trunk/libexec/log-processing/sec-to-utc-day trunk/libexec/log-processing/separate-execute-last-summary trunk/libexec/log-processing/simple-event-plot trunk/libexec/log-processing/slt2.plot trunk/libexec/log-processing/sort-preserve trunk/libexec/log-processing/sp.plot.template trunk/libexec/log-processing/split-start-times-shifted trunk/libexec/log-processing/start-last-times-and-kickstart trunk/libexec/log-processing/start-last-times-and-kickstart.plot trunk/libexec/log-processing/start-last-times.plot trunk/libexec/log-processing/start-times.plot trunk/libexec/log-processing/sum-tt1.pl trunk/libexec/log-processing/swap-and-sort trunk/libexec/log-processing/swap-and-sort-and-swap trunk/libexec/log-processing/swift-standard-log-to-transition trunk/libexec/log-processing/table-jobs-sites trunk/libexec/log-processing/task-status-to-transitions trunk/libexec/log-processing/tasks-in-cluster trunk/libexec/log-processing/tie-url-filenames trunk/libexec/log-processing/times-for-all-tasks trunk/libexec/log-processing/toolbar.html.template trunk/libexec/log-processing/total-event-plot trunk/libexec/log-processing/total.plot.template trunk/libexec/log-processing/trail trunk/libexec/log-processing/trail-freex trunk/libexec/log-processing/trail-freex.plot.template trunk/libexec/log-processing/trail.plot.template trunk/libexec/log-processing/transitions-to-cedps trunk/libexec/log-processing/transitions-to-event trunk/libexec/log-processing/tscore.sh trunk/libexec/log-processing/tscores.plot trunk/libexec/log-processing/weights.plot trunk/libexec/log-processing/weights.sh trunk/libexec/log-processing/whole-workflow-event trunk/libexec/log-processing/whole-workflow-time trunk/libexec/vdl-int-staging.k trunk/libexec/vdl-int.k trunk/resources/swiftscript.stg trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java trunk/src/org/griphyn/vdl/karajan/HangChecker.java trunk/src/org/griphyn/vdl/karajan/Loader.java trunk/src/org/griphyn/vdl/karajan/lib/AppStageouts.java trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java trunk/src/org/griphyn/vdl/karajan/lib/cache/LRUFileCache.java trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java trunk/src/org/griphyn/vdl/mapping/ExternalDataNode.java trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java trunk/src/org/griphyn/vdl/mapping/RootDataNode.java trunk/tests/suite.sh Log: merged 0.93 branch Property changes on: trunk ___________________________________________________________________ Added: svn:mergeinfo + /branches/release-0.93:4761-5122 Modified: trunk/.classpath =================================================================== --- trunk/.classpath 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/.classpath 2012-01-29 04:43:37 UTC (rev 5523) @@ -16,11 +16,10 @@ - - - + + Modified: trunk/.project =================================================================== --- trunk/.project 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/.project 2012-01-29 04:43:37 UTC (rev 5523) @@ -6,8 +6,13 @@ abstraction-common karajan - - + + + org.eclipse.jdt.core.javabuilder + + + + org.eclipse.jdt.core.javanature Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/build.xml 2012-01-29 04:43:37 UTC (rev 5523) @@ -92,12 +92,9 @@ - - - - - - + + + Modified: trunk/docs/build_docs.sh =================================================================== --- trunk/docs/build_docs.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/docs/build_docs.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -48,6 +48,8 @@ exit 1 fi +INSTALLATION_DIRECTORY=$1 + # Create installation directory if needed if [ ! -d "$INSTALLATION_DIRECTORY" ]; then mkdir $INSTALLATION_DIRECTORY || crash "Unable to create directory $INSTALLATION_DIRECTORY" Copied: trunk/docs/cookbook/cookbook.txt (from rev 5122, branches/release-0.93/docs/cookbook/cookbook.txt) =================================================================== --- trunk/docs/cookbook/cookbook.txt (rev 0) +++ trunk/docs/cookbook/cookbook.txt 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1,16 @@ +Swift Cookbook +============== +Swift team +v0.92, March 2011 + +include::overview[] + +include::swift_basics[] + +include::coasters[] + +include::diverse_infrastructures[] + +include::debugging_swift[] + +include::log_processing[] Modified: trunk/libexec/_swiftwrap =================================================================== --- trunk/libexec/_swiftwrap 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/libexec/_swiftwrap 2012-01-29 04:43:37 UTC (rev 5523) @@ -58,9 +58,13 @@ fail() { EC=$1 shift - if [ "$STATUSMODE" = "files" ]; then - echo $@ >"$WFDIR/status/$JOBDIR/${ID}-error" + + if [ "$STATUSMODE" != "files" ]; then + mkdir -p $WFDIR/status/$JOBDIR fi + + echo $@ >"$WFDIR/status/$JOBDIR/${ID}-error" + log $@ info if [ "$STATUSMODE" = "files" ]; then @@ -450,7 +454,7 @@ fi "$EXEC" "${CMDARGS[@]}" 1>"$STDOUT" 2>"$STDERR" <"$STDIN" fi - checkError $? "Exit code $?" + checkError $? "Application $EXEC failed with an exit code of $?" else if [ ! -f "$KICKSTART" ]; then log "Kickstart executable ($KICKSTART) not found" @@ -470,7 +474,7 @@ mv -f kickstart.xml "$WFDIR/kickstart/$JOBDIR/$ID-kickstart.xml" 2>&1 >& "$INFO" checkError 254 "Failed to copy Kickstart record to shared directory" if [ "$APPEXIT" != "0" ]; then - fail $APPEXIT "Exit code $APPEXIT" + fail $APPEXIT "Application $EXEC failed with an exit code of $APPEXIT" fi fi fi Modified: trunk/libexec/_swiftwrap.staging =================================================================== --- trunk/libexec/_swiftwrap.staging 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/libexec/_swiftwrap.staging 2012-01-29 04:43:37 UTC (rev 5523) @@ -61,19 +61,11 @@ fail() { EC=$1 shift - if [ "$STATUSMODE" = "files" ]; then - echo $@ >"$WFDIR/status/$JOBDIR/${ID}-error" - fi + log $@ info - if [ "$STATUSMODE" = "files" ]; then - exit 0 - else - if [ "X$STDERR" != "X" ]; then - echo "$@" >>$STDERR - fi - exit $EC - fi + echo "$@" >> wrapper.error + exit $EC } checkError() { @@ -308,7 +300,7 @@ fi "$EXEC" "${CMDARGS[@]}" 1>"$STDOUT" 2>"$STDERR" <"$STDIN" fi -checkError $? "Exit code $?" +checkError $? "Application $EXEC failed with an exit code of $?" <<$STDERR logstate "EXECUTE_DONE" log "Job ran successfully" Property changes on: trunk/libexec/log-processing/active-state-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/add-runid-as-prefix ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/affine-transform ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/aggregate.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/all-kickstarts-to-event ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/all-logs-active-jobsubmissions-count-graph ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/annotate-karatasks-with-execute2-id ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/assorted.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/autospace-data ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/b.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/bars ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/cli-finished ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/cli-version ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/cluster-report ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/cluster-stats ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/colour-execute2 ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/colour-execute2-by-falkon ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/colour-karatasks ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/colour.plot.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/coloured-event-plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/combine-execute-start-last-times ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/combine-start-last-times ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/combine-start-last-times-to-event ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/compute-t-inf ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/create-everylog-vs-versions-data ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/duration-histogram.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/duration-of-workflow ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/error-summary ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/event-duration-stats ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/events-in-progress ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/events-in-progress-first-loop.pl ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/events-in-progress-second-loop.pl ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/events-in-progress-third-loop.pl ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/everylog-active-submissions.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/everylog-durations-of-workflows ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/everylog-summary.html ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/everylog-time-cumulative.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/everylog-to-event ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/everylog-version-cumulative.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/everylog-vs-versions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/everylog-vs-versions.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/everylog.html ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/execstages-plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/execstages.plot.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/execute.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/execute.progress ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/execute2-by-falkon.channels ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/execute2-status-from-log ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/execute2-summary-from-log ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/execute2.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/execution-summaries ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/extract-activity-for-subthreads-of ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/extract-activity-for-task ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/extract-activity-for-thread ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/extract-completed-time-for-run-id ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/extract-end-time ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/extract-execute-start-times ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/extract-failed-time-for-run-id ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/extract-jobid-karajanid-bindings ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/extract-last-time-for-execute ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/extract-start-time ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/extract-start-times ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/falkon-to-event ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/falkon.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/generate-karatasks-event ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/get-jobid-for-karajanid ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/get-replicationid-for-execute2id ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/get-site-for-run-id ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/get-thread-for-run-id ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/index.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/info-and-karajan-actives ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/info-and-karajan-actives.2.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/info-and-karajan-actives.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/info-to-md5 ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/info-to-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/info-to-zeroed-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/info.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/iso-to-secs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/karajan.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/karatasks-coloured.channels ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/karatasks-coloured.channels.nm ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/karatasks-only ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/kickstart.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/kickstarts-to-event ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/kickstarts-to-plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/last-times ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/last-transition-line ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/list-known-tasks ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/list-known-threads ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/log-to-createdirset-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/log-to-dostagein-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/log-to-dostageout-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/log-to-execute-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/log-to-execute2-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/log-to-initshareddir-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/log-to-karatasks-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/logs-for-all ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/lookup-colour ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/makefile ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/makefile.cluster ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/makefile.errors ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/makefile.falkon ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/makefile.implicit ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/makefile.karatasks ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/makefile.kickstart ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/makefile.webpage ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/max-duration ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/normalise-event-start-time ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/normalise-event-start-time-to-any ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/number-events ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/number-sites-list ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/overview-reports.sh ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/overview.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/p1.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/per-site-execute2-durations ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/plot-duration-histogram ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/plot-everylogs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/plot1 ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/q.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/queue-state-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/retrycounts ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/scheduler.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/sec-to-utc ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/sec-to-utc-day ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/separate-execute-last-summary ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/simple-event-plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/slt2.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/sort-preserve ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/sp.plot.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/split-start-times-shifted ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/start-last-times-and-kickstart ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/start-last-times-and-kickstart.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/start-last-times.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/start-times.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/sum-tt1.pl ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/swap-and-sort ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/swap-and-sort-and-swap ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/swift-standard-log-to-transition ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/table-jobs-sites ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/task-status-to-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/tasks-in-cluster ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/tie-url-filenames ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/times-for-all-tasks ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/toolbar.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/total-event-plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/total.plot.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/trail ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/trail-freex ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/trail-freex.plot.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/trail.plot.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/transitions-to-cedps ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/transitions-to-event ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/tscore.sh ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/tscores.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/weights.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/weights.sh ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/whole-workflow-event ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/libexec/log-processing/whole-workflow-time ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: trunk/libexec/vdl-int-staging.k =================================================================== --- trunk/libexec/vdl-int-staging.k 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/libexec/vdl-int-staging.k 2012-01-29 04:43:37 UTC (rev 5523) @@ -70,7 +70,12 @@ element(cleanups, [cleanup] log(LOG:INFO, "START cleanups={cleanup}") ) - + + element(readErrorFile, [dir, jobid] + str:strip(file:read("{dir}/{jobid}.error")) + file:remove("{dir}/{jobid}.error") + ) + element(execute2, [tr, optional(arguments, stdin, stdout, stderr), stagein, stageout, restartout, replicationGroup, replicationChannel] stagein := list(unique(each(stagein))) @@ -150,6 +155,8 @@ mode = WRAPPER_TRANSFER_MODE) //stageOut("{stdout}", "{stagingMethod}://localhost/{ddir}/{stdout}") //stageOut("{stderr}", "{stagingMethod}://localhost/{ddir}/{stderr}") + stageOut("wrapper.error", "{stagingMethod}://localhost/{ddir}/{jobid}.error", + mode = STAGING_MODE:IF_PRESENT) appStageouts(jobid, stageout, ".", stagingMethod) task:cleanUp(".") //the whole job directory @@ -163,6 +170,8 @@ ) catch("^(?!Abort$).*" vdl:setprogress("Failed but can retry") + prev := exception + exception := try(exception(readErrorFile(ddir, jobid)), prev) log(LOG:DEBUG, "APPLICATION_EXCEPTION jobid={jobid} - Application exception: ", exception) throw( Modified: trunk/libexec/vdl-int.k =================================================================== --- trunk/libexec/vdl-int.k 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/libexec/vdl-int.k 2012-01-29 04:43:37 UTC (rev 5523) @@ -45,24 +45,37 @@ file:remove("{wfdir}/status/{jobdir}/{jobid}-success", host=rhost) log(LOG:INFO, "SUCCESS jobid={jobid} - Success file found") ) - if( - file:exists("{wfdir}/status/{jobdir}/{jobid}-error", host=rhost) then( - log(LOG:INFO, "FAILURE jobid={jobid} - Failure file found") - task:transfer(srchost=rhost, srcdir="{wfdir}/status/{jobdir}", srcfile="{jobid}-error") - error := parallel( - file:remove("{wfdir}/status/{jobdir}/{jobid}-error", host=rhost) - sequential( - str:strip(file:read("{jobid}-error")) - file:remove("{jobid}-error") - ) + sequential( + try ( + msg = checkErrorFile(rhost, wfdir, jobid, jobdir) + sequential ( + log(LOG:INFO, "NO_STATUS_FILE jobid={jobid} - Both status files are missing") + throw("No status file was found. Check the shared filesystem on {rhost}") ) - throw(error) ) - else ( - log(LOG:INFO, "NO_STATUS_FILE jobid={jobid} - Both status files are missing") - throw("No status file was found. Check the shared filesystem on {rhost}") + ) + throw(checkErrorFile(rhost, wfdir, jobid, tr, jobdir)) + ) + ) + + element(checkErrorFile, [rhost, wfdir, jobid, jobdir] + if ( + file:exists("{wfdir}/status/{jobdir}/{jobid}-error", host=rhost) then( + log(LOG:INFO, "FAILURE jobid={jobid} - Failure file found") + task:transfer(srchost=rhost, srcdir="{wfdir}/status/{jobdir}", srcfile="{jobid}-error") + error := parallel( + file:remove("{wfdir}/status/{jobdir}/{jobid}-error", host=rhost) + sequential( + str:strip(file:read("{jobid}-error")) + file:remove("{jobid}-error") + ) ) + error ) + else ( + log(LOG:INFO, "NO_STATUS_FILE jobid={jobid} - Error file missing") + throw("No status file was found. Check the shared filesystem on {rhost}") + ) ) ) @@ -553,6 +566,9 @@ ) catch("^(?!Abort$).*" vdl:setprogress("Failed but can retry") + prev := exception + exception := try(exception(checkErrorFile(rhost, wfdir, jobid, jobdir)), prev) + log(LOG:DEBUG, "APPLICATION_EXCEPTION jobid={jobid} - Application exception: ", exception) if(matches(exception,".*executable bit.*") Property changes on: trunk/resources/swiftscript.stg ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java 2012-01-29 04:43:37 UTC (rev 5523) @@ -24,6 +24,7 @@ import java.util.List; import org.globus.cog.karajan.stack.VariableStack; +import org.globus.cog.karajan.workflow.events.EventBus; import org.globus.cog.karajan.workflow.events.EventTargetPair; import org.globus.cog.karajan.workflow.futures.FutureEvaluationException; import org.globus.cog.karajan.workflow.futures.FutureListener; @@ -72,9 +73,13 @@ listeners = null; } - for (ListenerStackPair lsp : l) { + for (final ListenerStackPair lsp : l) { WaitingThreadsMonitor.removeThread(lsp.stack); - lsp.listener.futureModified(this, lsp.stack); + EventBus.post(new Runnable() { + public void run() { + lsp.listener.futureModified(DSHandleFutureWrapper.this, lsp.stack); + } + }); } } Modified: trunk/src/org/griphyn/vdl/karajan/HangChecker.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/HangChecker.java 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/src/org/griphyn/vdl/karajan/HangChecker.java 2012-01-29 04:43:37 UTC (rev 5523) @@ -23,7 +23,7 @@ import java.util.TimerTask; import org.apache.log4j.Logger; -import org.globus.cog.karajan.scheduler.LateBindingScheduler; +import org.globus.cog.karajan.scheduler.WeightedHostScoreScheduler; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; import org.globus.cog.karajan.workflow.events.EventBus; @@ -48,11 +48,11 @@ public void run() { try { - LateBindingScheduler s = (LateBindingScheduler) stack.getGlobal(SchedulerNode.SCHEDULER); + WeightedHostScoreScheduler s = (WeightedHostScoreScheduler) stack.getGlobal(SchedulerNode.SCHEDULER); if (s != null) { int running = s.getRunning(); - - if (running == 0 && EventBus.eventCount == lastEventCount) { + boolean allOverloaded = s.allOverloaded(); + if (running == 0 && EventBus.eventCount == lastEventCount && !allOverloaded) { logger.warn("No events in " + (CHECK_INTERVAL / 1000) + "s."); ByteArrayOutputStream os = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(os); Modified: trunk/src/org/griphyn/vdl/karajan/Loader.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/Loader.java 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/src/org/griphyn/vdl/karajan/Loader.java 2012-01-29 04:43:37 UTC (rev 5523) @@ -33,6 +33,7 @@ import java.security.SecureRandom; import java.text.DateFormat; import java.text.SimpleDateFormat; +import java.util.Arrays; import java.util.Date; import java.util.Enumeration; import java.util.List; @@ -148,7 +149,10 @@ boolean provenanceEnabled = VDL2Config.getConfig().getProvenanceLog(); setupLogging(ap, projectName, runID); - logger.debug("Max heap: " + Runtime.getRuntime().maxMemory()); + if (logger.isDebugEnabled()) { + logger.debug("arguments: " + Arrays.asList(argv)); + logger.debug("Max heap: " + Runtime.getRuntime().maxMemory()); + } if (ap.isPresent(ARG_CDMFILE)) { loadCDM(ap); Modified: trunk/src/org/griphyn/vdl/karajan/lib/AppStageouts.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/AppStageouts.java 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/src/org/griphyn/vdl/karajan/lib/AppStageouts.java 2012-01-29 04:43:37 UTC (rev 5523) @@ -52,7 +52,7 @@ List files = TypeUtil.toList(FILES.getValue(stack)); for (Object f : files) { List pv = TypeUtil.toList(f); - Path p = Path.parse(TypeUtil.toString(pv.get(0))); + Path p = (Path) pv.get(0); DSHandle handle = (DSHandle) pv.get(1); ArgUtil.getNamedArguments(stack).add("var", handle.getField(p)); AbsFile file = new AbsFile(VDLFunction.filename(stack)[0]); Modified: trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java 2012-01-29 04:43:37 UTC (rev 5523) @@ -218,7 +218,7 @@ } } finally { - states.release(); + states.release(stateIterator); } return summary; } Property changes on: trunk/src/org/griphyn/vdl/karajan/lib/cache/LRUFileCache.java ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93/src/org/griphyn/vdl/karajan/lib/cache/LRUFileCache.java:5123 + /branches/release-0.93/src/org/griphyn/vdl/karajan/lib/cache/LRUFileCache.java:4761-5123 Modified: trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2012-01-29 04:43:37 UTC (rev 5523) @@ -471,14 +471,8 @@ } } - Mapper m; + Mapper m = getActualMapper(); - try { - m = this.getMapper(); - } - catch (FutureFault fe) { - m = null; // no mapping info if mapper isn't initialised yet - } if (m != null) { // TODO proper type here @@ -536,12 +530,16 @@ } } } + + protected Mapper getActualMapper() { + return null; + } public boolean isClosed() { return closed; } - public void closeDeep() { + public synchronized void closeDeep() { if (!this.closed) { closeShallow(); } Modified: trunk/src/org/griphyn/vdl/mapping/ExternalDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/ExternalDataNode.java 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/src/org/griphyn/vdl/mapping/ExternalDataNode.java 2012-01-29 04:43:37 UTC (rev 5523) @@ -113,7 +113,6 @@ return null; } - @Override public String getParam(String name) { if (params == null) { return null; Modified: trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2012-01-29 04:43:37 UTC (rev 5523) @@ -123,6 +123,10 @@ throw new FutureNotYetAvailable(waitingMapperParam.getFutureWrapper()); } } + + protected Mapper getActualMapper() { + return mapper; + } public boolean isArray() { return true; Modified: trunk/src/org/griphyn/vdl/mapping/RootDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/RootDataNode.java 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/src/org/griphyn/vdl/mapping/RootDataNode.java 2012-01-29 04:43:37 UTC (rev 5523) @@ -221,6 +221,10 @@ throw new FutureNotYetAvailable(waitingMapperParam.getFutureWrapper()); } } + + protected Mapper getActualMapper() { + return mapper; + } public boolean isArray() { return false; Copied: trunk/tests/groups/mcs.sh (from rev 5122, branches/release-0.93/tests/groups/mcs.sh) =================================================================== --- trunk/tests/groups/mcs.sh (rev 0) +++ trunk/tests/groups/mcs.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1,6 @@ +# Group for MCS provider test (persistent coasters) + +GROUPLIST=( + $TESTDIR/providers/persistent-coasters/mcs + ) + Copied: trunk/tests/groups/providers-fusion.sh (from rev 5122, branches/release-0.93/tests/groups/providers-fusion.sh) =================================================================== --- trunk/tests/groups/providers-fusion.sh (rev 0) +++ trunk/tests/groups/providers-fusion.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1,6 @@ + +# GROUPLIST definition of providers that run on PADS + +GROUPLIST=( + $TESTDIR/providers/fusion +) Copied: trunk/tests/groups/providers-pads.sh (from rev 5122, branches/release-0.93/tests/groups/providers-pads.sh) =================================================================== --- trunk/tests/groups/providers-pads.sh (rev 0) +++ trunk/tests/groups/providers-pads.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1,7 @@ + +# GROUPLIST definition of providers that run on PADS + +GROUPLIST=( + $TESTDIR/providers/PADS/coasters \ + $TESTDIR/providers/PADS/pbs \ +) Copied: trunk/tests/language/working/063-filename_extraction.in (from rev 5122, branches/release-0.93/tests/language/working/063-filename_extraction.in) =================================================================== --- trunk/tests/language/working/063-filename_extraction.in (rev 0) +++ trunk/tests/language/working/063-filename_extraction.in 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +testing swift filename extraction Copied: trunk/tests/language/working/063-filename_extraction.out.expected (from rev 5122, branches/release-0.93/tests/language/working/063-filename_extraction.out.expected) =================================================================== --- trunk/tests/language/working/063-filename_extraction.out.expected (rev 0) +++ trunk/tests/language/working/063-filename_extraction.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +testing swift filename extraction Copied: trunk/tests/language/working/063-filename_extraction.swift (from rev 5122, branches/release-0.93/tests/language/working/063-filename_extraction.swift) =================================================================== --- trunk/tests/language/working/063-filename_extraction.swift (rev 0) +++ trunk/tests/language/working/063-filename_extraction.swift 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1,10 @@ +type logfile; + +app (logfile fout) cat(logfile fin) { + cat stdin=@fin stdout=@fout; +} + +logfile infile <"063-filename_extraction.in">; +logfile outfile <"063-filename_extraction.out">; + +outfile = cat(infile); Copied: trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.timeout (from rev 5122, branches/release-0.93/tests/language-behaviour/mappers/0756-ext-mapper-slow.timeout) =================================================================== --- trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.timeout (rev 0) +++ trunk/tests/language-behaviour/mappers/0756-ext-mapper-slow.timeout 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +60 \ No newline at end of file Deleted: trunk/tests/language-behaviour/math/006-add.check.sh =================================================================== --- trunk/tests/language-behaviour/math/006-add.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/006-add.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,8 +0,0 @@ -#!/bin/bash -set -x -(cat 006-add.out | grep 135) || exit 1 -exit 0 -#!/bin/bash -set -x -cat 006-add.out | grep || exit 1 -exit 0 Copied: trunk/tests/language-behaviour/math/006-add.out.expected (from rev 5122, branches/release-0.93/tests/language-behaviour/math/006-add.out.expected) =================================================================== --- trunk/tests/language-behaviour/math/006-add.out.expected (rev 0) +++ trunk/tests/language-behaviour/math/006-add.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +135 Deleted: trunk/tests/language-behaviour/math/007-add-in-proc-add.check.sh =================================================================== --- trunk/tests/language-behaviour/math/007-add-in-proc-add.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/007-add-in-proc-add.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 007-add-in-proc-add.out | grep 189|| exit 1 -exit 0 Deleted: trunk/tests/language-behaviour/math/008-add-multiply.check.sh =================================================================== --- trunk/tests/language-behaviour/math/008-add-multiply.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/008-add-multiply.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 008-add-multiply.out | grep 8|| exit 1 -exit 0 Copied: trunk/tests/language-behaviour/math/008-add-multiply.out.expected (from rev 5122, branches/release-0.93/tests/language-behaviour/math/008-add-multiply.out.expected) =================================================================== --- trunk/tests/language-behaviour/math/008-add-multiply.out.expected (rev 0) +++ trunk/tests/language-behaviour/math/008-add-multiply.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +8 Deleted: trunk/tests/language-behaviour/math/009-multiply.check.sh =================================================================== --- trunk/tests/language-behaviour/math/009-multiply.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/009-multiply.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 009-multiply.out | grep 42|| exit 1 -exit 0 Copied: trunk/tests/language-behaviour/math/009-multiply.out.expected (from rev 5122, branches/release-0.93/tests/language-behaviour/math/009-multiply.out.expected) =================================================================== --- trunk/tests/language-behaviour/math/009-multiply.out.expected (rev 0) +++ trunk/tests/language-behaviour/math/009-multiply.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +42 Deleted: trunk/tests/language-behaviour/math/010-divide.check.sh =================================================================== --- trunk/tests/language-behaviour/math/010-divide.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/010-divide.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 010-divide.out | grep 33|| exit 1 -exit 0 Copied: trunk/tests/language-behaviour/math/010-divide.out.expected (from rev 5122, branches/release-0.93/tests/language-behaviour/math/010-divide.out.expected) =================================================================== --- trunk/tests/language-behaviour/math/010-divide.out.expected (rev 0) +++ trunk/tests/language-behaviour/math/010-divide.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +33 Deleted: trunk/tests/language-behaviour/math/011-divide-float.check.sh =================================================================== --- trunk/tests/language-behaviour/math/011-divide-float.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/011-divide-float.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 011-divide-float.out | grep 0.3333333333333333|| exit 1 -exit 0 Copied: trunk/tests/language-behaviour/math/011-divide-float.out.expected (from rev 5122, branches/release-0.93/tests/language-behaviour/math/011-divide-float.out.expected) =================================================================== --- trunk/tests/language-behaviour/math/011-divide-float.out.expected (rev 0) +++ trunk/tests/language-behaviour/math/011-divide-float.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +0.3333333333333333 Deleted: trunk/tests/language-behaviour/math/013-mod.check.sh =================================================================== --- trunk/tests/language-behaviour/math/013-mod.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/013-mod.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 013-mod.out | grep 19|| exit 1 -exit 0 Copied: trunk/tests/language-behaviour/math/013-mod.out.expected (from rev 5122, branches/release-0.93/tests/language-behaviour/math/013-mod.out.expected) =================================================================== --- trunk/tests/language-behaviour/math/013-mod.out.expected (rev 0) +++ trunk/tests/language-behaviour/math/013-mod.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +19 Deleted: trunk/tests/language-behaviour/math/014-subtract.check.sh =================================================================== --- trunk/tests/language-behaviour/math/014-subtract.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/014-subtract.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 014-subtract.out | grep '\-37'|| exit 1 -exit 0 Copied: trunk/tests/language-behaviour/math/014-subtract.out.expected (from rev 5122, branches/release-0.93/tests/language-behaviour/math/014-subtract.out.expected) =================================================================== --- trunk/tests/language-behaviour/math/014-subtract.out.expected (rev 0) +++ trunk/tests/language-behaviour/math/014-subtract.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +-37 Deleted: trunk/tests/language-behaviour/math/0145-unary-subtact.check.sh =================================================================== --- trunk/tests/language-behaviour/math/0145-unary-subtact.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/0145-unary-subtact.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 0145-unary-subtact.out | grep '\-989929'|| exit 1 -exit 0 Copied: trunk/tests/language-behaviour/math/0145-unary-subtact.out.expected (from rev 5122, branches/release-0.93/tests/language-behaviour/math/0145-unary-subtact.out.expected) =================================================================== --- trunk/tests/language-behaviour/math/0145-unary-subtact.out.expected (rev 0) +++ trunk/tests/language-behaviour/math/0145-unary-subtact.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +-989929 Deleted: trunk/tests/language-behaviour/math/015-lesseq.check.sh =================================================================== --- trunk/tests/language-behaviour/math/015-lesseq.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/015-lesseq.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 015-lesseq.out | grep true|| exit 1 -exit 0 Copied: trunk/tests/language-behaviour/math/015-lesseq.out.expected (from rev 5122, branches/release-0.93/tests/language-behaviour/math/015-lesseq.out.expected) =================================================================== --- trunk/tests/language-behaviour/math/015-lesseq.out.expected (rev 0) +++ trunk/tests/language-behaviour/math/015-lesseq.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +true Deleted: trunk/tests/language-behaviour/math/016-greatereq.check.sh =================================================================== --- trunk/tests/language-behaviour/math/016-greatereq.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/016-greatereq.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 016-greatereq.out | grep false|| exit 1 -exit 0 Copied: trunk/tests/language-behaviour/math/016-greatereq.out.expected (from rev 5122, branches/release-0.93/tests/language-behaviour/math/016-greatereq.out.expected) =================================================================== --- trunk/tests/language-behaviour/math/016-greatereq.out.expected (rev 0) +++ trunk/tests/language-behaviour/math/016-greatereq.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +false Deleted: trunk/tests/language-behaviour/math/017-greater.check.sh =================================================================== --- trunk/tests/language-behaviour/math/017-greater.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/017-greater.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 017-greater.out | grep false|| exit 1 -exit 0 Copied: trunk/tests/language-behaviour/math/017-greater.out.expected (from rev 5122, branches/release-0.93/tests/language-behaviour/math/017-greater.out.expected) =================================================================== --- trunk/tests/language-behaviour/math/017-greater.out.expected (rev 0) +++ trunk/tests/language-behaviour/math/017-greater.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +false Deleted: trunk/tests/language-behaviour/math/018-less.check.sh =================================================================== --- trunk/tests/language-behaviour/math/018-less.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/018-less.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 018-less.out | grep true|| exit 1 -exit 0 Copied: trunk/tests/language-behaviour/math/018-less.out.expected (from rev 5122, branches/release-0.93/tests/language-behaviour/math/018-less.out.expected) =================================================================== --- trunk/tests/language-behaviour/math/018-less.out.expected (rev 0) +++ trunk/tests/language-behaviour/math/018-less.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +true Deleted: trunk/tests/language-behaviour/math/019-equals.check.sh =================================================================== --- trunk/tests/language-behaviour/math/019-equals.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/019-equals.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 019-equals.out | grep false|| exit 1 -exit 0 Copied: trunk/tests/language-behaviour/math/019-equals.out.expected (from rev 5122, branches/release-0.93/tests/language-behaviour/math/019-equals.out.expected) =================================================================== --- trunk/tests/language-behaviour/math/019-equals.out.expected (rev 0) +++ trunk/tests/language-behaviour/math/019-equals.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +false Deleted: trunk/tests/language-behaviour/math/0191-not-equals.check.sh =================================================================== --- trunk/tests/language-behaviour/math/0191-not-equals.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/0191-not-equals.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 0191-not-equals.out | grep true || exit 1 -exit 0 Copied: trunk/tests/language-behaviour/math/0191-not-equals.out.expected (from rev 5122, branches/release-0.93/tests/language-behaviour/math/0191-not-equals.out.expected) =================================================================== --- trunk/tests/language-behaviour/math/0191-not-equals.out.expected (rev 0) +++ trunk/tests/language-behaviour/math/0191-not-equals.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +true Deleted: trunk/tests/language-behaviour/math/030-mix-float-int.check.sh =================================================================== --- trunk/tests/language-behaviour/math/030-mix-float-int.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/030-mix-float-int.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 030-mix-float-int.out | grep 54.3|| exit 1 -exit 0 Copied: trunk/tests/language-behaviour/math/030-mix-float-int.out.expected (from rev 5122, branches/release-0.93/tests/language-behaviour/math/030-mix-float-int.out.expected) =================================================================== --- trunk/tests/language-behaviour/math/030-mix-float-int.out.expected (rev 0) +++ trunk/tests/language-behaviour/math/030-mix-float-int.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +54.3 Deleted: trunk/tests/language-behaviour/math/031-add-float.check.sh =================================================================== --- trunk/tests/language-behaviour/math/031-add-float.check.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/language-behaviour/math/031-add-float.check.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -1,4 +0,0 @@ -#!/bin/bash -set -x -cat 031-add-float.out | grep 135.3|| exit 1 -exit 0 Copied: trunk/tests/language-behaviour/math/031-add-float.out.expected (from rev 5122, branches/release-0.93/tests/language-behaviour/math/031-add-float.out.expected) =================================================================== --- trunk/tests/language-behaviour/math/031-add-float.out.expected (rev 0) +++ trunk/tests/language-behaviour/math/031-add-float.out.expected 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1 @@ +135.3 Copied: trunk/tests/language-behaviour/procedures/tc.template.mix.data (from rev 5122, branches/release-0.93/tests/language-behaviour/procedures/tc.template.mix.data) =================================================================== --- trunk/tests/language-behaviour/procedures/tc.template.mix.data (rev 0) +++ trunk/tests/language-behaviour/procedures/tc.template.mix.data 2012-01-29 04:43:37 UTC (rev 5523) @@ -0,0 +1,2 @@ + +localhost sleep /bin/sleep INSTALLED INTEL32::LINUX null Modified: trunk/tests/suite.sh =================================================================== --- trunk/tests/suite.sh 2012-01-28 21:10:59 UTC (rev 5522) +++ trunk/tests/suite.sh 2012-01-29 04:43:37 UTC (rev 5523) @@ -375,20 +375,20 @@ fi else if [ "$TYPE" == "test" ]; then - # WIDTH=$( width "$LABEL" ) - if [ "$RESULT" == "Passed" ]; then - html_td class "success" width 25 title "$CMD" - html_a_href "$TESTNAMEDIR/$OUTPUT" "$LABEL" - elif [ "$RESULT" == "None" ]; then - html_td width 25 - html "  " - html_~td - else - echo -e "${RED}FAILED${GRAY}" - cat $RUNDIR/$OUTPUT < /dev/null - html_td class "failure" width 25 title "$CMD" - html_a_href "$TESTNAMEDIR/$OUTPUT" "$LABEL" - fi + # WIDTH=$( width "$LABEL" ) + if [ "$RESULT" == "Passed" ]; then + html_td class "success" width 25 title "$CMD" + html_a_href "$TESTNAMEDIR/$OUTPUT" "$LABEL" + elif [ "$RESULT" == "None" ]; then + html_td width 25 + html "  " + html_~td + else + echo -e "${RED}FAILED${GRAY}" + cat $RUNDIR/$OUTPUT < /dev/null + html_td class "failure" width 25 title "$CMD" + html_a_href "$TESTNAMEDIR/$OUTPUT" "$LABEL" + fi html_~td elif [ "$TYPE" == "package" ]; then BINPACKAGE=$2 @@ -479,19 +479,6 @@ fi } -# Create test output_*.txt file and copy to stdout.txt -# Rename to copy_output? -# TEST_LOG = test log -test_log() { - TEST_LOG="output_$LOGCOUNT.txt" - banner "$LASTCMD" $RUNDIR/$TEST_LOG - if [ -f $OUTPUT ]; then - cp $OUTPUT $RUNDIR/$TEST_LOG 2>>$LOG - cp $OUTPUT $RUNDIR/stdout.txt - fi - let "LOGCOUNT=$LOGCOUNT+1" -} - stars() { for i in {1..120} do @@ -597,8 +584,13 @@ fi RESULT=$( result ) +<<<<<<< .working output_report test $SEQ "$LASTCMD" $RESULT $OUTPUT +======= +>>>>>>> .merge-right.r5122 + output_report test $SEQ "$LASTCMD" $RESULT $OUTPUT + check_bailout let "SEQ=$SEQ+1" @@ -720,7 +712,6 @@ NAME=$2 RESULT="None" - if [ -f "$GROUP/$NAME.in" ]; then echo "Copying input: $NAME.in" cp -v $GROUP/$NAME.in . 2>&1 >> $OUTPUT @@ -887,7 +878,7 @@ html_~td fi - OUTPUT=$NAME.stdout + OUTPUT=$NAME.stdout if [ -x $GROUP/$SHELLSCRIPT ]; then script_exec $SHELLSCRIPT "X" @@ -1048,7 +1039,7 @@ PIECES="" while [ "$G" != "$CRTDIR" ]; do PIECE=`basename $G` - PIECES="$PIECE $PIECES" + PIECES="$PIECE/$PIECES" G=`dirname $G` done echo $PIECES @@ -1235,6 +1226,7 @@ fi SWIFT_HOME=$TOPDIR/cog/modules/swift/dist/swift-svn OUTPUT=compile.stdout +OUTPUT=build.stdout if [ $BUILD_PACKAGE = "1" ]; then build_package fi From swift at ci.uchicago.edu Sun Jan 29 15:00:03 2012 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Sun, 29 Jan 2012 15:00:03 -0600 (CST) Subject: [Swift-commit] Cog update Message-ID: <20120129210003.CDADD8D00081@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3356 | hategan | 2012-01-29 14:57:26 -0600 (Sun, 29 Jan 2012) | 1 line added some comments and clarifications ------------------------------------------------------------------------ Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java (revision 3355) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java (working copy) @@ -450,73 +450,124 @@ // Number of new Blocks allocated in this call int newBlocks = 0; + // get the size (w * h) for the current block by + // dividing the total required size (tsum) by the number + // of slots used in this round and scaling based on the spread. + // + // i.e. 0 spread max spread + // ________________ ____ + // | | | | | | ___| | + // | | | | | | ___| | | + // | | | | | | ___| | | | + // | | | | | | ___| | | | | + // |__|__|__|__|__| |__|__|__|__|__| + // (where the total area =~ tsum in both cases) double size = metric.blockSize(newBlocks, chunkOfBlocks, tsum); String s = SECONDS.format(tsum); - logger.info("Allocating blocks for (seconds): " + s); + logger.info("Allocating blocks for a total walltime of: " + s + "s"); while (index <= holding.size() && newBlocks < chunkOfBlocks) { // Job job = holding.get(i); int granularity = settings.getNodeGranularity() * settings.getJobsPerNode(); + // true if the number of jobs for this block is a multiple + // of granularity boolean granularityFit = (index - last) % granularity == 0; + // true if we've reached the end of the job list boolean lastChunk = (index == holding.size() - 1); + // true when the size of jobs from the last allocated one up to the current one + // are greater than the size (which means we have to start committing jobs to the block) boolean sizeFit = false; if (!lastChunk) { sizeFit = sumSizes(last, index) > size; } + + // if there are enough jobs and they match the granularity or if these are the last jobs if ((granularityFit && sizeFit) || lastChunk) { int msz = (int) size; + // jobs are sorted on walltime, and the last job is the longest, + // so use that for calculating the overallocation int lastwalltime = (int) holding.get(index).getMaxWallTime().getSeconds(); int h = overallocatedSize(holding.get(index)); + + // the maximum time is a hard limit, so for the maximum useable time + // the reserve needs to be subtracted + int maxt = + settings.getMaxtime() - (int) settings.getReserve().getSeconds(); // height must be a multiple of the overallocation of the // largest job - int maxt = - settings.getMaxtime() - (int) settings.getReserve().getSeconds(); // Is not h <= round(h, lastwalltime) ? -Justin + // Yes, it is (see comment in round()) - Mihael + // h = Math.min(Math.max(h, round(h, lastwalltime)), maxt); + // If h > maxt, should we report a warning/error? -Justin - h = Math.min(Math.max(h, round(h, lastwalltime)), maxt); + // No. h is the overallocated time (i.e. greater than the + // job walltime). So it's acceptable for that to go over maxt. + // The error is when walltime > maxt - Mihael + h = Math.min(round(h, lastwalltime), maxt); + + // once we decided on a height, get the width by dividing the total size + // by the height (and rounding appropriately to fit the granularity), + // while making sure that we don't go over maxNodes int width = Math.min(round(metric.width(msz, h), granularity), settings.getMaxNodes() * settings.getJobsPerNode()); + // while we were shooting to have the number of jobs be a multiple of the + // width, various constraints might have changed that, so adjust the + // number of jobs accordingly int r = (index - last) % width; + if (logger.isInfoEnabled()) { logger.info("\t Considering: " + holding.get(index)); - //logger.info("h: " + h + ", jj: " + lastwalltime + - // ", x-last: " + ", r: " + r + - // ", sumsz: " + sumSizes(last, i)); logger.info("\t Max Walltime (seconds): " + lastwalltime); logger.info("\t Time estimate (seconds): " + h); logger.info("\t Total for this new Block (est. seconds): " + sumSizes(last, index)); } - // read just number of jobs fitted based on granularity + // read more jobs to fill up the remaining space towards the granularity + // +-----+ +-----+ + // |xx...| |xxrrr| + // |xxxxx| --> |xxxxx| + // |xxxxx| |xxxxx| + // |xxxxx| |xxxxx| + // +-----+ +-----+ // This result is unused and overwritten below. -Justin index += (width - r); + + if (r != 0) { + // and make sure that there is enough walltime to run the new added jobs + // though this is improper: what should be added to h is + // (newLastwalltime - lastwalltime) where newLastwalltime is the walltime + // of the i-th job after adding (w - r). h = Math.min(h + lastwalltime, maxt); } - //if (logger.isInfoEnabled()) { - // logger.info("h: " + h + ", w: " + width + ", size: " + size + ", msz: " + msz - // + ", w*h: " + width * h); - //} + // create the actual block Block b = new Block(width, TimeInterval.fromSeconds(h), this); + + // now add jobs from holding until the size of the jobs exceeds the + // size of the block (as given by the metric) int ii = last; while (ii < holding.size() && sumSizes(last, ii + 1) <= metric.size(width, h)) { queue(holding.get(ii)); remove.add(holding.get(ii)); ii++; } + if (logger.isInfoEnabled()) { logger.info("Queued: " + (ii-last) + " jobs to new Block"); } + // update index of last added job index = ii - 1; + // commit the block addBlock(b); last = index + 1; + newBlocks++; size = metric.blockSize(newBlocks, chunkOfBlocks, tsum); } @@ -672,6 +723,7 @@ Round v up to the next multiple of g */ private int round(int v, int g) { + // (v % g) < g => x - (v % g) + g > x int r = v - (v % g) + g; return r; } From wilde at ci.uchicago.edu Sun Jan 29 19:47:21 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Sun, 29 Jan 2012 19:47:21 -0600 (CST) Subject: [Swift-commit] r5524 - SwiftApps/SciColSim Message-ID: <20120130014721.8121D9CD01@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-29 19:47:21 -0600 (Sun, 29 Jan 2012) New Revision: 5524 Added: SwiftApps/SciColSim/test-orig.sh SwiftApps/SciColSim/test-swift.sh SwiftApps/SciColSim/testopt.py Removed: SwiftApps/SciColSim/testO.sh SwiftApps/SciColSim/testopt1.py Modified: SwiftApps/SciColSim/EMAIL SwiftApps/SciColSim/README SwiftApps/SciColSim/TODO SwiftApps/SciColSim/annealing.swift SwiftApps/SciColSim/evolve.sh SwiftApps/SciColSim/local.xml SwiftApps/SciColSim/optimizer.cpp SwiftApps/SciColSim/sumloss.sh Log: Checkpoint of doc and code devel. Modified: SwiftApps/SciColSim/EMAIL =================================================================== --- SwiftApps/SciColSim/EMAIL 2012-01-29 04:43:37 UTC (rev 5523) +++ SwiftApps/SciColSim/EMAIL 2012-01-30 01:47:21 UTC (rev 5524) @@ -207,7 +207,7 @@ > 15 repeats (parallel) > 100 Annealing_cycles (serial) > 6 repeats (serial) -> 1000 to 10000 annealing_repeats (parallel) +> 1000 to 10000 annealing_repeats (parallel) # NOTE (1/29 mw): should this be called "reruns"? > evolve() > > The main question I have at this point is regarding the strategy for Modified: SwiftApps/SciColSim/README =================================================================== --- SwiftApps/SciColSim/README 2012-01-29 04:43:37 UTC (rev 5523) +++ SwiftApps/SciColSim/README 2012-01-30 01:47:21 UTC (rev 5524) @@ -1,38 +1,102 @@ -=== Overview +*** Overview The code simulates the exploration of a chemical network by a research community. The five major parameters determine the strategy of exploration, "target" is the number of new interactions discovered and "loss" is the number of experiments per one new positive finding. -=== Files +Terminology and application logic: + optimizer: the C++ based optimizer that performs simulated annealing + optimizetion of parameters to the evolve() function. + + evolve(): the actual science code which does the "collaboration + simulation" desribed in Overview above. Implemented as a + function within optimizer. Uses the boost graph lib. + Calculates "loss" - amount of effort expended in rerunning + scientific experiments. + + multi_annealing(): the function within optimizer that does the + simulated annealing optimization logic (multiple times) + + multi_loss: performs a total of N independent repetitions of evolve() + on NWorker cores, in parallel. Each evolve() returns one loss + value, a scalar double. Returns average loss over all evolve() + simulations, and std dev. + +*** Files + Code: +testopt.py: top-most script to run the C++ optimizer (with no + swift). Based on a simpler Python script provided by + Andrey to run the C++ optimizer. + +test-orig.sh: original python script test script for optimizer, + provided by Andrey with some mods by Mike. + optirun.swift: replaces top-level py script for the outermost loops + (temporarily deprecated: has not been maintained to match changes in optimizer) +annealing.swift: the annealing logic of optimizer, moved to + swift. Calls optimizer(op=m) to run 1 multi_loss() of N + evolve() runs on NWorker cores. Implements a higher-level multi_loss + which spreads the N reruns of evolve() between M runs of optimizer(m) + each of which does R evolve runs. N = P*R. Eg, n=2400, P=100, R=24, + would use 100 nodes (invocations) of 24 cores each. + + +tc specifies: + + optimizer.sh (old) / evolve.sh (current) + + sumloss.sh: calculates avg loss and its std dev + did this as a separate app because it was hard to do the sum() + logic in swift. How best to do that? Try recursion? fold()? + + Data: + input: movie_data.txt + + output: best_??? max? itermiediate? FIX -=== How to build -make +*** How to build -=== How to Run +Just run "make" -> uses Makefile -./test0.sh + on mac, makes: openmp-optimizer (multi_loss() changed to use OpenMP), + dispatch-optimizer (orig code logic, only slight corrections) -./testO.sh + on linux, makes: openmp-optimizer -./test1.sh -./*.py +*** How to Run +Non-swift tests: -=== C++ app flow logic === + cp testopt.py t1.py etc; then edit t1.py etc to set the params you want. -for target in range(58, 1009 (used 209), 50): // 20 values - for i in range(15): +Swift tests: + + cp testswift.sh t1.sh etc; then edit t1.sh etc to set the params you want. + + +In each of the above, set the optimizer version you want to run. + + +*** C++ Command line args + + +*** Swift command line args and internal control vars + + + +*** C++ app flow logic === + +for target in range(58, 1009 (used 209), 50): // 20 values Target Values + for i in range(15): Optimization repeats (runs?) # P0: P1: D: P2: P3: optimizer |0 0 4 50 -1 target | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0 @@ -44,7 +108,7 @@ curr_err = Res.second; for i = 0 to annealing_cycles - 1 (100 from .py script) - for j = 0 to 4 // 5X: 0..4 is fixed constant + for j = 0 to 4 // 5X: 0..4 is fixed constant - one iteration for each of 5 evolve() parameters setParameters (for a round of parallel Annealing_repeats Res = multi_loss(un, Results, Counters, Annealing_repeats); In parallel: for 1 to AnnealingRepeats (1,000; 10,000 desired) @@ -52,14 +116,20 @@ evolve() setParameters again here, conditionally? (check) -20 targets - py - 15 repeats - py - 1 initial multi_loss: 1000 to 10000 annealing_repeats - 100 Annealing_cycles (groups of 10? : cycle=10 ) (fast:50) - 5 repeats (fast: 1) - multi_loss: 1000 to 10000 evolve re-runs - evolve() => 2 mins to 10 mins +TODO: Merge these two outlines into one: -=== END +P 20 targets - py (target loss) +P 15 repeats - py +S 1 initial multi_loss: 1000 to 10000 annealing_repeats +S 100 Annealing_cycles (groups of 10? : cycle=10 ) (fast:50) +S 5 repeats (fast: 1) +P multi_loss: 1000 to 10000 evolve re-runs +S evolve() (leaf) => 2 mins to 10 mins (is that time for one or for 1000?) - +# a) 20 targets (parallel) +# b) 15 repeats (parallel) of optimizer (optimizer == multi_annealing): +# 1 multi_loss to initialize +# c) 100 Annealing_cycles (serial) +# d) 5 repeats (1 per param, serial) of multi_loss: +# e) 1000 to 10000 annealing_repeats (parallel) == multi_loss +# f) evolve() Modified: SwiftApps/SciColSim/TODO =================================================================== --- SwiftApps/SciColSim/TODO 2012-01-29 04:43:37 UTC (rev 5523) +++ SwiftApps/SciColSim/TODO 2012-01-30 01:47:21 UTC (rev 5524) @@ -1,37 +1,69 @@ -[x] Determine if one evolve() run in the optimizer.cpp code is -sufficient. (yes -it does 1 woth reruns = 1 +Stopped at: +Are deps working right? why 20 in args? (not 10?) Why 2 calls in progress? Whats with initial call [0][0]? + +trace nan error; verify if N reruns per call is working and sumloss handles it OK. + +--- + +x = done, - = in progress + [ ] Determine correct test parameter sets - and if we are passing these -through correctly. + through correctly. -[ ] Check correctnes of rejection tracking logic and j of k logic for the 5 params +[ ] Check correctnes of rejection tracking logic and j of k logic for + the 5 params [ ] address fixme's -[ ] deterine how to find max_reject +[ ] determine how to find max_reject [ ] Determine if and how to let the optimizer.cpp code do N reruns and -how to set NWorkers accordingly (must evenly divide in current code). -Check if floor() is correct and how load is partitioned; what N makes -sense in swift usage? + how to set NWorkers accordingly (must evenly divide in current + code). Check if floor() is correct and how load is partitioned; what + N makes sense in swift usage? -[x] Determine annealing.swift output files needed. +[x] Ensure we are doing 100's to 1000's of evolve() calls in parallel. -[_x_ ] Make annealing.swift stdout/err output match that of optimizer.cpp +[ ] Do performance tests on Beagle and then other platforms (OSG, TG) + - at scale. -[x] Integrate code to start with usec seed +[-] Make annealing.swift stdout/err output match that of optimizer.cpp -[x] add code to set secific seed for reproducibiity. Will Swift use same from Java Random? - [ ] Align Swift and .cp code enough do a correctness test. [ ] Enable precision control for %f formatting (to match c++ -output). Why are we getting some long and some short? Is swift -truncating the constant or the tracef output? + output). Why are we getting some long and some short? Is swift + truncating the constant or the tracef output? -[ ] Do performance tests on Beagle and then other platforms (OSG, TG) -- at scale. Ensure we aredoing 100's to 1000's of evolve() calls in -parallel. - [ ] Package code for ExM research. +[ ] add logic from C++ called "random intiation of starting parameters + +[ ] make calls to optimizer(op m) work right regardless of what N and + Nworkers is. Now seems to require ((N mod NWorkers0 == 0) + +[-] Platforms: + +[-] Mac +[ ] Beagle +[ ] OSG +[ ] XSEDE +[ ] OSG+XSEDE +[ ] BG/P +[ ] PADS +[ ] FutureGrid +[ ] OSG Cloud +[ ] ibiCluster + +--- + +[x] Integrate code to start with usec seed + +[x] add code to set secific seed for reproducibiity. Will Swift use +same from Java Random? + +[x] Determine if one evolve() run in the optimizer.cpp code is +sufficient. (yes -it does 1 woth reruns = 1 + +[x] Determine annealing.swift output files needed. Modified: SwiftApps/SciColSim/annealing.swift =================================================================== --- SwiftApps/SciColSim/annealing.swift 2012-01-29 04:43:37 UTC (rev 5523) +++ SwiftApps/SciColSim/annealing.swift 2012-01-30 01:47:21 UTC (rev 5524) @@ -10,7 +10,7 @@ global boolean FIX_VARIABLES = true; global int var_fixed[] = [1,1,0,0,0]; -global int Nworkers = 1; +global int Nworkers = 4; (float nx) newx(float x, float dx) { @@ -63,7 +63,7 @@ float x[][], dx[][], curr_loss[], curr_sdev[]; Res mlres[][]; - mlres[0][0] = multi_loss( 0, 0, params0, target_innov, evolve_reruns ); // Only done once, not 5x; serves for all evolve-params ??? + mlres[0][0] = multi_loss( 0, 0, params0, target_innov, evolve_reruns ); // FIXME: serves for all evolve-params ??? tracef("multi_annealing: AR: %f +- %f\n",mlres[0][0].loss,mlres[0][0].sdev); foreach j in [0:NEVOPARAMS-1] { @@ -77,7 +77,7 @@ foreach i in [1:annealing_cycles] { // set new temperature, rejection threshold, and dx values for this cycle float temperature = T_start*exp( @tofloat(i)*(jlog(T_end)-jlog(T_start))/@tofloat(annealing_cycles)); - tracef("in multi_annealing: AR: i=%i ....T=%f\n", i, temperature); + // tracef("in multi_annealing: AR: i=%i ....T=%f\n", i, temperature); // On each new "major" cycle within the annealing_cycles (other than the first) set new rejection and dx values if ( i %% cycle == 1 && i > 1 ){ tracef("multi_annealing: new cycle at i=%i\n",i); @@ -93,7 +93,7 @@ } trace ("Recomputed rejection: i=%d k=%d dx[i][k]=%f\n", i, k, dx[i][k]); } - tracef("in multi_annealing: AR: %f %f %f %f %f\n",dx[i][0],dx[i][1],dx[i][2],dx[i][3],dx[i][4],dx[i][5]); + tracef("multi_annealing: AR: %f %f %f %f %f\n",dx[i][0],dx[i][1],dx[i][2],dx[i][3],dx[i][4],dx[i][5]); } else { # If not new cycle, set dx from previous dx (i-1) foreach k in [0:NEVOPARAMS-1] { @@ -104,7 +104,7 @@ // float try_x[]; int curr = (i * NEVOPARAMS) + j; int prev = curr-1; - tracef("in multi_annealing: i=%i j=%i curr=%i prev=%i\n", i, j, curr, prev); + // tracef("in multi_annealing: i=%i j=%i curr=%i prev=%i\n", i, j, curr, prev); if ( /*(!FIX_VARIABLES) || */ (var_fixed[j]==0) ) { # fixed=1,1,0,0,0: FIXME: FIX_VARIABLES flag has faulty logic but OK when TRUE float try_x[]; @@ -120,15 +120,15 @@ try_x[k] = x[i-1][k]; // use x[i-1][k] (from prior cycle) } } - tracef("in multi_annealing: i=%i j=%i k=%i try_x=%f\n", i, j, k, try_x[k]); - tracef("in multi_annealing: i=%i j=%i k=%i\n", i, j, k); + // tracef("in multi_annealing: i=%i j=%i k=%i try_x=%f\n", i, j, k, try_x[k]); + // tracef("in multi_annealing: i=%i j=%i k=%i\n", i, j, k); } // Up to here, x[] and dx[] are only set for previous i - tracef( @strcat(color(3,"in multi_annealing: "),"i=%i j=%i calling multi_loss\n"),i,j); - #tracef("multi_annealing: i=%i j=%i calling multi_loss try_x=%q\n",i,j,try_x); + # tracef( @strcat(color(3,"in multi_annealing: "),"i=%i j=%i calling multi_loss\n"),i,j); + # tracef("multi_annealing: i=%i j=%i calling multi_loss try_x=%q\n",i,j,try_x); mlres[i][j] = multi_loss(i,j,try_x, target_innov, evolve_reruns); # do the N evolve()'s, N=evolve_reruns - tracef("multi_annealing: i=%i j=%i ret vals from multi_loss=(%f,%f)\n",i,j,mlres[i][j].loss,mlres[i][j].sdev); - tracef("in multi_annealing: AR: %f+-%f\n",mlres[i][j].loss,mlres[i][j].sdev); + # tracef("multi_annealing: i=%i j=%i ret vals from multi_loss=(%f,%f)\n",i,j,mlres[i][j].loss,mlres[i][j].sdev); + # tracef("in multi_annealing: AR: %f+-%f\n",mlres[i][j].loss,mlres[i][j].sdev); // Beyond this point, x[] and dx[] are being set for this i,j float ratio = min(1.0, exp( -(mlres[i][j].loss-curr_loss[prev]) /temperature)); float r = (random()) / (pow(2.0,31.0)-1.0); // why all the 2^31's ??? @@ -199,7 +199,11 @@ file rfile[]; tracef("multi_loss: entered: ci=%i cj=%i target_innov=%f evolve_reruns=%i x=%q\n",ci, cj, target_innov,evolve_reruns,x); - foreach i in [1:evolve_reruns] { // repeats of the evolove() - same as n_reruns + int rerunsPerApp = 120; + int appCalls = @toint(@tofloat(evolve_reruns) / @tofloat(rerunsPerApp)); # FIXME: handle fractional issues and rounding etc. For now must divide evenly + +tracef("multi_loass appCalls=%i\n", appCalls); + foreach i in [1:appCalls] { // repeats of the evolove() - same as n_reruns file outfile; // FIXME: map and save in future string args[] = [ // FIXME: move this to a setargs() function // alpha_i alpha_m beta gamma delta target_innov @@ -207,7 +211,7 @@ // n_epochs n_steps evolve_reruns range // "40000", "20", @strcat(evolve_reruns), "2", - "40000", "20", "1", "2", # Set reruns to 1 for the cpp code; we do the re-runs in Swift for now. + "40000", "20", @strcat(rerunsPerApp), "2", // verbose_level "1", @@ -218,12 +222,13 @@ // FREEZE: alpha_i alpha_m beta gamma delta "1", "1", "0", "0", "0", - // operation-code:(m,a) Nworkers - "m", @strcat(Nworkers) ]; + // operation-code:(m,a) Nworkers seed + "m", @strcat(Nworkers), "1234567" ]; file graph <"movie_graph.txt">; (outfile, rfile[i]) = evolve(args,graph); - tracef("multi_loss: after evolve: i=%i %k %k\n", i, outfile, rfile[i]); + tracef("multi_loss: i=%i calling evolve, args=%q\n", i, args); + // tracef("multi_loss: after evolve: i=%i %k %k\n", i, outfile, rfile[i]); } file sumfile = sumloss(rfile); r = readData(sumfile); @@ -233,7 +238,7 @@ optimizer_sweep() // Implements logic of python driver script { int minrange=58; - int maxrange=209; + int maxrange=59; //int maxrange=59; //int maxrange=1009; //int maxrange=209; @@ -241,8 +246,7 @@ // fixme: add provision for random priming and random param values when x[i] == -100 (see optimizer.cpp main()) - //int nreps=1; # 15 - int nreps=3; # 15 + int nreps=1; # 15 // file bestfile ; // file maxfile ; @@ -266,11 +270,11 @@ 2.0, 0.01, 0.3, - 10, + 1200, 2.3, [0.0, 0.0, 4.0, 50.0, -1.0], @tofloat(target_innov), - 1); + 5); } } } Modified: SwiftApps/SciColSim/evolve.sh =================================================================== --- SwiftApps/SciColSim/evolve.sh 2012-01-29 04:43:37 UTC (rev 5523) +++ SwiftApps/SciColSim/evolve.sh 2012-01-30 01:47:21 UTC (rev 5524) @@ -2,5 +2,6 @@ datafile=$1 touch multi_loss.data shift 1 -$(dirname $0)/openmp-optimizer $* 2>&1 +NWORKERS=$23 +OMP_NUM_THREADS=$NWORKERS $(dirname $0)/openmp-optimizer $* 2>&1 mv multi_loss.data $datafile Modified: SwiftApps/SciColSim/local.xml =================================================================== --- SwiftApps/SciColSim/local.xml 2012-01-29 04:43:37 UTC (rev 5523) +++ SwiftApps/SciColSim/local.xml 2012-01-30 01:47:21 UTC (rev 5524) @@ -1,7 +1,7 @@ - 0.23 + 0.00 10000 /tmp/wilde/swiftwork Modified: SwiftApps/SciColSim/optimizer.cpp =================================================================== --- SwiftApps/SciColSim/optimizer.cpp 2012-01-29 04:43:37 UTC (rev 5523) +++ SwiftApps/SciColSim/optimizer.cpp 2012-01-30 01:47:21 UTC (rev 5524) @@ -1402,6 +1402,7 @@ #else Res = multi_loss( un, Results, Counters, x); #endif + std::cout << "Returned from initial multi_loss:" << std::endl; std::cout << Res.first << " +- " << Res.second << std::endl; if ( operation == 'm' ) { Modified: SwiftApps/SciColSim/sumloss.sh =================================================================== --- SwiftApps/SciColSim/sumloss.sh 2012-01-29 04:43:37 UTC (rev 5523) +++ SwiftApps/SciColSim/sumloss.sh 2012-01-30 01:47:21 UTC (rev 5524) @@ -1,17 +1,25 @@ #! /bin/awk -f -BEGIN { n = ARGC-1 } +BEGIN { n = 0; loss = 0; } + { - loss += $1/n - loss_sq += ($1*$1)/n + loss += $1 + loss_sq += ($1*$1) + n++ } + END { + + loss /= n; + loss_sq /= n; + x = (loss_sq - (loss*loss))/n sdev = 2.0 * sqrt(x) printf "loss sdev\n" printf "%f %f\n", loss, sdev } + # the awk script above implements this c++ logic from optimizer.cpp: # # for (int i=0; i Res; # Res.first=Loss; # Res.second=two_std; + + +# Older logic, literal transcription from C++ (didnt handle multiline files correctly): + +# { +# loss += $1/n +# loss_sq += ($1*$1)/n +# } +# +# { +# x = (loss_sq - (loss*loss))/n +# sdev = 2.0 * sqrt(x) +# printf "loss sdev\n" +# printf "%f %f\n", loss, sdev +# } Copied: SwiftApps/SciColSim/test-orig.sh (from rev 5519, SwiftApps/SciColSim/testO.sh) =================================================================== --- SwiftApps/SciColSim/test-orig.sh (rev 0) +++ SwiftApps/SciColSim/test-orig.sh 2012-01-30 01:47:21 UTC (rev 5524) @@ -0,0 +1,21 @@ +#! /bin/bash + +python <out.o.T"+s); +os.system("./Optimizer "+args+" >out.O.T"+s); + +# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") +# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") + +print "Done!" +END + Added: SwiftApps/SciColSim/test-swift.sh =================================================================== --- SwiftApps/SciColSim/test-swift.sh (rev 0) +++ SwiftApps/SciColSim/test-swift.sh 2012-01-30 01:47:21 UTC (rev 5524) @@ -0,0 +1,7 @@ +escapecode=$(echo -n -e '\033') + +swift -config cf -tc.file tc -sites.file local.xml annealing.swift \ + -e33="$escapecode" + +# -evolveReruns=20 \ +# -annealingCycles=10 Property changes on: SwiftApps/SciColSim/test-swift.sh ___________________________________________________________________ Added: svn:executable + * Deleted: SwiftApps/SciColSim/testO.sh =================================================================== --- SwiftApps/SciColSim/testO.sh 2012-01-29 04:43:37 UTC (rev 5523) +++ SwiftApps/SciColSim/testO.sh 2012-01-30 01:47:21 UTC (rev 5524) @@ -1,21 +0,0 @@ -#! /bin/bash - -python <out.o.T"+s); -os.system("./Optimizer "+args+" >out.O.T"+s); - -# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") -# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") - -print "Done!" -END - Copied: SwiftApps/SciColSim/testopt.py (from rev 5522, SwiftApps/SciColSim/testopt1.py) =================================================================== --- SwiftApps/SciColSim/testopt.py (rev 0) +++ SwiftApps/SciColSim/testopt.py 2012-01-30 01:47:21 UTC (rev 5524) @@ -0,0 +1,144 @@ +#! /usr/bin/env python + +import os, sys + +unbuffered = os.fdopen(sys.stdout.fileno(), 'w', 0) +sys.stdout = unbuffered + +app = "./orig-optimizer"; # For Mac only: original code (+1 loop fix) using Grand Central Dispatch +app = "./dispatch-optimizer"; # For Mac only: sing Grand Central Dispatch +app = "./openmp-optimizer"; # For Mac or Linux: Using OpenMP (Default) + +paramset="default" + +if paramset == "default": + + # Parameter names and optimizer command line positions + + startTarget = 58 # target (target innovation) + endTarget = 1009 # " + incrTarget = 50 # " + optimizerRepeats = 15 # wrapper control var (# of repeats of optimizer to do for each target loss) + evolveReruns = 1000 # n_reruns = + annealingSteps = 100 + +# Following params are for modified optimizer openmp-optimizer + +# NWorkers = "2" +# operation = "n" # n=normal, m=manual (runs 1 multi_loss call) +# seed = "1234567" +# openmp = "OMP_NUM_THREADS=24" + + NWorkers = "" + operation = "" + seed = "" + openmp = "" + +elif paramset == "FULLSCALE": # FULL INITIAL TEST PARAMETERS from Andrey + + startTarget = 58 + endTarget = 1009 + incrTarget = 50 + optimizerRepeats = 15 + evolveReruns = 1000 + annealingSteps = 100 + +elif paramset == "FASTTEST": # FAST TEST PARAMETERS by Mike + + startTarget = 58 + endTarget = 209 + incrTarget = 50 + optimizerRepeats = 2 + evolveReruns = 10 + annealingSteps = 2 + NWorkers = "2" + openmp = "OMP_NUM_THREADS=" + NWorkers + operation = "n" # n=normal, m=manual (runs 1 multi_loss call) + seed = "1234567" + +elif paramset == "MANUALTEST": # for manual (one multi_loss call) mode + + startTarget = 258 # runtime increases with greater target + endTarget = 259 + incrTarget = 50 + optimizerRepeats = 1 + evolveReruns = 60 + annealingSteps = 5 + NWorkers = "4" + openmp = "OMP_NUM_THREADS=" + NWorkers + operation = "m" # n=normal, m=manual (runs 1 multi_loss call) + seed = "1234567" + +# Ensure we dont pass new parameters to original optimizer versions +# (but they would be ignored) + +if app == "./orig-optimizer": + NWorkers = "" + operation = "" + seed = "" + +# Run the test + +for target in range(startTarget,endTarget,incrTarget): + for i in range(optimizerRepeats): + args = openmp + " " + app + " 0 0 4 50 -1 " + str(target) + " 40000 20 " + str(evolveReruns) + \ + " 2 1 2. 0.01 " + str(annealingSteps) + " 0.3 2.3 1 1 0 0 0 " + operation + " " + NWorkers + " " + seed; + print("\n**** Calling optimizer: "+args+"\n") + os.system(args); + +print sys.argv[0] + " Done!" + + +### Argument worksheet: + +# string fastargs1[] = [ +# "0", "0", "4", "50", "-1", @strcat(target), +# "40000", "20", "1000", "2", +# "1", +# "2.", "0.01", "100", "0.3", "2.3", +# "1", "1", "0", "0", "0"]; +# string fastargs2[] = [ +# "0", "0", "4", "50", "-1", @strcat(target), +# "40000", "20", "1000", "2", +# "1", +# "2.", "0.01", "5", "0.3", "2.3", +# "1", "1", "0", "0", "0", "m"]; +# string fastargs3[] = [ +# "0", "0", "4", "50", "-1", @strcat(target), +# "40000", "20", @strcat(repeats), "2", +# "1", +# "2.", "0.01", "2", "0.3", "2.3", +# "1", "1", "0", "0", "0", "m"]; +# +# +# long running args = "0 0 4 50 -1 target | 40000 20 1000 | 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0 | m 24? 12345 +# +# [ alpha_i alpha_m beta gamma delta target_innov ] +# 0 0 4 50 -1 target +# +# [ n_epochs n_steps n_reruns ] [ range ] [ verbose_level] +# 40000 20 1000 2 1 +# +# [ T_start T_end Annealing_steps Target_rejection Starting_jump ] +# 2. 0.01 100 0.3 2.3 +# +# [ FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta ] +# 1 1 0 0 0 +# +# [ operation-code:(n,m) Nworkers seed ] +# n 24 12345 +# + +# From older test, using separate file per run: +# args = app + " 0 0 4 50 -1 " + str(target) + " 40000 20 " + str(evolveReruns) + \ +# " 2 1 2. 0.01 " + str(annealingSteps) + " 0.3 2.3 1 1 0 0 0 > out.T"+str(target)+".i"+str(i) + +### Optimization loop logic: + +# a) 20 targets (parallel) +# b) 15 repeats (parallel) of optimizer (optimizer == multi_annealing): +# 1 multi_loss to initialize +# c) 100 Annealing_cycles (serial) +# d) 5 repeats (1 per param, serial) of multi_loss: +# e) 1000 to 10000 annealing_repeats (parallel) == multi_loss +# f) evolve() Deleted: SwiftApps/SciColSim/testopt1.py =================================================================== --- SwiftApps/SciColSim/testopt1.py 2012-01-29 04:43:37 UTC (rev 5523) +++ SwiftApps/SciColSim/testopt1.py 2012-01-30 01:47:21 UTC (rev 5524) @@ -1,61 +0,0 @@ -#! /usr/bin/env python -# -u => run unbuffered - - - -import os, sys - - -#_----------- - -unbuffered = os.fdopen(sys.stdout.fileno(), 'w', 0) -sys.stdout = unbuffered - -#-------------- - - -app = "./orig-optimizer"; # For Mac only: original code (+1 loop fix) using Grnd Central Dispatch -app = "./dispatch-optimizer"; # For Mac only: sing Grand Central Dispatch -app = "./openmp-optimizer"; # For Mac or Linux: Using OpenMP (Default) - -app = "./openmp-optimizer"; - -# FULL INITIAL TEST PARAMETERS from Andrey - -startTarget = 58 -endTarget = 1009 -incrTarget = 50 -optimizerRepeats = 15 -evolveReruns = 1000 -annealingSteps = 100 - -# FAST TEST PARAMETERS by Mike - -startTarget = 58 -endTarget = 209 -incrTarget = 50 -optimizerRepeats = 2 -evolveReruns = 10 -annealingSteps = 2 - -# extra (string) parameters for openmp- and dispatch- versions only: - -NWorkers = "2" -operation = "n" # n=normal, m=manual (runs 1 multi_loss call) -seed = "1234567"; - -if app == "./orig-optimizer": - NWorkers = "" - operation = "" - -for target in range(startTarget,endTarget,incrTarget): - for i in range(optimizerRepeats): - args = app + " 0 0 4 50 -1 " + str(target) + " 40000 20 " + str(evolveReruns) + \ - " 2 1 2. 0.01 " + str(annealingSteps) + " 0.3 2.3 1 1 0 0 0 " + operation + " " + NWorkers + " " + seed; - print("\n**** Calling optimizer: "+args+"\n") - os.system(args); -print sys.argv[0] + " Done!" - -# From older test, using separate file per run: -# args = app + " 0 0 4 50 -1 " + str(target) + " 40000 20 " + str(evolveReruns) + \ -# " 2 1 2. 0.01 " + str(annealingSteps) + " 0.3 2.3 1 1 0 0 0 > out.T"+str(target)+".i"+str(i) From wilde at ci.uchicago.edu Mon Jan 30 12:34:45 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 30 Jan 2012 12:34:45 -0600 (CST) Subject: [Swift-commit] r5525 - SwiftApps/SciColSim Message-ID: <20120130183446.003F29CCE6@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-30 12:34:45 -0600 (Mon, 30 Jan 2012) New Revision: 5525 Added: SwiftApps/SciColSim/sample.swift.output SwiftApps/SciColSim/sample.testopt.py.output Modified: SwiftApps/SciColSim/README SwiftApps/SciColSim/TODO SwiftApps/SciColSim/annealing.swift SwiftApps/SciColSim/evolve.sh Log: Correct hanging situation in setting rejection[] values. Still hangs after first cycle change. Updated README for handoff to Swift developers. Modified: SwiftApps/SciColSim/README =================================================================== --- SwiftApps/SciColSim/README 2012-01-30 01:47:21 UTC (rev 5524) +++ SwiftApps/SciColSim/README 2012-01-30 18:34:45 UTC (rev 5525) @@ -64,6 +64,9 @@ *** How to build +Copy and untar boost graph library to the current dir: + TBD - see CI: /home/wilde/AndreysOptimizer/src for the tgz file, for now. + Just run "make" -> uses Makefile on mac, makes: openmp-optimizer (multi_loss() changed to use OpenMP), @@ -74,18 +77,47 @@ *** How to Run -Non-swift tests: +* Non-swift tests (py calling C++ optimizer app): cp testopt.py t1.py etc; then edit t1.py etc to set the params you want. -Swift tests: +An example of a modified parameter set for testing a fast optimization +loop on communicado/local.xml is: - cp testswift.sh t1.sh etc; then edit t1.sh etc to set the params you want. +> paramset="mw" +71a73,86 +> elif paramset == "mw": # FAST TEST PARAMETERS by Mike +> +> startTarget = 58 +> endTarget = 59 +> incrTarget = 50 +> optimizerRepeats = 1 +> evolveReruns = 100 +> annealingSteps = 5 +> NWorkers = "4" +> openmp = "OMP_NUM_THREADS=" + NWorkers +> operation = "n" # n=normal, m=manual (runs 1 multi_loss call) +> seed = "1234567" +> app = "./openmp-optimizer"; +> +Sample output is in sample.testopt.py.output -In each of the above, set the optimizer version you want to run. +* Swift tests: + /test-swift.sh >&ts3.out & +(currently, parameters are set in a few different places in annealing.swift) + +Sample output (w/ bugs remaining) is in sample.test-swift.output + + +Optimizer output (both from C++ optimizer and Swift) generates text +with escape sequences to display colored text. Some versions of more +and less need special options set (eg in env var?) to display the +colors correctly. + + *** C++ Command line args Modified: SwiftApps/SciColSim/TODO =================================================================== --- SwiftApps/SciColSim/TODO 2012-01-30 01:47:21 UTC (rev 5524) +++ SwiftApps/SciColSim/TODO 2012-01-30 18:34:45 UTC (rev 5525) @@ -1,9 +1,12 @@ Stopped at: -Are deps working right? why 20 in args? (not 10?) Why 2 calls in progress? Whats with initial call [0][0]? -trace nan error; verify if N reruns per call is working and sumloss handles it OK. +Re-checking annealing loop +- rejection and rj calcs +- AR tracef's +- cycle logic + --- x = done, - = in progress Modified: SwiftApps/SciColSim/annealing.swift =================================================================== --- SwiftApps/SciColSim/annealing.swift 2012-01-30 01:47:21 UTC (rev 5524) +++ SwiftApps/SciColSim/annealing.swift 2012-01-30 18:34:45 UTC (rev 5525) @@ -11,16 +11,17 @@ global boolean FIX_VARIABLES = true; global int var_fixed[] = [1,1,0,0,0]; global int Nworkers = 4; +global int rerunsPerApp; (float nx) newx(float x, float dx) { - float r = (random()) / (pow(2.0,31.0)-1.0); + float r = (random()) ; # / (pow(2.0,31.0)-1.0); if (r > 0.5){ - nx = x + (random())*dx/(pow(2.0,31.0)-1.0); + nx = x + (random())*dx; # /(pow(2.0,31.0)-1.0); } else { - nx = x - (random())*dx/(pow(2.0,31.0)-1.0); + nx = x - (random())*dx; # /(pow(2.0,31.0)-1.0); } - tracef("newx(%f,%f)=%f\n",x,dx,nx); + // tracef("newx(%f,%f)=%f\n",x,dx,nx); } app (file outfile, file loss) evolve (string args[], file graph) @@ -64,7 +65,7 @@ Res mlres[][]; mlres[0][0] = multi_loss( 0, 0, params0, target_innov, evolve_reruns ); // FIXME: serves for all evolve-params ??? - tracef("multi_annealing: AR: %f +- %f\n",mlres[0][0].loss,mlres[0][0].sdev); + tracef("multi_annealing: AR: initial: %f +- %f\n",mlres[0][0].loss,mlres[0][0].sdev); foreach j in [0:NEVOPARAMS-1] { x[0][j]=params0[j]; @@ -74,38 +75,46 @@ curr_sdev[j] = mlres[0][0].sdev; } - foreach i in [1:annealing_cycles] { + iterate iter_i { # foreach i in [1:annealing_cycles] + int i = iter_i + 1; + // set new temperature, rejection threshold, and dx values for this cycle - float temperature = T_start*exp( @tofloat(i)*(jlog(T_end)-jlog(T_start))/@tofloat(annealing_cycles)); - // tracef("in multi_annealing: AR: i=%i ....T=%f\n", i, temperature); + + float temperature = T_start*exp( @tofloat(i-1)*(jlog(T_end)-jlog(T_start))/@tofloat(annealing_cycles)); + + tracef(@strcat("multi_annealing: AR: i=%i ....T = ",color(3,"%f"),"\n"), i, temperature); + // On each new "major" cycle within the annealing_cycles (other than the first) set new rejection and dx values + if ( i %% cycle == 1 && i > 1 ){ tracef("multi_annealing: new cycle at i=%i\n",i); + tracef(color(Pink, "multi_annealing: AR: New cycle at %i: prev dx[0-4]=[%f %f %f %f %f]\n"),i,dx[i-1][0],dx[i-1][1],dx[i-1][2],dx[i-1][3],dx[i-1][4]); foreach k in [0:NEVOPARAMS-1] { float newrejection = rejection[i-1][k] / @tofloat(cycle); if (newrejection > 0.0){ dx[i][k] = dx[i-1][k] / (newrejection / Target_rejection); - rejection[i][k]=0.0; + # FIXME: re-enable: rejection[i][k]=0.0; } else{ dx[i][k] = dx[i-1][k] * 2.0; - rejection[i][k]=rejection[i-1][k]; + # FIXME: re-enable: rejection[i][k]=rejection[i-1][k]; } - trace ("Recomputed rejection: i=%d k=%d dx[i][k]=%f\n", i, k, dx[i][k]); + tracef(color(Red,"Recomputed rejection: i=%d k=%d dx[i][k]=%f\n"), i, k, dx[i][k]); } - tracef("multi_annealing: AR: %f %f %f %f %f\n",dx[i][0],dx[i][1],dx[i][2],dx[i][3],dx[i][4],dx[i][5]); + tracef(color(Blue, "multi_annealing: AR: New cycle at %i: dx[0-4]=[%f %f %f %f %f]\n"),i,dx[i][0],dx[i][1],dx[i][2],dx[i][3],dx[i][4]); } - else { # If not new cycle, set dx from previous dx (i-1) + else { # If not new cycle, set dx[i][*] from previous dx ([i-1]). rejection[i]j] is set later. foreach k in [0:NEVOPARAMS-1] { dx[i][k] = dx[i-1][k]; } } - foreach j in [0:NEVOPARAMS-1] { // Try a new value for each non-fixed param; then write results and accept or reject + #foreach j in [0:NEVOPARAMS-1] { // Try a new value for each non-fixed param; then write results and accept or reject + iterate j { // Try a new value for each non-fixed param; then write results and accept or reject // float try_x[]; int curr = (i * NEVOPARAMS) + j; int prev = curr-1; // tracef("in multi_annealing: i=%i j=%i curr=%i prev=%i\n", i, j, curr, prev); - if ( /*(!FIX_VARIABLES) || */ (var_fixed[j]==0) ) { + if ( /*(!FIX_VARIABLES) || */ (var_fixed[j]==0) ) { # Adjustable vars # fixed=1,1,0,0,0: FIXME: FIX_VARIABLES flag has faulty logic but OK when TRUE float try_x[]; foreach k in [0:NEVOPARAMS-1] { // Select the evolve params to try @@ -120,30 +129,25 @@ try_x[k] = x[i-1][k]; // use x[i-1][k] (from prior cycle) } } - // tracef("in multi_annealing: i=%i j=%i k=%i try_x=%f\n", i, j, k, try_x[k]); - // tracef("in multi_annealing: i=%i j=%i k=%i\n", i, j, k); } + tracef(@strcat("multi_annealing: AR: ", color(10,"%f"), " ", color(9,"%i"),"\n"), try_x[j],j); // Up to here, x[] and dx[] are only set for previous i - # tracef( @strcat(color(3,"in multi_annealing: "),"i=%i j=%i calling multi_loss\n"),i,j); - # tracef("multi_annealing: i=%i j=%i calling multi_loss try_x=%q\n",i,j,try_x); mlres[i][j] = multi_loss(i,j,try_x, target_innov, evolve_reruns); # do the N evolve()'s, N=evolve_reruns - # tracef("multi_annealing: i=%i j=%i ret vals from multi_loss=(%f,%f)\n",i,j,mlres[i][j].loss,mlres[i][j].sdev); - # tracef("in multi_annealing: AR: %f+-%f\n",mlres[i][j].loss,mlres[i][j].sdev); + tracef("multi_annealing: AR: %f +- %f\n", mlres[i][j].loss, mlres[i][j].sdev); // Beyond this point, x[] and dx[] are being set for this i,j - float ratio = min(1.0, exp( -(mlres[i][j].loss-curr_loss[prev]) /temperature)); - float r = (random()) / (pow(2.0,31.0)-1.0); // why all the 2^31's ??? - tracef("in multi_annealing: AR: %f vs %f\n", r, ratio); float ALOT=100000000000.0; // 100,000,000,000. = 10^11 if (mlres[i][j].loss < ALOT) { tracef("multi_annealing: AF: best_opt_some.txt: %f,%f,%f,%f,%f,%f,%f,%f\n", target_innov,mlres[i][j].loss,try_x[0],try_x[1],try_x[2],try_x[3],try_x[4],mlres[i][j].sdev); - tracef(color(Red,"multi_annealing: AR: max_dist.txt - tbd\n")); - // FIXME: max_dist is global set inside evolve() - need to get to cli - perhaps as 3rd output value + tracef(color(Red,"multi_annealing: AF: max_dist.txt - tbd\n")); // FIXME: max_dist is global set in evolve() } else { // does this ever occur? if so did we want to still do the ratio computation above??? tracef("multi_annealing: Loss %f > ALOT at [i][j] = [%d][%d]\n", mlres[i][j].loss, i ,j); } + float ratio = min(1.0, exp( -(mlres[i][j].loss-curr_loss[prev]) / temperature)); + float r = (random()) ; # / (pow(2.0,31.0)-1.0); // FIXME: AR: why all the 2^31's ??? + tracef("multi_annealing: AR: %f vs %f\n", r, ratio); if (r > ratio) { // Reject new parameter x[i][j] = x[i-1][j]; rejection[i][j] = rejection[i-1][j] + 1.0; // FIXME: AR: Is this correct? incr rejection? @@ -160,38 +164,32 @@ tracef("multi_annealing: Accepting try_x[j], i=%i j=%i try_x[j]=%f\n",i,j,try_x[j]); curr_loss[curr] = mlres[i][j].loss; curr_sdev[curr] = mlres[i][j].sdev; - tracef(@strcat("multi_annealing: AR: %i ", color(8,"Rejection counts: "), - color( /* 2 */ 1," %f"), "\n\n"), - i, rejection[i][j] ); // , rejection[i][1], rejection[i][2], rejection[i][3], rejection[i][4]); -# FIXME: determine correct rejection[] values to avoid hanging: -# tracef(@strcat("multi_annealing: AR: %i ", color(8,"Rejection counts: "), -# color( /* 2 */ 1," %f"), color(7," %f"), color(5," %f"), color(9," %f"), color(6," %f"), "\n\n"), -# rejection[i][0], rejection[i][1], rejection[i][2], rejection[i][3], rejection[i][4]); -# END FIXME float rj[]; foreach k in [0:NEVOPARAMS-1] { # FIXME!!! - if (k==j) { - rj[k] = rejection[i-1][k]; + if (k <= j) { + rj[k] = rejection[i][k]; # Was either set from previous j or just set for this j } else { - rj[k] = rejection[i-1][k]; + rj[k] = rejection[i-1][k]; # Not yet set, use previous } - tracef(@strcat("multi_annealing: AR: [%i][%i] ", color(8,"Rejection counts: "), - color(/*2*/ 1," %f"), color(7," %f"), color(5," %f"), color(9," %f"), color(6," %f"), "\n\n"), - i, j, rj[0], rj[1], rj[2], rj[3], rj[4]); } + tracef(@strcat("multi_annealing: AR: [%i][%i] ", color(8,"Rejection counts: "), + color(1,"%f"), " ", color(7,"%f"), " ", color(5,"%f"), " ", color(9,"%f"), " ", color(6,"%f"), "\n\n"), + i, j, rj[0], rj[1], rj[2], rj[3], rj[4]); tracef(@strcat("multi_annealing: AR: %i ", color(8,"***** Did accept! "), - color(/*2*/ 1," %f"), color(7," %f"), color(5," %f"), color(9," %f"), color(6," %f"), "\n\n"), - i, try_x[0], try_x[1], try_x[2], try_x[3], try_x[4]); + color(1,"%f"), " ", color(7,"%f"), " ", color(5,"%f"), " ", color(9,"%f"), " ", color(6,"%f"), "\n\n"), + i, try_x[0], try_x[1], try_x[2], try_x[3], try_x[4]); } } - else { + else { # Fixed Vars x[i][j] = x[i-1][j]; + rejection[i][j] = rejection[i-1][j]; curr_loss[curr] = curr_loss[prev]; curr_sdev[curr] = curr_sdev[prev]; + # dx[i][j] not set for fixed vars } - } - } + } until(j == NEVOPARAMS-1); + } until(iter_i == (annealing_cycles-1)); } (Res r) multi_loss( int ci, int cj, float x[], float target_innov, int evolve_reruns ) @@ -199,10 +197,9 @@ file rfile[]; tracef("multi_loss: entered: ci=%i cj=%i target_innov=%f evolve_reruns=%i x=%q\n",ci, cj, target_innov,evolve_reruns,x); - int rerunsPerApp = 120; int appCalls = @toint(@tofloat(evolve_reruns) / @tofloat(rerunsPerApp)); # FIXME: handle fractional issues and rounding etc. For now must divide evenly -tracef("multi_loass appCalls=%i\n", appCalls); +tracef("multi_loss appCalls=%i\n", appCalls); foreach i in [1:appCalls] { // repeats of the evolove() - same as n_reruns file outfile; // FIXME: map and save in future string args[] = [ // FIXME: move this to a setargs() function @@ -239,12 +236,12 @@ { int minrange=58; int maxrange=59; - //int maxrange=59; + int rangeinc=50; + //int maxrange=1009; //int maxrange=209; - int rangeinc=50; - // fixme: add provision for random priming and random param values when x[i] == -100 (see optimizer.cpp main()) + // FIXME: add provision for random priming and random param values when x[i] == -100 (see optimizer.cpp main()) int nreps=1; # 15 @@ -264,21 +261,23 @@ starting_jump = 2.3, params0[] = [0.0, 0.0, 4.0, 50.0, -1.0], @tofloat(target_innov), - annealing_cycles = 1); + annealing_cycles = 2); */ (outfile,lossfile) = multi_annealing( 2.0, 0.01, 0.3, - 1200, + 100, 2.3, [0.0, 0.0, 4.0, 50.0, -1.0], @tofloat(target_innov), - 5); + 30); } } } +rerunsPerApp = 100; + main() { optimizer_sweep(); @@ -335,3 +334,13 @@ // [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta] [operation-code:(m,a) Nworkers] } +######### HOLD JUNK + +# tracef(@strcat("multi_annealing: AR: %i ", color(8,"Rejection counts: "), +# color( /* 2 */ 1," %f"), "\n\n"), +# i, rejection[i][j] ); // , rejection[i][1], rejection[i][2], rejection[i][3], rejection[i][4]); +# FIXME: determine correct rejection[] values to avoid hanging: +# tracef(@strcat("multi_annealing: AR: %i ", color(8,"Rejection counts: "), +# color( /* 2 */ 1," %f"), color(7," %f"), color(5," %f"), color(9," %f"), color(6," %f"), "\n\n"), +# rejection[i][0], rejection[i][1], rejection[i][2], rejection[i][3], rejection[i][4]); +# END FIXME Modified: SwiftApps/SciColSim/evolve.sh =================================================================== --- SwiftApps/SciColSim/evolve.sh 2012-01-30 01:47:21 UTC (rev 5524) +++ SwiftApps/SciColSim/evolve.sh 2012-01-30 18:34:45 UTC (rev 5525) @@ -2,6 +2,6 @@ datafile=$1 touch multi_loss.data shift 1 -NWORKERS=$23 +NWORKERS=${23} OMP_NUM_THREADS=$NWORKERS $(dirname $0)/openmp-optimizer $* 2>&1 mv multi_loss.data $datafile Added: SwiftApps/SciColSim/sample.swift.output =================================================================== --- SwiftApps/SciColSim/sample.swift.output (rev 0) +++ SwiftApps/SciColSim/sample.swift.output 2012-01-30 18:34:45 UTC (rev 5525) @@ -0,0 +1,528 @@ +Swift 0.93 swift-r5483 cog-r3339 + +RunID: 20120130-1217-63kot916 +Progress: time: Mon, 30 Jan 2012 12:17:12 -0600 +multi_loss appCalls=1 +multi_loss: entered: ci=0 cj=0 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,4.0,50.0,-1.0] +multi_annealing: AR: i=1 ....T = 2.0 +multi_loss: i=1 calling evolve, args=[0,0,4,50,-1,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:17:16 -0600 Checking status:1 +multi_annealing: AR: initial: 124.861101 +- 3.21017 +multi_loss: returning: ci=0 cj=0 r.loss=124.861101 r.sdev=3.21017 +multi_loss appCalls=1 +multi_annealing: AR: 4.017889129124014 2 +multi_loss: entered: ci=1 cj=2 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,4.017889129124014,50.0,-1.0] +multi_loss: i=1 calling evolve, args=[0,0,4.017889129124014,50,-1,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:17:19 -0600 Checking status:1 Finished successfully:2 +multi_annealing: AR: 124.117401 +- 3.306 +multi_loss: returning: ci=1 cj=2 r.loss=124.117401 r.sdev=3.306 +multi_annealing: AF: best_opt_some.txt: 58.0,124.117401,0.0,0.0,4.017889129124014,50.0,-1.0,3.306 +multi_annealing: AR: 0.3916097778073887 vs 1.0 +math/min: result=1.0 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: Accepting try_x[j], i=1 j=2 +multi_annealing: Accepting try_x[j], i=1 j=2 try_x[j]=4.017889129124014 +multi_annealing: AR: [1][2] Rejection counts: 0.0 0.0 0.0 0.0 0.0 + +multi_annealing: AR: 1 ***** Did accept! 0.0 0.0 4.017889129124014 50.0 -1.0 + +multi_loss appCalls=1 +multi_annealing: AR: 48.711529653164106 3 +multi_loss: entered: ci=1 cj=3 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,4.017889129124014,48.711529653164106,-1.0] +multi_loss: i=1 calling evolve, args=[0,0,4.017889129124014,48.711529653164106,-1,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:17:22 -0600 Checking status:1 Finished successfully:4 +multi_annealing: AR: 125.18271 +- 3.599503 +multi_loss: returning: ci=1 cj=3 r.loss=125.18271 r.sdev=3.599503 +multi_annealing: AF: best_opt_some.txt: 58.0,125.18271,0.0,0.0,4.017889129124014,48.711529653164106,-1.0,3.599503 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 0.29338527075939624 vs 0.5870445897168992 +math/min: result=0.5870445897168992 +multi_annealing: Accepting try_x[j], i=1 j=3 try_x[j]=48.711529653164106 +multi_annealing: Accepting try_x[j], i=1 j=3 +multi_annealing: AR: 1 ***** Did accept! 0.0 0.0 4.017889129124014 48.711529653164106 -1.0 + +multi_annealing: AR: [1][3] Rejection counts: 0.0 0.0 0.0 0.0 0.0 + +multi_loss appCalls=1 +multi_annealing: AR: -0.0033614536445253362 4 +multi_loss: entered: ci=1 cj=4 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,4.017889129124014,48.711529653164106,-0.0033614536445253362] +multi_loss: i=1 calling evolve, args=[0,0,4.017889129124014,48.711529653164106,-0.0033614536445253362,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:17:26 -0600 Checking status:1 Finished successfully:6 +multi_annealing: AR: 125.933179 +- 3.36805 +multi_loss: returning: ci=1 cj=4 r.loss=125.933179 r.sdev=3.36805 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AF: best_opt_some.txt: 58.0,125.933179,0.0,0.0,4.017889129124014,48.711529653164106,-0.0033614536445253362,3.36805 +multi_annealing: AR: 0.6647548795660121 vs 0.6871281283507249 +math/min: result=0.6871281283507249 +multi_annealing: Accepting try_x[j], i=1 j=4 +multi_annealing: Accepting try_x[j], i=1 j=4 try_x[j]=-0.0033614536445253362 +multi_annealing: AR: 1 ***** Did accept! 0.0 0.0 4.017889129124014 48.711529653164106 -0.0033614536445253362 + +multi_annealing: AR: [1][4] Rejection counts: 0.0 0.0 0.0 0.0 0.0 + +multi_annealing: AR: i=2 ....T = 1.6762121943865207 +multi_loss appCalls=1 +multi_annealing: AR: 5.284753614883805 2 +multi_loss: entered: ci=2 cj=2 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,48.711529653164106,-0.0033614536445253362] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,48.711529653164106,-0.0033614536445253362,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:17:29 -0600 Checking status:1 Finished successfully:8 +multi_annealing: AR: 126.145367 +- 3.119133 +multi_loss: returning: ci=2 cj=2 r.loss=126.145367 r.sdev=3.119133 +multi_annealing: AF: best_opt_some.txt: 58.0,126.145367,0.0,0.0,5.284753614883805,48.711529653164106,-0.0033614536445253362,3.119133 +multi_annealing: AR: 0.8343453829181197 vs 0.8810967932193764 +math/min: result=0.8810967932193764 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: Accepting try_x[j], i=2 j=2 try_x[j]=5.284753614883805 +multi_annealing: Accepting try_x[j], i=2 j=2 +multi_annealing: AR: 2 ***** Did accept! 0.0 0.0 5.284753614883805 48.711529653164106 -0.0033614536445253362 + +multi_annealing: AR: [2][2] Rejection counts: 0.0 0.0 0.0 0.0 0.0 + +multi_loss appCalls=1 +multi_annealing: AR: 47.49006278600924 3 +multi_loss: entered: ci=2 cj=3 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,47.49006278600924,-0.0033614536445253362] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,47.49006278600924,-0.0033614536445253362,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:17:33 -0600 Checking status:1 Finished successfully:10 +multi_annealing: AR: 125.831434 +- 3.344003 +multi_loss: returning: ci=2 cj=3 r.loss=125.831434 r.sdev=3.344003 +multi_annealing: AF: best_opt_some.txt: 58.0,125.831434,0.0,0.0,5.284753614883805,47.49006278600924,-0.0033614536445253362,3.344003 +multi_annealing: AR: 0.7961447191161577 vs 1.0 +math/min: result=1.0 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: Accepting try_x[j], i=2 j=3 +multi_annealing: Accepting try_x[j], i=2 j=3 try_x[j]=47.49006278600924 +multi_annealing: AR: 2 ***** Did accept! 0.0 0.0 5.284753614883805 47.49006278600924 -0.0033614536445253362 + +multi_annealing: AR: [2][3] Rejection counts: 0.0 0.0 0.0 0.0 0.0 + +multi_loss appCalls=1 +multi_annealing: AR: 0.2830038287653472 4 +multi_loss: entered: ci=2 cj=4 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,47.49006278600924,0.2830038287653472] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,47.49006278600924,0.2830038287653472,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:17:36 -0600 Checking status:1 Finished successfully:12 +multi_annealing: AR: 123.989674 +- 3.372759 +multi_loss: returning: ci=2 cj=4 r.loss=123.989674 r.sdev=3.372759 +multi_annealing: AF: best_opt_some.txt: 58.0,123.989674,0.0,0.0,5.284753614883805,47.49006278600924,0.2830038287653472,3.372759 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 0.19911890147442235 vs 1.0 +math/min: result=1.0 +multi_annealing: Accepting try_x[j], i=2 j=4 +multi_annealing: Accepting try_x[j], i=2 j=4 try_x[j]=0.2830038287653472 +multi_annealing: AR: [2][4] Rejection counts: 0.0 0.0 0.0 0.0 0.0 + +multi_annealing: AR: 2 ***** Did accept! 0.0 0.0 5.284753614883805 47.49006278600924 0.2830038287653472 + +multi_annealing: AR: i=3 ....T = 1.4048436603050374 +multi_loss appCalls=1 +multi_annealing: AR: 6.751519052449282 2 +multi_loss: entered: ci=3 cj=2 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,6.751519052449282,47.49006278600924,0.2830038287653472] +multi_loss: i=1 calling evolve, args=[0,0,6.751519052449282,47.49006278600924,0.2830038287653472,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:17:39 -0600 Checking status:1 Finished successfully:14 +multi_loss: returning: ci=3 cj=2 r.loss=125.83918 r.sdev=3.276288 +multi_annealing: AR: 125.83918 +- 3.276288 +multi_annealing: AF: best_opt_some.txt: 58.0,125.83918,0.0,0.0,6.751519052449282,47.49006278600924,0.2830038287653472,3.276288 +math/min: result=0.2680663186298088 +multi_annealing: AR: 3,2 3 Did not accept: 6.751519052449282 (2) +multi_annealing: AR: 0.6852396383450929 vs 0.2680663186298088 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 0.0 0.0 6.751519052449282 47.49006278600924 0.2830038287653472 +multi_loss appCalls=1 +multi_annealing: AR: 49.01109219848105 3 +multi_loss: entered: ci=3 cj=3 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,49.01109219848105,0.2830038287653472] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,49.01109219848105,0.2830038287653472,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:17:42 -0600 Checking status:1 Finished successfully:16 +multi_loss: returning: ci=3 cj=3 r.loss=126.260409 r.sdev=3.474799 +multi_annealing: AF: best_opt_some.txt: 58.0,126.260409,0.0,0.0,5.284753614883805,49.01109219848105,0.2830038287653472,3.474799 +multi_annealing: AR: 126.260409 +- 3.474799 +math/min: result=0.1986200941793068 +multi_annealing: AR: 0.6989515725257741 vs 0.1986200941793068 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 3,3 3 Did not accept: 49.01109219848105 (3) +multi_annealing: AR: 0.0 0.0 5.284753614883805 49.01109219848105 0.2830038287653472 +multi_loss appCalls=1 +multi_annealing: AR: 0.7184988677898592 4 +multi_loss: entered: ci=3 cj=4 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,47.49006278600924,0.7184988677898592] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,47.49006278600924,0.7184988677898592,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:17:45 -0600 Checking status:1 Finished successfully:18 +multi_loss: returning: ci=3 cj=4 r.loss=123.593465 r.sdev=3.286319 +multi_annealing: AR: 123.593465 +- 3.286319 +multi_annealing: AF: best_opt_some.txt: 58.0,123.593465,0.0,0.0,5.284753614883805,47.49006278600924,0.7184988677898592,3.286319 +multi_annealing: AR: 0.10970841947076293 vs 1.0 +multi_annealing: AF: max_dist.txt - tbd +math/min: result=1.0 +multi_annealing: Accepting try_x[j], i=3 j=4 +multi_annealing: Accepting try_x[j], i=3 j=4 try_x[j]=0.7184988677898592 +multi_annealing: AR: 3 ***** Did accept! 0.0 0.0 5.284753614883805 47.49006278600924 0.7184988677898592 + +multi_annealing: AR: [3][4] Rejection counts: 0.0 0.0 1.0 1.0 0.0 + +multi_annealing: AR: i=4 ....T = 1.1774080373049494 +multi_loss appCalls=1 +multi_annealing: AR: 4.4255186274220115 2 +multi_loss: entered: ci=4 cj=2 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,4.4255186274220115,47.49006278600924,0.7184988677898592] +multi_loss: i=1 calling evolve, args=[0,0,4.4255186274220115,47.49006278600924,0.7184988677898592,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:17:49 -0600 Checking status:1 Finished successfully:20 +multi_loss: returning: ci=4 cj=2 r.loss=126.444622 r.sdev=3.25147 +multi_annealing: AR: 126.444622 +- 3.25147 +multi_annealing: AF: best_opt_some.txt: 58.0,126.444622,0.0,0.0,4.4255186274220115,47.49006278600924,0.7184988677898592,3.25147 +multi_annealing: AR: 0.9535428038358379 vs 0.08878355131476454 +math/min: result=0.08878355131476454 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 4,2 4 Did not accept: 4.4255186274220115 (2) +multi_annealing: AR: 0.0 0.0 4.4255186274220115 47.49006278600924 0.7184988677898592 +multi_loss appCalls=1 +multi_annealing: AR: 46.92686166375319 3 +multi_loss: entered: ci=4 cj=3 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,46.92686166375319,0.7184988677898592] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,46.92686166375319,0.7184988677898592,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:17:52 -0600 Checking status:1 Finished successfully:22 +multi_annealing: AR: 124.963375 +- 3.41926 +multi_loss: returning: ci=4 cj=3 r.loss=124.963375 r.sdev=3.41926 +multi_annealing: AF: best_opt_some.txt: 58.0,124.963375,0.0,0.0,5.284753614883805,46.92686166375319,0.7184988677898592,3.41926 +multi_annealing: AR: 0.4500207377949753 vs 0.312392025102438 +math/min: result=0.312392025102438 +multi_annealing: AR: 4,3 4 Did not accept: 46.92686166375319 (3) +multi_annealing: AR: 0.0 0.0 5.284753614883805 46.92686166375319 0.7184988677898592 +multi_annealing: AF: max_dist.txt - tbd +multi_loss appCalls=1 +multi_annealing: AR: -0.3320316742658884 4 +multi_loss: entered: ci=4 cj=4 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,47.49006278600924,-0.3320316742658884] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,47.49006278600924,-0.3320316742658884,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:17:55 -0600 Checking status:1 Finished successfully:24 +multi_annealing: AR: 125.407828 +- 3.018498 +multi_loss: returning: ci=4 cj=4 r.loss=125.407828 r.sdev=3.018498 +multi_annealing: AF: best_opt_some.txt: 58.0,125.407828,0.0,0.0,5.284753614883805,47.49006278600924,-0.3320316742658884,3.018498 +multi_annealing: AR: 0.8555641933973892 vs 0.21417097212905944 +math/min: result=0.21417097212905944 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 0.0 0.0 5.284753614883805 47.49006278600924 -0.3320316742658884 +multi_annealing: AR: 4,4 4 Did not accept: -0.3320316742658884 (4) +multi_annealing: AR: i=5 ....T = 0.9867928549496278 +multi_loss appCalls=1 +multi_annealing: AR: 6.833327620921641 2 +multi_loss: entered: ci=5 cj=2 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,6.833327620921641,47.49006278600924,0.7184988677898592] +multi_loss: i=1 calling evolve, args=[0,0,6.833327620921641,47.49006278600924,0.7184988677898592,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:17:58 -0600 Checking status:1 Finished successfully:26 +multi_annealing: AR: 125.250487 +- 3.078819 +multi_loss: returning: ci=5 cj=2 r.loss=125.250487 r.sdev=3.078819 +multi_annealing: AF: best_opt_some.txt: 58.0,125.250487,0.0,0.0,6.833327620921641,47.49006278600924,0.7184988677898592,3.078819 +multi_annealing: AR: 0.44288167684075663 vs 0.18652324111077032 +math/min: result=0.18652324111077032 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 5,2 5 Did not accept: 6.833327620921641 (2) +multi_annealing: AR: 0.0 0.0 6.833327620921641 47.49006278600924 0.7184988677898592 +multi_loss appCalls=1 +multi_annealing: AR: 46.49027442733761 3 +multi_loss: entered: ci=5 cj=3 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,46.49027442733761,0.7184988677898592] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,46.49027442733761,0.7184988677898592,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:01 -0600 Checking status:1 Finished successfully:28 +multi_annealing: AR: 124.663101 +- 3.485893 +multi_loss: returning: ci=5 cj=3 r.loss=124.663101 r.sdev=3.485893 +multi_annealing: AF: best_opt_some.txt: 58.0,124.663101,0.0,0.0,5.284753614883805,46.49027442733761,0.7184988677898592,3.485893 +multi_annealing: AR: 0.42913823795768913 vs 0.33825612299835406 +math/min: result=0.33825612299835406 +multi_annealing: AR: 0.0 0.0 5.284753614883805 46.49027442733761 0.7184988677898592 +multi_annealing: AR: 5,3 5 Did not accept: 46.49027442733761 (3) +multi_annealing: AF: max_dist.txt - tbd +multi_loss appCalls=1 +multi_annealing: AR: 2.2333217492423234 4 +multi_loss: entered: ci=5 cj=4 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,47.49006278600924,2.2333217492423234] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,47.49006278600924,2.2333217492423234,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:05 -0600 Checking status:1 Finished successfully:30 +multi_annealing: AR: 125.856136 +- 3.415745 +multi_loss: returning: ci=5 cj=4 r.loss=125.856136 r.sdev=3.415745 +multi_annealing: AF: best_opt_some.txt: 58.0,125.856136,0.0,0.0,5.284753614883805,47.49006278600924,2.2333217492423234,3.415745 +multi_annealing: AR: 0.5684553851797784 vs 0.10096772364295076 +math/min: result=0.10096772364295076 +multi_annealing: AR: 5,4 5 Did not accept: 2.2333217492423234 (4) +multi_annealing: AR: 0.0 0.0 5.284753614883805 47.49006278600924 2.2333217492423234 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: i=6 ....T = 0.8270371084000275 +multi_loss appCalls=1 +multi_annealing: AR: 3.928981105935937 2 +multi_loss: entered: ci=6 cj=2 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,3.928981105935937,47.49006278600924,0.7184988677898592] +multi_loss: i=1 calling evolve, args=[0,0,3.928981105935937,47.49006278600924,0.7184988677898592,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:08 -0600 Checking status:1 Finished successfully:32 +multi_annealing: AR: 125.944813 +- 3.343539 +multi_loss: returning: ci=6 cj=2 r.loss=125.944813 r.sdev=3.343539 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 0.0737231873586417 vs 0.05824491156028037 +multi_annealing: AF: best_opt_some.txt: 58.0,125.944813,0.0,0.0,3.928981105935937,47.49006278600924,0.7184988677898592,3.343539 +multi_annealing: AR: 6,2 6 Did not accept: 3.928981105935937 (2) +math/min: result=0.05824491156028037 +multi_annealing: AR: 0.0 0.0 3.928981105935937 47.49006278600924 0.7184988677898592 +multi_loss appCalls=1 +multi_annealing: AR: 47.456980868107266 3 +multi_loss: entered: ci=6 cj=3 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,47.456980868107266,0.7184988677898592] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,47.456980868107266,0.7184988677898592,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:11 -0600 Checking status:1 Finished successfully:34 +multi_annealing: AR: 126.604462 +- 3.183016 +multi_loss: returning: ci=6 cj=3 r.loss=126.604462 r.sdev=3.183016 +multi_annealing: AR: 0.5487345599809303 vs 0.02623387861162342 +math/min: result=0.02623387861162342 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AF: best_opt_some.txt: 58.0,126.604462,0.0,0.0,5.284753614883805,47.456980868107266,0.7184988677898592,3.183016 +multi_annealing: AR: 6,3 6 Did not accept: 47.456980868107266 (3) +multi_annealing: AR: 0.0 0.0 5.284753614883805 47.456980868107266 0.7184988677898592 +multi_loss appCalls=1 +multi_loss: entered: ci=6 cj=4 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,47.49006278600924,-1.5302000464747076] +multi_annealing: AR: -1.5302000464747076 4 +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,47.49006278600924,-1.5302000464747076,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:12 -0600 Active:1 Finished successfully:36 +Progress: time: Mon, 30 Jan 2012 12:18:14 -0600 Checking status:1 Finished successfully:36 +multi_loss: returning: ci=6 cj=4 r.loss=125.062511 r.sdev=3.22833 +multi_annealing: AR: 125.062511 +- 3.22833 +multi_annealing: AF: best_opt_some.txt: 58.0,125.062511,0.0,0.0,5.284753614883805,47.49006278600924,-1.5302000464747076,3.22833 +multi_annealing: AR: 0.4295446121391554 vs 0.16926736066405584 +multi_annealing: AF: max_dist.txt - tbd +math/min: result=0.16926736066405584 +multi_annealing: AR: 6,4 6 Did not accept: -1.5302000464747076 (4) +multi_annealing: AR: 0.0 0.0 5.284753614883805 47.49006278600924 -1.5302000464747076 +multi_annealing: AR: i=7 ....T = 0.6931448431551464 +multi_loss appCalls=1 +multi_annealing: AR: 5.698890855198198 2 +multi_loss: entered: ci=7 cj=2 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.698890855198198,47.49006278600924,0.7184988677898592] +multi_loss: i=1 calling evolve, args=[0,0,5.698890855198198,47.49006278600924,0.7184988677898592,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:17 -0600 Checking status:1 Finished successfully:38 +multi_annealing: AR: 124.92233 +- 3.519439 +multi_loss: returning: ci=7 cj=2 r.loss=124.92233 r.sdev=3.519439 +multi_annealing: AF: best_opt_some.txt: 58.0,124.92233,0.0,0.0,5.698890855198198,47.49006278600924,0.7184988677898592,3.519439 +multi_annealing: AR: 0.26061833782383614 vs 0.14702488652213752 +multi_annealing: AF: max_dist.txt - tbd +math/min: result=0.14702488652213752 +multi_annealing: AR: 7,2 7 Did not accept: 5.698890855198198 (2) +multi_annealing: AR: 0.0 0.0 5.698890855198198 47.49006278600924 0.7184988677898592 +multi_loss appCalls=1 +multi_annealing: AR: 48.00451051760781 3 +multi_loss: entered: ci=7 cj=3 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,48.00451051760781,0.7184988677898592] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,48.00451051760781,0.7184988677898592,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:21 -0600 Checking status:1 Finished successfully:40 +multi_annealing: AR: 123.700997 +- 3.061641 +multi_loss: returning: ci=7 cj=3 r.loss=123.700997 r.sdev=3.061641 +multi_annealing: AF: best_opt_some.txt: 58.0,123.700997,0.0,0.0,5.284753614883805,48.00451051760781,0.7184988677898592,3.061641 +multi_annealing: AR: 0.04383216320955852 vs 0.8562983650405412 +math/min: result=0.8562983650405412 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: Accepting try_x[j], i=7 j=3 +multi_annealing: Accepting try_x[j], i=7 j=3 try_x[j]=48.00451051760781 +multi_annealing: AR: 7 ***** Did accept! 0.0 0.0 5.284753614883805 48.00451051760781 0.7184988677898592 + +multi_annealing: AR: [7][3] Rejection counts: 0.0 0.0 5.0 4.0 3.0 + +multi_loss appCalls=1 +multi_annealing: AR: -0.41452399887346414 4 +multi_loss: entered: ci=7 cj=4 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,48.00451051760781,-0.41452399887346414] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,48.00451051760781,-0.41452399887346414,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:24 -0600 Checking status:1 Finished successfully:42 +multi_annealing: AR: 122.427501 +- 3.484433 +multi_loss: returning: ci=7 cj=4 r.loss=122.427501 r.sdev=3.484433 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 0.6794911655574871 vs 1.0 +math/min: result=1.0 +multi_annealing: AF: best_opt_some.txt: 58.0,122.427501,0.0,0.0,5.284753614883805,48.00451051760781,-0.41452399887346414,3.484433 +multi_annealing: Accepting try_x[j], i=7 j=4 +multi_annealing: Accepting try_x[j], i=7 j=4 try_x[j]=-0.41452399887346414 +multi_annealing: AR: [7][4] Rejection counts: 0.0 0.0 5.0 4.0 3.0 + +multi_annealing: AR: 7 ***** Did accept! 0.0 0.0 5.284753614883805 48.00451051760781 -0.41452399887346414 + +multi_annealing: AR: i=8 ....T = 0.5809289192863943 +multi_loss appCalls=1 +multi_annealing: AR: 4.228373615739721 2 +multi_loss: entered: ci=8 cj=2 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,4.228373615739721,48.00451051760781,-0.41452399887346414] +multi_loss: i=1 calling evolve, args=[0,0,4.228373615739721,48.00451051760781,-0.41452399887346414,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:27 -0600 Checking status:1 Finished successfully:44 +multi_loss: returning: ci=8 cj=2 r.loss=125.825434 r.sdev=3.06081 +multi_annealing: AR: 125.825434 +- 3.06081 +multi_annealing: AF: best_opt_some.txt: 58.0,125.825434,0.0,0.0,4.228373615739721,48.00451051760781,-0.41452399887346414,3.06081 +multi_annealing: AR: 0.43307949429152304 vs 0.0028823847709179276 +math/min: result=0.0028823847709179276 +multi_annealing: AR: 0.0 0.0 4.228373615739721 48.00451051760781 -0.41452399887346414 +multi_annealing: AR: 8,2 8 Did not accept: 4.228373615739721 (2) +multi_annealing: AF: max_dist.txt - tbd +multi_loss appCalls=1 +multi_annealing: AR: 46.894163840589215 3 +multi_loss: entered: ci=8 cj=3 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,46.894163840589215,-0.41452399887346414] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,46.894163840589215,-0.41452399887346414,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:30 -0600 Checking status:1 Finished successfully:46 +multi_annealing: AR: 124.871719 +- 3.122439 +multi_loss: returning: ci=8 cj=3 r.loss=124.871719 r.sdev=3.122439 +multi_annealing: AF: best_opt_some.txt: 58.0,124.871719,0.0,0.0,5.284753614883805,46.894163840589215,-0.41452399887346414,3.122439 +multi_annealing: AR: 0.34644774801935974 vs 0.014884566500466245 +math/min: result=0.014884566500466245 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 0.0 0.0 5.284753614883805 46.894163840589215 -0.41452399887346414 +multi_annealing: AR: 8,3 8 Did not accept: 46.894163840589215 (3) +multi_loss appCalls=1 +multi_annealing: AR: -2.2286308752011443 4 +multi_loss: entered: ci=8 cj=4 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,48.00451051760781,-2.2286308752011443] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,48.00451051760781,-2.2286308752011443,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:33 -0600 Checking status:1 Finished successfully:48 +multi_annealing: AR: 125.200576 +- 3.137099 +multi_loss: returning: ci=8 cj=4 r.loss=125.200576 r.sdev=3.137099 +multi_annealing: AF: best_opt_some.txt: 58.0,125.200576,0.0,0.0,5.284753614883805,48.00451051760781,-2.2286308752011443,3.137099 +multi_annealing: AR: 0.47163119315783886 vs 0.008450593550370632 +math/min: result=0.008450593550370632 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 8,4 8 Did not accept: -2.2286308752011443 (4) +multi_annealing: AR: 0.0 0.0 5.284753614883805 48.00451051760781 -2.2286308752011443 +multi_annealing: AR: i=9 ....T = 0.48688006928981853 +multi_loss appCalls=1 +multi_annealing: AR: 5.695013169826046 2 +multi_loss: entered: ci=9 cj=2 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.695013169826046,48.00451051760781,-0.41452399887346414] +multi_loss: i=1 calling evolve, args=[0,0,5.695013169826046,48.00451051760781,-0.41452399887346414,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:37 -0600 Checking status:1 Finished successfully:50 +multi_annealing: AR: 125.017227 +- 3.237815 +multi_loss: returning: ci=9 cj=2 r.loss=125.017227 r.sdev=3.237815 +multi_annealing: AF: best_opt_some.txt: 58.0,125.017227,0.0,0.0,5.695013169826046,48.00451051760781,-0.41452399887346414,3.237815 +multi_annealing: AR: 0.17076495981302242 vs 0.004897539166396153 +math/min: result=0.004897539166396153 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 9,2 9 Did not accept: 5.695013169826046 (2) +multi_annealing: AR: 0.0 0.0 5.695013169826046 48.00451051760781 -0.41452399887346414 +multi_loss appCalls=1 +multi_annealing: AR: 48.00679484464189 3 +multi_loss: entered: ci=9 cj=3 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,48.00679484464189,-0.41452399887346414] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,48.00679484464189,-0.41452399887346414,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:40 -0600 Checking status:1 Finished successfully:52 +multi_annealing: AR: 125.213924 +- 3.333561 +multi_loss: returning: ci=9 cj=3 r.loss=125.213924 r.sdev=3.333561 +multi_annealing: AF: best_opt_some.txt: 58.0,125.213924,0.0,0.0,5.284753614883805,48.00679484464189,-0.41452399887346414,3.333561 +multi_annealing: AR: 0.15928070563724706 vs 0.003269830345111401 +math/min: result=0.003269830345111401 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 0.0 0.0 5.284753614883805 48.00679484464189 -0.41452399887346414 +multi_annealing: AR: 9,3 9 Did not accept: 48.00679484464189 (3) +multi_loss appCalls=1 +multi_annealing: AR: -0.7507963173758503 4 +multi_loss: entered: ci=9 cj=4 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,48.00451051760781,-0.7507963173758503] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,48.00451051760781,-0.7507963173758503,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:42 -0600 Active:1 Finished successfully:54 +multi_loss: returning: ci=9 cj=4 r.loss=125.856406 r.sdev=3.764608 +multi_annealing: AR: 125.856406 +- 3.764608 +multi_annealing: AF: best_opt_some.txt: 58.0,125.856406,0.0,0.0,5.284753614883805,48.00451051760781,-0.7507963173758503,3.764608 +math/min: result=8.738454465360378E-4 +multi_annealing: AR: 0.061628429129563234 vs 8.738454465360378E-4 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 9,4 9 Did not accept: -0.7507963173758503 (4) +multi_annealing: AR: 0.0 0.0 5.284753614883805 48.00451051760781 -0.7507963173758503 +multi_annealing: AR: i=10 ....T = 0.408057154673674 +multi_loss appCalls=1 +multi_annealing: AR: 3.29267604969456 2 +multi_loss: entered: ci=10 cj=2 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,3.29267604969456,48.00451051760781,-0.41452399887346414] +multi_loss: i=1 calling evolve, args=[0,0,3.29267604969456,48.00451051760781,-0.41452399887346414,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:46 -0600 Checking status:1 Finished successfully:56 +multi_annealing: AR: 125.360364 +- 3.317013 +multi_loss: returning: ci=10 cj=2 r.loss=125.360364 r.sdev=3.317013 +multi_annealing: AF: best_opt_some.txt: 58.0,125.360364,0.0,0.0,3.29267604969456,48.00451051760781,-0.41452399887346414,3.317013 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 0.27027335203696023 vs 7.56065260977875E-4 +math/min: result=7.56065260977875E-4 +multi_annealing: AR: 0.0 0.0 3.29267604969456 48.00451051760781 -0.41452399887346414 +multi_annealing: AR: 10,2 10 Did not accept: 3.29267604969456 (2) +multi_loss appCalls=1 +multi_annealing: AR: 46.275556353155956 3 +multi_loss: entered: ci=10 cj=3 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,46.275556353155956,-0.41452399887346414] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,46.275556353155956,-0.41452399887346414,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:49 -0600 Checking status:1 Finished successfully:58 +multi_annealing: AR: 126.434478 +- 3.246686 +multi_loss: returning: ci=10 cj=3 r.loss=126.434478 r.sdev=3.246686 +multi_annealing: AF: best_opt_some.txt: 58.0,126.434478,0.0,0.0,5.284753614883805,46.275556353155956,-0.41452399887346414,3.246686 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 0.14920802306232583 vs 5.4372803009239825E-5 +math/min: result=5.4372803009239825E-5 +multi_annealing: AR: 10,3 10 Did not accept: 46.275556353155956 (3) +multi_annealing: AR: 0.0 0.0 5.284753614883805 46.275556353155956 -0.41452399887346414 +multi_loss appCalls=1 +multi_annealing: AR: 1.5046793086101826 4 +multi_loss: entered: ci=10 cj=4 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,48.00451051760781,1.5046793086101826] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,48.00451051760781,1.5046793086101826,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:53 -0600 Checking status:1 Finished successfully:60 +multi_loss: returning: ci=10 cj=4 r.loss=125.785376 r.sdev=3.346594 +multi_annealing: AR: 125.785376 +- 3.346594 +multi_annealing: AF: best_opt_some.txt: 58.0,125.785376,0.0,0.0,5.284753614883805,48.00451051760781,1.5046793086101826,3.346594 +multi_annealing: AR: 0.6250655950503741 vs 2.668208671281028E-4 +math/min: result=2.668208671281028E-4 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 0.0 0.0 5.284753614883805 48.00451051760781 1.5046793086101826 +multi_annealing: AR: 10,4 10 Did not accept: 1.5046793086101826 (4) +multi_annealing: new cycle at i=11 +multi_annealing: AR: New cycle at 11: prev dx[0-4]=[2.3 2.3 2.3 2.3 2.3] +multi_annealing: AR: i=11 ....T = 0.34199518933533946 +multi_annealing: AR: New cycle at 11: dx[0-4]=[4.6 4.6 0.8624999999999998 0.9857142857142855 1.15] +multi_loss appCalls=1 +multi_annealing: AR: 3.791705563626845 2 +multi_loss: entered: ci=11 cj=2 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,3.791705563626845,48.00451051760781,-0.41452399887346414] +multi_loss: i=1 calling evolve, args=[0,0,3.791705563626845,48.00451051760781,-0.41452399887346414,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:56 -0600 Checking status:1 Finished successfully:62 +multi_annealing: AF: max_dist.txt - tbd +multi_loss: returning: ci=11 cj=2 r.loss=124.596526 r.sdev=3.176561 +multi_annealing: AR: 124.596526 +- 3.176561 +multi_annealing: AF: best_opt_some.txt: 58.0,124.596526,0.0,0.0,3.791705563626845,48.00451051760781,-0.41452399887346414,3.176561 +multi_annealing: AR: 0.9715442940965933 vs 0.001760306082349071 +math/min: result=0.001760306082349071 +multi_annealing: AR: 0.0 0.0 3.791705563626845 48.00451051760781 -0.41452399887346414 +multi_annealing: AR: 11,2 11 Did not accept: 3.791705563626845 (2) +multi_loss appCalls=1 +multi_annealing: AR: 49.92607616034099 3 +multi_loss: entered: ci=11 cj=3 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,49.92607616034099,-0.41452399887346414] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,49.92607616034099,-0.41452399887346414,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:18:59 -0600 Checking status:1 Finished successfully:64 +multi_annealing: AR: 124.00716 +- 3.111738 +multi_loss: returning: ci=11 cj=3 r.loss=124.00716 r.sdev=3.111738 +multi_annealing: AF: best_opt_some.txt: 58.0,124.00716,0.0,0.0,5.284753614883805,49.92607616034099,-0.41452399887346414,3.111738 +multi_annealing: AR: 0.38818246796613753 vs 0.009863137695174688 +math/min: result=0.009863137695174688 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 11,3 11 Did not accept: 49.92607616034099 (3) +multi_annealing: AR: 0.0 0.0 5.284753614883805 49.92607616034099 -0.41452399887346414 +multi_loss appCalls=1 +multi_annealing: AR: -0.7771568808805009 4 +multi_loss: entered: ci=11 cj=4 target_innov=58.0 evolve_reruns=100 x=[0.0,0.0,5.284753614883805,48.00451051760781,-0.7771568808805009] +multi_loss: i=1 calling evolve, args=[0,0,5.284753614883805,48.00451051760781,-0.7771568808805009,58,40000,20,100,2,1,2.,0.01,2,0.3,2.3,1,1,0,0,0,m,4,1234567] +Progress: time: Mon, 30 Jan 2012 12:19:02 -0600 Checking status:1 Finished successfully:66 +multi_annealing: AR: 123.567412 +- 3.66859 +multi_loss: returning: ci=11 cj=4 r.loss=123.567412 r.sdev=3.66859 +multi_annealing: AF: best_opt_some.txt: 58.0,123.567412,0.0,0.0,5.284753614883805,48.00451051760781,-0.7771568808805009,3.66859 +multi_annealing: AR: 0.5338319788181374 vs 0.03568160518248377 +math/min: result=0.03568160518248377 +multi_annealing: AF: max_dist.txt - tbd +multi_annealing: AR: 11,4 11 Did not accept: -0.7771568808805009 (4) +multi_annealing: AR: 0.0 0.0 5.284753614883805 48.00451051760781 -0.7771568808805009 +Progress: time: Mon, 30 Jan 2012 12:19:12 -0600 Finished successfully:68 +No events in 10s. + +Registered futures: +string[] args Closed, 24 elements, no listeners +string[] args Closed, 24 elements, no listeners +string[] args Closed, 24 elements, no listeners +string[] args Closed, 24 elements, no listeners +---- + +Waiting threads: +---- + +No events in 10s. + +Registered futures: +string[] args Closed, 24 elements, no listeners +string[] args Closed, 24 elements, no listeners +string[] args Closed, 24 elements, no listeners +string[] args Closed, 24 elements, no listeners +---- + +Waiting threads: +---- + +No events in 10s. + +Registered futures: +string[] args Closed, 24 elements, no listeners +string[] args Closed, 24 elements, no listeners +string[] args Closed, 24 elements, no listeners +string[] args Closed, 24 elements, no listeners +---- + +Waiting threads: +---- + +Progress: time: Mon, 30 Jan 2012 12:19:42 -0600 Finished successfully:68 Added: SwiftApps/SciColSim/sample.testopt.py.output =================================================================== --- SwiftApps/SciColSim/sample.testopt.py.output (rev 0) +++ SwiftApps/SciColSim/sample.testopt.py.output 2012-01-30 18:34:45 UTC (rev 5525) @@ -0,0 +1,243 @@ + +**** Calling optimizer: OMP_NUM_THREADS=4 ./openmp-optimizer 0 0 4 50 -1 58 40000 20 100 2 1 2. 0.01 5 0.3 2.3 1 1 0 0 0 n 4 1234567 + +alpha_i: 0 +alpha_m: 0 +beta: 4 +gamma: 50 +delta: -1 +target: 58 +n_epochs: 40000 +n_steps: 20 +n_reruns: 100 +range: 2 +verbose level: 1 +T_start: 2 +T_end: 0.01 +Annealing_steps: 5 +Target_rejection: 0.3 +Starting_jump: 2.3 +FREEZE_alpha_i: 1 +FREEZE_alpha_m: 1 +FREEZE_beta: 0 +FREEZE_gamma: 0 +FREEZE_delta: 0 +Operation: n +Nworkers: 4 +initSeed: 1234567 +0 | 1 (fixed) +1 | 1 (fixed) +2 | 0 (fixed) +3 | 0 (fixed) +4 | 0 (fixed) +0.742788 0.631704 0.118309 0.922271 0.141282 0.80831 0.961468 0.363704 0.665483 0.683465 0.771216 0.267925 0.224677 0.153439 0.23455 0.816502 0.718347 0.371612 0.948727 0.404154 0.600908 0.766305 0.493219 0.82445 0.100233 0.672304 0.157299 0.53804 0.6794 0.57498 0.758357 0.422188 0.206684 0.876666 0.344459 0.347966 0.684976 0.305927 0.71167 0.350459 0.989392 0.482885 0.618384 0.214069 0.636325 0.852934 0.0305713 0.354672 0.224546 0.979299 0.758825 0.825454 0.745604 0.252044 0.649904 0.845837 0.924348 0.807203 0.383877 0.603748 0.382183 0.142234 0.0259353 0.588867 0.0189005 0.370394 0.936833 0.703877 0.676321 0.648502 0.0543356 0.665713 0.131387 0.672719 0.879782 0.767712 0.525653 0.910353 0.122384 0.750199 0.889652 0.881209 0.575653 0.635256 0.133253 0.225557 0.481092 0.0576008 0.0327595 0.864969 0.661348 0.414942 0.00720323 0.687284 0.00380882 0.0261037 0.0576777 0.940641 0.72998 0.733998 +multi_loss: Calling evolve_to_target_and_save i=0 N=100 step=25 istart=0 iend=25 +multi_loss: Calling evolve_to_target_and_save i=1 N=100 step=25 istart=25 iend=50 +multi_loss: Calling evolve_to_target_and_save i=2 N=100 step=25 istart=50 iend=75 +multi_loss: Calling evolve_to_target_and_save i=3 N=100 step=25 istart=75 iend=100 +multi_loss(N=100, target=58) elapsed time: 2.9134 seconds 0.0485567 minutes + +126.43 +- 3.11244 + +....T = 2 + +3.77342 2 + +multi_loss: Calling evolve_to_target_and_save i=0 N=100 step=25 istart=0 iend=25 +multi_loss: Calling evolve_to_target_and_save i=1 N=100 step=25 istart=25 iend=50 +multi_loss: Calling evolve_to_target_and_save i=2 N=100 step=25 istart=50 iend=75 +multi_loss: Calling evolve_to_target_and_save i=3 N=100 step=25 istart=75 iend=100 +multi_loss(N=100, target=58) elapsed time: 2.90873 seconds 0.0484788 minutes + +126.523 +- 3.32417 +0.82704 vs 0.954153 +1 Rejection counts: 0 0 0 0 0 + + 1,2 ***** Did accept! 0 0 3.77342 50 -1 + +52.2335 3 + +multi_loss: Calling evolve_to_target_and_save i=0 N=100 step=25 istart=0 iend=25 +multi_loss: Calling evolve_to_target_and_save i=1 N=100 step=25 istart=25 iend=50 +multi_loss: Calling evolve_to_target_and_save i=2 N=100 step=25 istart=50 iend=75 +multi_loss: Calling evolve_to_target_and_save i=3 N=100 step=25 istart=75 iend=100 +multi_loss(N=100, target=58) elapsed time: 2.93802 seconds 0.0489671 minutes + +130.173 +- 3.67201 +0.188468 vs 0.161259 + 1,3 1 Did not accept 52.2335(3) +0 0 3.77342 52.2335 -1 +-2.00667 4 + +multi_loss: Calling evolve_to_target_and_save i=0 N=100 step=25 istart=0 iend=25 +multi_loss: Calling evolve_to_target_and_save i=1 N=100 step=25 istart=25 iend=50 +multi_loss: Calling evolve_to_target_and_save i=2 N=100 step=25 istart=50 iend=75 +multi_loss: Calling evolve_to_target_and_save i=3 N=100 step=25 istart=75 iend=100 +multi_loss(N=100, target=58) elapsed time: 2.95626 seconds 0.049271 minutes + +129.554 +- 3.1612 +0.88704 vs 0.219698 + 1,4 1 Did not accept -2.00667(4) +0 0 3.77342 50 -2.00667 + +....T = 0.693145 + +4.07035 2 + +multi_loss: Calling evolve_to_target_and_save i=0 N=100 step=25 istart=0 iend=25 +multi_loss: Calling evolve_to_target_and_save i=1 N=100 step=25 istart=25 iend=50 +multi_loss: Calling evolve_to_target_and_save i=2 N=100 step=25 istart=50 iend=75 +multi_loss: Calling evolve_to_target_and_save i=3 N=100 step=25 istart=75 iend=100 +multi_loss(N=100, target=58) elapsed time: 2.99097 seconds 0.0498495 minutes + +130.603 +- 3.25174 +0.0501227 vs 0.00277796 + 2,2 2 Did not accept 4.07035(2) +0 0 4.07035 50 -1 +48.5261 3 + +multi_loss: Calling evolve_to_target_and_save i=0 N=100 step=25 istart=0 iend=25 +multi_loss: Calling evolve_to_target_and_save i=1 N=100 step=25 istart=25 iend=50 +multi_loss: Calling evolve_to_target_and_save i=2 N=100 step=25 istart=50 iend=75 +multi_loss: Calling evolve_to_target_and_save i=3 N=100 step=25 istart=75 iend=100 +multi_loss(N=100, target=58) elapsed time: 2.94022 seconds 0.0490036 minutes + +128.508 +- 3.34913 +0.685387 vs 0.0571204 + 2,3 2 Did not accept 48.5261(3) +0 0 3.77342 48.5261 -1 +-2.2438 4 + +multi_loss: Calling evolve_to_target_and_save i=0 N=100 step=25 istart=0 iend=25 +multi_loss: Calling evolve_to_target_and_save i=1 N=100 step=25 istart=25 iend=50 +multi_loss: Calling evolve_to_target_and_save i=2 N=100 step=25 istart=50 iend=75 +multi_loss: Calling evolve_to_target_and_save i=3 N=100 step=25 istart=75 iend=100 +multi_loss(N=100, target=58) elapsed time: 2.95557 seconds 0.0492594 minutes + +128.768 +- 3.41509 +0.579097 vs 0.0392132 + 2,4 2 Did not accept -2.2438(4) +0 0 3.77342 50 -2.2438 + +....T = 0.240225 + +2.54662 2 + +multi_loss: Calling evolve_to_target_and_save i=0 N=100 step=25 istart=0 iend=25 +multi_loss: Calling evolve_to_target_and_save i=1 N=100 step=25 istart=25 iend=50 +multi_loss: Calling evolve_to_target_and_save i=2 N=100 step=25 istart=50 iend=75 +multi_loss: Calling evolve_to_target_and_save i=3 N=100 step=25 istart=75 iend=100 +multi_loss(N=100, target=58) elapsed time: 3.02841 seconds 0.0504735 minutes + +127.262 +- 3.06273 +0.274094 vs 0.0462924 + 3,2 3 Did not accept 2.54662(2) +0 0 2.54662 50 -1 +51.7319 3 + +multi_loss: Calling evolve_to_target_and_save i=0 N=100 step=25 istart=0 iend=25 +multi_loss: Calling evolve_to_target_and_save i=1 N=100 step=25 istart=25 iend=50 +multi_loss: Calling evolve_to_target_and_save i=2 N=100 step=25 istart=50 iend=75 +multi_loss: Calling evolve_to_target_and_save i=3 N=100 step=25 istart=75 iend=100 +multi_loss(N=100, target=58) elapsed time: 3.00121 seconds 0.0500201 minutes + +128.927 +- 3.75415 +0.00641465 vs 4.52253e-05 + 3,3 3 Did not accept 51.7319(3) +0 0 3.77342 51.7319 -1 +0.232896 4 + +multi_loss: Calling evolve_to_target_and_save i=0 N=100 step=25 istart=0 iend=25 +multi_loss: Calling evolve_to_target_and_save i=1 N=100 step=25 istart=25 iend=50 +multi_loss: Calling evolve_to_target_and_save i=2 N=100 step=25 istart=50 iend=75 +multi_loss: Calling evolve_to_target_and_save i=3 N=100 step=25 istart=75 iend=100 +multi_loss(N=100, target=58) elapsed time: 2.98499 seconds 0.0497499 minutes + +128.55 +- 3.56206 +0.941162 vs 0.000216463 + 3,4 3 Did not accept 0.232896(4) +0 0 3.77342 50 0.232896 + +....T = 0.0832553 + +4.37082 2 + +multi_loss: Calling evolve_to_target_and_save i=0 N=100 step=25 istart=0 iend=25 +multi_loss: Calling evolve_to_target_and_save i=1 N=100 step=25 istart=25 iend=50 +multi_loss: Calling evolve_to_target_and_save i=2 N=100 step=25 istart=50 iend=75 +multi_loss: Calling evolve_to_target_and_save i=3 N=100 step=25 istart=75 iend=100 +multi_loss(N=100, target=58) elapsed time: 2.95775 seconds 0.0492958 minutes + +128.816 +- 3.45615 +0.803355 vs 1.09972e-12 + 4,2 4 Did not accept 4.37082(2) +0 0 4.37082 50 -1 +49.3468 3 + +multi_loss: Calling evolve_to_target_and_save i=0 N=100 step=25 istart=0 iend=25 +multi_loss: Calling evolve_to_target_and_save i=1 N=100 step=25 istart=25 iend=50 +multi_loss: Calling evolve_to_target_and_save i=2 N=100 step=25 istart=50 iend=75 +multi_loss: Calling evolve_to_target_and_save i=3 N=100 step=25 istart=75 iend=100 +multi_loss(N=100, target=58) elapsed time: 2.9872 seconds 0.0497866 minutes + +128.915 +- 3.17434 +0.126163 vs 3.35758e-13 + 4,3 4 Did not accept 49.3468(3) +0 0 3.77342 49.3468 -1 +-0.0551126 4 + +multi_loss: Calling evolve_to_target_and_save i=0 N=100 step=25 istart=0 iend=25 +multi_loss: Calling evolve_to_target_and_save i=1 N=100 step=25 istart=25 iend=50 +multi_loss: Calling evolve_to_target_and_save i=2 N=100 step=25 istart=50 iend=75 +multi_loss: Calling evolve_to_target_and_save i=3 N=100 step=25 istart=75 iend=100 +multi_loss(N=100, target=58) elapsed time: 2.93849 seconds 0.0489748 minutes + +125.1 +- 3.35383 +0.17234 vs 1 +4 Rejection counts: 0 0 3 4 3 + + 4,4 ***** Did accept! 0 0 3.77342 50 -0.0551126 + + +....T = 0.028854 + +5.90757 2 + +multi_loss: Calling evolve_to_target_and_save i=0 N=100 step=25 istart=0 iend=25 +multi_loss: Calling evolve_to_target_and_save i=1 N=100 step=25 istart=25 iend=50 +multi_loss: Calling evolve_to_target_and_save i=2 N=100 step=25 istart=50 iend=75 +multi_loss: Calling evolve_to_target_and_save i=3 N=100 step=25 istart=75 iend=100 +multi_loss(N=100, target=58) elapsed time: 3.04963 seconds 0.0508272 minutes + +131.481 +- 3.49648 +0.318332 vs 9.27549e-97 + 5,2 5 Did not accept 5.90757(2) +0 0 5.90757 50 -0.0551126 +49.5818 3 + +multi_loss: Calling evolve_to_target_and_save i=0 N=100 step=25 istart=0 iend=25 +multi_loss: Calling evolve_to_target_and_save i=1 N=100 step=25 istart=25 iend=50 +multi_loss: Calling evolve_to_target_and_save i=2 N=100 step=25 istart=50 iend=75 +multi_loss: Calling evolve_to_target_and_save i=3 N=100 step=25 istart=75 iend=100 +multi_loss(N=100, target=58) elapsed time: 3.0051 seconds 0.050085 minutes + +131.054 +- 3.3899 +0.854774 vs 2.47481e-90 + 5,3 5 Did not accept 49.5818(3) +0 0 3.77342 49.5818 -0.0551126 +-1.93165 4 + +multi_loss: Calling evolve_to_target_and_save i=0 N=100 step=25 istart=0 iend=25 +multi_loss: Calling evolve_to_target_and_save i=1 N=100 step=25 istart=25 iend=50 +multi_loss: Calling evolve_to_target_and_save i=2 N=100 step=25 istart=50 iend=75 +multi_loss: Calling evolve_to_target_and_save i=3 N=100 step=25 istart=75 iend=100 +multi_loss(N=100, target=58) elapsed time: 2.95204 seconds 0.0492006 minutes + +127.676 +- 3.04749 +0.356781 vs 1.74605e-39 + 5,4 5 Did not accept -1.93165(4) +0 0 3.77342 50 -1.93165 + +*** optimizer completed, elapsed time=47.6158 seconds 0.793596 minutes) + +./mw.py Done! From wilde at ci.uchicago.edu Mon Jan 30 12:48:59 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 30 Jan 2012 12:48:59 -0600 (CST) Subject: [Swift-commit] r5526 - SwiftApps/SciColSim Message-ID: <20120130184859.60C829CCE6@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-30 12:48:59 -0600 (Mon, 30 Jan 2012) New Revision: 5526 Modified: SwiftApps/SciColSim/README Log: Updated README to add quickstart instructions Modified: SwiftApps/SciColSim/README =================================================================== --- SwiftApps/SciColSim/README 2012-01-30 18:34:45 UTC (rev 5525) +++ SwiftApps/SciColSim/README 2012-01-30 18:48:59 UTC (rev 5526) @@ -1,3 +1,23 @@ +*** QuickStart + +mkdir $HOME/SciColSim # scientific collaboration simulation application +cd SciColSim +svn co https://svn.ci.uchicago.edu/svn/vdl2/SwiftApps/SciColSim src +cd src +cp /home/wilde/AndreysOptimizer/src/ + +wget http://sourceforge.net/projects/boost/files/boost/1.47.0/boost_1_47_0.tar.gz/download +tar zxf boost_1_47_0.tar.gz + +make # should make openmp-optimizer executable + +./testopt.py >& testopt.out + +# Needs Swift 0.93 in PATH + +./test-swift.sh >& test-swift.out + + *** Overview The code simulates the exploration of a chemical network by a research @@ -65,10 +85,16 @@ *** How to build Copy and untar boost graph library to the current dir: - TBD - see CI: /home/wilde/AndreysOptimizer/src for the tgz file, for now. +Needs: boost_1_47_0.tar.gz +Available for now from: CI: /home/wilde/AndreysOptimizer/src -Just run "make" -> uses Makefile +Should create dir "boost_1_47_0" in the current directory +(svn checkout dir, which is: + https://svn.ci.uchicago.edu/svn/vdl2/SwiftApps/SciColSim +) +Then run "make" -> uses Makefile + on mac, makes: openmp-optimizer (multi_loss() changed to use OpenMP), dispatch-optimizer (orig code logic, only slight corrections) From wilde at ci.uchicago.edu Mon Jan 30 13:22:51 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 30 Jan 2012 13:22:51 -0600 (CST) Subject: [Swift-commit] r5527 - SwiftApps/SciColSim Message-ID: <20120130192251.71F1A9CCB4@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-30 13:22:51 -0600 (Mon, 30 Jan 2012) New Revision: 5527 Modified: SwiftApps/SciColSim/annealing.swift Log: Fix hang situation at end of first cycle. Caused by tracef() on variables that are likely not closed due to if() scope logic. Possible Swift bug - need to investigate. See commented-out tracef(). Modified: SwiftApps/SciColSim/annealing.swift =================================================================== --- SwiftApps/SciColSim/annealing.swift 2012-01-30 18:48:59 UTC (rev 5526) +++ SwiftApps/SciColSim/annealing.swift 2012-01-30 19:22:51 UTC (rev 5527) @@ -99,7 +99,7 @@ dx[i][k] = dx[i-1][k] * 2.0; # FIXME: re-enable: rejection[i][k]=rejection[i-1][k]; } - tracef(color(Red,"Recomputed rejection: i=%d k=%d dx[i][k]=%f\n"), i, k, dx[i][k]); + // FIXME: HANGS? : tracef(color(Red,"Recomputed rejection: i=%d k=%d dx[i][k]=%f\n"), i, k, dx[i][k]); } tracef(color(Blue, "multi_annealing: AR: New cycle at %i: dx[0-4]=[%f %f %f %f %f]\n"),i,dx[i][0],dx[i][1],dx[i][2],dx[i][3],dx[i][4]); } From wilde at ci.uchicago.edu Mon Jan 30 14:25:34 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 30 Jan 2012 14:25:34 -0600 (CST) Subject: [Swift-commit] r5528 - SwiftApps/SciColSim Message-ID: <20120130202534.6C0539CCB4@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-30 14:25:34 -0600 (Mon, 30 Jan 2012) New Revision: 5528 Modified: SwiftApps/SciColSim/TODO SwiftApps/SciColSim/testopt.py Log: Add calibration and tming tests to testopt.py. Add more TODO items. Modified: SwiftApps/SciColSim/TODO =================================================================== --- SwiftApps/SciColSim/TODO 2012-01-30 19:22:51 UTC (rev 5527) +++ SwiftApps/SciColSim/TODO 2012-01-30 20:25:34 UTC (rev 5528) @@ -1,20 +1,23 @@ -Stopped at: +x = done, - = in progress -Re-checking annealing loop -- rejection and rj calcs -- AR tracef's -- cycle logic +[ ] convert all hard-coded annealing.swift params to @arg(s) +[ ] Get timings for optimizer calls to display. Perhaps via stdout or + 2nd file or a tagged value in the main output file of 'm' mode? ---- +[ ] set optimizer to unbufferred IO -x = done, - = in progress +[ ] Do optimizer timing studies and look for long running outliers +[ ] Insert kill-and-restart logic to kill and re-run long running outliers. + +[ ] echo parameters at start like c++ logic + [ ] Determine correct test parameter sets - and if we are passing these through correctly. -[ ] Check correctnes of rejection tracking logic and j of k logic for +[x] Check correctnes of rejection tracking logic and j of k logic for the 5 params [ ] address fixme's @@ -26,6 +29,9 @@ code). Check if floor() is correct and how load is partitioned; what N makes sense in swift usage? +[ ] make calls to optimizer(op m) work right regardless of what N and + Nworkers is. Now seems to require ((N mod NWorkers0 == 0) + [x] Ensure we are doing 100's to 1000's of evolve() calls in parallel. [ ] Do performance tests on Beagle and then other platforms (OSG, TG) @@ -33,19 +39,20 @@ [-] Make annealing.swift stdout/err output match that of optimizer.cpp -[ ] Align Swift and .cp code enough do a correctness test. +[ ] Align Swift and .cpp code enough do a correctness test. +[ ] Double-check random number generation, and 100-# priming logic. + [ ] Enable precision control for %f formatting (to match c++ output). Why are we getting some long and some short? Is swift truncating the constant or the tracef output? -[ ] Package code for ExM research. +[ ] add logic from C++ called "random intiation of starting parameters" + (iff Andrey needs it) -[ ] add logic from C++ called "random intiation of starting parameters +[ ] Integrate latest C++ code from Andrey. See if any changes to the + annealing optimizer. -[ ] make calls to optimizer(op m) work right regardless of what N and - Nworkers is. Now seems to require ((N mod NWorkers0 == 0) - [-] Platforms: [-] Mac @@ -59,6 +66,11 @@ [ ] OSG Cloud [ ] ibiCluster +[ ] Develop ExTENCI verison of script with different logic on parallel + vs serial clusters. (Ketan) + +[ ] Package code for ExM research. + --- [x] Integrate code to start with usec seed Modified: SwiftApps/SciColSim/testopt.py =================================================================== --- SwiftApps/SciColSim/testopt.py 2012-01-30 19:22:51 UTC (rev 5527) +++ SwiftApps/SciColSim/testopt.py 2012-01-30 20:25:34 UTC (rev 5528) @@ -5,12 +5,15 @@ unbuffered = os.fdopen(sys.stdout.fileno(), 'w', 0) sys.stdout = unbuffered -app = "./orig-optimizer"; # For Mac only: original code (+1 loop fix) using Grand Central Dispatch +app = "./orig-optimizer"; # For Mac only: original code (+1 loop fix) using Grnd Central Dispatch app = "./dispatch-optimizer"; # For Mac only: sing Grand Central Dispatch app = "./openmp-optimizer"; # For Mac or Linux: Using OpenMP (Default) paramset="default" +#paramset="mw2" +print("Running with parameter set " + paramset + "\n\n"); + if paramset == "default": # Parameter names and optimizer command line positions @@ -69,6 +72,34 @@ operation = "m" # n=normal, m=manual (runs 1 multi_loss call) seed = "1234567" +elif paramset == "mw": # FAST TEST PARAMETERS by Mike + + startTarget = 58 + endTarget = 59 + incrTarget = 50 + optimizerRepeats = 1 + evolveReruns = 100 + annealingSteps = 5 + NWorkers = "4" + openmp = "OMP_NUM_THREADS=" + NWorkers + operation = "n" # n=normal, m=manual (runs 1 multi_loss call) + seed = "1234567" + app = "./openmp-optimizer"; + +elif paramset == "mw2": # Timing TEST PARAMETERS by Mike + + startTarget = 900 + endTarget = 1059 + incrTarget = 1 + optimizerRepeats = 1 + evolveReruns = 4 + annealingSteps = 1 + NWorkers = "4" + openmp = "OMP_NUM_THREADS=" + NWorkers + operation = "m" # n=normal, m=manual (runs 1 multi_loss call) + seed = "123456" + app = "./openmp-optimizer"; + # Ensure we dont pass new parameters to original optimizer versions # (but they would be ignored) From wilde at ci.uchicago.edu Mon Jan 30 14:36:57 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 30 Jan 2012 14:36:57 -0600 (CST) Subject: [Swift-commit] r5529 - SwiftApps/SciColSim Message-ID: <20120130203657.D23DD9CCB4@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-30 14:36:57 -0600 (Mon, 30 Jan 2012) New Revision: 5529 Modified: SwiftApps/SciColSim/TODO SwiftApps/SciColSim/annealing.swift Log: Add TODO items for timings and stubed in FIXMEs for obtaining the timing data from the Swift code. Modified: SwiftApps/SciColSim/TODO =================================================================== --- SwiftApps/SciColSim/TODO 2012-01-30 20:25:34 UTC (rev 5528) +++ SwiftApps/SciColSim/TODO 2012-01-30 20:36:57 UTC (rev 5529) @@ -5,6 +5,7 @@ [ ] Get timings for optimizer calls to display. Perhaps via stdout or 2nd file or a tagged value in the main output file of 'm' mode? + See FIXMEs inserted in the code for multi_loss for this. [ ] set optimizer to unbufferred IO @@ -42,6 +43,7 @@ [ ] Align Swift and .cpp code enough do a correctness test. [ ] Double-check random number generation, and 100-# priming logic. + Check on rand() vs random() and commented out RAND_MAX expressions. [ ] Enable precision control for %f formatting (to match c++ output). Why are we getting some long and some short? Is swift Modified: SwiftApps/SciColSim/annealing.swift =================================================================== --- SwiftApps/SciColSim/annealing.swift 2012-01-30 20:25:34 UTC (rev 5528) +++ SwiftApps/SciColSim/annealing.swift 2012-01-30 20:36:57 UTC (rev 5529) @@ -193,8 +193,10 @@ } (Res r) multi_loss( int ci, int cj, float x[], float target_innov, int evolve_reruns ) +// (Res r, Stats s) multi_loss( int ci, int cj, float x[], float target_innov, int evolve_reruns ) FIXME: To obtain stats { file rfile[]; + file ofile[]; // FIXME: to obtain timings and otehr stats tracef("multi_loss: entered: ci=%i cj=%i target_innov=%f evolve_reruns=%i x=%q\n",ci, cj, target_innov,evolve_reruns,x); int appCalls = @toint(@tofloat(evolve_reruns) / @tofloat(rerunsPerApp)); # FIXME: handle fractional issues and rounding etc. For now must divide evenly @@ -224,12 +226,15 @@ file graph <"movie_graph.txt">; (outfile, rfile[i]) = evolve(args,graph); + // (ofile[i], rfile[i]) = evolve(args,graph); tracef("multi_loss: i=%i calling evolve, args=%q\n", i, args); // tracef("multi_loss: after evolve: i=%i %k %k\n", i, outfile, rfile[i]); } file sumfile = sumloss(rfile); r = readData(sumfile); tracef("multi_loss: returning: ci=%i cj=%i r.loss=%f r.sdev=%f\n",ci,cj,r.loss,r.sdev); + // file statfile = sumstats(ofile); FIXME: to obtain timings and otehr stats + // s = readStat(statsfile); FIXME: to obtain timings and otehr stats } optimizer_sweep() // Implements logic of python driver script From wilde at ci.uchicago.edu Mon Jan 30 14:51:27 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 30 Jan 2012 14:51:27 -0600 (CST) Subject: [Swift-commit] r5530 - SwiftApps/SciColSim Message-ID: <20120130205127.073FC9CCB4@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-30 14:51:26 -0600 (Mon, 30 Jan 2012) New Revision: 5530 Modified: SwiftApps/SciColSim/TODO Log: Added TODOs needed to prepare code for delivery to Andrey. Modified: SwiftApps/SciColSim/TODO =================================================================== --- SwiftApps/SciColSim/TODO 2012-01-30 20:36:57 UTC (rev 5529) +++ SwiftApps/SciColSim/TODO 2012-01-30 20:51:26 UTC (rev 5530) @@ -1,6 +1,31 @@ + + x = done, - = in progress + +--- Top Prios --- + +Get code in shape for Andrey to do a comparison run between fast .py and .swift runs on his Mac. + +Get initial tests run on Beagle at scale + +Look for timing problems and ultr-long runs. + +Clean up Swift code for Andrey to take over the code. + +Get Swift code closer and closer to C++ output format + +Get Andrey Beagle-enabled (ie running new runs on Beagle) + +Deal with file management and temp files form runs + +Speed up data management if thats slowing us down (eg, CDM) + + +----------------- + + [ ] convert all hard-coded annealing.swift params to @arg(s) [ ] Get timings for optimizer calls to display. Perhaps via stdout or From wilde at ci.uchicago.edu Mon Jan 30 17:26:47 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 30 Jan 2012 17:26:47 -0600 (CST) Subject: [Swift-commit] r5531 - SwiftApps/SciColSim Message-ID: <20120130232647.0DA679CCE6@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-30 17:26:46 -0600 (Mon, 30 Jan 2012) New Revision: 5531 Modified: SwiftApps/SciColSim/evolve.sh Log: fix typo in shebang line Modified: SwiftApps/SciColSim/evolve.sh =================================================================== --- SwiftApps/SciColSim/evolve.sh 2012-01-30 20:51:26 UTC (rev 5530) +++ SwiftApps/SciColSim/evolve.sh 2012-01-30 23:26:46 UTC (rev 5531) @@ -1,4 +1,4 @@ -#1 /bin/sh +#! /bin/sh datafile=$1 touch multi_loss.data shift 1 From tga at ci.uchicago.edu Mon Jan 30 20:02:22 2012 From: tga at ci.uchicago.edu (tga at ci.uchicago.edu) Date: Mon, 30 Jan 2012 20:02:22 -0600 (CST) Subject: [Swift-commit] r5532 - SwiftApps/SwiftR/Swift Message-ID: <20120131020222.09AD99CCE6@svn.ci.uchicago.edu> Author: tga Date: 2012-01-30 20:02:21 -0600 (Mon, 30 Jan 2012) New Revision: 5532 Modified: SwiftApps/SwiftR/Swift/DESCRIPTION Log: Increment SwiftR version Modified: SwiftApps/SwiftR/Swift/DESCRIPTION =================================================================== --- SwiftApps/SwiftR/Swift/DESCRIPTION 2012-01-30 23:26:46 UTC (rev 5531) +++ SwiftApps/SwiftR/Swift/DESCRIPTION 2012-01-31 02:02:21 UTC (rev 5532) @@ -1,8 +1,8 @@ Package: Swift Type: Package Title: R interface to Swift parallel scripting languaage -Version: 0.3.3 -Date: 2011-10-20 +Version: 0.3.4 +Date: 2012-01-30 Author: Michael Wilde Maintainer: Michael Wilde Depends: R (>= 2.11) @@ -10,4 +10,4 @@ Description: Routines to invoke R functions on remote resources through Swift. License: Apache License LazyLoad: yes -Packaged: 2011-10-20; Tim Armstrong +Packaged: 2012-01-30; Tim Armstrong From ketan at ci.uchicago.edu Tue Jan 31 08:08:03 2012 From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu) Date: Tue, 31 Jan 2012 08:08:03 -0600 (CST) Subject: [Swift-commit] r5533 - SwiftApps/SciColSim Message-ID: <20120131140803.9DB459CCB4@svn.ci.uchicago.edu> Author: ketan Date: 2012-01-31 08:08:02 -0600 (Tue, 31 Jan 2012) New Revision: 5533 Modified: SwiftApps/SciColSim/tc Log: fixed tc for beagle Modified: SwiftApps/SciColSim/tc =================================================================== --- SwiftApps/SciColSim/tc 2012-01-31 02:02:21 UTC (rev 5532) +++ SwiftApps/SciColSim/tc 2012-01-31 14:08:02 UTC (rev 5533) @@ -5,10 +5,10 @@ mcs cat /bin/cat null null null localhost catnap /home/wilde/swift/lab/catnap.sh null null GLOBUS::maxwalltime="00:01:00" -beagle optimizer /home/wilde/AndreysOptimizer/Optimizer null null GLOBUS::maxwalltime="01:00:00" -beagle optimizersh /home/wilde/AndreysOptimizer/optimizer.sh null null GLOBUS::maxwalltime="02:00:00" +beagle optimizer /home/wilde/AndreysOptimizer/src/Optimizer null null GLOBUS::maxwalltime="01:00:00" +beagle optimizersh /home/wilde/AndreysOptimizer/src/optimizer.sh null null GLOBUS::maxwalltime="02:00:00" -beagle evolve /home/wilde/AndreysOptimizer/evolve.sh null null GLOBUS::maxwalltime="02:00:00" +beagle evolve /home/wilde/AndreysOptimizer/src/evolve.sh null null GLOBUS::maxwalltime="02:00:00" localhost evolve /home/wilde/AndreysOptimizer/src/evolve.sh null null GLOBUS::maxwalltime="02:00:00" beagle sumloss /home/wilde/AndreysOptimizer/src/sumloss.sh null null GLOBUS::maxwalltime="02:00:00" From ketan at ci.uchicago.edu Tue Jan 31 08:09:54 2012 From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu) Date: Tue, 31 Jan 2012 08:09:54 -0600 (CST) Subject: [Swift-commit] r5534 - SwiftApps/SciColSim Message-ID: <20120131140954.12CAD9CCB4@svn.ci.uchicago.edu> Author: ketan Date: 2012-01-31 08:09:53 -0600 (Tue, 31 Jan 2012) New Revision: 5534 Added: SwiftApps/SciColSim/sites.beagle.xml Log: beagle sites.xml Added: SwiftApps/SciColSim/sites.beagle.xml =================================================================== --- SwiftApps/SciColSim/sites.beagle.xml (rev 0) +++ SwiftApps/SciColSim/sites.beagle.xml 2012-01-31 14:09:53 UTC (rev 5534) @@ -0,0 +1,20 @@ + + + + CI-MCB000119 + + KEEP + + 24 + pbs.aprun;pbs.mpp;depth=24 + 7300 + 0:02:00 + 1 + 1 + 1 + 0.23 + 10000 + + /lustre/beagle/ketan/labs/SciColSim-Bgl/swift.workdir + + From ketan at ci.uchicago.edu Tue Jan 31 13:14:32 2012 From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu) Date: Tue, 31 Jan 2012 13:14:32 -0600 (CST) Subject: [Swift-commit] r5535 - SwiftApps/SciColSim Message-ID: <20120131191432.4757F9CCA2@svn.ci.uchicago.edu> Author: ketan Date: 2012-01-31 13:14:32 -0600 (Tue, 31 Jan 2012) New Revision: 5535 Modified: SwiftApps/SciColSim/annealing.swift SwiftApps/SciColSim/sites.beagle.xml SwiftApps/SciColSim/tc Log: parameterized nworkers Modified: SwiftApps/SciColSim/annealing.swift =================================================================== --- SwiftApps/SciColSim/annealing.swift 2012-01-31 14:09:53 UTC (rev 5534) +++ SwiftApps/SciColSim/annealing.swift 2012-01-31 19:14:32 UTC (rev 5535) @@ -10,7 +10,7 @@ global boolean FIX_VARIABLES = true; global int var_fixed[] = [1,1,0,0,0]; -global int Nworkers = 4; +global int Nworkers = @toint(@arg("nworkers","4")); global int rerunsPerApp; (float nx) newx(float x, float dx) Modified: SwiftApps/SciColSim/sites.beagle.xml =================================================================== --- SwiftApps/SciColSim/sites.beagle.xml 2012-01-31 14:09:53 UTC (rev 5534) +++ SwiftApps/SciColSim/sites.beagle.xml 2012-01-31 19:14:32 UTC (rev 5535) @@ -7,8 +7,8 @@ 24 pbs.aprun;pbs.mpp;depth=24 - 7300 - 0:02:00 + 1800 + 1 1 1 1 Modified: SwiftApps/SciColSim/tc =================================================================== --- SwiftApps/SciColSim/tc 2012-01-31 14:09:53 UTC (rev 5534) +++ SwiftApps/SciColSim/tc 2012-01-31 19:14:32 UTC (rev 5535) @@ -5,11 +5,11 @@ mcs cat /bin/cat null null null localhost catnap /home/wilde/swift/lab/catnap.sh null null GLOBUS::maxwalltime="00:01:00" -beagle optimizer /home/wilde/AndreysOptimizer/src/Optimizer null null GLOBUS::maxwalltime="01:00:00" -beagle optimizersh /home/wilde/AndreysOptimizer/src/optimizer.sh null null GLOBUS::maxwalltime="02:00:00" +beagle optimizer /home/wilde/AndreysOptimizer/src/Optimizer null null null +beagle optimizersh /home/wilde/AndreysOptimizer/src/optimizer.sh null null null -beagle evolve /home/wilde/AndreysOptimizer/src/evolve.sh null null GLOBUS::maxwalltime="02:00:00" +beagle evolve /home/wilde/AndreysOptimizer/src/evolve.sh null null null localhost evolve /home/wilde/AndreysOptimizer/src/evolve.sh null null GLOBUS::maxwalltime="02:00:00" -beagle sumloss /home/wilde/AndreysOptimizer/src/sumloss.sh null null GLOBUS::maxwalltime="02:00:00" +beagle sumloss /home/wilde/AndreysOptimizer/src/sumloss.sh null null null localhost sumloss /home/wilde/AndreysOptimizer/src/sumloss.sh null null GLOBUS::maxwalltime="02:00:00" From jonmon at ci.uchicago.edu Tue Jan 31 13:38:50 2012 From: jonmon at ci.uchicago.edu (jonmon at ci.uchicago.edu) Date: Tue, 31 Jan 2012 13:38:50 -0600 (CST) Subject: [Swift-commit] r5536 - SwiftApps/SciColSim Message-ID: <20120131193850.993EE9CCA2@svn.ci.uchicago.edu> Author: jonmon Date: 2012-01-31 13:38:50 -0600 (Tue, 31 Jan 2012) New Revision: 5536 Added: SwiftApps/SciColSim/annealing.open-issues.swift Log: checked in copy of annealing.swift named annealing.open-issues.swift with all comments left intacted. Added: SwiftApps/SciColSim/annealing.open-issues.swift =================================================================== --- SwiftApps/SciColSim/annealing.open-issues.swift (rev 0) +++ SwiftApps/SciColSim/annealing.open-issues.swift 2012-01-31 19:38:50 UTC (rev 5536) @@ -0,0 +1,379 @@ +import "math"; +import "colortext"; + +type file; + +type Res +{ + float loss; + float sdev; +} + +global boolean FIX_VARIABLES = true; +global int var_fixed[] = [1,1,0,0,0]; +global int Nworkers = @toint(@arg("nworkers","4")); +global int rerunsPerApp; + +(float nx) newx(float x, float dx) +{ + float r = (random()) ; // / (pow(2.0,31.0)-1.0); + if (r > 0.5) + { + nx = x + (random())*dx; // /(pow(2.0,31.0)-1.0); + } + else + { + nx = x - (random())*dx; // /(pow(2.0,31.0)-1.0); + } + // tracef("newx(%f,%f)=%f\n",x,dx,nx); +} + +app (file outfile, file loss) evolve (string args[], file graph) +{ + evolve @loss args stdout=@outfile ; // graph is passed implicitly +} + +app (file x) sumloss(file loss[]) +{ + sumloss @filenames(loss) stdout=@x; +} + +/* + + Program structure: + + main + optimizer_sweep() - formerly, python script + multi_annealing() + multi_loss() + evolve() + sumloss() +*/ + +(file bestfile, file maxfile) multi_annealing ( + float T_start, + float T_end, + float Target_rejection, + int evolve_reruns, + float starting_jump, + float params0[], + float target_innov, + int annealing_cycles) +{ + int cycle=10; // const + int NEVOPARAMS=5; // const - 5 params, alpha 1,m through delta, does not include target_innovation + + float rejection[][]; // [i][j] where i is cycle and j is evolve-parameter (alpha_i, alpha_m, beta, gamma, delta) + + float x[][], dx[][], curr_loss[], curr_sdev[]; + + Res mlres[][]; + mlres[0][0] = multi_loss( 0, 0, params0, target_innov, evolve_reruns ); // FIXME: serves for all evolve-params ??? + tracef("multi_annealing: AR: initial: %f +- %f\n",mlres[0][0].loss,mlres[0][0].sdev); + + foreach j in [0:NEVOPARAMS-1] + { + x[0][j]=params0[j]; + dx[0][j] = starting_jump; + rejection[0][j] = 0.0; + curr_loss[j] = mlres[0][0].loss; + curr_sdev[j] = mlres[0][0].sdev; + } + + iterate iter_i + { // foreach i in [1:annealing_cycles] + int i = iter_i + 1; + + // set new temperature, rejection threshold, and dx values for this cycle + + float temperature = T_start*exp( @tofloat(i-1)*(jlog(T_end)-jlog(T_start))/@tofloat(annealing_cycles)); + + tracef(@strcat("multi_annealing: AR: i=%i ....T = ",color(3,"%f"),"\n"), i, temperature); + + // On each new "major" cycle within the annealing_cycles (other than the first) set new rejection and dx values + + if ( i %% cycle == 1 && i > 1 ) + { + tracef("multi_annealing: new cycle at i=%i\n",i); + tracef(color(Pink, "multi_annealing: AR: New cycle at %i: prev dx[0-4]=[%f %f %f %f %f]\n"),i,dx[i-1][0],dx[i-1][1],dx[i-1][2],dx[i-1][3],dx[i-1][4]); + foreach k in [0:NEVOPARAMS-1] + { + float newrejection = rejection[i-1][k] / @tofloat(cycle); + if (newrejection > 0.0) + { + dx[i][k] = dx[i-1][k] / (newrejection / Target_rejection); + // FIXME: re-enable: rejection[i][k]=0.0; + } + else + { + dx[i][k] = dx[i-1][k] * 2.0; + // FIXME: re-enable: rejection[i][k]=rejection[i-1][k]; + } + // FIXME: HANGS? : tracef(color(Red,"Recomputed rejection: i=%d k=%d dx[i][k]=%f\n"), i, k, dx[i][k]); + } + tracef(color(Blue, "multi_annealing: AR: New cycle at %i: dx[0-4]=[%f %f %f %f %f]\n"),i,dx[i][0],dx[i][1],dx[i][2],dx[i][3],dx[i][4]); + } + else + { // If not new cycle, set dx[i][*] from previous dx ([i-1]). rejection[i]j] is set later. + foreach k in [0:NEVOPARAMS-1] + { + dx[i][k] = dx[i-1][k]; + } + } + //foreach j in [0:NEVOPARAMS-1] { // Try a new value for each non-fixed param; then write results and accept or reject + iterate j + { // Try a new value for each non-fixed param; then write results and accept or reject + // float try_x[]; + int curr = (i * NEVOPARAMS) + j; + int prev = curr-1; + // tracef("in multi_annealing: i=%i j=%i curr=%i prev=%i\n", i, j, curr, prev); + if ( /*(!FIX_VARIABLES) || */ (var_fixed[j]==0) ) { // Adjustable vars + // fixed=1,1,0,0,0: FIXME: FIX_VARIABLES flag has faulty logic but OK when TRUE + float try_x[]; + foreach k in [0:NEVOPARAMS-1] + { // Select the evolve params to try + if ( k < j ) + { + try_x[k] = x[i][k]; // already set x[i][k] + } + else + { + if ( k == j ) + { + try_x[k] = newx(x[i-1][j],dx[i-1][j]); // permute x[i-1][j] + } + else + { // k > j + try_x[k] = x[i-1][k]; // use x[i-1][k] (from prior cycle) + } + } + } + tracef(@strcat("multi_annealing: AR: ", color(10,"%f"), " ", color(9,"%i"),"\n"), try_x[j],j); + // Up to here, x[] and dx[] are only set for previous i + mlres[i][j] = multi_loss(i,j,try_x, target_innov, evolve_reruns); // do the N evolve()'s, N=evolve_reruns + tracef("multi_annealing: AR: %f +- %f\n", mlres[i][j].loss, mlres[i][j].sdev); + // Beyond this point, x[] and dx[] are being set for this i,j + + float ALOT=100000000000.0; // 100,000,000,000. = 10^11 + if (mlres[i][j].loss < ALOT) + { + tracef("multi_annealing: AF: best_opt_some.txt: %f,%f,%f,%f,%f,%f,%f,%f\n", + target_innov,mlres[i][j].loss,try_x[0],try_x[1],try_x[2],try_x[3],try_x[4],mlres[i][j].sdev); + tracef(color(Red,"multi_annealing: AF: max_dist.txt - tbd\n")); // FIXME: max_dist is global set in evolve() + } + else + { // does this ever occur? if so did we want to still do the ratio computation above??? + tracef("multi_annealing: Loss %f > ALOT at [i][j] = [%d][%d]\n", mlres[i][j].loss, i ,j); + } + float ratio = min(1.0, exp( -(mlres[i][j].loss-curr_loss[prev]) / temperature)); + float r = (random()) ; // / (pow(2.0,31.0)-1.0); // FIXME: AR: why all the 2^31's ??? + tracef("multi_annealing: AR: %f vs %f\n", r, ratio); + if (r > ratio) + { // Reject new parameter + x[i][j] = x[i-1][j]; + rejection[i][j] = rejection[i-1][j] + 1.0; // FIXME: AR: Is this correct? incr rejection? + curr_loss[curr] = curr_loss[prev]; + curr_sdev[curr] = curr_sdev[prev]; + // FIXME: AR: the following prints seem to replicate values in the .cpp version - please clarify. + tracef("multi_annealing: AR: %i,%i %i Did not accept: %f (%i)\n", i, j, i, try_x[j], j); + tracef("multi_annealing: AR: %f %f %f %f %f\n", try_x[0],try_x[1],try_x[2],try_x[3],try_x[4]); + } + else + { // Accept new parameter + tracef("multi_annealing: Accepting try_x[j], i=%i j=%i\n",i,j); + x[i][j] = try_x[j]; + rejection[i][j] = rejection[i-1][j]; // FIXME: AR: Is this correct? no incr of rejection? + tracef("multi_annealing: Accepting try_x[j], i=%i j=%i try_x[j]=%f\n",i,j,try_x[j]); + curr_loss[curr] = mlres[i][j].loss; + curr_sdev[curr] = mlres[i][j].sdev; + float rj[]; + foreach k in [0:NEVOPARAMS-1] + { // FIXME!!! + if (k <= j) + { + rj[k] = rejection[i][k]; // Was either set from previous j or just set for this j + } + else + { + rj[k] = rejection[i-1][k]; // Not yet set, use previous + } + } + tracef(@strcat("multi_annealing: AR: [%i][%i] ", color(8,"Rejection counts: "), + color(1,"%f"), " ", color(7,"%f"), " ", color(5,"%f"), " ", color(9,"%f"), " ", color(6,"%f"), "\n\n"), + i, j, rj[0], rj[1], rj[2], rj[3], rj[4]); + tracef(@strcat("multi_annealing: AR: %i ", color(8,"***** Did accept! "), + color(1,"%f"), " ", color(7,"%f"), " ", color(5,"%f"), " ", color(9,"%f"), " ", color(6,"%f"), "\n\n"), + i, try_x[0], try_x[1], try_x[2], try_x[3], try_x[4]); + } + } + else + { // Fixed Vars + x[i][j] = x[i-1][j]; + rejection[i][j] = rejection[i-1][j]; + curr_loss[curr] = curr_loss[prev]; + curr_sdev[curr] = curr_sdev[prev]; + // dx[i][j] not set for fixed vars + } + } until(j == NEVOPARAMS-1); + } until(iter_i == (annealing_cycles-1)); +} + +(Res r) multi_loss( int ci, int cj, float x[], float target_innov, int evolve_reruns ) +// (Res r, Stats s) multi_loss( int ci, int cj, float x[], float target_innov, int evolve_reruns ) FIXME: To obtain stats +{ + file rfile[]; + file ofile[]; // FIXME: to obtain timings and otehr stats + tracef("multi_loss: entered: ci=%i cj=%i target_innov=%f evolve_reruns=%i x=%q\n",ci, cj, target_innov,evolve_reruns,x); + + int appCalls = @toint(@tofloat(evolve_reruns) / @tofloat(rerunsPerApp)); // FIXME: handle fractional issues and rounding etc. For now must divide evenly + + tracef("multi_loss appCalls=%i\n", appCalls); + foreach i in [1:appCalls] { // repeats of the evolove() - same as n_reruns + file outfile; // FIXME: map and save in future + string args[] = [ // FIXME: move this to a setargs() function + // alpha_i alpha_m beta gamma delta target_innov + @strcat(x[0]), @strcat(x[1]), @strcat(x[2]), @strcat(x[3]), @strcat(x[4]), @strcat(target_innov), + + // n_epochs n_steps evolve_reruns range + // "40000", "20", @strcat(evolve_reruns), "2", + "40000", "20", @strcat(rerunsPerApp), "2", + + // verbose_level + "1", + + // T_start T_end Annealing_steps Target_rejection Starting_jump + "2.", "0.01", "2", "0.3", "2.3", + + // FREEZE: alpha_i alpha_m beta gamma delta + "1", "1", "0", "0", "0", + + // operation-code:(m,a) Nworkers seed + "m", @strcat(Nworkers), "1234567" ]; + + file graph <"movie_graph.txt">; + (outfile, rfile[i]) = evolve(args,graph); + // (ofile[i], rfile[i]) = evolve(args,graph); + tracef("multi_loss: i=%i calling evolve, args=%q\n", i, args); + // tracef("multi_loss: after evolve: i=%i %k %k\n", i, outfile, rfile[i]); + } + file sumfile = sumloss(rfile); + r = readData(sumfile); + tracef("multi_loss: returning: ci=%i cj=%i r.loss=%f r.sdev=%f\n",ci,cj,r.loss,r.sdev); + // file statfile = sumstats(ofile); FIXME: to obtain timings and otehr stats + // s = readStat(statsfile); FIXME: to obtain timings and otehr stats +} + +optimizer_sweep() // Implements logic of python driver script +{ + int minrange=58; + int maxrange=59; + int rangeinc=50; + + //int maxrange=1009; + //int maxrange=209; + + // FIXME: add provision for random priming and random param values when x[i] == -100 (see optimizer.cpp main()) + + int nreps=1; // 15 + +// file bestfile ; +// file maxfile ; + + foreach target_innov in [minrange:maxrange:rangeinc] + { + foreach rep in [1:nreps] + { + file outfile; // ; + file lossfile; // ; +/* + (outfile,lossfile) = multi_annealing( + T_start = 2.0, + T_end = 0.01, + Target_rejection = 0.3, + evolve_reruns = 10, + starting_jump = 2.3, + params0[] = [0.0, 0.0, 4.0, 50.0, -1.0], + @tofloat(target_innov), + annealing_cycles = 2); +*/ + (outfile,lossfile) = multi_annealing( + 2.0, + 0.01, + 0.3, + 100, + 2.3, + [0.0, 0.0, 4.0, 50.0, -1.0], + @tofloat(target_innov), + 30); + } + } +} + +rerunsPerApp = 100; + +main() +{ + optimizer_sweep(); +} + +main(); + +/* + + Program structure: + + main + optimizer_sweep() + multi_annealing() + multi_loss() + evolve() + sumloss() + + Example parameter sets: + + for target in range(58,59,50): + for i in range(1): + args="./toptimizer 0 0 4 50 -1 "+target+" 40000 20 75 2 1 2. 0.01 2 0.3 2.3 1 1 1 0 0 m // > out.T"+str(target)+".i"+str(i) + os.system(args); + + string fastargs1[] = [ + "0", "0", "4", "50", "-1", @strcat(target), + "40000", "20", "1000", "2", + "1", + "2.", "0.01", "100", "0.3", "2.3", + "1", "1", "0", "0", "0"]; + string fastargs2[] = [ + "0", "0", "4", "50", "-1", @strcat(target), + "40000", "20", "1000", "2", + "1", + "2.", "0.01", "5", "0.3", "2.3", + "1", "1", "0", "0", "0", "m"]; + string fastargs3[] = [ + "0", "0", "4", "50", "-1", @strcat(target), + "40000", "20", @strcat(repeats), "2", + "1", + "2.", "0.01", "2", "0.3", "2.3", + "1", "1", "0", "0", "0", "m"]; +*/ + +(string args[]) setargs() +{ + // string longargs[] = @strcat("0 0 4 50 -1 ",target," 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 m"); + + // [alpha_i alpha_m beta gamma delta target_innov + // [n_epochs n_steps n_reruns] [range] + // [verbose_level] + // [T_start T_end Annealing_steps Target_rejection Starting_jump] + // [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta] [operation-code:(m,a) Nworkers] +} + +////////////////// HOLD JUNK + +// tracef(@strcat("multi_annealing: AR: %i ", color(8,"Rejection counts: "), +// color( /* 2 */ 1," %f"), "\n\n"), +// i, rejection[i][j] ); // , rejection[i][1], rejection[i][2], rejection[i][3], rejection[i][4]); +// FIXME: determine correct rejection[] values to avoid hanging: +// tracef(@strcat("multi_annealing: AR: %i ", color(8,"Rejection counts: "), +// color( /* 2 */ 1," %f"), color(7," %f"), color(5," %f"), color(9," %f"), color(6," %f"), "\n\n"), +// rejection[i][0], rejection[i][1], rejection[i][2], rejection[i][3], rejection[i][4]); +// END FIXME From ketan at ci.uchicago.edu Tue Jan 31 16:43:07 2012 From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu) Date: Tue, 31 Jan 2012 16:43:07 -0600 (CST) Subject: [Swift-commit] r5537 - SwiftApps/SciColSim Message-ID: <20120131224307.C36B69CCA2@svn.ci.uchicago.edu> Author: ketan Date: 2012-01-31 16:43:07 -0600 (Tue, 31 Jan 2012) New Revision: 5537 Added: SwiftApps/SciColSim/openmp-optimizer Modified: SwiftApps/SciColSim/testopt.py Log: adding openmp-optimizer as it is required by testopt.py Added: SwiftApps/SciColSim/openmp-optimizer =================================================================== (Binary files differ) Property changes on: SwiftApps/SciColSim/openmp-optimizer ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Modified: SwiftApps/SciColSim/testopt.py =================================================================== --- SwiftApps/SciColSim/testopt.py 2012-01-31 19:38:50 UTC (rev 5536) +++ SwiftApps/SciColSim/testopt.py 2012-01-31 22:43:07 UTC (rev 5537) @@ -9,8 +9,8 @@ app = "./dispatch-optimizer"; # For Mac only: sing Grand Central Dispatch app = "./openmp-optimizer"; # For Mac or Linux: Using OpenMP (Default) -paramset="default" -#paramset="mw2" +#paramset="default" +paramset="mw2" print("Running with parameter set " + paramset + "\n\n"); From ketan at ci.uchicago.edu Tue Jan 31 17:21:33 2012 From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu) Date: Tue, 31 Jan 2012 17:21:33 -0600 (CST) Subject: [Swift-commit] r5538 - SwiftApps/SciColSim Message-ID: <20120131232133.E02049CCA2@svn.ci.uchicago.edu> Author: ketan Date: 2012-01-31 17:21:33 -0600 (Tue, 31 Jan 2012) New Revision: 5538 Modified: SwiftApps/SciColSim/testopt.py Log: Modified: SwiftApps/SciColSim/testopt.py =================================================================== --- SwiftApps/SciColSim/testopt.py 2012-01-31 22:43:07 UTC (rev 5537) +++ SwiftApps/SciColSim/testopt.py 2012-01-31 23:21:33 UTC (rev 5538) @@ -10,7 +10,8 @@ app = "./openmp-optimizer"; # For Mac or Linux: Using OpenMP (Default) #paramset="default" -paramset="mw2" +#paramset="mw2" +paramset="VERYFASTTEST" print("Running with parameter set " + paramset + "\n\n"); @@ -59,6 +60,19 @@ operation = "n" # n=normal, m=manual (runs 1 multi_loss call) seed = "1234567" +elif paramset == "VERYFASTTEST": #VERY FAST TEST PARAMETERS by Ketan + + startTarget = 58 + endTarget = 209 + incrTarget = 50 + optimizerRepeats = 2 + evolveReruns = 1 + annealingSteps = 2 + NWorkers = "2" + openmp = "OMP_NUM_THREADS=" + NWorkers + operation = "n" # n=normal, m=manual (runs 1 multi_loss call) + seed = "1234567" + elif paramset == "MANUALTEST": # for manual (one multi_loss call) mode startTarget = 258 # runtime increases with greater target From ketan at ci.uchicago.edu Tue Jan 31 17:29:20 2012 From: ketan at ci.uchicago.edu (ketan at ci.uchicago.edu) Date: Tue, 31 Jan 2012 17:29:20 -0600 (CST) Subject: [Swift-commit] r5539 - SwiftApps/SciColSim Message-ID: <20120131232920.737299CCA2@svn.ci.uchicago.edu> Author: ketan Date: 2012-01-31 17:29:20 -0600 (Tue, 31 Jan 2012) New Revision: 5539 Modified: SwiftApps/SciColSim/testopt.py Log: very fast test Modified: SwiftApps/SciColSim/testopt.py =================================================================== --- SwiftApps/SciColSim/testopt.py 2012-01-31 23:21:33 UTC (rev 5538) +++ SwiftApps/SciColSim/testopt.py 2012-01-31 23:29:20 UTC (rev 5539) @@ -68,7 +68,7 @@ optimizerRepeats = 2 evolveReruns = 1 annealingSteps = 2 - NWorkers = "2" + NWorkers = "1" openmp = "OMP_NUM_THREADS=" + NWorkers operation = "n" # n=normal, m=manual (runs 1 multi_loss call) seed = "1234567" From davidk at ci.uchicago.edu Fri Jan 6 15:41:46 2012 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Fri, 06 Jan 2012 21:41:46 -0000 Subject: [Swift-commit] r5488 - in SwiftApps/modis: . landuse old Message-ID: <20120106213942.17B449D027@svn.ci.uchicago.edu> Author: davidk Date: 2012-01-06 15:39:41 -0600 (Fri, 06 Jan 2012) New Revision: 5488 Added: SwiftApps/modis/old/ SwiftApps/modis/old/coast1.xml SwiftApps/modis/old/coasters.xml SwiftApps/modis/old/demo3 SwiftApps/modis/old/demo4 SwiftApps/modis/old/geos.mapper.sh SwiftApps/modis/old/modis.swift SwiftApps/modis/old/modis2.swift SwiftApps/modis/old/modis3.swift SwiftApps/modis/old/modis4.swift SwiftApps/modis/old/modisp1.swift SwiftApps/modis/old/rundemo.sh SwiftApps/modis/old/rundemo2.pbs.sh SwiftApps/modis/old/rundemo2.sh SwiftApps/modis/old/rundemop1.sh SwiftApps/modis/old/sico.xml SwiftApps/modis/old/sites.xml.pas.coasters SwiftApps/modis/old/tc.pbs Removed: SwiftApps/modis/MODIS_grid.gif SwiftApps/modis/coast1.xml SwiftApps/modis/coasters.xml SwiftApps/modis/demo3 SwiftApps/modis/demo4 SwiftApps/modis/demo5.local.out SwiftApps/modis/demo5.local.out2 SwiftApps/modis/demo5.local.out3 SwiftApps/modis/g.gif SwiftApps/modis/geos.mapper.sh SwiftApps/modis/gridmap.gif SwiftApps/modis/landuse/h00v08.color.png SwiftApps/modis/landuse/h00v09.color.png SwiftApps/modis/landuse/h00v10.color.png SwiftApps/modis/landuse/h01v07.color.png SwiftApps/modis/landuse/h01v08.color.png SwiftApps/modis/landuse/h01v09.color.png SwiftApps/modis/landuse/h01v10.color.png SwiftApps/modis/landuse/h01v11.color.png SwiftApps/modis/landuse/h02v06.color.png SwiftApps/modis/landuse/h02v08.color.png SwiftApps/modis/landuse/h02v09.color.png SwiftApps/modis/landuse/h02v10.color.png SwiftApps/modis/landuse/h02v11.color.png SwiftApps/modis/landuse/h03v06.color.png SwiftApps/modis/landuse/h03v07.color.png SwiftApps/modis/landuse/h03v09.color.png SwiftApps/modis/landuse/h03v10.color.png SwiftApps/modis/landuse/h03v11.color.png SwiftApps/modis/landuse/h04v09.color.png SwiftApps/modis/landuse/h04v10.color.png SwiftApps/modis/landuse/h04v11.color.png SwiftApps/modis/landuse/h05v10.color.png SwiftApps/modis/landuse/h05v11.color.png SwiftApps/modis/landuse/h05v13.color.png SwiftApps/modis/landuse/h06v03.color.png SwiftApps/modis/landuse/h06v11.color.png SwiftApps/modis/landuse/h07v03.color.png SwiftApps/modis/landuse/h07v05.color.png SwiftApps/modis/landuse/h07v06.color.png SwiftApps/modis/landuse/h07v07.color.png SwiftApps/modis/landuse/h08v03.color.png SwiftApps/modis/landuse/h08v04.color.png SwiftApps/modis/landuse/h08v05.color.png SwiftApps/modis/landuse/h08v06.color.png SwiftApps/modis/landuse/h08v07.color.png SwiftApps/modis/landuse/h08v08.color.png SwiftApps/modis/landuse/h08v09.color.png SwiftApps/modis/landuse/h08v11.color.png SwiftApps/modis/landuse/h09v02.color.png SwiftApps/modis/landuse/h09v03.color.png SwiftApps/modis/landuse/h09v04.color.png SwiftApps/modis/landuse/h09v05.color.png SwiftApps/modis/landuse/h09v06.color.png SwiftApps/modis/landuse/h09v07.color.png SwiftApps/modis/landuse/h09v08.color.png SwiftApps/modis/landuse/h09v09.color.png SwiftApps/modis/landuse/h10v02.color.png SwiftApps/modis/landuse/h10v03.color.png SwiftApps/modis/landuse/h10v04.color.png SwiftApps/modis/landuse/h10v05.color.png SwiftApps/modis/landuse/h10v06.color.png SwiftApps/modis/landuse/h10v07.color.png SwiftApps/modis/landuse/h10v08.color.png SwiftApps/modis/landuse/h10v09.color.png SwiftApps/modis/landuse/h10v10.color.png SwiftApps/modis/landuse/h10v11.color.png SwiftApps/modis/landuse/h11v02.color.png SwiftApps/modis/landuse/h11v03.color.png SwiftApps/modis/landuse/h11v04.color.png SwiftApps/modis/landuse/h11v05.color.png SwiftApps/modis/landuse/h11v06.color.png SwiftApps/modis/landuse/h11v07.color.png SwiftApps/modis/landuse/h11v08.color.png SwiftApps/modis/landuse/h11v09.color.png SwiftApps/modis/landuse/h11v10.color.png SwiftApps/modis/landuse/h11v11.color.png SwiftApps/modis/landuse/h11v12.color.png SwiftApps/modis/landuse/h12v01.color.png SwiftApps/modis/landuse/h12v02.color.png SwiftApps/modis/landuse/h12v03.color.png SwiftApps/modis/landuse/h12v04.color.png SwiftApps/modis/landuse/h12v05.color.png SwiftApps/modis/landuse/h12v07.color.png SwiftApps/modis/landuse/h12v08.color.png SwiftApps/modis/landuse/h12v09.color.png SwiftApps/modis/landuse/h12v10.color.png SwiftApps/modis/landuse/h12v11.color.png SwiftApps/modis/landuse/h12v12.color.png SwiftApps/modis/landuse/h12v13.color.png SwiftApps/modis/landuse/h13v01.color.png SwiftApps/modis/landuse/h13v02.color.png SwiftApps/modis/landuse/h13v03.color.png SwiftApps/modis/landuse/h13v04.color.png SwiftApps/modis/landuse/h13v08.color.png SwiftApps/modis/landuse/h13v09.color.png SwiftApps/modis/landuse/h13v10.color.png SwiftApps/modis/landuse/h13v11.color.png SwiftApps/modis/landuse/h13v12.color.png SwiftApps/modis/landuse/h13v13.color.png SwiftApps/modis/landuse/h13v14.color.png SwiftApps/modis/landuse/h14v01.color.png SwiftApps/modis/landuse/h14v02.color.png SwiftApps/modis/landuse/h14v03.color.png SwiftApps/modis/landuse/h14v04.color.png SwiftApps/modis/landuse/h14v09.color.png SwiftApps/modis/landuse/h14v10.color.png SwiftApps/modis/landuse/h14v11.color.png SwiftApps/modis/landuse/h14v14.color.png SwiftApps/modis/landuse/h14v16.color.png SwiftApps/modis/landuse/h14v17.color.png SwiftApps/modis/landuse/h15v01.color.png SwiftApps/modis/landuse/h15v02.color.png SwiftApps/modis/landuse/h15v03.color.png SwiftApps/modis/landuse/h15v05.color.png SwiftApps/modis/landuse/h15v07.color.png SwiftApps/modis/landuse/h15v11.color.png SwiftApps/modis/landuse/h15v14.color.png SwiftApps/modis/landuse/h15v15.color.png SwiftApps/modis/landuse/h15v16.color.png SwiftApps/modis/landuse/h15v17.color.png SwiftApps/modis/landuse/h16v00.color.png SwiftApps/modis/landuse/h16v01.color.png SwiftApps/modis/landuse/h16v02.color.png SwiftApps/modis/landuse/h16v05.color.png SwiftApps/modis/landuse/h16v06.color.png SwiftApps/modis/landuse/h16v07.color.png SwiftApps/modis/landuse/h16v08.color.png SwiftApps/modis/landuse/h16v09.color.png SwiftApps/modis/landuse/h16v12.color.png SwiftApps/modis/landuse/h16v14.color.png SwiftApps/modis/landuse/h16v16.color.png SwiftApps/modis/landuse/h16v17.color.png SwiftApps/modis/landuse/h17v00.color.png SwiftApps/modis/landuse/h17v01.color.png SwiftApps/modis/landuse/h17v02.color.png SwiftApps/modis/landuse/h17v03.color.png SwiftApps/modis/landuse/h17v04.color.png SwiftApps/modis/landuse/h17v05.color.png SwiftApps/modis/landuse/h17v06.color.png SwiftApps/modis/landuse/h17v07.color.png SwiftApps/modis/landuse/h17v08.color.png SwiftApps/modis/landuse/h17v10.color.png SwiftApps/modis/landuse/h17v12.color.png SwiftApps/modis/landuse/h17v13.color.png SwiftApps/modis/landuse/h17v15.color.png SwiftApps/modis/landuse/h17v16.color.png SwiftApps/modis/landuse/h17v17.color.png SwiftApps/modis/landuse/h18v00.color.png SwiftApps/modis/landuse/h18v01.color.png SwiftApps/modis/landuse/h18v02.color.png SwiftApps/modis/landuse/h18v03.color.png SwiftApps/modis/landuse/h18v04.color.png SwiftApps/modis/landuse/h18v05.color.png SwiftApps/modis/landuse/h18v06.color.png SwiftApps/modis/landuse/h18v07.color.png SwiftApps/modis/landuse/h18v08.color.png SwiftApps/modis/landuse/h18v09.color.png SwiftApps/modis/landuse/h18v14.color.png SwiftApps/modis/landuse/h18v15.color.png SwiftApps/modis/landuse/h18v16.color.png SwiftApps/modis/landuse/h18v17.color.png SwiftApps/modis/landuse/h19v00.color.png SwiftApps/modis/landuse/h19v01.color.png SwiftApps/modis/landuse/h19v02.color.png SwiftApps/modis/landuse/h19v03.color.png SwiftApps/modis/landuse/h19v04.color.png SwiftApps/modis/landuse/h19v05.color.png SwiftApps/modis/landuse/h19v06.color.png SwiftApps/modis/landuse/h19v07.color.png SwiftApps/modis/landuse/h19v08.color.png SwiftApps/modis/landuse/h19v09.color.png SwiftApps/modis/landuse/h19v10.color.png SwiftApps/modis/landuse/h19v11.color.png SwiftApps/modis/landuse/h19v12.color.png SwiftApps/modis/landuse/h19v15.color.png SwiftApps/modis/landuse/h19v16.color.png SwiftApps/modis/landuse/h19v17.color.png SwiftApps/modis/landuse/h20v01.color.png SwiftApps/modis/landuse/h20v02.color.png SwiftApps/modis/landuse/h20v03.color.png SwiftApps/modis/landuse/h20v04.color.png SwiftApps/modis/landuse/h20v05.color.png SwiftApps/modis/landuse/h20v06.color.png SwiftApps/modis/landuse/h20v07.color.png SwiftApps/modis/landuse/h20v08.color.png SwiftApps/modis/landuse/h20v09.color.png SwiftApps/modis/landuse/h20v10.color.png SwiftApps/modis/landuse/h20v11.color.png SwiftApps/modis/landuse/h20v12.color.png SwiftApps/modis/landuse/h20v13.color.png SwiftApps/modis/landuse/h20v15.color.png SwiftApps/modis/landuse/h20v16.color.png SwiftApps/modis/landuse/h20v17.color.png SwiftApps/modis/landuse/h21v01.color.png SwiftApps/modis/landuse/h21v02.color.png SwiftApps/modis/landuse/h21v03.color.png SwiftApps/modis/landuse/h21v04.color.png SwiftApps/modis/landuse/h21v05.color.png SwiftApps/modis/landuse/h21v06.color.png SwiftApps/modis/landuse/h21v07.color.png SwiftApps/modis/landuse/h21v08.color.png SwiftApps/modis/landuse/h21v09.color.png SwiftApps/modis/landuse/h21v10.color.png SwiftApps/modis/landuse/h21v11.color.png SwiftApps/modis/landuse/h21v13.color.png SwiftApps/modis/landuse/h21v15.color.png SwiftApps/modis/landuse/h21v16.color.png SwiftApps/modis/landuse/h21v17.color.png SwiftApps/modis/landuse/h22v01.color.png SwiftApps/modis/landuse/h22v02.color.png SwiftApps/modis/landuse/h22v03.color.png SwiftApps/modis/landuse/h22v04.color.png SwiftApps/modis/landuse/h22v05.color.png SwiftApps/modis/landuse/h22v06.color.png SwiftApps/modis/landuse/h22v07.color.png SwiftApps/modis/landuse/h22v08.color.png SwiftApps/modis/landuse/h22v09.color.png SwiftApps/modis/landuse/h22v10.color.png SwiftApps/modis/landuse/h22v11.color.png SwiftApps/modis/landuse/h22v13.color.png SwiftApps/modis/landuse/h22v14.color.png SwiftApps/modis/landuse/h22v15.color.png SwiftApps/modis/landuse/h22v16.color.png SwiftApps/modis/landuse/h23v01.color.png SwiftApps/modis/landuse/h23v02.color.png SwiftApps/modis/landuse/h23v03.color.png SwiftApps/modis/landuse/h23v04.color.png SwiftApps/modis/landuse/h23v05.color.png SwiftApps/modis/landuse/h23v06.color.png SwiftApps/modis/landuse/h23v07.color.png SwiftApps/modis/landuse/h23v08.color.png SwiftApps/modis/landuse/h23v09.color.png SwiftApps/modis/landuse/h23v10.color.png SwiftApps/modis/landuse/h23v11.color.png SwiftApps/modis/landuse/h23v15.color.png SwiftApps/modis/landuse/h23v16.color.png SwiftApps/modis/landuse/h24v02.color.png SwiftApps/modis/landuse/h24v03.color.png SwiftApps/modis/landuse/h24v04.color.png SwiftApps/modis/landuse/h24v05.color.png SwiftApps/modis/landuse/h24v06.color.png SwiftApps/modis/landuse/h24v07.color.png SwiftApps/modis/landuse/h24v12.color.png SwiftApps/modis/landuse/h24v15.color.png SwiftApps/modis/landuse/h25v02.color.png SwiftApps/modis/landuse/h25v03.color.png SwiftApps/modis/landuse/h25v04.color.png SwiftApps/modis/landuse/h25v05.color.png SwiftApps/modis/landuse/h25v06.color.png SwiftApps/modis/landuse/h25v07.color.png SwiftApps/modis/landuse/h25v08.color.png SwiftApps/modis/landuse/h25v09.color.png SwiftApps/modis/landuse/h26v02.color.png SwiftApps/modis/landuse/h26v03.color.png SwiftApps/modis/landuse/h26v04.color.png SwiftApps/modis/landuse/h26v05.color.png SwiftApps/modis/landuse/h26v06.color.png SwiftApps/modis/landuse/h26v07.color.png SwiftApps/modis/landuse/h26v08.color.png SwiftApps/modis/landuse/h27v03.color.png SwiftApps/modis/landuse/h27v04.color.png SwiftApps/modis/landuse/h27v05.color.png SwiftApps/modis/landuse/h27v06.color.png SwiftApps/modis/landuse/h27v07.color.png SwiftApps/modis/landuse/h27v08.color.png SwiftApps/modis/landuse/h27v09.color.png SwiftApps/modis/landuse/h27v10.color.png SwiftApps/modis/landuse/h27v11.color.png SwiftApps/modis/landuse/h27v12.color.png SwiftApps/modis/landuse/h27v14.color.png SwiftApps/modis/landuse/h28v03.color.png SwiftApps/modis/landuse/h28v04.color.png SwiftApps/modis/landuse/h28v05.color.png SwiftApps/modis/landuse/h28v06.color.png SwiftApps/modis/landuse/h28v07.color.png SwiftApps/modis/landuse/h28v08.color.png SwiftApps/modis/landuse/h28v09.color.png SwiftApps/modis/landuse/h28v10.color.png SwiftApps/modis/landuse/h28v11.color.png SwiftApps/modis/landuse/h28v12.color.png SwiftApps/modis/landuse/h28v13.color.png SwiftApps/modis/landuse/h28v14.color.png SwiftApps/modis/landuse/h29v03.color.png SwiftApps/modis/landuse/h29v05.color.png SwiftApps/modis/landuse/h29v06.color.png SwiftApps/modis/landuse/h29v07.color.png SwiftApps/modis/landuse/h29v08.color.png SwiftApps/modis/landuse/h29v09.color.png SwiftApps/modis/landuse/h29v10.color.png SwiftApps/modis/landuse/h29v11.color.png SwiftApps/modis/landuse/h29v12.color.png SwiftApps/modis/landuse/h29v13.color.png SwiftApps/modis/landuse/h30v05.color.png SwiftApps/modis/landuse/h30v06.color.png SwiftApps/modis/landuse/h30v07.color.png SwiftApps/modis/landuse/h30v08.color.png SwiftApps/modis/landuse/h30v09.color.png SwiftApps/modis/landuse/h30v10.color.png SwiftApps/modis/landuse/h30v11.color.png SwiftApps/modis/landuse/h30v12.color.png SwiftApps/modis/landuse/h30v13.color.png SwiftApps/modis/landuse/h31v06.color.png SwiftApps/modis/landuse/h31v07.color.png SwiftApps/modis/landuse/h31v08.color.png SwiftApps/modis/landuse/h31v09.color.png SwiftApps/modis/landuse/h31v10.color.png SwiftApps/modis/landuse/h31v11.color.png SwiftApps/modis/landuse/h31v12.color.png SwiftApps/modis/landuse/h31v13.color.png SwiftApps/modis/landuse/h32v07.color.png SwiftApps/modis/landuse/h32v08.color.png SwiftApps/modis/landuse/h32v09.color.png SwiftApps/modis/landuse/h32v10.color.png SwiftApps/modis/landuse/h32v11.color.png SwiftApps/modis/landuse/h32v12.color.png SwiftApps/modis/landuse/h33v07.color.png SwiftApps/modis/landuse/h33v08.color.png SwiftApps/modis/landuse/h33v09.color.png SwiftApps/modis/landuse/h33v10.color.png SwiftApps/modis/landuse/h33v11.color.png SwiftApps/modis/landuse/h34v07.color.png SwiftApps/modis/landuse/h34v08.color.png SwiftApps/modis/landuse/h34v09.color.png SwiftApps/modis/landuse/h34v10.color.png SwiftApps/modis/landuse/h35v08.color.png SwiftApps/modis/landuse/h35v09.color.png SwiftApps/modis/landuse/h35v10.color.png SwiftApps/modis/map.png SwiftApps/modis/markedGrid.gif SwiftApps/modis/modis.swift SwiftApps/modis/modis2.swift SwiftApps/modis/modis3.swift SwiftApps/modis/modis4.swift SwiftApps/modis/modis5.xml SwiftApps/modis/modisp1.swift SwiftApps/modis/mon.png SwiftApps/modis/rundemo.sh SwiftApps/modis/rundemo2.pbs.sh SwiftApps/modis/rundemo2.sh SwiftApps/modis/rundemop1.sh SwiftApps/modis/sico.xml SwiftApps/modis/sites.xml.pas.coasters SwiftApps/modis/tc.pbs SwiftApps/modis/tmp.png SwiftApps/modis/white.png Modified: SwiftApps/modis/demo5.local SwiftApps/modis/sites.local.xml SwiftApps/modis/tc.local Log: Cleaning up modis demo a bit - removing some files, moving others into the old directory Deleted: SwiftApps/modis/MODIS_grid.gif =================================================================== (Binary files differ) Deleted: SwiftApps/modis/coast1.xml =================================================================== --- SwiftApps/modis/coast1.xml 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/coast1.xml 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,191 +0,0 @@ - - - - - 8 - 3500 - 1 - 1 - 1 - - .31 - 10000 - /home/wilde/swiftwork/stomp - - - - - - - - Deleted: SwiftApps/modis/coasters.xml =================================================================== --- SwiftApps/modis/coasters.xml 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/coasters.xml 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,189 +0,0 @@ - - - - - - 8 - 3500 - 1 - 1 - 1 - - - .07 - 10000 - /home/wilde/swiftwork/crush - - - - - 8 - 3500 - 1 - 1 - 1 - - .31 - 10000 - /home/wilde/swiftwork/thwomp - - - - - 8 - 3500 - 1 - 1 - 1 - - .31 - 10000 - /home/wilde/swiftwork/stomp - - - - - 8 - 3500 - 1 - 1 - 1 - - .31 - 10000 - /home/wilde/swiftwork/crush - - - - - 8 - 3500 - 1 - 1 - 1 - - .31 - 10000 - /home/wilde/swiftwork/crank - - - - - 8 - 3500 - 1 - 1 - 1 - - .31 - 10000 - /home/wilde/swiftwork/steamroller - - - - - 8 - 3500 - 1 - 1 - 1 - - .31 - 10000 - /home/wilde/swiftwork/grind - - - - - 8 - 3500 - 1 - 1 - 1 - - .31 - 10000 - /home/wilde/swiftwork/churn - - - - - 8 - 3500 - 1 - 1 - 1 - - .31 - 10000 - /home/wilde/swiftwork/trounce - - - - - 8 - 3500 - 1 - 1 - 1 - - .31 - 10000 - /home/wilde/swiftwork/thrash - - - - - 8 - 3500 - 1 - 1 - 1 - - .31 - 10000 - /home/wilde/swiftwork/vanquish - - - - - Deleted: SwiftApps/modis/demo3 =================================================================== --- SwiftApps/modis/demo3 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/demo3 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,7 +0,0 @@ -swift -tc.file tc.local \ - -sites.file sites.xml \ - modis3.swift -landtype=$1 -nfiles=$2 -nselect=$3 - -exit - -swift -tc.file tc.local -sites.file sites.local.xml modis2.swift -landtype=$1 -nfiles=$2 -nselect=$3 Deleted: SwiftApps/modis/demo4 =================================================================== --- SwiftApps/modis/demo4 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/demo4 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,18 +0,0 @@ -# demo4 forest 50 5 pbs - -landtype=${1:-urban} -nfiles=${2:-50} -nselect=${3:-10} -site=${4:-local} - -runid=modis-$(date +%Y.%m%d.%H%M)-$landtype-$nfiles-$nselect - -echo runid=$runid - -swift -tc.file tc.$site \ - -sites.file sites.xml \ - modis4.swift -landtype=$landtype -nfiles=$nfiles -nselect=$nselect -runid=$runid \ - -MODISdir=/home/wilde/bigdata/data/modis/2002 -webdir=/home/wilde/public_html/geo -exit - -swift -tc.file tc.local -sites.file sites.local.xml modis2.swift -landtype=$1 -nfiles=$2 -nselect=$3 Modified: SwiftApps/modis/demo5.local =================================================================== --- SwiftApps/modis/demo5.local 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/demo5.local 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,20 +1,15 @@ # demo4 forest 50 5 pbs landtype=${1:-urban} -nfiles=${2:-50} +nfiles=${2:-999} nselect=${3:-10} site=${4:-local} -nfiles=30 - runid=modis-$(date +%Y.%m%d.%H%M)-$landtype-$nfiles-$nselect echo runid=$runid -swift -tc.file tc.$site \ - -sites.file sites.xml \ +swift -tc.file tc.local \ + -sites.file sites.local.xml \ modis5.swift -landtype=$landtype -nfiles=$nfiles -nselect=$nselect -runid=$runid \ - -modisdir=/scratch/local/wilde/swift/demo/modis/data/modis/2002 -webdir=/home/wilde/public_html/geo -exit - -swift -tc.file tc.local -sites.file sites.local.xml modis2.swift -landtype=$1 -nfiles=$2 -nselect=$3 + -modisdir=$PWD/data/modis/2002 -webdir=$HOME/public_html/geo Deleted: SwiftApps/modis/demo5.local.out =================================================================== --- SwiftApps/modis/demo5.local.out 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/demo5.local.out 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,86 +0,0 @@ -runid=modis-2011.1201.1026-urban-50-10 -Warning: Function toint is deprecated, at line 37 -Warning: Function toint is deprecated, at line 38 -Swift trunk swift-r5317 cog-r3329 - -RunID: 20111201-1026-yu50voje - (input): found 0 files -Progress: time: Thu, 01 Dec 2011 10:26:08 -0600 -Progress: time: Thu, 01 Dec 2011 10:26:09 -0600 Selecting site:94 Submitting:1 Active:5 -Progress: time: Thu, 01 Dec 2011 10:26:11 -0600 Selecting site:89 Stage in:5 Active:1 Finished successfully:5 -Progress: time: Thu, 01 Dec 2011 10:26:12 -0600 Selecting site:89 Active:5 Checking status:1 Finished successfully:5 -Progress: time: Thu, 01 Dec 2011 10:26:14 -0600 Selecting site:86 Stage in:2 Submitting:1 Active:3 Finished successfully:8 -Progress: time: Thu, 01 Dec 2011 10:26:17 -0600 Selecting site:86 Active:5 Checking status:1 Finished successfully:8 -Progress: time: Thu, 01 Dec 2011 10:26:18 -0600 Selecting site:86 Active:4 Stage out:1 Finished successfully:9 -Progress: time: Thu, 01 Dec 2011 10:26:19 -0600 Selecting site:84 Stage in:1 Submitting:1 Active:4 Finished successfully:10 -Progress: time: Thu, 01 Dec 2011 10:26:20 -0600 Selecting site:84 Active:5 Checking status:1 Finished successfully:10 -Progress: time: Thu, 01 Dec 2011 10:26:22 -0600 Selecting site:83 Stage in:1 Active:4 Finished successfully:12 -Progress: time: Thu, 01 Dec 2011 10:26:25 -0600 Selecting site:81 Active:5 Checking status:1 Finished successfully:13 -Progress: time: Thu, 01 Dec 2011 10:26:28 -0600 Selecting site:80 Submitting:1 Active:5 Finished successfully:14 -Progress: time: Thu, 01 Dec 2011 10:26:30 -0600 Selecting site:80 Active:5 Checking status:1 Finished successfully:14 -Progress: time: Thu, 01 Dec 2011 10:26:31 -0600 Selecting site:78 Stage in:2 Active:2 Stage out:2 Finished successfully:16 -Progress: time: Thu, 01 Dec 2011 10:26:32 -0600 Selecting site:76 Stage in:4 Active:1 Checking status:1 Finished successfully:18 -Progress: time: Thu, 01 Dec 2011 10:26:33 -0600 Selecting site:75 Stage in:2 Submitting:1 Active:3 Finished successfully:19 -Progress: time: Thu, 01 Dec 2011 10:26:38 -0600 Selecting site:74 Active:5 Checking status:1 Finished successfully:20 -Progress: time: Thu, 01 Dec 2011 10:26:39 -0600 Selecting site:72 Stage in:1 Submitting:1 Active:4 Finished successfully:22 -Progress: time: Thu, 01 Dec 2011 10:26:41 -0600 Selecting site:72 Active:5 Checking status:1 Finished successfully:22 -Progress: time: Thu, 01 Dec 2011 10:26:42 -0600 Selecting site:69 Stage in:2 Active:4 Finished successfully:25 -Progress: time: Thu, 01 Dec 2011 10:26:44 -0600 Selecting site:69 Stage in:2 Active:3 Checking status:1 Finished successfully:25 -Progress: time: Thu, 01 Dec 2011 10:26:45 -0600 Selecting site:67 Stage in:1 Active:5 Finished successfully:27 -Progress: time: Thu, 01 Dec 2011 10:26:46 -0600 Selecting site:67 Submitting:1 Active:5 Finished successfully:27 -Progress: time: Thu, 01 Dec 2011 10:26:48 -0600 Selecting site:67 Active:5 Checking status:1 Finished successfully:27 -Progress: time: Thu, 01 Dec 2011 10:26:49 -0600 Selecting site:65 Stage in:2 Active:4 Finished successfully:29 -Progress: time: Thu, 01 Dec 2011 10:26:51 -0600 Selecting site:65 Active:5 Checking status:1 Finished successfully:29 -Progress: time: Thu, 01 Dec 2011 10:26:52 -0600 Selecting site:62 Stage in:2 Active:2 Checking status:1 Stage out:1 Finished successfully:32 -Progress: time: Thu, 01 Dec 2011 10:26:53 -0600 Selecting site:60 Stage in:2 Submitting:1 Active:3 Finished successfully:34 -Progress: time: Thu, 01 Dec 2011 10:26:55 -0600 Selecting site:60 Active:5 Checking status:1 Finished successfully:34 -Progress: time: Thu, 01 Dec 2011 10:27:00 -0600 Selecting site:59 Active:5 Checking status:1 Finished successfully:35 -Progress: time: Thu, 01 Dec 2011 10:27:01 -0600 Selecting site:57 Active:5 Checking status:1 Finished successfully:37 -Progress: time: Thu, 01 Dec 2011 10:27:02 -0600 Selecting site:55 Stage in:1 Active:4 Checking status:1 Finished successfully:39 -Progress: time: Thu, 01 Dec 2011 10:27:03 -0600 Selecting site:54 Stage in:1 Active:4 Checking status:1 Finished successfully:40 -Progress: time: Thu, 01 Dec 2011 10:27:05 -0600 Selecting site:52 Stage in:2 Active:4 Finished successfully:42 -Progress: time: Thu, 01 Dec 2011 10:27:06 -0600 Selecting site:51 Stage in:2 Active:4 Finished successfully:43 -Progress: time: Thu, 01 Dec 2011 10:27:07 -0600 Selecting site:50 Submitting:1 Active:5 Finished successfully:44 -Progress: time: Thu, 01 Dec 2011 10:27:09 -0600 Selecting site:49 Stage in:1 Active:5 Finished successfully:45 -Progress: time: Thu, 01 Dec 2011 10:27:10 -0600 Selecting site:49 Submitting:1 Active:5 Finished successfully:45 -Progress: time: Thu, 01 Dec 2011 10:27:12 -0600 Selecting site:48 Active:5 Checking status:1 Finished successfully:46 -Progress: time: Thu, 01 Dec 2011 10:27:13 -0600 Selecting site:47 Stage in:1 Active:5 Finished successfully:47 -Progress: time: Thu, 01 Dec 2011 10:27:14 -0600 Selecting site:47 Stage in:1 Active:4 Checking status:1 Finished successfully:47 -Progress: time: Thu, 01 Dec 2011 10:27:16 -0600 Selecting site:46 Stage in:1 Submitting:1 Active:4 Finished successfully:48 -Progress: time: Thu, 01 Dec 2011 10:27:17 -0600 Selecting site:46 Active:5 Checking status:1 Finished successfully:48 -Progress: time: Thu, 01 Dec 2011 10:27:18 -0600 Selecting site:45 Active:4 Checking status:1 Stage out:1 Finished successfully:49 -Progress: time: Thu, 01 Dec 2011 10:27:20 -0600 Selecting site:42 Stage in:2 Active:4 Finished successfully:52 -Progress: time: Thu, 01 Dec 2011 10:27:23 -0600 Selecting site:42 Submitting:1 Active:5 Finished successfully:52 -Progress: time: Thu, 01 Dec 2011 10:27:24 -0600 Selecting site:41 Stage in:1 Active:5 Finished successfully:53 -Progress: time: Thu, 01 Dec 2011 10:27:27 -0600 Selecting site:41 Active:5 Checking status:1 Finished successfully:53 -Progress: time: Thu, 01 Dec 2011 10:27:29 -0600 Selecting site:39 Stage in:1 Active:4 Finished successfully:56 -Progress: time: Thu, 01 Dec 2011 10:27:31 -0600 Selecting site:38 Stage in:1 Submitting:1 Active:4 Finished successfully:56 -Progress: time: Thu, 01 Dec 2011 10:27:32 -0600 Selecting site:36 Stage in:2 Active:4 Finished successfully:58 -Progress: time: Thu, 01 Dec 2011 10:27:33 -0600 Selecting site:34 Stage in:4 Active:2 Finished successfully:60 -Progress: time: Thu, 01 Dec 2011 10:27:35 -0600 Selecting site:34 Stage in:1 Active:4 Checking status:1 Finished successfully:60 -Progress: time: Thu, 01 Dec 2011 10:27:36 -0600 Selecting site:30 Stage in:1 Active:5 Finished successfully:64 -Progress: time: Thu, 01 Dec 2011 10:27:37 -0600 Selecting site:29 Active:5 Checking status:1 Finished successfully:65 -Progress: time: Thu, 01 Dec 2011 10:27:38 -0600 Selecting site:24 Submitting:1 Active:4 Finished successfully:71 -Progress: time: Thu, 01 Dec 2011 10:27:40 -0600 Selecting site:22 Active:4 Checking status:1 Stage out:1 Finished successfully:72 -Progress: time: Thu, 01 Dec 2011 10:27:43 -0600 Selecting site:20 Active:5 Checking status:1 Finished successfully:74 -Progress: time: Thu, 01 Dec 2011 10:27:46 -0600 Selecting site:19 Active:5 Checking status:1 Finished successfully:75 -Progress: time: Thu, 01 Dec 2011 10:27:48 -0600 Selecting site:17 Stage in:1 Active:4 Checking status:1 Finished successfully:77 -Progress: time: Thu, 01 Dec 2011 10:27:49 -0600 Selecting site:16 Stage in:1 Active:4 Checking status:1 Finished successfully:78 -Progress: time: Thu, 01 Dec 2011 10:27:50 -0600 Selecting site:15 Active:5 Checking status:1 Finished successfully:79 -Progress: time: Thu, 01 Dec 2011 10:27:52 -0600 Selecting site:14 Active:5 Checking status:1 Finished successfully:80 -Progress: time: Thu, 01 Dec 2011 10:27:54 -0600 Selecting site:12 Stage in:1 Submitting:1 Active:4 Finished successfully:82 -Progress: time: Thu, 01 Dec 2011 10:27:56 -0600 Selecting site:12 Active:5 Checking status:1 Finished successfully:82 -Progress: time: Thu, 01 Dec 2011 10:27:58 -0600 Selecting site:11 Active:5 Checking status:1 Finished successfully:83 -Progress: time: Thu, 01 Dec 2011 10:28:00 -0600 Selecting site:10 Active:5 Checking status:1 Finished successfully:84 -Progress: time: Thu, 01 Dec 2011 10:28:02 -0600 Selecting site:8 Stage in:1 Active:5 Finished successfully:86 -Progress: time: Thu, 01 Dec 2011 10:28:03 -0600 Selecting site:8 Active:5 Checking status:1 Finished successfully:86 -Progress: time: Thu, 01 Dec 2011 10:28:04 -0600 Selecting site:6 Active:5 Checking status:1 Finished successfully:88 -Progress: time: Thu, 01 Dec 2011 10:28:05 -0600 Selecting site:3 Active:5 Finished successfully:92 -Progress: time: Thu, 01 Dec 2011 10:28:06 -0600 Stage in:2 Active:3 Finished successfully:95 -Progress: time: Thu, 01 Dec 2011 10:28:08 -0600 Active:5 Finished successfully:95 -Progress: time: Thu, 01 Dec 2011 10:28:09 -0600 Active:4 Checking status:1 Finished successfully:96 -Progress: time: Thu, 01 Dec 2011 10:28:12 -0600 Active:4 Checking status:1 Finished successfully:97 -Progress: time: Thu, 01 Dec 2011 10:28:15 -0600 Active:1 Checking status:1 Finished successfully:100 -Progress: time: Thu, 01 Dec 2011 10:28:38 -0600 Active:1 Finished successfully:102 -Progress: time: Thu, 01 Dec 2011 10:28:50 -0600 Checking status:1 Finished successfully:102 -Final status: Thu, 01 Dec 2011 10:28:50 -0600 Finished successfully:103 Deleted: SwiftApps/modis/demo5.local.out2 =================================================================== --- SwiftApps/modis/demo5.local.out2 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/demo5.local.out2 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,59 +0,0 @@ -runid=modis-2011.1201.1036-urban-50-10 -Swift trunk swift-r5317 cog-r3329 - -RunID: 20111201-1036-1kclii0a - (input): found 0 files -Progress: time: Thu, 01 Dec 2011 10:36:20 -0600 -Progress: time: Thu, 01 Dec 2011 10:36:22 -0600 Selecting site:89 Active:10 Checking status:1 -Progress: time: Thu, 01 Dec 2011 10:36:23 -0600 Selecting site:88 Submitting:1 Active:10 Finished successfully:1 -Progress: time: Thu, 01 Dec 2011 10:36:28 -0600 Selecting site:86 Active:10 Checking status:1 Finished successfully:3 -Progress: time: Thu, 01 Dec 2011 10:36:30 -0600 Selecting site:85 Active:10 Checking status:1 Finished successfully:4 -Progress: time: Thu, 01 Dec 2011 10:36:36 -0600 Selecting site:84 Active:10 Checking status:1 Finished successfully:5 -Progress: time: Thu, 01 Dec 2011 10:36:37 -0600 Selecting site:83 Stage in:1 Active:10 Finished successfully:6 -Progress: time: Thu, 01 Dec 2011 10:36:38 -0600 Selecting site:81 Stage in:1 Active:10 Finished successfully:8 -Progress: time: Thu, 01 Dec 2011 10:36:39 -0600 Selecting site:81 Submitted:1 Active:9 Finished successfully:9 -Progress: time: Thu, 01 Dec 2011 10:36:41 -0600 Selecting site:79 Stage in:1 Active:10 Finished successfully:10 -Progress: time: Thu, 01 Dec 2011 10:36:42 -0600 Selecting site:79 Active:10 Finished successfully:11 -Progress: time: Thu, 01 Dec 2011 10:36:43 -0600 Selecting site:78 Active:10 Checking status:1 Finished successfully:11 -Progress: time: Thu, 01 Dec 2011 10:36:44 -0600 Selecting site:74 Submitted:2 Active:7 Stage out:2 Finished successfully:15 -Progress: time: Thu, 01 Dec 2011 10:36:47 -0600 Selecting site:72 Active:10 Checking status:1 Finished successfully:17 -Progress: time: Thu, 01 Dec 2011 10:36:48 -0600 Selecting site:69 Submitted:1 Active:10 Finished successfully:20 -Progress: time: Thu, 01 Dec 2011 10:36:49 -0600 Selecting site:65 Active:10 Checking status:1 Finished successfully:24 -Progress: time: Thu, 01 Dec 2011 10:36:51 -0600 Selecting site:64 Active:9 Stage out:1 Finished successfully:26 -Progress: time: Thu, 01 Dec 2011 10:36:55 -0600 Selecting site:61 Stage in:2 Active:7 Stage out:1 Finished successfully:29 -Progress: time: Thu, 01 Dec 2011 10:36:56 -0600 Selecting site:57 Stage in:3 Active:7 Stage out:1 Finished successfully:32 -Progress: time: Thu, 01 Dec 2011 10:36:57 -0600 Selecting site:57 Stage in:3 Active:7 Finished successfully:33 -Progress: time: Thu, 01 Dec 2011 10:36:58 -0600 Selecting site:56 Active:11 Finished successfully:33 -Progress: time: Thu, 01 Dec 2011 10:36:59 -0600 Selecting site:55 Stage in:1 Active:10 Finished successfully:34 -Progress: time: Thu, 01 Dec 2011 10:37:04 -0600 Selecting site:55 Active:10 Checking status:1 Finished successfully:34 -Progress: time: Thu, 01 Dec 2011 10:37:06 -0600 Selecting site:55 Active:10 Finished successfully:35 -Progress: time: Thu, 01 Dec 2011 10:37:08 -0600 Selecting site:51 Active:10 Checking status:1 Finished successfully:38 -Progress: time: Thu, 01 Dec 2011 10:37:12 -0600 Selecting site:50 Active:10 Checking status:1 Finished successfully:39 -Progress: time: Thu, 01 Dec 2011 10:37:14 -0600 Selecting site:49 Active:7 Checking status:1 Stage out:3 Finished successfully:40 -Progress: time: Thu, 01 Dec 2011 10:37:16 -0600 Selecting site:45 Active:10 Checking status:1 Finished successfully:44 -Progress: time: Thu, 01 Dec 2011 10:37:17 -0600 Selecting site:43 Active:10 Checking status:1 Finished successfully:46 -Progress: time: Thu, 01 Dec 2011 10:37:18 -0600 Selecting site:41 Active:11 Finished successfully:48 -Progress: time: Thu, 01 Dec 2011 10:37:21 -0600 Selecting site:41 Active:11 Finished successfully:48 -Progress: time: Thu, 01 Dec 2011 10:37:23 -0600 Selecting site:37 Active:10 Checking status:1 Finished successfully:52 -Progress: time: Thu, 01 Dec 2011 10:37:24 -0600 Selecting site:32 Active:10 Checking status:1 Finished successfully:57 -Progress: time: Thu, 01 Dec 2011 10:37:30 -0600 Selecting site:30 Active:10 Checking status:1 Finished successfully:59 -Progress: time: Thu, 01 Dec 2011 10:37:31 -0600 Selecting site:29 Active:10 Checking status:1 Finished successfully:60 -Progress: time: Thu, 01 Dec 2011 10:37:33 -0600 Selecting site:26 Active:10 Checking status:1 Finished successfully:63 -Progress: time: Thu, 01 Dec 2011 10:37:34 -0600 Selecting site:23 Active:10 Checking status:1 Finished successfully:66 -Progress: time: Thu, 01 Dec 2011 10:37:36 -0600 Selecting site:19 Active:11 Finished successfully:70 -Progress: time: Thu, 01 Dec 2011 10:37:39 -0600 Selecting site:17 Active:10 Checking status:1 Finished successfully:72 -Progress: time: Thu, 01 Dec 2011 10:37:40 -0600 Selecting site:11 Stage in:1 Active:10 Finished successfully:78 -Progress: time: Thu, 01 Dec 2011 10:37:42 -0600 Selecting site:8 Active:10 Checking status:1 Finished successfully:81 -Progress: time: Thu, 01 Dec 2011 10:37:43 -0600 Selecting site:6 Stage in:1 Active:10 Finished successfully:83 -Progress: time: Thu, 01 Dec 2011 10:37:45 -0600 Selecting site:5 Stage in:1 Active:10 Finished successfully:84 -Progress: time: Thu, 01 Dec 2011 10:37:51 -0600 Selecting site:5 Active:11 Finished successfully:84 -Progress: time: Thu, 01 Dec 2011 10:37:52 -0600 Stage in:1 Active:10 Finished successfully:89 -Progress: time: Thu, 01 Dec 2011 10:37:55 -0600 Active:9 Checking status:1 Finished successfully:90 -Progress: time: Thu, 01 Dec 2011 10:37:57 -0600 Active:8 Checking status:1 Finished successfully:93 -Progress: time: Thu, 01 Dec 2011 10:38:01 -0600 Active:7 Checking status:1 Finished successfully:94 -Progress: time: Thu, 01 Dec 2011 10:38:05 -0600 Active:5 Checking status:1 Finished successfully:96 -Progress: time: Thu, 01 Dec 2011 10:38:07 -0600 Active:2 Checking status:1 Finished successfully:99 -Progress: time: Thu, 01 Dec 2011 10:38:09 -0600 Checking status:1 Finished successfully:101 -Progress: time: Thu, 01 Dec 2011 10:38:21 -0600 Active:1 Finished successfully:102 -Progress: time: Thu, 01 Dec 2011 10:38:45 -0600 Checking status:1 Finished successfully:102 -Final status: Thu, 01 Dec 2011 10:38:45 -0600 Finished successfully:103 Deleted: SwiftApps/modis/demo5.local.out3 =================================================================== --- SwiftApps/modis/demo5.local.out3 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/demo5.local.out3 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,371 +0,0 @@ -runid=modis-2011.1201.1149-urban-1000-10 -Swift trunk swift-r5317 cog-r3329 - -RunID: 20111201-1149-v54q9n2a - (input): found 0 files -Progress: time: Thu, 01 Dec 2011 11:49:56 -0600 -Progress: time: Thu, 01 Dec 2011 11:49:57 -0600 Selecting site:623 Stage in:10 Submitting:1 -Progress: time: Thu, 01 Dec 2011 11:49:58 -0600 Selecting site:622 Stage in:1 Active:10 Finished successfully:1 -Progress: time: Thu, 01 Dec 2011 11:50:00 -0600 Selecting site:619 Stage in:1 Submitting:1 Active:8 Stage out:1 Finished successfully:4 -Progress: time: Thu, 01 Dec 2011 11:50:01 -0600 Selecting site:617 Stage in:1 Active:10 Finished successfully:6 -Progress: time: Thu, 01 Dec 2011 11:50:02 -0600 Selecting site:616 Active:10 Checking status:1 Finished successfully:7 -Progress: time: Thu, 01 Dec 2011 11:50:03 -0600 Selecting site:616 Active:10 Finished successfully:8 -Progress: time: Thu, 01 Dec 2011 11:50:06 -0600 Selecting site:614 Stage in:1 Submitting:1 Active:9 Finished successfully:9 -Progress: time: Thu, 01 Dec 2011 11:50:10 -0600 Selecting site:614 Active:10 Checking status:1 Finished successfully:9 -Progress: time: Thu, 01 Dec 2011 11:50:11 -0600 Selecting site:612 Submitting:1 Active:10 Finished successfully:11 -Progress: time: Thu, 01 Dec 2011 11:50:12 -0600 Selecting site:611 Active:10 Stage out:1 Finished successfully:12 -Progress: time: Thu, 01 Dec 2011 11:50:14 -0600 Selecting site:610 Active:10 Checking status:1 Finished successfully:13 -Progress: time: Thu, 01 Dec 2011 11:50:15 -0600 Selecting site:608 Active:10 Checking status:1 Finished successfully:15 -Progress: time: Thu, 01 Dec 2011 11:50:16 -0600 Selecting site:605 Stage in:1 Active:10 Finished successfully:18 -Progress: time: Thu, 01 Dec 2011 11:50:21 -0600 Selecting site:605 Active:10 Checking status:1 Finished successfully:18 -Progress: time: Thu, 01 Dec 2011 11:50:22 -0600 Selecting site:601 Stage in:1 Active:10 Finished successfully:22 -Progress: time: Thu, 01 Dec 2011 11:50:26 -0600 Selecting site:601 Active:11 Finished successfully:22 -Progress: time: Thu, 01 Dec 2011 11:50:27 -0600 Selecting site:598 Stage in:2 Active:9 Finished successfully:25 -Progress: time: Thu, 01 Dec 2011 11:50:29 -0600 Selecting site:598 Submitting:1 Active:10 Finished successfully:25 -Progress: time: Thu, 01 Dec 2011 11:50:31 -0600 Selecting site:597 Active:11 Finished successfully:26 -Progress: time: Thu, 01 Dec 2011 11:50:32 -0600 Selecting site:594 Submitting:1 Active:10 Finished successfully:29 -Progress: time: Thu, 01 Dec 2011 11:50:35 -0600 Selecting site:594 Active:10 Checking status:1 Finished successfully:29 -Progress: time: Thu, 01 Dec 2011 11:50:36 -0600 Selecting site:590 Stage in:1 Active:10 Finished successfully:33 -Progress: time: Thu, 01 Dec 2011 11:50:37 -0600 Selecting site:589 Active:10 Checking status:1 Finished successfully:34 -Progress: time: Thu, 01 Dec 2011 11:50:38 -0600 Selecting site:586 Stage in:1 Active:10 Finished successfully:37 -Progress: time: Thu, 01 Dec 2011 11:50:40 -0600 Selecting site:586 Active:10 Checking status:1 Finished successfully:37 -Progress: time: Thu, 01 Dec 2011 11:50:43 -0600 Selecting site:586 Active:9 Stage out:1 Finished successfully:38 -Progress: time: Thu, 01 Dec 2011 11:50:44 -0600 Selecting site:584 Active:10 Checking status:1 Finished successfully:39 -Progress: time: Thu, 01 Dec 2011 11:50:45 -0600 Selecting site:581 Active:10 Finished successfully:43 -Progress: time: Thu, 01 Dec 2011 11:50:47 -0600 Selecting site:579 Stage in:1 Submitting:1 Active:9 Finished successfully:44 -Progress: time: Thu, 01 Dec 2011 11:50:50 -0600 Selecting site:578 Active:10 Checking status:1 Finished successfully:45 -Progress: time: Thu, 01 Dec 2011 11:50:52 -0600 Selecting site:577 Active:10 Checking status:1 Finished successfully:46 -Progress: time: Thu, 01 Dec 2011 11:50:53 -0600 Selecting site:575 Stage in:1 Active:10 Finished successfully:48 -Progress: time: Thu, 01 Dec 2011 11:50:54 -0600 Selecting site:574 Stage in:1 Active:10 Finished successfully:49 -Progress: time: Thu, 01 Dec 2011 11:50:55 -0600 Selecting site:573 Active:10 Finished successfully:51 -Progress: time: Thu, 01 Dec 2011 11:51:06 -0600 Selecting site:572 Active:10 Checking status:1 Finished successfully:51 -Progress: time: Thu, 01 Dec 2011 11:51:09 -0600 Selecting site:568 Submitting:1 Active:10 Finished successfully:55 -Progress: time: Thu, 01 Dec 2011 11:51:14 -0600 Selecting site:568 Active:10 Checking status:1 Finished successfully:55 -Progress: time: Thu, 01 Dec 2011 11:51:16 -0600 Selecting site:567 Active:10 Checking status:1 Finished successfully:56 -Progress: time: Thu, 01 Dec 2011 11:51:19 -0600 Selecting site:566 Active:10 Checking status:1 Finished successfully:57 -Progress: time: Thu, 01 Dec 2011 11:51:20 -0600 Selecting site:563 Stage in:1 Active:10 Finished successfully:60 -Progress: time: Thu, 01 Dec 2011 11:51:21 -0600 Selecting site:563 Active:10 Checking status:1 Finished successfully:60 -Progress: time: Thu, 01 Dec 2011 11:51:23 -0600 Selecting site:560 Submitted:2 Active:8 Checking status:1 Finished successfully:63 -Progress: time: Thu, 01 Dec 2011 11:51:26 -0600 Selecting site:558 Active:11 Finished successfully:65 -Progress: time: Thu, 01 Dec 2011 11:51:27 -0600 Selecting site:558 Active:10 Checking status:1 Finished successfully:65 -Progress: time: Thu, 01 Dec 2011 11:51:30 -0600 Selecting site:556 Active:10 Checking status:1 Finished successfully:67 -Progress: time: Thu, 01 Dec 2011 11:51:32 -0600 Selecting site:555 Active:10 Checking status:1 Finished successfully:68 -Progress: time: Thu, 01 Dec 2011 11:51:33 -0600 Selecting site:553 Active:10 Finished successfully:71 -Progress: time: Thu, 01 Dec 2011 11:51:34 -0600 Selecting site:550 Active:10 Checking status:1 Finished successfully:73 -Progress: time: Thu, 01 Dec 2011 11:51:35 -0600 Selecting site:546 Stage in:3 Submitted:1 Active:7 Finished successfully:77 -Progress: time: Thu, 01 Dec 2011 11:51:37 -0600 Selecting site:544 Stage in:5 Active:6 Finished successfully:79 -Progress: time: Thu, 01 Dec 2011 11:51:38 -0600 Selecting site:542 Active:10 Checking status:1 Finished successfully:81 -Progress: time: Thu, 01 Dec 2011 11:51:40 -0600 Selecting site:539 Stage in:1 Active:10 Finished successfully:84 -Progress: time: Thu, 01 Dec 2011 11:51:48 -0600 Selecting site:536 Active:10 Checking status:1 Finished successfully:87 -Progress: time: Thu, 01 Dec 2011 11:51:49 -0600 Selecting site:532 Stage in:1 Active:9 Checking status:1 Finished successfully:91 -Progress: time: Thu, 01 Dec 2011 11:51:51 -0600 Selecting site:531 Stage in:1 Submitting:1 Active:9 Finished successfully:92 -Progress: time: Thu, 01 Dec 2011 11:51:52 -0600 Selecting site:531 Active:10 Checking status:1 Finished successfully:92 -Progress: time: Thu, 01 Dec 2011 11:51:53 -0600 Selecting site:530 Active:10 Checking status:1 Finished successfully:93 -Progress: time: Thu, 01 Dec 2011 11:51:54 -0600 Selecting site:529 Active:10 Checking status:1 Finished successfully:94 -Progress: time: Thu, 01 Dec 2011 11:51:56 -0600 Selecting site:528 Active:11 Finished successfully:95 -Progress: time: Thu, 01 Dec 2011 11:51:58 -0600 Selecting site:528 Active:10 Checking status:1 Finished successfully:95 -Progress: time: Thu, 01 Dec 2011 11:51:59 -0600 Selecting site:526 Active:10 Checking status:1 Finished successfully:97 -Progress: time: Thu, 01 Dec 2011 11:52:00 -0600 Selecting site:525 Active:10 Finished successfully:99 -Progress: time: Thu, 01 Dec 2011 11:52:02 -0600 Selecting site:523 Submitting:1 Active:10 Finished successfully:100 -Progress: time: Thu, 01 Dec 2011 11:52:04 -0600 Selecting site:523 Active:10 Checking status:1 Finished successfully:100 -Progress: time: Thu, 01 Dec 2011 11:52:06 -0600 Selecting site:520 Stage in:1 Active:10 Finished successfully:103 -Progress: time: Thu, 01 Dec 2011 11:52:08 -0600 Selecting site:520 Active:10 Checking status:1 Finished successfully:103 -Progress: time: Thu, 01 Dec 2011 11:52:10 -0600 Selecting site:517 Active:10 Checking status:1 Finished successfully:106 -Progress: time: Thu, 01 Dec 2011 11:52:11 -0600 Selecting site:516 Active:11 Finished successfully:107 -Progress: time: Thu, 01 Dec 2011 11:52:14 -0600 Selecting site:516 Active:10 Checking status:1 Finished successfully:107 -Progress: time: Thu, 01 Dec 2011 11:52:16 -0600 Selecting site:514 Stage in:1 Active:10 Finished successfully:109 -Progress: time: Thu, 01 Dec 2011 11:52:17 -0600 Selecting site:514 Active:9 Checking status:1 Finished successfully:110 -Progress: time: Thu, 01 Dec 2011 11:52:19 -0600 Selecting site:512 Active:10 Checking status:1 Finished successfully:111 -Progress: time: Thu, 01 Dec 2011 11:52:21 -0600 Selecting site:510 Stage in:1 Active:10 Finished successfully:113 -Progress: time: Thu, 01 Dec 2011 11:52:23 -0600 Selecting site:510 Active:10 Checking status:1 Finished successfully:113 -Progress: time: Thu, 01 Dec 2011 11:52:25 -0600 Selecting site:507 Active:10 Checking status:1 Finished successfully:116 -Progress: time: Thu, 01 Dec 2011 11:52:26 -0600 Selecting site:506 Active:11 Finished successfully:117 -Progress: time: Thu, 01 Dec 2011 11:52:37 -0600 Selecting site:506 Active:10 Checking status:1 Finished successfully:117 -Progress: time: Thu, 01 Dec 2011 11:52:38 -0600 Selecting site:503 Stage in:1 Active:9 Checking status:1 Finished successfully:120 -Progress: time: Thu, 01 Dec 2011 11:52:40 -0600 Selecting site:500 Stage in:4 Active:7 Finished successfully:123 -Progress: time: Thu, 01 Dec 2011 11:52:42 -0600 Selecting site:499 Active:10 Checking status:1 Finished successfully:124 -Progress: time: Thu, 01 Dec 2011 11:52:43 -0600 Selecting site:496 Active:10 Checking status:1 Finished successfully:127 -Progress: time: Thu, 01 Dec 2011 11:52:45 -0600 Selecting site:494 Stage in:2 Active:9 Finished successfully:129 -Progress: time: Thu, 01 Dec 2011 11:52:47 -0600 Selecting site:493 Submitting:1 Active:10 Finished successfully:130 -Progress: time: Thu, 01 Dec 2011 11:52:49 -0600 Selecting site:493 Active:10 Checking status:1 Finished successfully:130 -Progress: time: Thu, 01 Dec 2011 11:52:51 -0600 Selecting site:492 Active:10 Checking status:1 Finished successfully:131 -Progress: time: Thu, 01 Dec 2011 11:52:56 -0600 Selecting site:490 Active:11 Finished successfully:133 -Progress: time: Thu, 01 Dec 2011 11:52:59 -0600 Selecting site:490 Active:10 Checking status:1 Finished successfully:133 -Progress: time: Thu, 01 Dec 2011 11:53:00 -0600 Selecting site:486 Submitted:1 Active:10 Finished successfully:137 -Progress: time: Thu, 01 Dec 2011 11:53:02 -0600 Selecting site:486 Active:10 Checking status:1 Finished successfully:137 -Progress: time: Thu, 01 Dec 2011 11:53:03 -0600 Selecting site:483 Active:10 Checking status:1 Finished successfully:140 -Progress: time: Thu, 01 Dec 2011 11:53:05 -0600 Selecting site:482 Active:10 Checking status:1 Finished successfully:141 -Progress: time: Thu, 01 Dec 2011 11:53:06 -0600 Selecting site:479 Stage in:1 Active:10 Finished successfully:144 -Progress: time: Thu, 01 Dec 2011 11:53:07 -0600 Selecting site:478 Active:10 Checking status:1 Finished successfully:145 -Progress: time: Thu, 01 Dec 2011 11:53:08 -0600 Selecting site:477 Active:10 Checking status:1 Finished successfully:146 -Progress: time: Thu, 01 Dec 2011 11:53:10 -0600 Selecting site:476 Active:10 Checking status:1 Finished successfully:147 -Progress: time: Thu, 01 Dec 2011 11:53:14 -0600 Selecting site:475 Active:10 Checking status:1 Finished successfully:148 -Progress: time: Thu, 01 Dec 2011 11:53:20 -0600 Selecting site:474 Active:10 Checking status:1 Finished successfully:149 -Progress: time: Thu, 01 Dec 2011 11:53:21 -0600 Selecting site:472 Active:10 Finished successfully:152 -Progress: time: Thu, 01 Dec 2011 11:53:24 -0600 Selecting site:468 Active:10 Checking status:1 Finished successfully:155 -Progress: time: Thu, 01 Dec 2011 11:53:26 -0600 Selecting site:465 Active:10 Checking status:1 Finished successfully:158 -Progress: time: Thu, 01 Dec 2011 11:53:29 -0600 Selecting site:464 Active:10 Checking status:1 Finished successfully:159 -Progress: time: Thu, 01 Dec 2011 11:53:30 -0600 Selecting site:460 Submitting:1 Submitted:1 Active:9 Finished successfully:163 -Progress: time: Thu, 01 Dec 2011 11:53:31 -0600 Selecting site:459 Active:9 Checking status:1 Finished successfully:165 -Progress: time: Thu, 01 Dec 2011 11:53:33 -0600 Selecting site:457 Active:10 Checking status:1 Finished successfully:166 -Progress: time: Thu, 01 Dec 2011 11:53:34 -0600 Selecting site:455 Stage in:1 Active:10 Finished successfully:168 -Progress: time: Thu, 01 Dec 2011 11:53:40 -0600 Selecting site:455 Active:10 Checking status:1 Finished successfully:168 -Progress: time: Thu, 01 Dec 2011 11:53:46 -0600 Selecting site:454 Active:10 Checking status:1 Finished successfully:169 -Progress: time: Thu, 01 Dec 2011 11:53:47 -0600 Selecting site:453 Active:9 Stage out:1 Finished successfully:171 -Progress: time: Thu, 01 Dec 2011 11:53:50 -0600 Selecting site:450 Active:10 Checking status:1 Finished successfully:173 -Progress: time: Thu, 01 Dec 2011 11:53:56 -0600 Selecting site:449 Active:11 Finished successfully:174 -Progress: time: Thu, 01 Dec 2011 11:53:57 -0600 Selecting site:448 Stage in:1 Active:10 Finished successfully:175 -Progress: time: Thu, 01 Dec 2011 11:54:02 -0600 Selecting site:448 Active:10 Checking status:1 Finished successfully:175 -Progress: time: Thu, 01 Dec 2011 11:54:03 -0600 Selecting site:446 Submitting:1 Active:9 Stage out:1 Finished successfully:177 -Progress: time: Thu, 01 Dec 2011 11:54:05 -0600 Selecting site:445 Active:10 Checking status:1 Finished successfully:178 -Progress: time: Thu, 01 Dec 2011 11:54:06 -0600 Selecting site:443 Stage in:1 Active:10 Finished successfully:180 -Progress: time: Thu, 01 Dec 2011 11:54:07 -0600 Selecting site:442 Stage in:2 Active:8 Checking status:1 Finished successfully:181 -Progress: time: Thu, 01 Dec 2011 11:54:08 -0600 Selecting site:441 Stage in:2 Submitting:1 Active:8 Finished successfully:182 -Progress: time: Thu, 01 Dec 2011 11:54:15 -0600 Selecting site:441 Active:10 Checking status:1 Finished successfully:182 -Progress: time: Thu, 01 Dec 2011 11:54:16 -0600 Selecting site:437 Submitted:1 Active:10 Finished successfully:186 -Progress: time: Thu, 01 Dec 2011 11:54:20 -0600 Selecting site:437 Active:10 Checking status:1 Finished successfully:186 -Progress: time: Thu, 01 Dec 2011 11:54:22 -0600 Selecting site:435 Stage in:1 Active:10 Finished successfully:188 -Progress: time: Thu, 01 Dec 2011 11:54:23 -0600 Selecting site:435 Active:11 Finished successfully:188 -Progress: time: Thu, 01 Dec 2011 11:54:26 -0600 Selecting site:434 Active:10 Checking status:1 Finished successfully:189 -Progress: time: Thu, 01 Dec 2011 11:54:36 -0600 Selecting site:433 Active:10 Checking status:1 Finished successfully:190 -Progress: time: Thu, 01 Dec 2011 11:54:43 -0600 Selecting site:429 Active:10 Checking status:1 Finished successfully:194 -Progress: time: Thu, 01 Dec 2011 11:54:44 -0600 Selecting site:428 Stage in:1 Active:10 Finished successfully:195 -Progress: time: Thu, 01 Dec 2011 11:54:46 -0600 Selecting site:427 Active:10 Checking status:1 Finished successfully:196 -Progress: time: Thu, 01 Dec 2011 11:54:52 -0600 Selecting site:426 Active:10 Checking status:1 Finished successfully:197 -Progress: time: Thu, 01 Dec 2011 11:54:55 -0600 Selecting site:424 Submitting:1 Active:10 Finished successfully:199 -Progress: time: Thu, 01 Dec 2011 11:54:56 -0600 Selecting site:421 Submitted:1 Active:10 Finished successfully:202 -Progress: time: Thu, 01 Dec 2011 11:54:59 -0600 Selecting site:421 Active:10 Checking status:1 Finished successfully:202 -Progress: time: Thu, 01 Dec 2011 11:55:01 -0600 Selecting site:421 Active:9 Checking status:1 Finished successfully:203 -Progress: time: Thu, 01 Dec 2011 11:55:03 -0600 Selecting site:417 Active:10 Checking status:1 Finished successfully:206 -Progress: time: Thu, 01 Dec 2011 11:55:10 -0600 Selecting site:416 Active:10 Checking status:1 Finished successfully:207 -Progress: time: Thu, 01 Dec 2011 11:55:12 -0600 Selecting site:415 Active:10 Checking status:1 Finished successfully:208 -Progress: time: Thu, 01 Dec 2011 11:55:15 -0600 Selecting site:414 Active:10 Checking status:1 Finished successfully:209 -Progress: time: Thu, 01 Dec 2011 11:55:16 -0600 Selecting site:412 Active:9 Checking status:1 Finished successfully:212 -Progress: time: Thu, 01 Dec 2011 11:55:17 -0600 Selecting site:409 Active:11 Finished successfully:214 -Progress: time: Thu, 01 Dec 2011 11:55:19 -0600 Selecting site:409 Active:10 Checking status:1 Finished successfully:214 -Progress: time: Thu, 01 Dec 2011 11:55:22 -0600 Selecting site:408 Active:10 Checking status:1 Finished successfully:215 -Progress: time: Thu, 01 Dec 2011 11:55:24 -0600 Selecting site:406 Active:10 Checking status:1 Finished successfully:217 -Progress: time: Thu, 01 Dec 2011 11:55:25 -0600 Selecting site:404 Active:10 Checking status:1 Finished successfully:219 -Progress: time: Thu, 01 Dec 2011 11:55:27 -0600 Selecting site:403 Active:10 Checking status:1 Finished successfully:220 -Progress: time: Thu, 01 Dec 2011 11:55:28 -0600 Selecting site:401 Submitting:1 Active:10 Finished successfully:222 -Progress: time: Thu, 01 Dec 2011 11:55:30 -0600 Selecting site:400 Active:10 Checking status:1 Finished successfully:223 -Progress: time: Thu, 01 Dec 2011 11:55:32 -0600 Selecting site:398 Stage in:1 Active:10 Finished successfully:225 -Progress: time: Thu, 01 Dec 2011 11:55:33 -0600 Selecting site:398 Active:11 Finished successfully:225 -Progress: time: Thu, 01 Dec 2011 11:55:34 -0600 Selecting site:397 Active:10 Checking status:1 Finished successfully:226 -Progress: time: Thu, 01 Dec 2011 11:55:36 -0600 Selecting site:396 Active:10 Checking status:1 Finished successfully:227 -Progress: time: Thu, 01 Dec 2011 11:55:39 -0600 Selecting site:395 Active:10 Checking status:1 Finished successfully:228 -Progress: time: Thu, 01 Dec 2011 11:55:41 -0600 Selecting site:393 Stage in:1 Active:10 Finished successfully:230 -Progress: time: Thu, 01 Dec 2011 11:55:42 -0600 Selecting site:392 Active:10 Checking status:1 Finished successfully:231 -Progress: time: Thu, 01 Dec 2011 11:55:43 -0600 Selecting site:391 Active:11 Finished successfully:232 -Progress: time: Thu, 01 Dec 2011 11:55:54 -0600 Selecting site:389 Active:10 Checking status:1 Finished successfully:234 -Progress: time: Thu, 01 Dec 2011 11:55:56 -0600 Selecting site:387 Active:11 Finished successfully:236 -Progress: time: Thu, 01 Dec 2011 11:55:59 -0600 Selecting site:387 Active:10 Checking status:1 Finished successfully:236 -Progress: time: Thu, 01 Dec 2011 11:56:00 -0600 Selecting site:386 Stage in:1 Active:9 Stage out:1 Finished successfully:237 -Progress: time: Thu, 01 Dec 2011 11:56:01 -0600 Selecting site:380 Active:11 Finished successfully:243 -Progress: time: Thu, 01 Dec 2011 11:56:03 -0600 Selecting site:380 Active:10 Checking status:1 Finished successfully:243 -Progress: time: Thu, 01 Dec 2011 11:56:04 -0600 Selecting site:378 Stage in:1 Active:10 Finished successfully:245 -Progress: time: Thu, 01 Dec 2011 11:56:08 -0600 Selecting site:378 Active:10 Checking status:1 Finished successfully:245 -Progress: time: Thu, 01 Dec 2011 11:56:13 -0600 Selecting site:376 Active:10 Checking status:1 Finished successfully:247 -Progress: time: Thu, 01 Dec 2011 11:56:16 -0600 Selecting site:374 Active:10 Checking status:1 Finished successfully:249 -Progress: time: Thu, 01 Dec 2011 11:56:18 -0600 Selecting site:373 Stage in:1 Active:9 Checking status:1 Finished successfully:250 -Progress: time: Thu, 01 Dec 2011 11:56:19 -0600 Selecting site:372 Stage in:1 Submitting:1 Active:9 Finished successfully:251 -Progress: time: Thu, 01 Dec 2011 11:56:20 -0600 Selecting site:372 Active:11 Finished successfully:251 -Progress: time: Thu, 01 Dec 2011 11:56:25 -0600 Selecting site:372 Active:10 Checking status:1 Finished successfully:251 -Progress: time: Thu, 01 Dec 2011 11:56:27 -0600 Selecting site:367 Stage in:1 Active:9 Checking status:1 Finished successfully:256 -Progress: time: Thu, 01 Dec 2011 11:56:28 -0600 Selecting site:366 Active:10 Checking status:1 Finished successfully:257 -Progress: time: Thu, 01 Dec 2011 11:56:30 -0600 Selecting site:365 Active:10 Checking status:1 Finished successfully:258 -Progress: time: Thu, 01 Dec 2011 11:56:33 -0600 Selecting site:364 Active:10 Checking status:1 Finished successfully:259 -Progress: time: Thu, 01 Dec 2011 11:56:35 -0600 Selecting site:360 Stage in:2 Active:8 Checking status:1 Finished successfully:263 -Progress: time: Thu, 01 Dec 2011 11:56:37 -0600 Selecting site:359 Stage in:1 Submitting:1 Active:9 Finished successfully:264 -Progress: time: Thu, 01 Dec 2011 11:56:38 -0600 Selecting site:359 Stage in:1 Active:8 Checking status:1 Finished successfully:265 -Progress: time: Thu, 01 Dec 2011 11:56:40 -0600 Selecting site:357 Stage in:2 Active:8 Checking status:1 Finished successfully:266 -Progress: time: Thu, 01 Dec 2011 11:56:42 -0600 Selecting site:356 Stage in:1 Submitting:1 Active:9 Finished successfully:267 -Progress: time: Thu, 01 Dec 2011 11:56:46 -0600 Selecting site:356 Submitting:1 Active:10 Finished successfully:267 -Progress: time: Thu, 01 Dec 2011 11:56:51 -0600 Selecting site:356 Active:10 Checking status:1 Finished successfully:267 -Progress: time: Thu, 01 Dec 2011 11:56:52 -0600 Selecting site:355 Stage in:1 Active:10 Finished successfully:268 -Progress: time: Thu, 01 Dec 2011 11:56:56 -0600 Selecting site:355 Active:11 Finished successfully:268 -Progress: time: Thu, 01 Dec 2011 11:56:57 -0600 Selecting site:355 Active:10 Checking status:1 Finished successfully:268 -Progress: time: Thu, 01 Dec 2011 11:56:59 -0600 Selecting site:351 Stage in:1 Active:10 Finished successfully:272 -Progress: time: Thu, 01 Dec 2011 11:57:01 -0600 Selecting site:351 Stage in:1 Active:9 Checking status:1 Finished successfully:272 -Progress: time: Thu, 01 Dec 2011 11:57:04 -0600 Selecting site:348 Stage in:2 Active:8 Checking status:1 Finished successfully:275 -Progress: time: Thu, 01 Dec 2011 11:57:11 -0600 Selecting site:345 Stage in:1 Submitting:1 Active:9 Finished successfully:278 -Progress: time: Thu, 01 Dec 2011 11:57:14 -0600 Selecting site:345 Active:10 Checking status:1 Finished successfully:278 -Progress: time: Thu, 01 Dec 2011 11:57:15 -0600 Selecting site:343 Active:10 Checking status:1 Finished successfully:280 -Progress: time: Thu, 01 Dec 2011 11:57:18 -0600 Selecting site:341 Active:10 Checking status:1 Finished successfully:282 -Progress: time: Thu, 01 Dec 2011 11:57:26 -0600 Selecting site:340 Active:11 Finished successfully:283 -Progress: time: Thu, 01 Dec 2011 11:57:27 -0600 Selecting site:340 Active:10 Checking status:1 Finished successfully:283 -Progress: time: Thu, 01 Dec 2011 11:57:28 -0600 Selecting site:337 Active:10 Checking status:1 Finished successfully:286 -Progress: time: Thu, 01 Dec 2011 11:57:29 -0600 Selecting site:336 Active:10 Checking status:1 Finished successfully:287 -Progress: time: Thu, 01 Dec 2011 11:57:32 -0600 Selecting site:335 Stage in:1 Active:9 Checking status:1 Finished successfully:288 -Progress: time: Thu, 01 Dec 2011 11:57:35 -0600 Selecting site:334 Submitting:1 Active:10 Finished successfully:289 -Progress: time: Thu, 01 Dec 2011 11:57:36 -0600 Selecting site:334 Active:11 Finished successfully:289 -Progress: time: Thu, 01 Dec 2011 11:57:37 -0600 Selecting site:334 Active:8 Stage out:2 Finished successfully:290 -Progress: time: Thu, 01 Dec 2011 11:57:41 -0600 Selecting site:331 Stage in:2 Active:8 Checking status:1 Finished successfully:292 -Progress: time: Thu, 01 Dec 2011 11:57:42 -0600 Selecting site:330 Submitting:1 Active:10 Finished successfully:293 -Progress: time: Thu, 01 Dec 2011 11:57:43 -0600 Selecting site:329 Stage in:1 Active:10 Finished successfully:294 -Progress: time: Thu, 01 Dec 2011 11:57:46 -0600 Selecting site:329 Active:10 Checking status:1 Finished successfully:294 -Progress: time: Thu, 01 Dec 2011 11:57:48 -0600 Selecting site:328 Stage in:1 Active:9 Checking status:1 Finished successfully:295 -Progress: time: Thu, 01 Dec 2011 11:57:49 -0600 Selecting site:325 Stage in:2 Active:9 Finished successfully:298 -Progress: time: Thu, 01 Dec 2011 11:57:51 -0600 Selecting site:323 Stage in:1 Submitting:1 Active:9 Finished successfully:300 -Progress: time: Thu, 01 Dec 2011 11:57:52 -0600 Selecting site:323 Active:10 Checking status:1 Finished successfully:300 -Progress: time: Thu, 01 Dec 2011 11:57:53 -0600 Selecting site:322 Stage in:1 Active:9 Checking status:1 Finished successfully:301 -Progress: time: Thu, 01 Dec 2011 11:57:54 -0600 Selecting site:321 Stage in:1 Active:10 Finished successfully:302 -Progress: time: Thu, 01 Dec 2011 11:57:55 -0600 Selecting site:321 Submitting:1 Active:10 Finished successfully:302 -Progress: time: Thu, 01 Dec 2011 11:57:57 -0600 Selecting site:321 Active:10 Checking status:1 Finished successfully:302 -Progress: time: Thu, 01 Dec 2011 11:58:02 -0600 Selecting site:317 Stage in:3 Submitting:1 Active:7 Finished successfully:306 -Progress: time: Thu, 01 Dec 2011 11:58:04 -0600 Selecting site:317 Stage in:3 Active:7 Checking status:1 Finished successfully:306 -Progress: time: Thu, 01 Dec 2011 11:58:06 -0600 Selecting site:316 Active:10 Checking status:1 Finished successfully:307 -Progress: time: Thu, 01 Dec 2011 11:58:10 -0600 Selecting site:314 Stage in:1 Active:9 Checking status:1 Finished successfully:309 -Progress: time: Thu, 01 Dec 2011 11:58:11 -0600 Selecting site:312 Stage in:3 Active:7 Finished successfully:312 -Progress: time: Thu, 01 Dec 2011 11:58:14 -0600 Selecting site:311 Stage in:4 Active:6 Checking status:1 Finished successfully:312 -Progress: time: Thu, 01 Dec 2011 11:58:16 -0600 Selecting site:310 Stage in:4 Submitted:1 Active:5 Stage out:1 Finished successfully:313 -Progress: time: Thu, 01 Dec 2011 11:58:17 -0600 Selecting site:309 Stage in:3 Submitting:1 Active:7 Finished successfully:314 -Progress: time: Thu, 01 Dec 2011 11:58:20 -0600 Selecting site:309 Active:10 Checking status:1 Finished successfully:314 -Progress: time: Thu, 01 Dec 2011 11:58:22 -0600 Selecting site:307 Stage in:2 Active:8 Checking status:1 Finished successfully:316 -Progress: time: Thu, 01 Dec 2011 11:58:23 -0600 Selecting site:305 Stage in:3 Active:7 Checking status:1 Finished successfully:318 -Progress: time: Thu, 01 Dec 2011 11:58:25 -0600 Selecting site:304 Stage in:3 Submitting:1 Active:7 Finished successfully:319 -Progress: time: Thu, 01 Dec 2011 11:58:26 -0600 Selecting site:304 Stage in:2 Submitting:1 Active:7 Finished successfully:320 -Progress: time: Thu, 01 Dec 2011 11:58:28 -0600 Selecting site:303 Stage in:2 Submitting:1 Active:8 Finished successfully:320 -Progress: time: Thu, 01 Dec 2011 11:58:30 -0600 Selecting site:303 Active:10 Checking status:1 Finished successfully:320 -Progress: time: Thu, 01 Dec 2011 11:58:33 -0600 Selecting site:301 Submitting:1 Active:10 Finished successfully:322 -Progress: time: Thu, 01 Dec 2011 11:58:35 -0600 Selecting site:301 Active:10 Checking status:1 Finished successfully:322 -Progress: time: Thu, 01 Dec 2011 11:58:37 -0600 Selecting site:300 Active:10 Checking status:1 Finished successfully:323 -Progress: time: Thu, 01 Dec 2011 11:58:42 -0600 Selecting site:298 Stage in:1 Submitting:1 Active:9 Finished successfully:325 -Progress: time: Thu, 01 Dec 2011 11:58:43 -0600 Selecting site:298 Submitting:1 Active:10 Finished successfully:325 -Progress: time: Thu, 01 Dec 2011 11:58:46 -0600 Selecting site:298 Active:10 Checking status:1 Finished successfully:325 -Progress: time: Thu, 01 Dec 2011 11:58:48 -0600 Selecting site:297 Stage in:1 Active:9 Checking status:1 Finished successfully:326 -Progress: time: Thu, 01 Dec 2011 11:58:50 -0600 Selecting site:297 Stage in:1 Active:8 Checking status:1 Finished successfully:327 -Progress: time: Thu, 01 Dec 2011 11:58:51 -0600 Selecting site:293 Stage in:1 Submitting:1 Active:9 Finished successfully:330 -Progress: time: Thu, 01 Dec 2011 11:58:52 -0600 Selecting site:292 Stage in:1 Active:10 Finished successfully:331 -Progress: time: Thu, 01 Dec 2011 11:58:53 -0600 Selecting site:290 Stage in:3 Active:8 Finished successfully:333 -Progress: time: Thu, 01 Dec 2011 11:58:56 -0600 Selecting site:290 Stage in:2 Active:8 Stage out:1 Finished successfully:333 -Progress: time: Thu, 01 Dec 2011 11:58:58 -0600 Selecting site:288 Stage in:2 Submitting:1 Active:8 Finished successfully:335 -Progress: time: Thu, 01 Dec 2011 11:58:59 -0600 Selecting site:288 Stage in:1 Active:9 Checking status:1 Finished successfully:335 -Progress: time: Thu, 01 Dec 2011 11:59:03 -0600 Selecting site:287 Submitting:1 Active:10 Finished successfully:336 -Progress: time: Thu, 01 Dec 2011 11:59:06 -0600 Selecting site:287 Active:10 Checking status:1 Finished successfully:336 -Progress: time: Thu, 01 Dec 2011 11:59:15 -0600 Selecting site:286 Active:10 Checking status:1 Finished successfully:337 -Progress: time: Thu, 01 Dec 2011 11:59:18 -0600 Selecting site:285 Active:10 Checking status:1 Finished successfully:338 -Progress: time: Thu, 01 Dec 2011 11:59:22 -0600 Selecting site:283 Stage in:1 Active:9 Checking status:1 Finished successfully:340 -Progress: time: Thu, 01 Dec 2011 11:59:23 -0600 Selecting site:280 Stage in:3 Active:8 Finished successfully:343 -Progress: time: Thu, 01 Dec 2011 11:59:25 -0600 Selecting site:280 Stage in:2 Submitting:1 Active:8 Finished successfully:343 -Progress: time: Thu, 01 Dec 2011 11:59:26 -0600 Selecting site:280 Active:10 Checking status:1 Finished successfully:343 -Progress: time: Thu, 01 Dec 2011 11:59:31 -0600 Selecting site:279 Active:10 Checking status:1 Finished successfully:344 -Progress: time: Thu, 01 Dec 2011 11:59:32 -0600 Selecting site:276 Stage in:1 Active:10 Finished successfully:347 -Progress: time: Thu, 01 Dec 2011 11:59:33 -0600 Selecting site:276 Active:10 Checking status:1 Finished successfully:347 -Progress: time: Thu, 01 Dec 2011 11:59:37 -0600 Selecting site:275 Active:10 Checking status:1 Finished successfully:348 -Progress: time: Thu, 01 Dec 2011 11:59:38 -0600 Selecting site:273 Stage in:2 Active:8 Checking status:1 Finished successfully:350 -Progress: time: Thu, 01 Dec 2011 11:59:43 -0600 Selecting site:272 Stage in:2 Submitting:1 Active:8 Finished successfully:351 -Progress: time: Thu, 01 Dec 2011 11:59:45 -0600 Selecting site:272 Stage in:1 Submitting:1 Active:9 Finished successfully:351 -Progress: time: Thu, 01 Dec 2011 11:59:48 -0600 Selecting site:272 Stage in:1 Active:9 Checking status:1 Finished successfully:351 -Progress: time: Thu, 01 Dec 2011 11:59:49 -0600 Selecting site:269 Stage in:3 Active:8 Finished successfully:354 -Progress: time: Thu, 01 Dec 2011 11:59:50 -0600 Selecting site:268 Stage in:1 Submitting:1 Active:9 Finished successfully:355 -Progress: time: Thu, 01 Dec 2011 11:59:51 -0600 Selecting site:268 Active:10 Checking status:1 Finished successfully:355 -Progress: time: Thu, 01 Dec 2011 11:59:53 -0600 Selecting site:267 Active:10 Checking status:1 Finished successfully:356 -Progress: time: Thu, 01 Dec 2011 11:59:56 -0600 Selecting site:265 Stage in:1 Submitting:1 Active:9 Finished successfully:358 -Progress: time: Thu, 01 Dec 2011 11:59:57 -0600 Selecting site:263 Stage in:2 Active:9 Finished successfully:360 -Progress: time: Thu, 01 Dec 2011 11:59:59 -0600 Selecting site:263 Stage in:1 Active:9 Checking status:1 Finished successfully:360 -Progress: time: Thu, 01 Dec 2011 12:00:02 -0600 Selecting site:262 Stage in:1 Active:9 Checking status:1 Finished successfully:361 -Progress: time: Thu, 01 Dec 2011 12:00:03 -0600 Selecting site:258 Stage in:3 Active:8 Finished successfully:365 -Progress: time: Thu, 01 Dec 2011 12:00:10 -0600 Selecting site:258 Stage in:1 Submitting:1 Active:9 Finished successfully:365 -Progress: time: Thu, 01 Dec 2011 12:00:12 -0600 Selecting site:258 Stage in:1 Active:9 Checking status:1 Finished successfully:365 -Progress: time: Thu, 01 Dec 2011 12:00:13 -0600 Selecting site:253 Stage in:1 Active:9 Checking status:1 Finished successfully:370 -Progress: time: Thu, 01 Dec 2011 12:00:17 -0600 Selecting site:252 Stage in:2 Active:8 Checking status:1 Finished successfully:371 -Progress: time: Thu, 01 Dec 2011 12:00:18 -0600 Selecting site:250 Stage in:2 Submitting:1 Active:8 Finished successfully:373 -Progress: time: Thu, 01 Dec 2011 12:00:19 -0600 Selecting site:248 Stage in:1 Active:10 Finished successfully:375 -Progress: time: Thu, 01 Dec 2011 12:00:22 -0600 Selecting site:248 Submitting:1 Active:10 Finished successfully:375 -Progress: time: Thu, 01 Dec 2011 12:00:23 -0600 Selecting site:246 Active:10 Checking status:1 Finished successfully:377 -Progress: time: Thu, 01 Dec 2011 12:00:24 -0600 Selecting site:244 Stage in:2 Active:9 Finished successfully:379 -Progress: time: Thu, 01 Dec 2011 12:00:25 -0600 Selecting site:244 Stage in:1 Active:9 Checking status:1 Finished successfully:379 -Progress: time: Thu, 01 Dec 2011 12:00:29 -0600 Selecting site:243 Stage in:1 Active:9 Checking status:1 Finished successfully:380 -Progress: time: Thu, 01 Dec 2011 12:00:33 -0600 Selecting site:242 Stage in:2 Active:8 Checking status:1 Finished successfully:381 -Progress: time: Thu, 01 Dec 2011 12:00:35 -0600 Selecting site:241 Stage in:3 Active:7 Checking status:1 Finished successfully:382 -Progress: time: Thu, 01 Dec 2011 12:00:36 -0600 Selecting site:240 Stage in:3 Active:7 Checking status:1 Finished successfully:383 -Progress: time: Thu, 01 Dec 2011 12:00:37 -0600 Selecting site:239 Stage in:4 Active:6 Checking status:1 Finished successfully:384 -Progress: time: Thu, 01 Dec 2011 12:00:38 -0600 Selecting site:238 Stage in:5 Active:5 Checking status:1 Finished successfully:385 -Progress: time: Thu, 01 Dec 2011 12:00:39 -0600 Selecting site:237 Stage in:5 Active:4 Checking status:1 Finished successfully:387 -Progress: time: Thu, 01 Dec 2011 12:00:40 -0600 Selecting site:234 Stage in:7 Active:4 Finished successfully:389 -Progress: time: Thu, 01 Dec 2011 12:00:42 -0600 Selecting site:234 Stage in:7 Active:3 Checking status:1 Finished successfully:389 -Progress: time: Thu, 01 Dec 2011 12:00:43 -0600 Selecting site:232 Stage in:8 Active:2 Checking status:1 Finished successfully:391 -Progress: time: Thu, 01 Dec 2011 12:00:45 -0600 Selecting site:230 Stage in:9 Submitting:1 Active:1 Finished successfully:393 -Progress: time: Thu, 01 Dec 2011 12:00:46 -0600 Selecting site:230 Stage in:6 Submitting:1 Active:4 Finished successfully:393 -Progress: time: Thu, 01 Dec 2011 12:00:50 -0600 Selecting site:230 Stage in:1 Submitting:1 Active:9 Finished successfully:393 -Progress: time: Thu, 01 Dec 2011 12:00:56 -0600 Selecting site:230 Active:11 Finished successfully:393 -Progress: time: Thu, 01 Dec 2011 12:01:04 -0600 Selecting site:230 Active:10 Checking status:1 Finished successfully:393 -Progress: time: Thu, 01 Dec 2011 12:01:09 -0600 Selecting site:229 Active:10 Checking status:1 Finished successfully:394 -Progress: time: Thu, 01 Dec 2011 12:01:10 -0600 Selecting site:228 Stage in:1 Active:9 Checking status:1 Finished successfully:395 -Progress: time: Thu, 01 Dec 2011 12:01:14 -0600 Selecting site:226 Stage in:2 Active:8 Checking status:1 Finished successfully:397 -Progress: time: Thu, 01 Dec 2011 12:01:18 -0600 Selecting site:225 Stage in:2 Active:8 Checking status:1 Finished successfully:398 -Progress: time: Thu, 01 Dec 2011 12:01:19 -0600 Selecting site:224 Stage in:2 Active:8 Checking status:1 Finished successfully:399 -Progress: time: Thu, 01 Dec 2011 12:01:20 -0600 Selecting site:221 Stage in:3 Active:8 Finished successfully:402 -Progress: time: Thu, 01 Dec 2011 12:01:21 -0600 Selecting site:221 Stage in:3 Active:7 Checking status:1 Finished successfully:402 -Progress: time: Thu, 01 Dec 2011 12:01:22 -0600 Selecting site:216 Stage in:7 Active:3 Checking status:1 Finished successfully:407 -Progress: time: Thu, 01 Dec 2011 12:01:24 -0600 Selecting site:212 Stage in:9 Active:2 Finished successfully:411 -Progress: time: Thu, 01 Dec 2011 12:01:25 -0600 Selecting site:212 Stage in:7 Submitting:1 Active:3 Finished successfully:411 -Progress: time: Thu, 01 Dec 2011 12:01:26 -0600 Selecting site:211 Stage in:3 Active:8 Finished successfully:412 -Progress: time: Thu, 01 Dec 2011 12:01:29 -0600 Selecting site:211 Stage in:2 Submitting:1 Active:8 Finished successfully:412 -Progress: time: Thu, 01 Dec 2011 12:01:36 -0600 Selecting site:211 Stage in:1 Submitting:1 Active:9 Finished successfully:412 -Progress: time: Thu, 01 Dec 2011 12:01:37 -0600 Selecting site:211 Active:11 Finished successfully:412 -Progress: time: Thu, 01 Dec 2011 12:01:44 -0600 Selecting site:211 Active:10 Checking status:1 Finished successfully:412 -Progress: time: Thu, 01 Dec 2011 12:01:46 -0600 Selecting site:210 Stage in:1 Active:9 Checking status:1 Finished successfully:413 -Progress: time: Thu, 01 Dec 2011 12:01:48 -0600 Selecting site:207 Stage in:2 Active:8 Checking status:1 Finished successfully:416 -Progress: time: Thu, 01 Dec 2011 12:01:49 -0600 Selecting site:203 Stage in:4 Active:6 Checking status:1 Finished successfully:420 -Progress: time: Thu, 01 Dec 2011 12:01:50 -0600 Selecting site:201 Stage in:4 Submitting:1 Active:6 Finished successfully:422 -Progress: time: Thu, 01 Dec 2011 12:01:52 -0600 Selecting site:198 Stage in:4 Active:6 Checking status:1 Finished successfully:425 -Progress: time: Thu, 01 Dec 2011 12:01:54 -0600 Selecting site:196 Stage in:1 Active:9 Checking status:1 Finished successfully:427 -Progress: time: Thu, 01 Dec 2011 12:01:56 -0600 Selecting site:194 Stage in:2 Submitting:1 Active:8 Finished successfully:429 -Progress: time: Thu, 01 Dec 2011 12:01:57 -0600 Selecting site:194 Submitting:1 Active:10 Finished successfully:429 -Progress: time: Thu, 01 Dec 2011 12:02:07 -0600 Selecting site:194 Active:10 Checking status:1 Finished successfully:429 -Progress: time: Thu, 01 Dec 2011 12:02:18 -0600 Selecting site:193 Active:10 Checking status:1 Finished successfully:430 -Progress: time: Thu, 01 Dec 2011 12:02:20 -0600 Selecting site:186 Stage in:5 Active:6 Finished successfully:437 -Progress: time: Thu, 01 Dec 2011 12:02:21 -0600 Selecting site:185 Stage in:5 Active:6 Finished successfully:438 -Progress: time: Thu, 01 Dec 2011 12:02:23 -0600 Selecting site:182 Stage in:4 Active:6 Checking status:1 Finished successfully:441 -Progress: time: Thu, 01 Dec 2011 12:02:24 -0600 Selecting site:177 Stage in:5 Active:6 Finished successfully:446 -Progress: time: Thu, 01 Dec 2011 12:02:25 -0600 Selecting site:172 Stage in:5 Active:6 Finished successfully:451 -Progress: time: Thu, 01 Dec 2011 12:02:26 -0600 Selecting site:172 Stage in:3 Active:6 Stage out:1 Finished successfully:452 -Progress: time: Thu, 01 Dec 2011 12:02:27 -0600 Selecting site:168 Stage in:1 Active:10 Finished successfully:455 -Progress: time: Thu, 01 Dec 2011 12:02:28 -0600 Selecting site:163 Submitting:1 Active:10 Finished successfully:460 -Progress: time: Thu, 01 Dec 2011 12:02:30 -0600 Selecting site:162 Active:10 Checking status:1 Finished successfully:461 -Progress: time: Thu, 01 Dec 2011 12:02:31 -0600 Selecting site:160 Submitted:2 Active:5 Stage out:4 Finished successfully:463 -Progress: time: Thu, 01 Dec 2011 12:02:32 -0600 Selecting site:155 Active:11 Finished successfully:468 -Progress: time: Thu, 01 Dec 2011 12:02:34 -0600 Selecting site:153 Active:10 Checking status:1 Finished successfully:470 -Progress: time: Thu, 01 Dec 2011 12:02:35 -0600 Selecting site:147 Stage in:1 Active:10 Finished successfully:476 -Progress: time: Thu, 01 Dec 2011 12:02:37 -0600 Selecting site:145 Stage in:1 Active:10 Finished successfully:478 -Progress: time: Thu, 01 Dec 2011 12:02:38 -0600 Selecting site:139 Active:10 Checking status:1 Finished successfully:484 -Progress: time: Thu, 01 Dec 2011 12:02:39 -0600 Selecting site:132 Active:10 Checking status:1 Finished successfully:491 -Progress: time: Thu, 01 Dec 2011 12:02:40 -0600 Selecting site:126 Stage in:2 Active:9 Finished successfully:497 -Progress: time: Thu, 01 Dec 2011 12:02:42 -0600 Selecting site:121 Active:10 Checking status:1 Finished successfully:502 -Progress: time: Thu, 01 Dec 2011 12:02:43 -0600 Selecting site:115 Active:10 Checking status:1 Finished successfully:508 -Progress: time: Thu, 01 Dec 2011 12:02:44 -0600 Selecting site:108 Active:10 Checking status:1 Finished successfully:515 -Progress: time: Thu, 01 Dec 2011 12:02:45 -0600 Selecting site:105 Active:9 Checking status:1 Finished successfully:519 -Progress: time: Thu, 01 Dec 2011 12:02:46 -0600 Selecting site:100 Stage in:1 Active:10 Finished successfully:523 -Progress: time: Thu, 01 Dec 2011 12:02:47 -0600 Selecting site:94 Stage in:1 Submitted:1 Active:9 Finished successfully:529 -Progress: time: Thu, 01 Dec 2011 12:02:48 -0600 Selecting site:90 Stage in:1 Active:10 Finished successfully:533 -Progress: time: Thu, 01 Dec 2011 12:02:50 -0600 Selecting site:83 Stage in:2 Active:9 Finished successfully:540 -Progress: time: Thu, 01 Dec 2011 12:02:51 -0600 Selecting site:81 Stage in:1 Active:10 Finished successfully:542 -Progress: time: Thu, 01 Dec 2011 12:02:52 -0600 Selecting site:76 Active:11 Finished successfully:547 -Progress: time: Thu, 01 Dec 2011 12:02:53 -0600 Selecting site:72 Active:9 Checking status:1 Finished successfully:552 -Progress: time: Thu, 01 Dec 2011 12:02:54 -0600 Selecting site:67 Active:10 Checking status:1 Finished successfully:556 -Progress: time: Thu, 01 Dec 2011 12:02:55 -0600 Selecting site:63 Active:9 Checking status:1 Finished successfully:561 -Progress: time: Thu, 01 Dec 2011 12:02:57 -0600 Selecting site:58 Active:9 Checking status:1 Finished successfully:566 -Progress: time: Thu, 01 Dec 2011 12:02:58 -0600 Selecting site:50 Active:10 Checking status:1 Finished successfully:573 -Progress: time: Thu, 01 Dec 2011 12:02:59 -0600 Selecting site:45 Stage in:1 Active:10 Finished successfully:578 -Progress: time: Thu, 01 Dec 2011 12:03:00 -0600 Selecting site:36 Stage in:1 Active:10 Finished successfully:587 -Progress: time: Thu, 01 Dec 2011 12:03:02 -0600 Selecting site:31 Active:9 Checking status:1 Finished successfully:593 -Progress: time: Thu, 01 Dec 2011 12:03:03 -0600 Selecting site:25 Active:10 Checking status:1 Finished successfully:598 -Progress: time: Thu, 01 Dec 2011 12:03:04 -0600 Selecting site:21 Active:9 Checking status:1 Finished successfully:603 -Progress: time: Thu, 01 Dec 2011 12:03:05 -0600 Selecting site:12 Submitted:1 Active:9 Checking status:1 Finished successfully:611 -Progress: time: Thu, 01 Dec 2011 12:03:06 -0600 Selecting site:9 Stage in:1 Submitted:1 Active:9 Finished successfully:614 -Progress: time: Thu, 01 Dec 2011 12:03:07 -0600 Selecting site:8 Submitted:1 Active:9 Checking status:1 Finished successfully:615 -Progress: time: Thu, 01 Dec 2011 12:03:12 -0600 Selecting site:5 Submitted:1 Active:9 Checking status:1 Finished successfully:618 -Progress: time: Thu, 01 Dec 2011 12:03:13 -0600 Selecting site:1 Stage in:1 Active:10 Finished successfully:622 -Progress: time: Thu, 01 Dec 2011 12:03:16 -0600 Active:7 Checking status:1 Finished successfully:626 -Progress: time: Thu, 01 Dec 2011 12:03:17 -0600 Active:4 Checking status:1 Finished successfully:629 -Progress: time: Thu, 01 Dec 2011 12:03:19 -0600 Initializing:1 Active:4 Finished successfully:630 -Progress: time: Thu, 01 Dec 2011 12:03:20 -0600 Active:4 Checking status:1 Finished successfully:630 -Progress: time: Thu, 01 Dec 2011 12:03:21 -0600 Active:2 Checking status:1 Finished successfully:632 -Progress: time: Thu, 01 Dec 2011 12:03:22 -0600 Active:1 Checking status:1 Finished successfully:634 -Progress: time: Thu, 01 Dec 2011 12:03:25 -0600 Checking status:1 Finished successfully:635 -Progress: time: Thu, 01 Dec 2011 12:03:26 -0600 Active:1 Finished successfully:636 -Progress: time: Thu, 01 Dec 2011 12:03:56 -0600 Active:1 Finished successfully:636 -Progress: time: Thu, 01 Dec 2011 12:04:05 -0600 Checking status:1 Finished successfully:636 -Final status: Thu, 01 Dec 2011 12:04:05 -0600 Finished successfully:637 Deleted: SwiftApps/modis/g.gif =================================================================== (Binary files differ) Deleted: SwiftApps/modis/geos.mapper.sh =================================================================== --- SwiftApps/modis/geos.mapper.sh 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/geos.mapper.sh 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,20 +0,0 @@ -#!/bin/bash - -# Usage: $0 -location dir -suffix .tif -site gsiftp://gridftp.pads.ci.uchicago.edu/ -n=999 - -while [ $# -gt 0 ]; do - case $1 in - -location) location=$2;; - -suffix) suffix=$2;; - -site) site=$2;; - -n) n=$2;; - *) echo "$0: bad mapper args" 1>&2 - exit 1;; - esac - shift 2 -done - -find $location -name '*'${suffix} -print | head -$n | -awk '{printf "[%d] '$site'/%s\n", NR, $1}' - - Deleted: SwiftApps/modis/gridmap.gif =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h00v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h00v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h00v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h01v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h01v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h01v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h01v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h01v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h02v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h02v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h02v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h02v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h02v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h03v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h03v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h03v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h03v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h03v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h04v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h04v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h04v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h05v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h05v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h05v13.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h06v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h06v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h07v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h07v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h07v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h07v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h08v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h08v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h08v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h08v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h08v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h08v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h08v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h08v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h09v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h09v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h09v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h09v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h09v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h09v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h09v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h09v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h10v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h10v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h10v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h10v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h10v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h10v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h10v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h10v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h10v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h10v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h11v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h11v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h11v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h11v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h11v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h11v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h11v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h11v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h11v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h11v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h11v12.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h12v01.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h12v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h12v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h12v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h12v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h12v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h12v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h12v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h12v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h12v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h12v12.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h12v13.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h13v01.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h13v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h13v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h13v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h13v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h13v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h13v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h13v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h13v12.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h13v13.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h13v14.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h14v01.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h14v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h14v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h14v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h14v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h14v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h14v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h14v14.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h14v16.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h14v17.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h15v01.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h15v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h15v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h15v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h15v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h15v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h15v14.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h15v15.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h15v16.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h15v17.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h16v00.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h16v01.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h16v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h16v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h16v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h16v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h16v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h16v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h16v12.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h16v14.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h16v16.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h16v17.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h17v00.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h17v01.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h17v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h17v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h17v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h17v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h17v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h17v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h17v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h17v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h17v12.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h17v13.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h17v15.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h17v16.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h17v17.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h18v00.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h18v01.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h18v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h18v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h18v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h18v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h18v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h18v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h18v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h18v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h18v14.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h18v15.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h18v16.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h18v17.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h19v00.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h19v01.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h19v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h19v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h19v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h19v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h19v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h19v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h19v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h19v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h19v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h19v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h19v12.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h19v15.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h19v16.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h19v17.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h20v01.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h20v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h20v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h20v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h20v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h20v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h20v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h20v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h20v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h20v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h20v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h20v12.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h20v13.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h20v15.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h20v16.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h20v17.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h21v01.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h21v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h21v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h21v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h21v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h21v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h21v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h21v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h21v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h21v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h21v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h21v13.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h21v15.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h21v16.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h21v17.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h22v01.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h22v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h22v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h22v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h22v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h22v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h22v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h22v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h22v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h22v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h22v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h22v13.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h22v14.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h22v15.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h22v16.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h23v01.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h23v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h23v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h23v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h23v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h23v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h23v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h23v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h23v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h23v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h23v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h23v15.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h23v16.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h24v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h24v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h24v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h24v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h24v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h24v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h24v12.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h24v15.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h25v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h25v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h25v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h25v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h25v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h25v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h25v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h25v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h26v02.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h26v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h26v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h26v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h26v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h26v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h26v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h27v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h27v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h27v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h27v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h27v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h27v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h27v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h27v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h27v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h27v12.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h27v14.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h28v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h28v04.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h28v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h28v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h28v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h28v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h28v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h28v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h28v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h28v12.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h28v13.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h28v14.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h29v03.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h29v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h29v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h29v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h29v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h29v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h29v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h29v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h29v12.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h29v13.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h30v05.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h30v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h30v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h30v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h30v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h30v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h30v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h30v12.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h30v13.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h31v06.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h31v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h31v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h31v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h31v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h31v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h31v12.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h31v13.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h32v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h32v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h32v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h32v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h32v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h32v12.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h33v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h33v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h33v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h33v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h33v11.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h34v07.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h34v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h34v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h34v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h35v08.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h35v09.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/landuse/h35v10.color.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/map.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/markedGrid.gif =================================================================== (Binary files differ) Deleted: SwiftApps/modis/modis.swift =================================================================== --- SwiftApps/modis/modis.swift 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/modis.swift 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,71 +0,0 @@ -# Declare dataset types - -type file; -type imagefile; -type landuse; - -# Define application program interfaces - -app (landuse output) getLandUse (imagefile input, int sortfield) -{ - getlanduse @input sortfield stdout=@output ; -} - -app (file output, file tilelist) analyzeLandUse (landuse input[], int usetype, int maxnum) -{ - analyzelanduse @output @tilelist usetype maxnum @filenames(input); -} - -app (imagefile output) colormodis (imagefile input) -{ - colormodis @input @output; -} - -app (imagefile output) assemble (imagefile input[]) -{ - assemble @output @filenames(input); -} - -# Declare datasets - -imagefile geos[]; -landuse land[]; - -# Find the land use of each MODIS tile - -foreach g,i in geos { - land[i] = getLandUse(g,1); -} - -# Find the top N most urban tiles (by area) - -int N = 12; -int UsageTypeURBAN=13; -file bigurban<"topurban.txt">; -file urbantiles<"urbantiles.txt">; -(bigurban, urbantiles) = analyzeLandUse(land, UsageTypeURBAN, N); - -# Map the files for the top urban tiles to an array - -string urbanfilenames[] = readData(urbantiles); -imagefile urbanfiles[] ; - -# Create a set of recolored images for just the urban tiles - -string odir = "/home/wilde/public_html/geo/"; - -imagefile recoloredImage[] ; - -foreach uf, i in urbanfiles { - #imagefile recoloredImage ; - recoloredImage[i] = colormodis(uf); -} - -# Assemble a montage of the top urban areas - -imagefile urbanMontage ; - -urbanMontage = assemble(recoloredImage); Deleted: SwiftApps/modis/modis2.swift =================================================================== --- SwiftApps/modis/modis2.swift 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/modis2.swift 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,78 +0,0 @@ -# Declare dataset types - -type file; -type imagefile; -type landuse; - -# Define application program interfaces - -app (landuse output) getLandUse (imagefile input, int sortfield) -{ - getlanduse @input sortfield stdout=@output ; -} - -app (file output, file tilelist) analyzeLandUse (landuse input[], string usetype, int maxnum) -{ - analyzelanduse @output @tilelist usetype maxnum @filenames(input); -} - -app (imagefile output) colormodis (imagefile input) -{ - colormodis @input @output; -} - -app (imagefile output) assemble (imagefile input[]) -{ - assemble @output @filenames(input); -} - -# Declare datasets - -# imagefile geos[]; - -string location="/home/wilde/bigdata/data/modis/2002"; -string suffix=".tif"; - -int nfiles = @toint(@arg("nfiles","1000")); -int N = @toint(@arg("nselect","12")); -string UsageType=@arg("landtype","urban"); - -imagefile geos[]; # site=site -landuse land[]; - -# Find the land use of each MODIS tile - -foreach g,i in geos { - land[i] = getLandUse(g,1); -} - -# Find the top N tiles (by total area of selected landuse types) - -file topselected<"topselected.txt">; -file selectedtiles<"selectedtiles.txt">; -(topselected, selectedtiles) = analyzeLandUse(land, UsageType, N); - -# Map the files for the top selected tiles to an array - -string selectedfilenames[] = readData(selectedtiles); -imagefile selectedfiles[] ; - -# Create a set of recolored images for just the selected tiles - -string odir = "/home/wilde/public_html/geo/"; - -imagefile recoloredImage[] ; - -foreach sf, i in selectedfiles { - #imagefile recoloredImage ; - recoloredImage[i] = colormodis(sf); -} - -# Assemble a montage of the top selcted areas - -imagefile selectedMontage ; - -selectedMontage = assemble(recoloredImage); Deleted: SwiftApps/modis/modis3.swift =================================================================== --- SwiftApps/modis/modis3.swift 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/modis3.swift 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,71 +0,0 @@ -# Declare dataset types - -type file; -type imagefile; -type landuse; - -# Define application program interfaces - -app (landuse output) getLandUse (imagefile input, int sortfield) -{ - getlanduse @input sortfield stdout=@output ; -} - -app (file output, file tilelist) analyzeLandUse (landuse input[], string usetype, int maxnum) -{ - analyzelanduse @output @tilelist usetype maxnum @filenames(input); -} - -app (imagefile output) colorMODIS (imagefile input) -{ - colormodis @input @output; -} - -app (imagefile output) assemble (file selected, imagefile image[]) -{ - assemble @output @selected @filenames(image); -} - -# Declare datasets - -# imagefile geos[]; - -string location="/home/wilde/bigdata/data/modis/2002"; -string suffix=".tif"; - -int nfiles = @toint(@arg("nfiles","1000")); -int N = @toint(@arg("nselect","12")); -string UsageType=@arg("landtype","urban"); - -imagefile geos[]; # site=site -landuse land[]; - -# Find the land use of each MODIS tile - -foreach g,i in geos { - land[i] = getLandUse(g,1); -} - -# Find the top N tiles (by total area of selected landuse types) - -file topSelected<"topselected.txt">; -file selectedTiles<"selectedtiles.txt">; -(topSelected, selectedTiles) = analyzeLandUse(land, UsageType, N); - -# Create multi-color images for all tiles - -string odir = "/home/wilde/public_html/geo/"; - -imagefile colorImage[] ; - -foreach g, i in geos { - colorImage[i] = colorMODIS(g); -} - -# Assemble a montage of the top selcted areas - -imagefile montage ; # @arg - -montage = assemble(selectedTiles,colorImage); Deleted: SwiftApps/modis/modis4.swift =================================================================== --- SwiftApps/modis/modis4.swift 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/modis4.swift 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,83 +0,0 @@ -# Declare dataset types - -type file; -type imagefile; -type landuse; - -# Define application program interfaces - -app (landuse output) getLandUse (imagefile input, int sortfield) -{ - getlanduse @input sortfield stdout=@output ; -} - -app (file output, file tilelist) analyzeLandUse (landuse input[], string usetype, int maxnum) -{ - analyzelanduse @output @tilelist usetype maxnum @filenames(input); -} - -app (imagefile output) colorMODIS (imagefile input) -{ - colormodis @input @output; -} - -app (imagefile output) assemble (file selected, imagefile image[], string webdir) -{ - assemble @output @selected @filename(image[0]) webdir; -} - -# Constants and command line arguments - -int nFiles = @toint(@arg("nfiles","1000")); -int nSelect = @toint(@arg("nselect","12")); -string landType = @arg("landtype","urban"); -string runID = @arg("runid","modis-run"); -string MODISdir= @arg("modisdir","/home/wilde/bigdata/data/modis/2002"); -string webDir = @arg("webdir","/home/wilde/public_html/geo/"); - -string suffix=".tif"; - -# Datasets - -imagefile geos[]; # site=site - -# Find the land use of each MODIS tile - -landuse land[]; - -foreach g,i in geos { - land[i] = getLandUse(g,1); -} - -# Find the top N tiles (by total area of selected landuse types) - -file topSelected<"topselected.txt">; -file selectedTiles<"selectedtiles.txt">; -(topSelected, selectedTiles) = analyzeLandUse(land, landType, nSelect); - -# Create multi-color images for all tiles - -imagefile colorImage[] ; - -foreach g, i in geos { - colorImage[i] = colorMODIS(g); -} - -# Assemble a montage of the top selcted areas - -imagefile montage ; # @arg - -montage = assemble(selectedTiles,colorImage,webDir); - -# future args: - -int selectHiThreshold; -int selectLowThreshold; -string upperLeftTile; -string lowerRightTile; -float imageSizes[]; -string displayOptions; - -# imagefile geos[]; Deleted: SwiftApps/modis/modis5.xml =================================================================== --- SwiftApps/modis/modis5.xml 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/modis5.xml 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,271 +0,0 @@ - - - - - file - string - - - - imagefile - string - - - - landuse - string - - - - - - - - - - - - - getlanduse - - output - inputsortfield - - - - - - - - - - - - - - - - analyzelanduse - - output - tilelistusetypemaxnum - input - - - - - - - - - - colormodis - - input - output - - - - - - - - - - - - - - assemble - - output - selected - - image - 0 - webdir - - - - - - - - - - markmap - - tilelist - grid - - - - - nFiles - - - nfiles1000 - - - - nSelect - - - nselect12 - - - - landType - - landtypeurban - - - - runID - - runidmodis-run - - - - MODISdir - - modisdir/home/wilde/bigdata/data/modis/2002 - - - - webDir - - webdir/home/wilde/public_html/geo/ - - - - suffix - .tif - - - - modis.mapper - MODISdir - .tif - nFiles - - - - - geos - (h..v..) - - runID/\1.landuse.byfreq - - - - geos - - - land - i - - g - 1 - - - - - - topSelected - selectedTiles - land - landType - nSelect - - - - gridMap - topSelected - - - - geos - (h..v..) - landuse/\1.color.png - - - - geos - - - colorImage - i - - g - - - - - - runID/map.png - - - - montage - selectedTiles - colorImage - webDir - - - - - - - - Deleted: SwiftApps/modis/modisp1.swift =================================================================== --- SwiftApps/modis/modisp1.swift 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/modisp1.swift 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,73 +0,0 @@ -# Declare dataset types - -type file; -type imagefile; -type landuse; - -# Define application program interfaces - -app (landuse output) getLandUse (imagefile input, int sortfield) -{ - getlanduse @input sortfield stdout=@output ; -} - -app (file output, file tilelist) analyzeLandUse (landuse input[], int usetype, int maxnum) -{ - analyzelanduse @output @tilelist usetype maxnum @filenames(input); -} - -app (imagefile output) colormodis (imagefile input) -{ - colormodis @input @output; -} - -app (imagefile output) assemble (imagefile input[]) -{ - assemble @output @filenames(input); -} - -# Declare datasets - -imagefile geos[]; -landuse land[]; - -int nfiles = @toint(@arg("nfiles","1000")); -int N = @toint(@arg("nselect","12")); -string UsageType=@arg("landtype","13"); - -# Find the land use of each MODIS tile - -foreach g,i in geos { - land[i] = getLandUse(g,1); -} - -# Find the top N most urban tiles (by area) - -file bigurban<"topurban.txt">; -file urbantiles<"urbantiles.txt">; -(bigurban, urbantiles) = analyzeLandUse(land, UsageType, N); - -# Map the files for the top urban tiles to an array - -string urbanfilenames[] = readData(urbantiles); -imagefile urbanfiles[] ; - -# Create a set of recolored images for just the urban tiles - -string odir = "/home/wilde/public_html/geo/"; - -imagefile recoloredImage[] ; - -foreach uf, i in urbanfiles { - #imagefile recoloredImage ; - recoloredImage[i] = colormodis(uf); -} - -# Assemble a montage of the top urban areas - -imagefile urbanMontage ; - -urbanMontage = assemble(recoloredImage); Deleted: SwiftApps/modis/mon.png =================================================================== (Binary files differ) Copied: SwiftApps/modis/old/coast1.xml (from rev 5487, SwiftApps/modis/coast1.xml) =================================================================== --- SwiftApps/modis/old/coast1.xml (rev 0) +++ SwiftApps/modis/old/coast1.xml 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1,191 @@ + + + + + 8 + 3500 + 1 + 1 + 1 + + .31 + 10000 + /home/wilde/swiftwork/stomp + + + + + + + + Copied: SwiftApps/modis/old/coasters.xml (from rev 5487, SwiftApps/modis/coasters.xml) =================================================================== --- SwiftApps/modis/old/coasters.xml (rev 0) +++ SwiftApps/modis/old/coasters.xml 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1,189 @@ + + + + + + 8 + 3500 + 1 + 1 + 1 + + + .07 + 10000 + /home/wilde/swiftwork/crush + + + + + 8 + 3500 + 1 + 1 + 1 + + .31 + 10000 + /home/wilde/swiftwork/thwomp + + + + + 8 + 3500 + 1 + 1 + 1 + + .31 + 10000 + /home/wilde/swiftwork/stomp + + + + + 8 + 3500 + 1 + 1 + 1 + + .31 + 10000 + /home/wilde/swiftwork/crush + + + + + 8 + 3500 + 1 + 1 + 1 + + .31 + 10000 + /home/wilde/swiftwork/crank + + + + + 8 + 3500 + 1 + 1 + 1 + + .31 + 10000 + /home/wilde/swiftwork/steamroller + + + + + 8 + 3500 + 1 + 1 + 1 + + .31 + 10000 + /home/wilde/swiftwork/grind + + + + + 8 + 3500 + 1 + 1 + 1 + + .31 + 10000 + /home/wilde/swiftwork/churn + + + + + 8 + 3500 + 1 + 1 + 1 + + .31 + 10000 + /home/wilde/swiftwork/trounce + + + + + 8 + 3500 + 1 + 1 + 1 + + .31 + 10000 + /home/wilde/swiftwork/thrash + + + + + 8 + 3500 + 1 + 1 + 1 + + .31 + 10000 + /home/wilde/swiftwork/vanquish + + + + + Copied: SwiftApps/modis/old/demo3 (from rev 5487, SwiftApps/modis/demo3) =================================================================== --- SwiftApps/modis/old/demo3 (rev 0) +++ SwiftApps/modis/old/demo3 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1,7 @@ +swift -tc.file tc.local \ + -sites.file sites.xml \ + modis3.swift -landtype=$1 -nfiles=$2 -nselect=$3 + +exit + +swift -tc.file tc.local -sites.file sites.local.xml modis2.swift -landtype=$1 -nfiles=$2 -nselect=$3 Copied: SwiftApps/modis/old/demo4 (from rev 5487, SwiftApps/modis/demo4) =================================================================== --- SwiftApps/modis/old/demo4 (rev 0) +++ SwiftApps/modis/old/demo4 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1,18 @@ +# demo4 forest 50 5 pbs + +landtype=${1:-urban} +nfiles=${2:-50} +nselect=${3:-10} +site=${4:-local} + +runid=modis-$(date +%Y.%m%d.%H%M)-$landtype-$nfiles-$nselect + +echo runid=$runid + +swift -tc.file tc.$site \ + -sites.file sites.xml \ + modis4.swift -landtype=$landtype -nfiles=$nfiles -nselect=$nselect -runid=$runid \ + -MODISdir=/home/wilde/bigdata/data/modis/2002 -webdir=/home/wilde/public_html/geo +exit + +swift -tc.file tc.local -sites.file sites.local.xml modis2.swift -landtype=$1 -nfiles=$2 -nselect=$3 Copied: SwiftApps/modis/old/geos.mapper.sh (from rev 5487, SwiftApps/modis/geos.mapper.sh) =================================================================== --- SwiftApps/modis/old/geos.mapper.sh (rev 0) +++ SwiftApps/modis/old/geos.mapper.sh 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1,20 @@ +#!/bin/bash + +# Usage: $0 -location dir -suffix .tif -site gsiftp://gridftp.pads.ci.uchicago.edu/ -n=999 + +while [ $# -gt 0 ]; do + case $1 in + -location) location=$2;; + -suffix) suffix=$2;; + -site) site=$2;; + -n) n=$2;; + *) echo "$0: bad mapper args" 1>&2 + exit 1;; + esac + shift 2 +done + +find $location -name '*'${suffix} -print | head -$n | +awk '{printf "[%d] '$site'/%s\n", NR, $1}' + + Copied: SwiftApps/modis/old/modis.swift (from rev 5487, SwiftApps/modis/modis.swift) =================================================================== --- SwiftApps/modis/old/modis.swift (rev 0) +++ SwiftApps/modis/old/modis.swift 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1,71 @@ +# Declare dataset types + +type file; +type imagefile; +type landuse; + +# Define application program interfaces + +app (landuse output) getLandUse (imagefile input, int sortfield) +{ + getlanduse @input sortfield stdout=@output ; +} + +app (file output, file tilelist) analyzeLandUse (landuse input[], int usetype, int maxnum) +{ + analyzelanduse @output @tilelist usetype maxnum @filenames(input); +} + +app (imagefile output) colormodis (imagefile input) +{ + colormodis @input @output; +} + +app (imagefile output) assemble (imagefile input[]) +{ + assemble @output @filenames(input); +} + +# Declare datasets + +imagefile geos[]; +landuse land[]; + +# Find the land use of each MODIS tile + +foreach g,i in geos { + land[i] = getLandUse(g,1); +} + +# Find the top N most urban tiles (by area) + +int N = 12; +int UsageTypeURBAN=13; +file bigurban<"topurban.txt">; +file urbantiles<"urbantiles.txt">; +(bigurban, urbantiles) = analyzeLandUse(land, UsageTypeURBAN, N); + +# Map the files for the top urban tiles to an array + +string urbanfilenames[] = readData(urbantiles); +imagefile urbanfiles[] ; + +# Create a set of recolored images for just the urban tiles + +string odir = "/home/wilde/public_html/geo/"; + +imagefile recoloredImage[] ; + +foreach uf, i in urbanfiles { + #imagefile recoloredImage ; + recoloredImage[i] = colormodis(uf); +} + +# Assemble a montage of the top urban areas + +imagefile urbanMontage ; + +urbanMontage = assemble(recoloredImage); Copied: SwiftApps/modis/old/modis2.swift (from rev 5487, SwiftApps/modis/modis2.swift) =================================================================== --- SwiftApps/modis/old/modis2.swift (rev 0) +++ SwiftApps/modis/old/modis2.swift 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1,78 @@ +# Declare dataset types + +type file; +type imagefile; +type landuse; + +# Define application program interfaces + +app (landuse output) getLandUse (imagefile input, int sortfield) +{ + getlanduse @input sortfield stdout=@output ; +} + +app (file output, file tilelist) analyzeLandUse (landuse input[], string usetype, int maxnum) +{ + analyzelanduse @output @tilelist usetype maxnum @filenames(input); +} + +app (imagefile output) colormodis (imagefile input) +{ + colormodis @input @output; +} + +app (imagefile output) assemble (imagefile input[]) +{ + assemble @output @filenames(input); +} + +# Declare datasets + +# imagefile geos[]; + +string location="/home/wilde/bigdata/data/modis/2002"; +string suffix=".tif"; + +int nfiles = @toint(@arg("nfiles","1000")); +int N = @toint(@arg("nselect","12")); +string UsageType=@arg("landtype","urban"); + +imagefile geos[]; # site=site +landuse land[]; + +# Find the land use of each MODIS tile + +foreach g,i in geos { + land[i] = getLandUse(g,1); +} + +# Find the top N tiles (by total area of selected landuse types) + +file topselected<"topselected.txt">; +file selectedtiles<"selectedtiles.txt">; +(topselected, selectedtiles) = analyzeLandUse(land, UsageType, N); + +# Map the files for the top selected tiles to an array + +string selectedfilenames[] = readData(selectedtiles); +imagefile selectedfiles[] ; + +# Create a set of recolored images for just the selected tiles + +string odir = "/home/wilde/public_html/geo/"; + +imagefile recoloredImage[] ; + +foreach sf, i in selectedfiles { + #imagefile recoloredImage ; + recoloredImage[i] = colormodis(sf); +} + +# Assemble a montage of the top selcted areas + +imagefile selectedMontage ; + +selectedMontage = assemble(recoloredImage); Copied: SwiftApps/modis/old/modis3.swift (from rev 5487, SwiftApps/modis/modis3.swift) =================================================================== --- SwiftApps/modis/old/modis3.swift (rev 0) +++ SwiftApps/modis/old/modis3.swift 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1,71 @@ +# Declare dataset types + +type file; +type imagefile; +type landuse; + +# Define application program interfaces + +app (landuse output) getLandUse (imagefile input, int sortfield) +{ + getlanduse @input sortfield stdout=@output ; +} + +app (file output, file tilelist) analyzeLandUse (landuse input[], string usetype, int maxnum) +{ + analyzelanduse @output @tilelist usetype maxnum @filenames(input); +} + +app (imagefile output) colorMODIS (imagefile input) +{ + colormodis @input @output; +} + +app (imagefile output) assemble (file selected, imagefile image[]) +{ + assemble @output @selected @filenames(image); +} + +# Declare datasets + +# imagefile geos[]; + +string location="/home/wilde/bigdata/data/modis/2002"; +string suffix=".tif"; + +int nfiles = @toint(@arg("nfiles","1000")); +int N = @toint(@arg("nselect","12")); +string UsageType=@arg("landtype","urban"); + +imagefile geos[]; # site=site +landuse land[]; + +# Find the land use of each MODIS tile + +foreach g,i in geos { + land[i] = getLandUse(g,1); +} + +# Find the top N tiles (by total area of selected landuse types) + +file topSelected<"topselected.txt">; +file selectedTiles<"selectedtiles.txt">; +(topSelected, selectedTiles) = analyzeLandUse(land, UsageType, N); + +# Create multi-color images for all tiles + +string odir = "/home/wilde/public_html/geo/"; + +imagefile colorImage[] ; + +foreach g, i in geos { + colorImage[i] = colorMODIS(g); +} + +# Assemble a montage of the top selcted areas + +imagefile montage ; # @arg + +montage = assemble(selectedTiles,colorImage); Copied: SwiftApps/modis/old/modis4.swift (from rev 5487, SwiftApps/modis/modis4.swift) =================================================================== --- SwiftApps/modis/old/modis4.swift (rev 0) +++ SwiftApps/modis/old/modis4.swift 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1,83 @@ +# Declare dataset types + +type file; +type imagefile; +type landuse; + +# Define application program interfaces + +app (landuse output) getLandUse (imagefile input, int sortfield) +{ + getlanduse @input sortfield stdout=@output ; +} + +app (file output, file tilelist) analyzeLandUse (landuse input[], string usetype, int maxnum) +{ + analyzelanduse @output @tilelist usetype maxnum @filenames(input); +} + +app (imagefile output) colorMODIS (imagefile input) +{ + colormodis @input @output; +} + +app (imagefile output) assemble (file selected, imagefile image[], string webdir) +{ + assemble @output @selected @filename(image[0]) webdir; +} + +# Constants and command line arguments + +int nFiles = @toint(@arg("nfiles","1000")); +int nSelect = @toint(@arg("nselect","12")); +string landType = @arg("landtype","urban"); +string runID = @arg("runid","modis-run"); +string MODISdir= @arg("modisdir","/home/wilde/bigdata/data/modis/2002"); +string webDir = @arg("webdir","/home/wilde/public_html/geo/"); + +string suffix=".tif"; + +# Datasets + +imagefile geos[]; # site=site + +# Find the land use of each MODIS tile + +landuse land[]; + +foreach g,i in geos { + land[i] = getLandUse(g,1); +} + +# Find the top N tiles (by total area of selected landuse types) + +file topSelected<"topselected.txt">; +file selectedTiles<"selectedtiles.txt">; +(topSelected, selectedTiles) = analyzeLandUse(land, landType, nSelect); + +# Create multi-color images for all tiles + +imagefile colorImage[] ; + +foreach g, i in geos { + colorImage[i] = colorMODIS(g); +} + +# Assemble a montage of the top selcted areas + +imagefile montage ; # @arg + +montage = assemble(selectedTiles,colorImage,webDir); + +# future args: + +int selectHiThreshold; +int selectLowThreshold; +string upperLeftTile; +string lowerRightTile; +float imageSizes[]; +string displayOptions; + +# imagefile geos[]; Copied: SwiftApps/modis/old/modisp1.swift (from rev 5487, SwiftApps/modis/modisp1.swift) =================================================================== --- SwiftApps/modis/old/modisp1.swift (rev 0) +++ SwiftApps/modis/old/modisp1.swift 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1,73 @@ +# Declare dataset types + +type file; +type imagefile; +type landuse; + +# Define application program interfaces + +app (landuse output) getLandUse (imagefile input, int sortfield) +{ + getlanduse @input sortfield stdout=@output ; +} + +app (file output, file tilelist) analyzeLandUse (landuse input[], int usetype, int maxnum) +{ + analyzelanduse @output @tilelist usetype maxnum @filenames(input); +} + +app (imagefile output) colormodis (imagefile input) +{ + colormodis @input @output; +} + +app (imagefile output) assemble (imagefile input[]) +{ + assemble @output @filenames(input); +} + +# Declare datasets + +imagefile geos[]; +landuse land[]; + +int nfiles = @toint(@arg("nfiles","1000")); +int N = @toint(@arg("nselect","12")); +string UsageType=@arg("landtype","13"); + +# Find the land use of each MODIS tile + +foreach g,i in geos { + land[i] = getLandUse(g,1); +} + +# Find the top N most urban tiles (by area) + +file bigurban<"topurban.txt">; +file urbantiles<"urbantiles.txt">; +(bigurban, urbantiles) = analyzeLandUse(land, UsageType, N); + +# Map the files for the top urban tiles to an array + +string urbanfilenames[] = readData(urbantiles); +imagefile urbanfiles[] ; + +# Create a set of recolored images for just the urban tiles + +string odir = "/home/wilde/public_html/geo/"; + +imagefile recoloredImage[] ; + +foreach uf, i in urbanfiles { + #imagefile recoloredImage ; + recoloredImage[i] = colormodis(uf); +} + +# Assemble a montage of the top urban areas + +imagefile urbanMontage ; + +urbanMontage = assemble(recoloredImage); Copied: SwiftApps/modis/old/rundemo.sh (from rev 5487, SwiftApps/modis/rundemo.sh) =================================================================== --- SwiftApps/modis/old/rundemo.sh (rev 0) +++ SwiftApps/modis/old/rundemo.sh 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1 @@ +swift -tc.file tc -sites.file sites.xml modis.swift Copied: SwiftApps/modis/old/rundemo2.pbs.sh (from rev 5487, SwiftApps/modis/rundemo2.pbs.sh) =================================================================== --- SwiftApps/modis/old/rundemo2.pbs.sh (rev 0) +++ SwiftApps/modis/old/rundemo2.pbs.sh 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1,7 @@ +swift -tc.file tc.pbs \ + -sites.file sites.xml \ + modis2.swift -landtype=$1 -nfiles=$2 -nselect=$3 + +exit + +swift -tc.file tc.local -sites.file sites.local.xml modis2.swift -landtype=$1 -nfiles=$2 -nselect=$3 Copied: SwiftApps/modis/old/rundemo2.sh (from rev 5487, SwiftApps/modis/rundemo2.sh) =================================================================== --- SwiftApps/modis/old/rundemo2.sh (rev 0) +++ SwiftApps/modis/old/rundemo2.sh 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1,7 @@ +swift -tc.file tc.local \ + -sites.file sites.xml \ + modis2.swift -landtype=$1 -nfiles=$2 -nselect=$3 + +exit + +swift -tc.file tc.local -sites.file sites.local.xml modis2.swift -landtype=$1 -nfiles=$2 -nselect=$3 Copied: SwiftApps/modis/old/rundemop1.sh (from rev 5487, SwiftApps/modis/rundemop1.sh) =================================================================== --- SwiftApps/modis/old/rundemop1.sh (rev 0) +++ SwiftApps/modis/old/rundemop1.sh 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1 @@ +swift -tc.file tc -sites.file sites.xml modisp1.swift -nselect=9 -nfiles=100 -landtype=13 Copied: SwiftApps/modis/old/sico.xml (from rev 5487, SwiftApps/modis/sico.xml) =================================================================== --- SwiftApps/modis/old/sico.xml (rev 0) +++ SwiftApps/modis/old/sico.xml 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1,17 @@ + + + + + + passive + + 6 + .07 + 10000 + + + /home/wilde/swiftwork + + + + Copied: SwiftApps/modis/old/sites.xml.pas.coasters (from rev 5487, SwiftApps/modis/sites.xml.pas.coasters) =================================================================== --- SwiftApps/modis/old/sites.xml.pas.coasters (rev 0) +++ SwiftApps/modis/old/sites.xml.pas.coasters 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1,28 @@ + + + + + + /home/wilde/swiftwork + + + + + + 1 + 3600 + 00:02:00 + 64 + 1 + 1 + fast + + .63 + 10000 + + + /home/wilde/swiftwork + /scratch/local/wilde + + + Copied: SwiftApps/modis/old/tc.pbs (from rev 5487, SwiftApps/modis/tc.pbs) =================================================================== --- SwiftApps/modis/old/tc.pbs (rev 0) +++ SwiftApps/modis/old/tc.pbs 2012-01-06 21:39:41 UTC (rev 5488) @@ -0,0 +1,35 @@ +#This is the transformation catalog. +# +#It comes pre-configured with a number of simple transformations with +#paths that are likely to work on a linux box. However, on some systems, +#the paths to these executables will be different (for example, sometimes +#some of these programs are found in /usr/bin rather than in /bin) +# +#NOTE WELL: fields in this file must be separated by tabs, not spaces; and +#there must be no trailing whitespace at the end of each line. +# +# site transformation path obsolete fields for compatibility + +localhost echo /bin/echo null null null +localhost cat /bin/cat null null null +localhost ls /bin/ls null null null +localhost grep /bin/grep null null null +localhost sort /bin/sort null null null +localhost paste /bin/paste null null null +localhost pwd /bin/pwd null null null + +# For cluster usage + +pbs convert /usr/bin/convert null null null +pbs getlanduse /home/wilde/swift/demo/modis/bin/getlanduse.sh null null null +pbs analyzelanduse /home/wilde/swift/demo/modis/bin/analyzelanduse2.sh null null null +pbs colormodis /home/wilde/swift/demo/modis/bin/colormodis.sh null null null +pbs assemble /home/wilde/swift/demo/modis/bin/assemble2.sh null null null +pbs markmap /home/wilde/swift/demo/modis/bin/markmap.sh null null null + +# For localhost testing + +#localhost convert /usr/bin/convert null null null +#localhost getlanduse /home/wilde/bigdata/bin/getlanduse.sh null null null +#localhost analyzelanduse /home/wilde/bigdata/bin/analyzelanduse.sh null null null +#localhost colormodis /home/wilde/bigdata/bin/colormodis.sh null null null Deleted: SwiftApps/modis/rundemo.sh =================================================================== --- SwiftApps/modis/rundemo.sh 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/rundemo.sh 2012-01-06 21:39:41 UTC (rev 5488) @@ -1 +0,0 @@ -swift -tc.file tc -sites.file sites.xml modis.swift Deleted: SwiftApps/modis/rundemo2.pbs.sh =================================================================== --- SwiftApps/modis/rundemo2.pbs.sh 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/rundemo2.pbs.sh 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,7 +0,0 @@ -swift -tc.file tc.pbs \ - -sites.file sites.xml \ - modis2.swift -landtype=$1 -nfiles=$2 -nselect=$3 - -exit - -swift -tc.file tc.local -sites.file sites.local.xml modis2.swift -landtype=$1 -nfiles=$2 -nselect=$3 Deleted: SwiftApps/modis/rundemo2.sh =================================================================== --- SwiftApps/modis/rundemo2.sh 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/rundemo2.sh 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,7 +0,0 @@ -swift -tc.file tc.local \ - -sites.file sites.xml \ - modis2.swift -landtype=$1 -nfiles=$2 -nselect=$3 - -exit - -swift -tc.file tc.local -sites.file sites.local.xml modis2.swift -landtype=$1 -nfiles=$2 -nselect=$3 Deleted: SwiftApps/modis/rundemop1.sh =================================================================== --- SwiftApps/modis/rundemop1.sh 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/rundemop1.sh 2012-01-06 21:39:41 UTC (rev 5488) @@ -1 +0,0 @@ -swift -tc.file tc -sites.file sites.xml modisp1.swift -nselect=9 -nfiles=100 -landtype=13 Deleted: SwiftApps/modis/sico.xml =================================================================== --- SwiftApps/modis/sico.xml 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/sico.xml 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,17 +0,0 @@ - - - - - - passive - - 6 - .07 - 10000 - - - /home/wilde/swiftwork - - - - Modified: SwiftApps/modis/sites.local.xml =================================================================== --- SwiftApps/modis/sites.local.xml 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/sites.local.xml 2012-01-06 21:39:41 UTC (rev 5488) @@ -5,7 +5,7 @@ .31 10000 - /home/wilde/swift/lab/go/work + {env.HOME}/swiftwork Deleted: SwiftApps/modis/sites.xml.pas.coasters =================================================================== --- SwiftApps/modis/sites.xml.pas.coasters 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/sites.xml.pas.coasters 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,28 +0,0 @@ - - - - - - /home/wilde/swiftwork - - - - - - 1 - 3600 - 00:02:00 - 64 - 1 - 1 - fast - - .63 - 10000 - - - /home/wilde/swiftwork - /scratch/local/wilde - - - Modified: SwiftApps/modis/tc.local =================================================================== --- SwiftApps/modis/tc.local 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/tc.local 2012-01-06 21:39:41 UTC (rev 5488) @@ -27,8 +27,8 @@ # For localhost testing -localhost getlanduse /home/wilde/swift/demo/modis/bin/getlanduse.sh null null null -localhost analyzelanduse /home/wilde/swift/demo/modis/bin/analyzelanduse2.sh null null null -localhost colormodis /home/wilde/swift/demo/modis/bin/colormodis.sh null null null -localhost assemble /home/wilde/swift/demo/modis/bin/assemble2.sh null null null -localhost markmap /home/wilde/swift/demo/modis/bin/markmap.sh null null null +localhost getlanduse /home/david/modis/bin/getlanduse.sh null null null +localhost analyzelanduse /home/david/modis/bin/analyzelanduse2.sh null null null +localhost colormodis /home/david/modis/bin/colormodis.sh null null null +localhost assemble /home/david/modis/bin/assemble2.sh null null null +localhost markmap /home/david/modis/bin/markmap.sh null null null Deleted: SwiftApps/modis/tc.pbs =================================================================== --- SwiftApps/modis/tc.pbs 2012-01-05 18:42:42 UTC (rev 5487) +++ SwiftApps/modis/tc.pbs 2012-01-06 21:39:41 UTC (rev 5488) @@ -1,35 +0,0 @@ -#This is the transformation catalog. -# -#It comes pre-configured with a number of simple transformations with -#paths that are likely to work on a linux box. However, on some systems, -#the paths to these executables will be different (for example, sometimes -#some of these programs are found in /usr/bin rather than in /bin) -# -#NOTE WELL: fields in this file must be separated by tabs, not spaces; and -#there must be no trailing whitespace at the end of each line. -# -# site transformation path obsolete fields for compatibility - -localhost echo /bin/echo null null null -localhost cat /bin/cat null null null -localhost ls /bin/ls null null null -localhost grep /bin/grep null null null -localhost sort /bin/sort null null null -localhost paste /bin/paste null null null -localhost pwd /bin/pwd null null null - -# For cluster usage - -pbs convert /usr/bin/convert null null null -pbs getlanduse /home/wilde/swift/demo/modis/bin/getlanduse.sh null null null -pbs analyzelanduse /home/wilde/swift/demo/modis/bin/analyzelanduse2.sh null null null -pbs colormodis /home/wilde/swift/demo/modis/bin/colormodis.sh null null null -pbs assemble /home/wilde/swift/demo/modis/bin/assemble2.sh null null null -pbs markmap /home/wilde/swift/demo/modis/bin/markmap.sh null null null - -# For localhost testing - -#localhost convert /usr/bin/convert null null null -#localhost getlanduse /home/wilde/bigdata/bin/getlanduse.sh null null null -#localhost analyzelanduse /home/wilde/bigdata/bin/analyzelanduse.sh null null null -#localhost colormodis /home/wilde/bigdata/bin/colormodis.sh null null null Deleted: SwiftApps/modis/tmp.png =================================================================== (Binary files differ) Deleted: SwiftApps/modis/white.png =================================================================== (Binary files differ) From davidk at ci.uchicago.edu Tue Jan 10 12:43:51 2012 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Tue, 10 Jan 2012 18:43:51 -0000 Subject: [Swift-commit] r5497 - in trunk: examples/tutorial src/org/globus/swift/catalog src/org/globus/swift/catalog/transformation src/org/globus/swift/catalog/types src/org/globus/swift/catalog/util src/org/globus/swift/data src/org/globus/swift/data/policy src/org/globus/swift/data/util src/org/griphyn/vdl/engine src/org/griphyn/vdl/karajan src/org/griphyn/vdl/karajan/functions src/org/griphyn/vdl/karajan/lib src/org/griphyn/vdl/karajan/lib/cache src/org/griphyn/vdl/karajan/lib/replication src/org/griphyn/vdl/karajan/lib/swiftscript src/org/griphyn/vdl/karajan/monitor src/org/griphyn/vdl/karajan/monitor/common src/org/griphyn/vdl/karajan/monitor/items src/org/griphyn/vdl/karajan/monitor/monitors src/org/griphyn/vdl/karajan/monitor/monitors/ansi src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui src/org/griphyn/vdl/karajan/monitor/monitors/swing src/org/griphyn/vdl/karajan/monitor/processors src/org/griphyn/vdl/mapping src/org/griphyn/vdl/mapping/file src/org/griphyn/vdl/toolkit src/o rg/griphyn/vdl/type src/org/griphyn/vdl/type/impl src/org/griphyn/vdl/util Message-ID: <20120110184346.654259CCBF@svn.ci.uchicago.edu> Author: davidk Date: 2012-01-10 12:43:45 -0600 (Tue, 10 Jan 2012) New Revision: 5497 Modified: trunk/examples/tutorial/MyFirstMapper.java trunk/src/org/globus/swift/catalog/Catalog.java trunk/src/org/globus/swift/catalog/CatalogEntry.java trunk/src/org/globus/swift/catalog/TCEntry.java trunk/src/org/globus/swift/catalog/TransformationCatalog.java trunk/src/org/globus/swift/catalog/TransformationCatalogEntry.java trunk/src/org/globus/swift/catalog/transformation/File.java trunk/src/org/globus/swift/catalog/types/Arch.java trunk/src/org/globus/swift/catalog/types/Os.java trunk/src/org/globus/swift/catalog/types/SysInfo.java trunk/src/org/globus/swift/catalog/types/TCType.java trunk/src/org/globus/swift/catalog/util/Data.java trunk/src/org/globus/swift/catalog/util/Escape.java trunk/src/org/globus/swift/catalog/util/Profile.java trunk/src/org/globus/swift/catalog/util/ProfileParser.java trunk/src/org/globus/swift/catalog/util/ProfileParserException.java trunk/src/org/globus/swift/catalog/util/Separator.java trunk/src/org/globus/swift/data/Action.java trunk/src/org/globus/swift/data/Director.java trunk/src/org/globus/swift/data/Query.java trunk/src/org/globus/swift/data/policy/AllocationHook.java trunk/src/org/globus/swift/data/policy/Broadcast.java trunk/src/org/globus/swift/data/policy/Default.java trunk/src/org/globus/swift/data/policy/Direct.java trunk/src/org/globus/swift/data/policy/External.java trunk/src/org/globus/swift/data/policy/Gather.java trunk/src/org/globus/swift/data/policy/Local.java trunk/src/org/globus/swift/data/policy/Policy.java trunk/src/org/globus/swift/data/util/LineReader.java trunk/src/org/griphyn/vdl/engine/FormalArgumentSignature.java trunk/src/org/griphyn/vdl/engine/Karajan.java trunk/src/org/griphyn/vdl/engine/ProcedureSignature.java trunk/src/org/griphyn/vdl/engine/VariableScope.java trunk/src/org/griphyn/vdl/karajan/ArrayIndexFutureList.java trunk/src/org/griphyn/vdl/karajan/AssertFailedException.java trunk/src/org/griphyn/vdl/karajan/CompilationException.java trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java trunk/src/org/griphyn/vdl/karajan/FuturePairIterator.java trunk/src/org/griphyn/vdl/karajan/FutureTracker.java trunk/src/org/griphyn/vdl/karajan/FutureWrapper.java trunk/src/org/griphyn/vdl/karajan/HangChecker.java trunk/src/org/griphyn/vdl/karajan/InHook.java trunk/src/org/griphyn/vdl/karajan/Loader.java trunk/src/org/griphyn/vdl/karajan/Mergeable.java trunk/src/org/griphyn/vdl/karajan/Monitor.java trunk/src/org/griphyn/vdl/karajan/Pair.java trunk/src/org/griphyn/vdl/karajan/PairIterator.java trunk/src/org/griphyn/vdl/karajan/ScalabilityTest.java trunk/src/org/griphyn/vdl/karajan/TCCache.java trunk/src/org/griphyn/vdl/karajan/VDL2ErrorTranslator.java trunk/src/org/griphyn/vdl/karajan/VDL2ExecutionContext.java trunk/src/org/griphyn/vdl/karajan/VDL2FutureException.java trunk/src/org/griphyn/vdl/karajan/VDSAdaptiveScheduler.java trunk/src/org/griphyn/vdl/karajan/VDSTaskTransformer.java trunk/src/org/griphyn/vdl/karajan/WaitingThreadsMonitor.java trunk/src/org/griphyn/vdl/karajan/functions/ConfigProperty.java trunk/src/org/griphyn/vdl/karajan/functions/ProcessBulkErrors.java trunk/src/org/griphyn/vdl/karajan/lib/AbsFileName.java trunk/src/org/griphyn/vdl/karajan/lib/AppStageins.java trunk/src/org/griphyn/vdl/karajan/lib/AppStageouts.java trunk/src/org/griphyn/vdl/karajan/lib/AppendArray.java trunk/src/org/griphyn/vdl/karajan/lib/CacheAddAndLockFile.java trunk/src/org/griphyn/vdl/karajan/lib/CacheAddFile.java trunk/src/org/griphyn/vdl/karajan/lib/CacheFileRemoved.java trunk/src/org/griphyn/vdl/karajan/lib/CacheFunction.java trunk/src/org/griphyn/vdl/karajan/lib/CacheUnlockFiles.java trunk/src/org/griphyn/vdl/karajan/lib/CleanDataset.java trunk/src/org/griphyn/vdl/karajan/lib/CloseDataset.java trunk/src/org/griphyn/vdl/karajan/lib/CreateArray.java trunk/src/org/griphyn/vdl/karajan/lib/DoRestartLog.java trunk/src/org/griphyn/vdl/karajan/lib/Executable.java trunk/src/org/griphyn/vdl/karajan/lib/Execute.java trunk/src/org/griphyn/vdl/karajan/lib/ExpandArguments.java trunk/src/org/griphyn/vdl/karajan/lib/FileCopier.java trunk/src/org/griphyn/vdl/karajan/lib/FileName.java trunk/src/org/griphyn/vdl/karajan/lib/Flatten.java trunk/src/org/griphyn/vdl/karajan/lib/FringePaths.java trunk/src/org/griphyn/vdl/karajan/lib/GetArrayIterator.java trunk/src/org/griphyn/vdl/karajan/lib/GetDatasetProvenanceID.java trunk/src/org/griphyn/vdl/karajan/lib/GetField.java trunk/src/org/griphyn/vdl/karajan/lib/GetFieldSubscript.java trunk/src/org/griphyn/vdl/karajan/lib/GetFieldValue.java trunk/src/org/griphyn/vdl/karajan/lib/InFileDirs.java trunk/src/org/griphyn/vdl/karajan/lib/InfiniteCountingWhile.java trunk/src/org/griphyn/vdl/karajan/lib/IsDone.java trunk/src/org/griphyn/vdl/karajan/lib/IsFileBound.java trunk/src/org/griphyn/vdl/karajan/lib/IsLogged.java trunk/src/org/griphyn/vdl/karajan/lib/IsRestartable.java trunk/src/org/griphyn/vdl/karajan/lib/JobConstraints.java trunk/src/org/griphyn/vdl/karajan/lib/Kickstart.java trunk/src/org/griphyn/vdl/karajan/lib/Log.java trunk/src/org/griphyn/vdl/karajan/lib/LogVar.java trunk/src/org/griphyn/vdl/karajan/lib/Mark.java trunk/src/org/griphyn/vdl/karajan/lib/New.java trunk/src/org/griphyn/vdl/karajan/lib/NiceName.java trunk/src/org/griphyn/vdl/karajan/lib/Operators.java trunk/src/org/griphyn/vdl/karajan/lib/OutFileDirs.java trunk/src/org/griphyn/vdl/karajan/lib/OutFiles.java trunk/src/org/griphyn/vdl/karajan/lib/Parameterlog.java trunk/src/org/griphyn/vdl/karajan/lib/PartialCloseDataset.java trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java trunk/src/org/griphyn/vdl/karajan/lib/Range.java trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java trunk/src/org/griphyn/vdl/karajan/lib/SequentialWithID.java trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java trunk/src/org/griphyn/vdl/karajan/lib/SetFutureFault.java trunk/src/org/griphyn/vdl/karajan/lib/SiteProfile.java trunk/src/org/griphyn/vdl/karajan/lib/SliceArray.java trunk/src/org/griphyn/vdl/karajan/lib/Stagein.java trunk/src/org/griphyn/vdl/karajan/lib/Stageout.java trunk/src/org/griphyn/vdl/karajan/lib/SwiftArg.java trunk/src/org/griphyn/vdl/karajan/lib/TCProfile.java trunk/src/org/griphyn/vdl/karajan/lib/ThreadPrefix.java trunk/src/org/griphyn/vdl/karajan/lib/ThrottledParallelFor.java trunk/src/org/griphyn/vdl/karajan/lib/Typecheck.java trunk/src/org/griphyn/vdl/karajan/lib/UnwrapClosedList.java trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java trunk/src/org/griphyn/vdl/karajan/lib/WaitFieldValue.java trunk/src/org/griphyn/vdl/karajan/lib/cache/CacheMapAdapter.java trunk/src/org/griphyn/vdl/karajan/lib/cache/CacheReturn.java trunk/src/org/griphyn/vdl/karajan/lib/cache/File.java trunk/src/org/griphyn/vdl/karajan/lib/cache/LRUFileCache.java trunk/src/org/griphyn/vdl/karajan/lib/cache/ProcessingListener.java trunk/src/org/griphyn/vdl/karajan/lib/cache/Site.java trunk/src/org/griphyn/vdl/karajan/lib/cache/VDLFileCache.java trunk/src/org/griphyn/vdl/karajan/lib/cache/VDLFileCacheFactory.java trunk/src/org/griphyn/vdl/karajan/lib/replication/CanceledReplicaException.java trunk/src/org/griphyn/vdl/karajan/lib/replication/ReplicationGroups.java trunk/src/org/griphyn/vdl/karajan/lib/replication/ReplicationManager.java trunk/src/org/griphyn/vdl/karajan/lib/replication/Sweeper.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Assert.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ExtractInt.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FileName.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FileNames.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FnArg.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Fprintf.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Java.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadData.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadStructured.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Sprintf.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Tracef.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/WriteData.java trunk/src/org/griphyn/vdl/karajan/monitor/MonitorAppender.java trunk/src/org/griphyn/vdl/karajan/monitor/RadixTree.java trunk/src/org/griphyn/vdl/karajan/monitor/StateUpdater.java trunk/src/org/griphyn/vdl/karajan/monitor/StatefulItemClassSet.java trunk/src/org/griphyn/vdl/karajan/monitor/Stats.java trunk/src/org/griphyn/vdl/karajan/monitor/SystemState.java trunk/src/org/griphyn/vdl/karajan/monitor/SystemStateListener.java trunk/src/org/griphyn/vdl/karajan/monitor/common/StatefulItemModel.java trunk/src/org/griphyn/vdl/karajan/monitor/items/AbstractStatefulItem.java trunk/src/org/griphyn/vdl/karajan/monitor/items/ApplicationItem.java trunk/src/org/griphyn/vdl/karajan/monitor/items/Bridge.java trunk/src/org/griphyn/vdl/karajan/monitor/items/HostItem.java trunk/src/org/griphyn/vdl/karajan/monitor/items/StatefulItem.java trunk/src/org/griphyn/vdl/karajan/monitor/items/StatefulItemClass.java trunk/src/org/griphyn/vdl/karajan/monitor/items/TaskItem.java trunk/src/org/griphyn/vdl/karajan/monitor/items/TraceItem.java trunk/src/org/griphyn/vdl/karajan/monitor/items/WorkflowItem.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/AbstractMonitor.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/Monitor.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/MonitorFactory.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/TextMonitor.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/ANSIMonitor.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/AbstractANSIDisplay.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/AppDialog.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/AppTable.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/AppTasksModel.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/BensCellRenderer.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/BensModel.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/BensPane.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/GlobalProgress.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/GlobalTimer.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/HostCellRenderer.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/HostTableModel.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/LocalANSIDisplay.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/RemoteANSIConnection.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/STable.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/SchedulerInfoPane.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/SummaryPane.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/TaskCellRenderer.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/TaskStatsPane.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/WorkerTerminalInputHandler.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ANSI.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ANSIContext.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ActionListener.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Button.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/CharacterMap.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Component.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Container.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/DefaultTableCellRenderer.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Dialog.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Frame.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Graph.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/HLine.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Key.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Label.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LabelWithAccelerator.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LayeredContainer.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LevelBar.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LevelBars.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Menu.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/MenuBar.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/MenuItem.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Screen.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ScreenBuffer.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Tab.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/TabbedContainer.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Table.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/TableCellRenderer.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/TableColumn.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Terminal.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/TextArea.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/VBox.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/VHCrossing.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/VLine.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/VScrollbar.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/ApplicationTable.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/ClassRenderer.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/FilteringTaskTable.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GanttChart.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/SimpleTableClassRenderer.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/SwingMonitor.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/TasksRenderer.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/TransferProgress.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/TransferProgressRenderer.java trunk/src/org/griphyn/vdl/karajan/monitor/processors/AppProcessor.java trunk/src/org/griphyn/vdl/karajan/monitor/processors/AppThreadProcessor.java trunk/src/org/griphyn/vdl/karajan/monitor/processors/ExecutionContextProcessor.java trunk/src/org/griphyn/vdl/karajan/monitor/processors/JobProcessor.java trunk/src/org/griphyn/vdl/karajan/monitor/processors/LogMessageProcessor.java trunk/src/org/griphyn/vdl/karajan/monitor/processors/ParsingException.java trunk/src/org/griphyn/vdl/karajan/monitor/processors/ProcedureProcessor.java trunk/src/org/griphyn/vdl/karajan/monitor/processors/SchedulerInfoProcessor.java trunk/src/org/griphyn/vdl/karajan/monitor/processors/SimpleParser.java trunk/src/org/griphyn/vdl/karajan/monitor/processors/TaskProcessor.java trunk/src/org/griphyn/vdl/karajan/monitor/processors/TraceProcessor.java trunk/src/org/griphyn/vdl/mapping/AbsFile.java trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java trunk/src/org/griphyn/vdl/mapping/AbstractMapper.java trunk/src/org/griphyn/vdl/mapping/ArrayDataNode.java trunk/src/org/griphyn/vdl/mapping/DSHandle.java trunk/src/org/griphyn/vdl/mapping/DSHandleListener.java trunk/src/org/griphyn/vdl/mapping/DataDependentException.java trunk/src/org/griphyn/vdl/mapping/DataNode.java trunk/src/org/griphyn/vdl/mapping/DependentException.java trunk/src/org/griphyn/vdl/mapping/ExternalDataNode.java trunk/src/org/griphyn/vdl/mapping/GeneralizedFileFormat.java trunk/src/org/griphyn/vdl/mapping/HandleOpenException.java trunk/src/org/griphyn/vdl/mapping/InvalidMapperException.java trunk/src/org/griphyn/vdl/mapping/InvalidMappingParameterException.java trunk/src/org/griphyn/vdl/mapping/InvalidPathException.java trunk/src/org/griphyn/vdl/mapping/Mapper.java trunk/src/org/griphyn/vdl/mapping/MapperFactory.java trunk/src/org/griphyn/vdl/mapping/MappingDependentException.java trunk/src/org/griphyn/vdl/mapping/MappingParam.java trunk/src/org/griphyn/vdl/mapping/Path.java trunk/src/org/griphyn/vdl/mapping/PathComparator.java trunk/src/org/griphyn/vdl/mapping/PathElementComparator.java trunk/src/org/griphyn/vdl/mapping/PathParser.java trunk/src/org/griphyn/vdl/mapping/PathParsingException.java trunk/src/org/griphyn/vdl/mapping/PhysicalFormat.java trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java trunk/src/org/griphyn/vdl/mapping/RootDataNode.java trunk/src/org/griphyn/vdl/mapping/file/AbstractFileMapper.java trunk/src/org/griphyn/vdl/mapping/file/AirsnFileNameElementMapper.java trunk/src/org/griphyn/vdl/mapping/file/AirsnMapper.java trunk/src/org/griphyn/vdl/mapping/file/ArrayFileMapper.java trunk/src/org/griphyn/vdl/mapping/file/CSVMapper.java trunk/src/org/griphyn/vdl/mapping/file/ConcurrentElementMapper.java trunk/src/org/griphyn/vdl/mapping/file/ConcurrentMapper.java trunk/src/org/griphyn/vdl/mapping/file/DefaultFileNameElementMapper.java trunk/src/org/griphyn/vdl/mapping/file/ExternalMapper.java trunk/src/org/griphyn/vdl/mapping/file/FileGarbageCollector.java trunk/src/org/griphyn/vdl/mapping/file/FileNameElementMapper.java trunk/src/org/griphyn/vdl/mapping/file/FileSystemArrayMapper.java trunk/src/org/griphyn/vdl/mapping/file/FixedArrayFileMapper.java trunk/src/org/griphyn/vdl/mapping/file/ROIFileNameElementMapper.java trunk/src/org/griphyn/vdl/mapping/file/ROIMapper.java trunk/src/org/griphyn/vdl/mapping/file/RegularExpressionMapper.java trunk/src/org/griphyn/vdl/mapping/file/SimpleFileMapper.java trunk/src/org/griphyn/vdl/mapping/file/SingleFileMapper.java trunk/src/org/griphyn/vdl/mapping/file/StructuredRegularExpressionMapper.java trunk/src/org/griphyn/vdl/mapping/file/TestMapper.java trunk/src/org/griphyn/vdl/toolkit/VDLt2VDLx.java trunk/src/org/griphyn/vdl/type/DuplicateFieldException.java trunk/src/org/griphyn/vdl/type/Field.java trunk/src/org/griphyn/vdl/type/NoSuchTypeException.java trunk/src/org/griphyn/vdl/type/Type.java trunk/src/org/griphyn/vdl/type/Types.java trunk/src/org/griphyn/vdl/type/impl/FieldImpl.java trunk/src/org/griphyn/vdl/type/impl/TypeImpl.java trunk/src/org/griphyn/vdl/type/impl/UnresolvedType.java trunk/src/org/griphyn/vdl/util/FQN.java trunk/src/org/griphyn/vdl/util/SwiftProfile.java trunk/src/org/griphyn/vdl/util/TriStateBoolean.java trunk/src/org/griphyn/vdl/util/VDL2Config.java trunk/src/org/griphyn/vdl/util/VDL2ConfigProperties.java Log: Add apache license information to each source file Modified: trunk/examples/tutorial/MyFirstMapper.java =================================================================== --- trunk/examples/tutorial/MyFirstMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/examples/tutorial/MyFirstMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package tutorial; import java.util.Arrays; Modified: trunk/src/org/globus/swift/catalog/Catalog.java =================================================================== --- trunk/src/org/globus/swift/catalog/Catalog.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/catalog/Catalog.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,18 +1,20 @@ /* - * This file or a portion of this file is licensed under the terms of - * the Globus Toolkit Public License, found in file GTPL, or at - * http://www.globus.org/toolkit/download/license.html. This notice must - * appear in redistributions of this file, with or without modification. - * - * Redistributions of this Software, with or without modification, must - * reproduce the GTPL in: (1) the Software, or (2) the Documentation or - * some other similar material which is provided with the Software (if - * any). - * - * Copyright 1999-2004 University of Chicago and The University of - * Southern California. All rights reserved. + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.globus.swift.catalog; import java.util.Properties; Modified: trunk/src/org/globus/swift/catalog/CatalogEntry.java =================================================================== --- trunk/src/org/globus/swift/catalog/CatalogEntry.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/catalog/CatalogEntry.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,18 +1,20 @@ /* - * This file or a portion of this file is licensed under the terms of - * the Globus Toolkit Public License, found in file GTPL, or at - * http://www.globus.org/toolkit/download/license.html. This notice must - * appear in redistributions of this file, with or without modification. - * - * Redistributions of this Software, with or without modification, must - * reproduce the GTPL in: (1) the Software, or (2) the Documentation or - * some other similar material which is provided with the Software (if - * any). - * - * Copyright 1999-2004 University of Chicago and The University of - * Southern California. All rights reserved. + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.globus.swift.catalog; /** Modified: trunk/src/org/globus/swift/catalog/TCEntry.java =================================================================== --- trunk/src/org/globus/swift/catalog/TCEntry.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/catalog/TCEntry.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,18 +1,20 @@ /* - * This file or a portion of this file is licensed under the terms of - * the Globus Toolkit Public License, found in file GTPL, or at - * http://www.globus.org/toolkit/download/license.html. This notice must - * appear in redistributions of this file, with or without modification. - * - * Redistributions of this Software, with or without modification, must - * reproduce the GTPL in: (1) the Software, or (2) the Documentation or - * some other similar material which is provided with the Software (if - * any). - * - * Copyright 1999-2004 University of Chicago and The University of - * Southern California. All rights reserved. + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.globus.swift.catalog; /** Modified: trunk/src/org/globus/swift/catalog/TransformationCatalog.java =================================================================== --- trunk/src/org/globus/swift/catalog/TransformationCatalog.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/catalog/TransformationCatalog.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,21 +1,20 @@ -/** - * - * This file or a portion of this file is licensed under the terms of - * the Globus Toolkit Public License, found at $VDS_HOME/GTPL or - * http://www.globus.org/toolkit/download/license.html. - * This notice must appear in redistributions of this file - * with or without modification. - * - * Redistributions of this Software, with or without modification, must reproduce - * the GTPL in: - * (1) the Software, or - * (2) the Documentation or - * some other similar material which is provided with the Software (if any). - * - * Copyright 1999-2004 - * University of Chicago and The University of Southern California. - * All rights reserved. +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.globus.swift.catalog; import org.globus.swift.catalog.types.SysInfo; Modified: trunk/src/org/globus/swift/catalog/TransformationCatalogEntry.java =================================================================== --- trunk/src/org/globus/swift/catalog/TransformationCatalogEntry.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/catalog/TransformationCatalogEntry.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,18 +1,20 @@ /* - * This file or a portion of this file is licensed under the terms of - * the Globus Toolkit Public License, found in file GTPL, or at - * http://www.globus.org/toolkit/download/license.html. This notice must - * appear in redistributions of this file, with or without modification. - * - * Redistributions of this Software, with or without modification, must - * reproduce the GTPL in: (1) the Software, or (2) the Documentation or - * some other similar material which is provided with the Software (if - * any). - * - * Copyright 1999-2004 University of Chicago and The University of - * Southern California. All rights reserved. + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.globus.swift.catalog; /** Modified: trunk/src/org/globus/swift/catalog/transformation/File.java =================================================================== --- trunk/src/org/globus/swift/catalog/transformation/File.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/catalog/transformation/File.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,20 +1,20 @@ -/** - * This file or a portion of this file is licensed under the terms of - * the Globus Toolkit Public License, found at $VDS_HOME/GTPL or - * http://www.globus.org/toolkit/download/license.html. - * This notice must appear in redistributions of this file - * with or without modification. - * - * Redistributions of this Software, with or without modification, must reproduce - * the GTPL in: - * (1) the Software, or - * (2) the Documentation or - * some other similar material which is provided with the Software (if any). - * - * Copyright 1999-2004 - * University of Chicago and The University of Southern California. - * All rights reserved. +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.globus.swift.catalog.transformation; import org.apache.log4j.Logger; Modified: trunk/src/org/globus/swift/catalog/types/Arch.java =================================================================== --- trunk/src/org/globus/swift/catalog/types/Arch.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/catalog/types/Arch.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,21 +1,20 @@ -/** - * This file or a portion of this file is licensed under the terms of - * the Globus Toolkit Public License, found at $VDS_HOME/GTPL or - * http://www.globus.org/toolkit/download/license.html. - * This notice must appear in redistributions of this file - * with or without modification. - * - * Redistributions of this Software, with or without modification, must reproduce - * the GTPL in: - * (1) the Software, or - * (2) the Documentation or - * some other similar material which is provided with the Software (if any). - * - * Copyright 1999-2004 - * University of Chicago and The University of Southern California. - * All rights reserved. +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.globus.swift.catalog.types; /** Modified: trunk/src/org/globus/swift/catalog/types/Os.java =================================================================== --- trunk/src/org/globus/swift/catalog/types/Os.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/catalog/types/Os.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,21 +1,20 @@ -/** - * This file or a portion of this file is licensed under the terms of - * the Globus Toolkit Public License, found at $VDS_HOME/GTPL or - * http://www.globus.org/toolkit/download/license.html. - * This notice must appear in redistributions of this file - * with or without modification. - * - * Redistributions of this Software, with or without modification, must reproduce - * the GTPL in: - * (1) the Software, or - * (2) the Documentation or - * some other similar material which is provided with the Software (if any). - * - * Copyright 1999-2004 - * University of Chicago and The University of Southern California. - * All rights reserved. +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.globus.swift.catalog.types; /** Modified: trunk/src/org/globus/swift/catalog/types/SysInfo.java =================================================================== --- trunk/src/org/globus/swift/catalog/types/SysInfo.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/catalog/types/SysInfo.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,20 +1,20 @@ -/** - * This file or a portion of this file is licensed under the terms of - * the Globus Toolkit Public License, found at $VDS_HOME/GTPL or - * http://www.globus.org/toolkit/download/license.html. - * This notice must appear in redistributions of this file - * with or without modification. - * - * Redistributions of this Software, with or without modification, must reproduce - * the GTPL in: - * (1) the Software, or - * (2) the Documentation or - * some other similar material which is provided with the Software (if any). - * - * Copyright 1999-2004 - * University of Chicago and The University of Southern California. - * All rights reserved. +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.globus.swift.catalog.types; /** Modified: trunk/src/org/globus/swift/catalog/types/TCType.java =================================================================== --- trunk/src/org/globus/swift/catalog/types/TCType.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/catalog/types/TCType.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,20 +1,20 @@ -/** - * This file or a portion of this file is licensed under the terms of - * the Globus Toolkit Public License, found at $VDS_HOME/GTPL or - * http://www.globus.org/toolkit/download/license.html. - * This notice must appear in redistributions of this file - * with or without modification. - * - * Redistributions of this Software, with or without modification, must reproduce - * the GTPL in: - * (1) the Software, or - * (2) the Documentation or - * some other similar material which is provided with the Software (if any). - * - * Copyright 1999-2004 - * University of Chicago and The University of Southern California. - * All rights reserved. +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.globus.swift.catalog.types; /** Modified: trunk/src/org/globus/swift/catalog/util/Data.java =================================================================== --- trunk/src/org/globus/swift/catalog/util/Data.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/catalog/util/Data.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,17 +1,20 @@ /* - * This file or a portion of this file is licensed under the terms of - * the Globus Toolkit Public License, found in file GTPL, or at - * http://www.globus.org/toolkit/download/license.html. This notice must - * appear in redistributions of this file, with or without modification. - * - * Redistributions of this Software, with or without modification, must - * reproduce the GTPL in: (1) the Software, or (2) the Documentation or - * some other similar material which is provided with the Software (if - * any). - * - * Copyright 1999-2004 University of Chicago and The University of - * Southern California. All rights reserved. + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.globus.swift.catalog.util; @@ -44,4 +47,4 @@ */ public abstract String toString(); -} \ No newline at end of file +} Modified: trunk/src/org/globus/swift/catalog/util/Escape.java =================================================================== --- trunk/src/org/globus/swift/catalog/util/Escape.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/catalog/util/Escape.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,18 +1,20 @@ /* - * This file or a portion of this file is licensed under the terms of - * the Globus Toolkit Public License, found in file GTPL, or at - * http://www.globus.org/toolkit/download/license.html. This notice must - * appear in redistributions of this file, with or without modification. - * - * Redistributions of this Software, with or without modification, must - * reproduce the GTPL in: (1) the Software, or (2) the Documentation or - * some other similar material which is provided with the Software (if - * any). - * - * Copyright 1999-2004 University of Chicago and The University of - * Southern California. All rights reserved. + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.globus.swift.catalog.util; /** Modified: trunk/src/org/globus/swift/catalog/util/Profile.java =================================================================== --- trunk/src/org/globus/swift/catalog/util/Profile.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/catalog/util/Profile.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,21 +1,20 @@ -/** - * This file or a portion of this file is licensed under the terms of - * the Globus Toolkit Public License, found at $VDS_HOME/GTPL or - * http://www.globus.org/toolkit/download/license.html. - * This notice must appear in redistributions of this file - * with or without modification. - * - * Redistributions of this Software, with or without modification, must reproduce - * the GTPL in: - * (1) the Software, or - * (2) the Documentation or - * some other similar material which is provided with the Software (if any). - * - * Copyright 1999-2004 - * University of Chicago and The University of Southern California. - * All rights reserved. +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.globus.swift.catalog.util; Modified: trunk/src/org/globus/swift/catalog/util/ProfileParser.java =================================================================== --- trunk/src/org/globus/swift/catalog/util/ProfileParser.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/catalog/util/ProfileParser.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,18 +1,20 @@ /* - * This file or a portion of this file is licensed under the terms of - * the Globus Toolkit Public License, found in file GTPL, or at - * http://www.globus.org/toolkit/download/license.html. This notice must - * appear in redistributions of this file, with or without modification. - * - * Redistributions of this Software, with or without modification, must - * reproduce the GTPL in: (1) the Software, or (2) the Documentation or - * some other similar material which is provided with the Software (if - * any). - * - * Copyright 1999-2004 University of Chicago and The University of - * Southern California. All rights reserved. + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.globus.swift.catalog.util; import java.util.List; Modified: trunk/src/org/globus/swift/catalog/util/ProfileParserException.java =================================================================== --- trunk/src/org/globus/swift/catalog/util/ProfileParserException.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/catalog/util/ProfileParserException.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,17 +1,20 @@ /* - * This file or a portion of this file is licensed under the terms of - * the Globus Toolkit Public License, found in file GTPL, or at - * http://www.globus.org/toolkit/download/license.html. This notice must - * appear in redistributions of this file, with or without modification. - * - * Redistributions of this Software, with or without modification, must - * reproduce the GTPL in: (1) the Software, or (2) the Documentation or - * some other similar material which is provided with the Software (if - * any). - * - * Copyright 1999-2004 University of Chicago and The University of - * Southern California. All rights reserved. + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.globus.swift.catalog.util; Modified: trunk/src/org/globus/swift/catalog/util/Separator.java =================================================================== --- trunk/src/org/globus/swift/catalog/util/Separator.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/catalog/util/Separator.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,18 +1,20 @@ /* - * This file or a portion of this file is licensed under the terms of - * the Globus Toolkit Public License, found in file GTPL, or at - * http://www.globus.org/toolkit/download/license.html. This notice must - * appear in redistributions of this file, with or without modification. - * - * Redistributions of this Software, with or without modification, must - * reproduce the GTPL in: (1) the Software, or (2) the Documentation or - * some other similar material which is provided with the Software (if - * any). - * - * Copyright 1999-2004 University of Chicago and The University of - * Southern California. All rights reserved. + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.globus.swift.catalog.util; Modified: trunk/src/org/globus/swift/data/Action.java =================================================================== --- trunk/src/org/globus/swift/data/Action.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/data/Action.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.globus.swift.data; import org.apache.log4j.Logger; Modified: trunk/src/org/globus/swift/data/Director.java =================================================================== --- trunk/src/org/globus/swift/data/Director.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/data/Director.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.globus.swift.data; import java.io.File; Modified: trunk/src/org/globus/swift/data/Query.java =================================================================== --- trunk/src/org/globus/swift/data/Query.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/data/Query.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.globus.swift.data; import org.apache.log4j.Logger; Modified: trunk/src/org/globus/swift/data/policy/AllocationHook.java =================================================================== --- trunk/src/org/globus/swift/data/policy/AllocationHook.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/data/policy/AllocationHook.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.globus.swift.data.policy; import org.globus.cog.abstraction.coaster.service.job.manager.Hook; Modified: trunk/src/org/globus/swift/data/policy/Broadcast.java =================================================================== --- trunk/src/org/globus/swift/data/policy/Broadcast.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/data/policy/Broadcast.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.globus.swift.data.policy; import java.util.ArrayList; Modified: trunk/src/org/globus/swift/data/policy/Default.java =================================================================== --- trunk/src/org/globus/swift/data/policy/Default.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/data/policy/Default.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.globus.swift.data.policy; import java.util.List; Modified: trunk/src/org/globus/swift/data/policy/Direct.java =================================================================== --- trunk/src/org/globus/swift/data/policy/Direct.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/data/policy/Direct.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.globus.swift.data.policy; import java.util.List; Modified: trunk/src/org/globus/swift/data/policy/External.java =================================================================== --- trunk/src/org/globus/swift/data/policy/External.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/data/policy/External.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.globus.swift.data.policy; import java.util.List; Modified: trunk/src/org/globus/swift/data/policy/Gather.java =================================================================== --- trunk/src/org/globus/swift/data/policy/Gather.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/data/policy/Gather.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.globus.swift.data.policy; import java.util.List; Modified: trunk/src/org/globus/swift/data/policy/Local.java =================================================================== --- trunk/src/org/globus/swift/data/policy/Local.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/data/policy/Local.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.globus.swift.data.policy; import java.util.List; Modified: trunk/src/org/globus/swift/data/policy/Policy.java =================================================================== --- trunk/src/org/globus/swift/data/policy/Policy.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/data/policy/Policy.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.globus.swift.data.policy; import java.util.List; Modified: trunk/src/org/globus/swift/data/util/LineReader.java =================================================================== --- trunk/src/org/globus/swift/data/util/LineReader.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/globus/swift/data/util/LineReader.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.globus.swift.data.util; import java.io.BufferedReader; Modified: trunk/src/org/griphyn/vdl/engine/FormalArgumentSignature.java =================================================================== --- trunk/src/org/griphyn/vdl/engine/FormalArgumentSignature.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/engine/FormalArgumentSignature.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.engine; import org.griphyn.vdl.type.Types; Modified: trunk/src/org/griphyn/vdl/engine/Karajan.java =================================================================== --- trunk/src/org/griphyn/vdl/engine/Karajan.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/engine/Karajan.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.engine; import java.io.File; Modified: trunk/src/org/griphyn/vdl/engine/ProcedureSignature.java =================================================================== --- trunk/src/org/griphyn/vdl/engine/ProcedureSignature.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/engine/ProcedureSignature.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.engine; import java.util.ArrayList; Modified: trunk/src/org/griphyn/vdl/engine/VariableScope.java =================================================================== --- trunk/src/org/griphyn/vdl/engine/VariableScope.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/engine/VariableScope.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.engine; import org.antlr.stringtemplate.StringTemplate; Modified: trunk/src/org/griphyn/vdl/karajan/ArrayIndexFutureList.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/ArrayIndexFutureList.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/ArrayIndexFutureList.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 9, 2006 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/AssertFailedException.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/AssertFailedException.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/AssertFailedException.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan; import org.globus.cog.karajan.workflow.ExecutionException; Modified: trunk/src/org/griphyn/vdl/karajan/CompilationException.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/CompilationException.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/CompilationException.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 8, 2006 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/FuturePairIterator.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/FuturePairIterator.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/FuturePairIterator.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 9, 2006 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/FutureTracker.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/FutureTracker.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/FutureTracker.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Jul 1, 2011 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan; import java.util.HashMap; Modified: trunk/src/org/griphyn/vdl/karajan/FutureWrapper.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/FutureWrapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/FutureWrapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Jul 1, 2011 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan; import org.globus.cog.karajan.workflow.events.EventTargetPair; Modified: trunk/src/org/griphyn/vdl/karajan/HangChecker.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/HangChecker.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/HangChecker.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 6, 2011 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan; import java.io.ByteArrayOutputStream; Modified: trunk/src/org/griphyn/vdl/karajan/InHook.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/InHook.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/InHook.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 19, 2006 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/Loader.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/Loader.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/Loader.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 12, 2005 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/Mergeable.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/Mergeable.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/Mergeable.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 13, 2006 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/Monitor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/Monitor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/Monitor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 17, 2006 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/Pair.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/Pair.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/Pair.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 9, 2006 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/PairIterator.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/PairIterator.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/PairIterator.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 9, 2006 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/ScalabilityTest.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/ScalabilityTest.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/ScalabilityTest.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 20, 2006 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/TCCache.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/TCCache.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/TCCache.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 5, 2007 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/VDL2ErrorTranslator.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/VDL2ErrorTranslator.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/VDL2ErrorTranslator.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 23, 2006 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/VDL2ExecutionContext.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/VDL2ExecutionContext.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/VDL2ExecutionContext.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 23, 2006 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/VDL2FutureException.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/VDL2FutureException.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/VDL2FutureException.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 4, 2007 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/VDSAdaptiveScheduler.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/VDSAdaptiveScheduler.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/VDSAdaptiveScheduler.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 12, 2006 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/VDSTaskTransformer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/VDSTaskTransformer.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/VDSTaskTransformer.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 12, 2006 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/WaitingThreadsMonitor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/WaitingThreadsMonitor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/WaitingThreadsMonitor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 17, 2006 */ package org.griphyn.vdl.karajan; Modified: trunk/src/org/griphyn/vdl/karajan/functions/ConfigProperty.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/functions/ConfigProperty.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/functions/ConfigProperty.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 6, 2006 */ package org.griphyn.vdl.karajan.functions; Modified: trunk/src/org/griphyn/vdl/karajan/functions/ProcessBulkErrors.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/functions/ProcessBulkErrors.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/functions/ProcessBulkErrors.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 6, 2006 */ package org.griphyn.vdl.karajan.functions; Modified: trunk/src/org/griphyn/vdl/karajan/lib/AbsFileName.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/AbsFileName.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/AbsFileName.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/AppStageins.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/AppStageins.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/AppStageins.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 5, 2007 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/AppStageouts.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/AppStageouts.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/AppStageouts.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 5, 2007 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/AppendArray.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/AppendArray.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/AppendArray.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Jul 21, 2011 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.lib; import org.globus.cog.karajan.arguments.Arg; Modified: trunk/src/org/griphyn/vdl/karajan/lib/CacheAddAndLockFile.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/CacheAddAndLockFile.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/CacheAddAndLockFile.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 29, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/CacheAddFile.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/CacheAddFile.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/CacheAddFile.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 28, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/CacheFileRemoved.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/CacheFileRemoved.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/CacheFileRemoved.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 29, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/CacheFunction.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/CacheFunction.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/CacheFunction.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 28, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/CacheUnlockFiles.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/CacheUnlockFiles.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/CacheUnlockFiles.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 28, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/CleanDataset.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/CleanDataset.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/CleanDataset.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/CloseDataset.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/CloseDataset.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/CloseDataset.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/CreateArray.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/CreateArray.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/CreateArray.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib; import java.util.Iterator; Modified: trunk/src/org/griphyn/vdl/karajan/lib/DoRestartLog.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/DoRestartLog.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/DoRestartLog.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jul 18, 2010 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/Executable.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Executable.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/Executable.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/Execute.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Execute.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/Execute.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Apr 30, 2008 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/ExpandArguments.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/ExpandArguments.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/ExpandArguments.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib; import java.util.ArrayList; Modified: trunk/src/org/griphyn/vdl/karajan/lib/FileCopier.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/FileCopier.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/FileCopier.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Oct 16, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.lib; import java.util.LinkedList; Modified: trunk/src/org/griphyn/vdl/karajan/lib/FileName.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/FileName.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/FileName.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/Flatten.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Flatten.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/Flatten.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jul 18, 2010 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/FringePaths.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/FringePaths.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/FringePaths.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/GetArrayIterator.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/GetArrayIterator.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/GetArrayIterator.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib; import org.apache.log4j.Logger; Modified: trunk/src/org/griphyn/vdl/karajan/lib/GetDatasetProvenanceID.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/GetDatasetProvenanceID.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/GetDatasetProvenanceID.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib; import org.globus.cog.karajan.arguments.Arg; Modified: trunk/src/org/griphyn/vdl/karajan/lib/GetField.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/GetField.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/GetField.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/GetFieldSubscript.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/GetFieldSubscript.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/GetFieldSubscript.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib; import java.util.Collection; Modified: trunk/src/org/griphyn/vdl/karajan/lib/GetFieldValue.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/GetFieldValue.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/GetFieldValue.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/InFileDirs.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/InFileDirs.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/InFileDirs.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jul 18, 2010 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/InfiniteCountingWhile.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/InfiniteCountingWhile.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/InfiniteCountingWhile.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,9 +1,20 @@ -// ---------------------------------------------------------------------- -// This code is developed as part of the Java CoG Kit project -// The terms of the license can be found at http://www.cogkit.org/license -// This message may not be removed or altered. -// ---------------------------------------------------------------------- +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.griphyn.vdl.karajan.lib; import java.util.Collections; Modified: trunk/src/org/griphyn/vdl/karajan/lib/IsDone.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/IsDone.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/IsDone.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jul 18, 2010 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/IsFileBound.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/IsFileBound.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/IsFileBound.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/IsLogged.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/IsLogged.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/IsLogged.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/IsRestartable.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/IsRestartable.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/IsRestartable.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib; import org.globus.cog.karajan.arguments.Arg; Modified: trunk/src/org/griphyn/vdl/karajan/lib/JobConstraints.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/JobConstraints.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/JobConstraints.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/Kickstart.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Kickstart.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/Kickstart.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/Log.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Log.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/Log.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 5, 2007 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/LogVar.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/LogVar.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/LogVar.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/Mark.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Mark.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/Mark.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jul 18, 2010 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/New.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/New.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/New.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/NiceName.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/NiceName.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/NiceName.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/Operators.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Operators.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/Operators.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib; import java.io.IOException; Modified: trunk/src/org/griphyn/vdl/karajan/lib/OutFileDirs.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/OutFileDirs.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/OutFileDirs.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jul 18, 2010 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/OutFiles.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/OutFiles.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/OutFiles.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jul 18, 2010 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/Parameterlog.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Parameterlog.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/Parameterlog.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jul 18, 2010 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/PartialCloseDataset.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/PartialCloseDataset.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/PartialCloseDataset.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib; import org.apache.log4j.Logger; Modified: trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib; import java.util.ArrayList; Modified: trunk/src/org/griphyn/vdl/karajan/lib/Range.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Range.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/Range.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib; import java.io.IOException; Modified: trunk/src/org/griphyn/vdl/karajan/lib/SequentialWithID.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/SequentialWithID.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/SequentialWithID.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib; import org.globus.cog.karajan.workflow.nodes.Sequential; Modified: trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/SetFutureFault.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/SetFutureFault.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/SetFutureFault.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/SiteProfile.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/SiteProfile.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/SiteProfile.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/SliceArray.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/SliceArray.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/SliceArray.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/Stagein.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Stagein.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/Stagein.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 5, 2007 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/Stageout.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Stageout.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/Stageout.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 5, 2007 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/SwiftArg.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/SwiftArg.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/SwiftArg.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jul 31, 2007 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/TCProfile.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/TCProfile.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/TCProfile.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/ThreadPrefix.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/ThreadPrefix.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/ThreadPrefix.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/ThrottledParallelFor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/ThrottledParallelFor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/ThrottledParallelFor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -// ---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 21, 2005 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.lib; import java.io.IOException; @@ -293,4 +301,4 @@ return closed; } } -} \ No newline at end of file +} Modified: trunk/src/org/griphyn/vdl/karajan/lib/Typecheck.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Typecheck.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/Typecheck.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/UnwrapClosedList.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/UnwrapClosedList.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/UnwrapClosedList.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib; Modified: trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib; import java.util.ArrayList; Modified: trunk/src/org/griphyn/vdl/karajan/lib/WaitFieldValue.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/WaitFieldValue.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/WaitFieldValue.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib; import org.apache.log4j.Logger; Modified: trunk/src/org/griphyn/vdl/karajan/lib/cache/CacheMapAdapter.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/cache/CacheMapAdapter.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/cache/CacheMapAdapter.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jul 15, 2008 */ package org.griphyn.vdl.karajan.lib.cache; Modified: trunk/src/org/griphyn/vdl/karajan/lib/cache/CacheReturn.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/cache/CacheReturn.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/cache/CacheReturn.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 29, 2006 */ package org.griphyn.vdl.karajan.lib.cache; Modified: trunk/src/org/griphyn/vdl/karajan/lib/cache/File.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/cache/File.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/cache/File.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 29, 2006 */ package org.griphyn.vdl.karajan.lib.cache; Modified: trunk/src/org/griphyn/vdl/karajan/lib/cache/LRUFileCache.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/cache/LRUFileCache.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/cache/LRUFileCache.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 29, 2006 */ package org.griphyn.vdl.karajan.lib.cache; Modified: trunk/src/org/griphyn/vdl/karajan/lib/cache/ProcessingListener.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/cache/ProcessingListener.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/cache/ProcessingListener.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 29, 2006 */ package org.griphyn.vdl.karajan.lib.cache; Modified: trunk/src/org/griphyn/vdl/karajan/lib/cache/Site.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/cache/Site.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/cache/Site.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 29, 2006 */ package org.griphyn.vdl.karajan.lib.cache; Modified: trunk/src/org/griphyn/vdl/karajan/lib/cache/VDLFileCache.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/cache/VDLFileCache.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/cache/VDLFileCache.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 28, 2006 */ package org.griphyn.vdl.karajan.lib.cache; Modified: trunk/src/org/griphyn/vdl/karajan/lib/cache/VDLFileCacheFactory.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/cache/VDLFileCacheFactory.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/cache/VDLFileCacheFactory.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 28, 2006 */ package org.griphyn.vdl.karajan.lib.cache; Modified: trunk/src/org/griphyn/vdl/karajan/lib/replication/CanceledReplicaException.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/replication/CanceledReplicaException.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/replication/CanceledReplicaException.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on May 29, 2008 */ package org.griphyn.vdl.karajan.lib.replication; Modified: trunk/src/org/griphyn/vdl/karajan/lib/replication/ReplicationGroups.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/replication/ReplicationGroups.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/replication/ReplicationGroups.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on May 1, 2008 */ package org.griphyn.vdl.karajan.lib.replication; Modified: trunk/src/org/griphyn/vdl/karajan/lib/replication/ReplicationManager.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/replication/ReplicationManager.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/replication/ReplicationManager.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on May 1, 2008 */ package org.griphyn.vdl.karajan.lib.replication; Modified: trunk/src/org/griphyn/vdl/karajan/lib/replication/Sweeper.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/replication/Sweeper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/replication/Sweeper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on May 1, 2008 */ package org.griphyn.vdl.karajan.lib.replication; Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Assert.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Assert.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Assert.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib.swiftscript; // import org.apache.log4j.Logger; Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ExtractInt.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ExtractInt.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ExtractInt.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib.swiftscript; import java.io.BufferedReader; Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FileName.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FileName.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FileName.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib.swiftscript; import org.globus.cog.karajan.arguments.Arg; Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FileNames.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FileNames.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FileNames.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 26, 2006 */ package org.griphyn.vdl.karajan.lib.swiftscript; Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FnArg.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FnArg.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/FnArg.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Sep 28, 2006 */ package org.griphyn.vdl.karajan.lib.swiftscript; Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Fprintf.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Fprintf.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Fprintf.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib.swiftscript; import java.io.FileWriter; Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Java.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Java.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Java.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib.swiftscript; import java.lang.reflect.Method; Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib.swiftscript; import java.io.IOException; Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadData.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadData.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadData.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Oct 8, 2007 */ package org.griphyn.vdl.karajan.lib.swiftscript; Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadStructured.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadStructured.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadStructured.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Oct 8, 2007 */ package org.griphyn.vdl.karajan.lib.swiftscript; Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Sprintf.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Sprintf.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Sprintf.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib.swiftscript; import org.apache.log4j.Logger; Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Tracef.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Tracef.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Tracef.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib.swiftscript; import org.apache.log4j.Logger; Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/WriteData.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/WriteData.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/WriteData.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.karajan.lib.swiftscript; import java.io.BufferedWriter; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/MonitorAppender.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/MonitorAppender.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/MonitorAppender.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/RadixTree.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/RadixTree.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/RadixTree.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Sep 22, 2007 */ package org.griphyn.vdl.karajan.monitor; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/StateUpdater.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/StateUpdater.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/StateUpdater.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/StatefulItemClassSet.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/StatefulItemClassSet.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/StatefulItemClassSet.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/Stats.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/Stats.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/Stats.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 27, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor; import java.util.Timer; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/SystemState.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/SystemState.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/SystemState.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/SystemStateListener.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/SystemStateListener.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/SystemStateListener.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/common/StatefulItemModel.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/common/StatefulItemModel.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/common/StatefulItemModel.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Sep 24, 2007 */ package org.griphyn.vdl.karajan.monitor.common; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/items/AbstractStatefulItem.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/items/AbstractStatefulItem.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/items/AbstractStatefulItem.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.items; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/items/ApplicationItem.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/items/ApplicationItem.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/items/ApplicationItem.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.items; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/items/Bridge.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/items/Bridge.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/items/Bridge.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Feb 19, 2007 */ package org.griphyn.vdl.karajan.monitor.items; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/items/HostItem.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/items/HostItem.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/items/HostItem.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.items; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/items/StatefulItem.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/items/StatefulItem.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/items/StatefulItem.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.items; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/items/StatefulItemClass.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/items/StatefulItemClass.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/items/StatefulItemClass.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.items; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/items/TaskItem.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/items/TaskItem.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/items/TaskItem.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.items; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/items/TraceItem.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/items/TraceItem.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/items/TraceItem.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.items; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/items/WorkflowItem.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/items/WorkflowItem.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/items/WorkflowItem.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.items; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/AbstractMonitor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/AbstractMonitor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/AbstractMonitor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/Monitor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/Monitor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/Monitor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/MonitorFactory.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/MonitorFactory.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/MonitorFactory.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/TextMonitor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/TextMonitor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/TextMonitor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/ANSIMonitor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/ANSIMonitor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/ANSIMonitor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/AbstractANSIDisplay.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/AbstractANSIDisplay.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/AbstractANSIDisplay.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 30, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/AppDialog.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/AppDialog.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/AppDialog.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 27, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi; import java.util.Collection; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/AppTable.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/AppTable.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/AppTable.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Sep 22, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/AppTasksModel.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/AppTasksModel.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/AppTasksModel.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 27, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi; import javax.swing.event.TableModelListener; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/BensCellRenderer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/BensCellRenderer.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/BensCellRenderer.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 29, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi; import java.util.HashMap; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/BensModel.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/BensModel.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/BensModel.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 28, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi; import java.io.BufferedReader; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/BensPane.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/BensPane.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/BensPane.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 28, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi; import org.griphyn.vdl.karajan.monitor.SystemState; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/GlobalProgress.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/GlobalProgress.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/GlobalProgress.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 27, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi; import java.io.IOException; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/GlobalTimer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/GlobalTimer.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/GlobalTimer.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Sep 23, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/HostCellRenderer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/HostCellRenderer.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/HostCellRenderer.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 27, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi; import java.io.IOException; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/HostTableModel.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/HostTableModel.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/HostTableModel.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 28, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi; import javax.swing.event.TableModelListener; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/LocalANSIDisplay.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/LocalANSIDisplay.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/LocalANSIDisplay.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Aug 28, 2008 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/RemoteANSIConnection.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/RemoteANSIConnection.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/RemoteANSIConnection.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 30, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/STable.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/STable.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/STable.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Feb 22, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/SchedulerInfoPane.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/SchedulerInfoPane.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/SchedulerInfoPane.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Sep 2, 2008 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/SummaryPane.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/SummaryPane.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/SummaryPane.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 27, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi; import java.io.IOException; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/TaskCellRenderer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/TaskCellRenderer.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/TaskCellRenderer.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 27, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi; import java.io.IOException; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/TaskStatsPane.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/TaskStatsPane.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/TaskStatsPane.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 27, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi; import java.io.IOException; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/WorkerTerminalInputHandler.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/WorkerTerminalInputHandler.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/WorkerTerminalInputHandler.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Apr 4, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi; import java.io.CharArrayWriter; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ANSI.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ANSI.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ANSI.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 30, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ANSIContext.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ANSIContext.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ANSIContext.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 31, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ActionListener.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ActionListener.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ActionListener.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Mar 1, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Button.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Button.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Button.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Feb 22, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/CharacterMap.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/CharacterMap.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/CharacterMap.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Feb 1, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Component.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Component.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Component.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 31, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Container.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Container.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Container.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 31, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/DefaultTableCellRenderer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/DefaultTableCellRenderer.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/DefaultTableCellRenderer.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 27, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; public class DefaultTableCellRenderer implements TableCellRenderer { Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Dialog.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Dialog.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Dialog.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Feb 22, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Frame.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Frame.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Frame.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 31, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Graph.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Graph.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Graph.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 27, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; import java.io.IOException; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/HLine.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/HLine.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/HLine.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Feb 21, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Key.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Key.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Key.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Feb 22, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Label.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Label.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Label.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 31, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LabelWithAccelerator.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LabelWithAccelerator.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LabelWithAccelerator.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 31, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LayeredContainer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LayeredContainer.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LayeredContainer.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 31, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LevelBar.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LevelBar.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LevelBar.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 28, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; import java.io.IOException; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LevelBars.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LevelBars.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LevelBars.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 28, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; import java.util.Iterator; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Menu.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Menu.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Menu.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 31, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/MenuBar.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/MenuBar.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/MenuBar.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 31, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/MenuItem.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/MenuItem.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/MenuItem.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 31, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Screen.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Screen.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Screen.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 31, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ScreenBuffer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ScreenBuffer.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ScreenBuffer.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Sep 24, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Tab.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Tab.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Tab.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 31, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/TabbedContainer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/TabbedContainer.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/TabbedContainer.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 31, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Table.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Table.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Table.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Feb 21, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/TableCellRenderer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/TableCellRenderer.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/TableCellRenderer.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Mar 27, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; public interface TableCellRenderer { Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/TableColumn.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/TableColumn.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/TableColumn.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Feb 21, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Terminal.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Terminal.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Terminal.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Apr 4, 2009 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; import java.io.IOException; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/TextArea.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/TextArea.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/TextArea.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 31, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/VBox.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/VBox.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/VBox.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Feb 22, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/VHCrossing.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/VHCrossing.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/VHCrossing.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Feb 21, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/VLine.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/VLine.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/VLine.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Feb 21, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/VScrollbar.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/VScrollbar.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/VScrollbar.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Feb 21, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.ansi.tui; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/ApplicationTable.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/ApplicationTable.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/ApplicationTable.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 30, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.swing; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/ClassRenderer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/ClassRenderer.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/ClassRenderer.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 30, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.swing; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/FilteringTaskTable.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/FilteringTaskTable.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/FilteringTaskTable.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.swing; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GanttChart.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GanttChart.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GanttChart.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Feb 13, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.swing; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/SimpleTableClassRenderer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/SimpleTableClassRenderer.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/SimpleTableClassRenderer.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.swing; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/SwingMonitor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/SwingMonitor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/SwingMonitor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.swing; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/TasksRenderer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/TasksRenderer.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/TasksRenderer.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 30, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.swing; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/TransferProgress.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/TransferProgress.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/TransferProgress.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 30, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.swing; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/TransferProgressRenderer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/TransferProgressRenderer.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/TransferProgressRenderer.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 30, 2007 */ package org.griphyn.vdl.karajan.monitor.monitors.swing; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/processors/AppProcessor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/processors/AppProcessor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/processors/AppProcessor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.processors; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/processors/AppThreadProcessor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/processors/AppThreadProcessor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/processors/AppThreadProcessor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.processors; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/processors/ExecutionContextProcessor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/processors/ExecutionContextProcessor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/processors/ExecutionContextProcessor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Aug 28, 2008 */ package org.griphyn.vdl.karajan.monitor.processors; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/processors/JobProcessor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/processors/JobProcessor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/processors/JobProcessor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Aug 29, 2008 */ package org.griphyn.vdl.karajan.monitor.processors; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/processors/LogMessageProcessor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/processors/LogMessageProcessor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/processors/LogMessageProcessor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.processors; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/processors/ParsingException.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/processors/ParsingException.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/processors/ParsingException.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.processors; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/processors/ProcedureProcessor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/processors/ProcedureProcessor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/processors/ProcedureProcessor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.processors; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/processors/SchedulerInfoProcessor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/processors/SchedulerInfoProcessor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/processors/SchedulerInfoProcessor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Aug 28, 2008 */ package org.griphyn.vdl.karajan.monitor.processors; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/processors/SimpleParser.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/processors/SimpleParser.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/processors/SimpleParser.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.processors; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/processors/TaskProcessor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/processors/TaskProcessor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/processors/TaskProcessor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.processors; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/processors/TraceProcessor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/processors/TraceProcessor.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/karajan/monitor/processors/TraceProcessor.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 29, 2007 */ package org.griphyn.vdl.karajan.monitor.processors; Modified: trunk/src/org/griphyn/vdl/mapping/AbsFile.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/AbsFile.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/AbsFile.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jul 26, 2007 */ package org.griphyn.vdl.mapping; Modified: trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 6, 2006 */ package org.griphyn.vdl.mapping; Modified: trunk/src/org/griphyn/vdl/mapping/AbstractMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/AbstractMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/AbstractMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping; import java.util.HashMap; Modified: trunk/src/org/griphyn/vdl/mapping/ArrayDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/ArrayDataNode.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/ArrayDataNode.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 30, 2006 */ package org.griphyn.vdl.mapping; Modified: trunk/src/org/griphyn/vdl/mapping/DSHandle.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/DSHandle.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/DSHandle.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping; import java.util.Collection; Modified: trunk/src/org/griphyn/vdl/mapping/DSHandleListener.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/DSHandleListener.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/DSHandleListener.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 8, 2007 */ package org.griphyn.vdl.mapping; Modified: trunk/src/org/griphyn/vdl/mapping/DataDependentException.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/DataDependentException.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/DataDependentException.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 13, 2007 */ package org.griphyn.vdl.mapping; Modified: trunk/src/org/griphyn/vdl/mapping/DataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/DataNode.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/DataNode.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 15, 2006 */ package org.griphyn.vdl.mapping; Modified: trunk/src/org/griphyn/vdl/mapping/DependentException.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/DependentException.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/DependentException.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 11, 2007 */ package org.griphyn.vdl.mapping; Modified: trunk/src/org/griphyn/vdl/mapping/ExternalDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/ExternalDataNode.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/ExternalDataNode.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping; import java.util.Collection; Modified: trunk/src/org/griphyn/vdl/mapping/GeneralizedFileFormat.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/GeneralizedFileFormat.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/GeneralizedFileFormat.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Aug 12, 2007 */ package org.griphyn.vdl.mapping; Modified: trunk/src/org/griphyn/vdl/mapping/HandleOpenException.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/HandleOpenException.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/HandleOpenException.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 15, 2006 */ package org.griphyn.vdl.mapping; Modified: trunk/src/org/griphyn/vdl/mapping/InvalidMapperException.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/InvalidMapperException.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/InvalidMapperException.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 30, 2006 */ package org.griphyn.vdl.mapping; Modified: trunk/src/org/griphyn/vdl/mapping/InvalidMappingParameterException.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/InvalidMappingParameterException.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/InvalidMappingParameterException.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Mar 2, 2007 */ package org.griphyn.vdl.mapping; Modified: trunk/src/org/griphyn/vdl/mapping/InvalidPathException.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/InvalidPathException.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/InvalidPathException.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 6, 2006 */ package org.griphyn.vdl.mapping; Modified: trunk/src/org/griphyn/vdl/mapping/Mapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/Mapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/Mapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping; import java.util.Collection; Modified: trunk/src/org/griphyn/vdl/mapping/MapperFactory.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/MapperFactory.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/MapperFactory.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 30, 2006 */ package org.griphyn.vdl.mapping; Modified: trunk/src/org/griphyn/vdl/mapping/MappingDependentException.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/MappingDependentException.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/MappingDependentException.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jan 13, 2007 */ package org.griphyn.vdl.mapping; Modified: trunk/src/org/griphyn/vdl/mapping/MappingParam.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/MappingParam.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/MappingParam.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping; import java.util.Map; Modified: trunk/src/org/griphyn/vdl/mapping/Path.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/Path.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/Path.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping; import java.util.ArrayList; Modified: trunk/src/org/griphyn/vdl/mapping/PathComparator.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/PathComparator.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/PathComparator.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Jul 22, 2011 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.mapping; import java.util.Comparator; @@ -54,4 +62,4 @@ } return 0; } -} \ No newline at end of file +} Modified: trunk/src/org/griphyn/vdl/mapping/PathElementComparator.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/PathElementComparator.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/PathElementComparator.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Jul 22, 2011 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.mapping; import java.util.Comparator; Modified: trunk/src/org/griphyn/vdl/mapping/PathParser.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/PathParser.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/PathParser.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Jul 21, 2011 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.mapping; import java.util.ArrayList; Modified: trunk/src/org/griphyn/vdl/mapping/PathParsingException.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/PathParsingException.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/PathParsingException.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Jul 22, 2011 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.mapping; public class PathParsingException extends RuntimeException { Modified: trunk/src/org/griphyn/vdl/mapping/PhysicalFormat.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/PhysicalFormat.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/PhysicalFormat.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Aug 12, 2007 */ package org.griphyn.vdl.mapping; Modified: trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping; import java.util.Map; Modified: trunk/src/org/griphyn/vdl/mapping/RootDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/RootDataNode.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/RootDataNode.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 15, 2006 */ package org.griphyn.vdl.mapping; Modified: trunk/src/org/griphyn/vdl/mapping/file/AbstractFileMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/AbstractFileMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/AbstractFileMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping.file; import java.io.File; Modified: trunk/src/org/griphyn/vdl/mapping/file/AirsnFileNameElementMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/AirsnFileNameElementMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/AirsnFileNameElementMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 8, 2006 */ package org.griphyn.vdl.mapping.file; Modified: trunk/src/org/griphyn/vdl/mapping/file/AirsnMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/AirsnMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/AirsnMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 30, 2006 */ package org.griphyn.vdl.mapping.file; Modified: trunk/src/org/griphyn/vdl/mapping/file/ArrayFileMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/ArrayFileMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/ArrayFileMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping.file; import java.util.ArrayList; Modified: trunk/src/org/griphyn/vdl/mapping/file/CSVMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/CSVMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/CSVMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping.file; import java.io.BufferedReader; Modified: trunk/src/org/griphyn/vdl/mapping/file/ConcurrentElementMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/ConcurrentElementMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/ConcurrentElementMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping.file; Modified: trunk/src/org/griphyn/vdl/mapping/file/ConcurrentMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/ConcurrentMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/ConcurrentMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Sep 20, 2006 */ package org.griphyn.vdl.mapping.file; Modified: trunk/src/org/griphyn/vdl/mapping/file/DefaultFileNameElementMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/DefaultFileNameElementMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/DefaultFileNameElementMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping.file; Modified: trunk/src/org/griphyn/vdl/mapping/file/ExternalMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/ExternalMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/ExternalMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping.file; import java.io.BufferedReader; Modified: trunk/src/org/griphyn/vdl/mapping/file/FileGarbageCollector.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/FileGarbageCollector.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/FileGarbageCollector.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Jul 4, 2011 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.mapping.file; import java.util.HashMap; Modified: trunk/src/org/griphyn/vdl/mapping/file/FileNameElementMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/FileNameElementMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/FileNameElementMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping.file; Modified: trunk/src/org/griphyn/vdl/mapping/file/FileSystemArrayMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/FileSystemArrayMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/FileSystemArrayMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping.file; import java.util.HashMap; Modified: trunk/src/org/griphyn/vdl/mapping/file/FixedArrayFileMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/FixedArrayFileMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/FixedArrayFileMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping.file; import java.util.ArrayList; Modified: trunk/src/org/griphyn/vdl/mapping/file/ROIFileNameElementMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/ROIFileNameElementMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/ROIFileNameElementMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping.file; import java.util.HashMap; Modified: trunk/src/org/griphyn/vdl/mapping/file/ROIMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/ROIMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/ROIMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping.file; import java.util.HashMap; Modified: trunk/src/org/griphyn/vdl/mapping/file/RegularExpressionMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/RegularExpressionMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/RegularExpressionMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping.file; import java.util.Arrays; Modified: trunk/src/org/griphyn/vdl/mapping/file/SimpleFileMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/SimpleFileMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/SimpleFileMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 30, 2006 */ package org.griphyn.vdl.mapping.file; Modified: trunk/src/org/griphyn/vdl/mapping/file/SingleFileMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/SingleFileMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/SingleFileMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping.file; import java.util.Arrays; Modified: trunk/src/org/griphyn/vdl/mapping/file/StructuredRegularExpressionMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/StructuredRegularExpressionMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/StructuredRegularExpressionMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.mapping.file; import java.util.ArrayList; Modified: trunk/src/org/griphyn/vdl/mapping/file/TestMapper.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/file/TestMapper.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/mapping/file/TestMapper.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,12 +1,20 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - /* - * Created on Jul 4, 2011 + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + + package org.griphyn.vdl.mapping.file; import java.util.Collection; Modified: trunk/src/org/griphyn/vdl/toolkit/VDLt2VDLx.java =================================================================== --- trunk/src/org/griphyn/vdl/toolkit/VDLt2VDLx.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/toolkit/VDLt2VDLx.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.toolkit; import java.io.InputStream; Modified: trunk/src/org/griphyn/vdl/type/DuplicateFieldException.java =================================================================== --- trunk/src/org/griphyn/vdl/type/DuplicateFieldException.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/type/DuplicateFieldException.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.type; public class DuplicateFieldException extends Exception { Modified: trunk/src/org/griphyn/vdl/type/Field.java =================================================================== --- trunk/src/org/griphyn/vdl/type/Field.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/type/Field.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.type; import org.griphyn.vdl.type.impl.FieldImpl; Modified: trunk/src/org/griphyn/vdl/type/NoSuchTypeException.java =================================================================== --- trunk/src/org/griphyn/vdl/type/NoSuchTypeException.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/type/NoSuchTypeException.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Jun 6, 2006 */ package org.griphyn.vdl.type; Modified: trunk/src/org/griphyn/vdl/type/Type.java =================================================================== --- trunk/src/org/griphyn/vdl/type/Type.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/type/Type.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.type; import java.net.URI; Modified: trunk/src/org/griphyn/vdl/type/Types.java =================================================================== --- trunk/src/org/griphyn/vdl/type/Types.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/type/Types.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.type; import java.util.HashMap; Modified: trunk/src/org/griphyn/vdl/type/impl/FieldImpl.java =================================================================== --- trunk/src/org/griphyn/vdl/type/impl/FieldImpl.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/type/impl/FieldImpl.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.type.impl; import org.griphyn.vdl.type.Field; Modified: trunk/src/org/griphyn/vdl/type/impl/TypeImpl.java =================================================================== --- trunk/src/org/griphyn/vdl/type/impl/TypeImpl.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/type/impl/TypeImpl.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,3 +1,20 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.griphyn.vdl.type.impl; import java.net.URI; Modified: trunk/src/org/griphyn/vdl/type/impl/UnresolvedType.java =================================================================== --- trunk/src/org/griphyn/vdl/type/impl/UnresolvedType.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/type/impl/UnresolvedType.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Aug 13, 2007 */ package org.griphyn.vdl.type.impl; Modified: trunk/src/org/griphyn/vdl/util/FQN.java =================================================================== --- trunk/src/org/griphyn/vdl/util/FQN.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/util/FQN.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Nov 21, 2006 */ package org.griphyn.vdl.util; Modified: trunk/src/org/griphyn/vdl/util/SwiftProfile.java =================================================================== --- trunk/src/org/griphyn/vdl/util/SwiftProfile.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/util/SwiftProfile.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 29, 2006 */ package org.griphyn.vdl.util; Modified: trunk/src/org/griphyn/vdl/util/TriStateBoolean.java =================================================================== --- trunk/src/org/griphyn/vdl/util/TriStateBoolean.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/util/TriStateBoolean.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Feb 7, 2007 */ package org.griphyn.vdl.util; Modified: trunk/src/org/griphyn/vdl/util/VDL2Config.java =================================================================== --- trunk/src/org/griphyn/vdl/util/VDL2Config.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/util/VDL2Config.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 5, 2006 */ package org.griphyn.vdl.util; Modified: trunk/src/org/griphyn/vdl/util/VDL2ConfigProperties.java =================================================================== --- trunk/src/org/griphyn/vdl/util/VDL2ConfigProperties.java 2012-01-10 17:01:34 UTC (rev 5496) +++ trunk/src/org/griphyn/vdl/util/VDL2ConfigProperties.java 2012-01-10 18:43:45 UTC (rev 5497) @@ -1,4 +1,21 @@ /* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* * Created on Dec 23, 2006 */ package org.griphyn.vdl.util; From hategan at ci.uchicago.edu Sat Jan 21 21:23:23 2012 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sun, 22 Jan 2012 03:23:23 -0000 Subject: [Swift-commit] r5505 - in branches/release-0.93.1: . bin docs docs/cookbook docs/cookbook/.cache docs/documentation docs/documentation/.cache docs/quickstart docs/quickstart/.cache docs/siteguide docs/siteguide/.cache docs/tutorial docs/tutorial/.cache docs/userguide docs/userguide/.cache docs/utils docs/utils/.cache etc etc/sites examples/misc libexec libexec/log-processing resources src/org/griphyn/vdl/engine src/org/griphyn/vdl/karajan src/org/griphyn/vdl/karajan/lib src/org/griphyn/vdl/karajan/lib/swiftscript src/org/griphyn/vdl/mapping tests tests/cdm tests/cdm/absolute tests/cdm/absolute/indir tests/functions tests/groups tests/sites tests/sites/PADS tests/sites/PADS/coasters tests/sites/PADS/pbs tests/sites/beagle tests/sites/beagle/coasters tests/sites/beagle/pbs tests/sites/crow tests/sites/crow/big tests/sites/fusion tests/sites/ibicluster tests/sites/intrepid tests/sites/local tests/sites/local-coasters tests/sites/mcs tests/sites/queenbee tests/sites/queenbee/pbs tests/ sites/ranger tests/sites/ranger/gt2 tests/sites/ranger/local tests/sites/surveyor tests/sites.old tests/sites.old/broken tests/sites.old/coaster tests/sites.old/communicado.ci.uchicago.edu tests/sites.old/gwynn.bsd.uchicago.edu tests/sites.old/tg-login.uc.teragrid.org tests/sites.old/wonky Message-ID: <20120122032314.E1B2A9CC94@svn.ci.uchicago.edu> Author: hategan Date: 2012-01-21 21:23:13 -0600 (Sat, 21 Jan 2012) New Revision: 5505 Added: branches/release-0.93.1/docs/cookbook/.cache/ branches/release-0.93.1/docs/cookbook/.cache/cookbook.txt branches/release-0.93.1/docs/documentation/.cache/ branches/release-0.93.1/docs/documentation/.cache/documentation.txt branches/release-0.93.1/docs/quickstart/.cache/ branches/release-0.93.1/docs/quickstart/.cache/quickstart.txt branches/release-0.93.1/docs/siteguide/.cache/ branches/release-0.93.1/docs/siteguide/.cache/siteguide.txt branches/release-0.93.1/docs/siteguide/bag_of_workstations branches/release-0.93.1/docs/siteguide/mcs branches/release-0.93.1/docs/tutorial/.cache/ branches/release-0.93.1/docs/tutorial/.cache/tutorial.txt branches/release-0.93.1/docs/userguide/.cache/ branches/release-0.93.1/docs/userguide/.cache/userguide.txt branches/release-0.93.1/docs/userguide/troubleshooting branches/release-0.93.1/docs/utils/.cache/ branches/release-0.93.1/docs/utils/.cache/gensites.txt branches/release-0.93.1/etc/sites/mcs branches/release-0.93.1/examples/misc/data.txt branches/release-0.93.1/tests/cdm/absolute/ branches/release-0.93.1/tests/cdm/absolute/100-infullpath-outfullpath.check.sh branches/release-0.93.1/tests/cdm/absolute/100-infullpath-outfullpath.swift branches/release-0.93.1/tests/cdm/absolute/200-infullpath-outrelpath.check.sh branches/release-0.93.1/tests/cdm/absolute/200-infullpath-outrelpath.swift branches/release-0.93.1/tests/cdm/absolute/300-inrelpath-outfullpath.check.sh branches/release-0.93.1/tests/cdm/absolute/300-inrelpath-outfullpath.swift branches/release-0.93.1/tests/cdm/absolute/400-inrelpath-outrelpath.check.sh branches/release-0.93.1/tests/cdm/absolute/400-inrelpath-outrelpath.swift branches/release-0.93.1/tests/cdm/absolute/README branches/release-0.93.1/tests/cdm/absolute/basic.swift branches/release-0.93.1/tests/cdm/absolute/catnap.sh branches/release-0.93.1/tests/cdm/absolute/cf.absolute branches/release-0.93.1/tests/cdm/absolute/cf.relative branches/release-0.93.1/tests/cdm/absolute/clean.sh branches/release-0.93.1/tests/cdm/absolute/data1.txt branches/release-0.93.1/tests/cdm/absolute/data2.txt branches/release-0.93.1/tests/cdm/absolute/data3.txt branches/release-0.93.1/tests/cdm/absolute/data4.txt branches/release-0.93.1/tests/cdm/absolute/ff.kml branches/release-0.93.1/tests/cdm/absolute/ff.swift branches/release-0.93.1/tests/cdm/absolute/fr.kml branches/release-0.93.1/tests/cdm/absolute/fr.swift branches/release-0.93.1/tests/cdm/absolute/fs.data branches/release-0.93.1/tests/cdm/absolute/indir/ branches/release-0.93.1/tests/cdm/absolute/indir/data1.txt branches/release-0.93.1/tests/cdm/absolute/indir/data2.txt branches/release-0.93.1/tests/cdm/absolute/indir/data3.txt branches/release-0.93.1/tests/cdm/absolute/indir/data4.txt branches/release-0.93.1/tests/cdm/absolute/out1.data branches/release-0.93.1/tests/cdm/absolute/out2.data branches/release-0.93.1/tests/cdm/absolute/out3.data branches/release-0.93.1/tests/cdm/absolute/out4.data branches/release-0.93.1/tests/cdm/absolute/rf.kml branches/release-0.93.1/tests/cdm/absolute/rf.swift branches/release-0.93.1/tests/cdm/absolute/rr.kml branches/release-0.93.1/tests/cdm/absolute/rr.swift branches/release-0.93.1/tests/cdm/absolute/run.sh branches/release-0.93.1/tests/cdm/absolute/set-env.sh branches/release-0.93.1/tests/cdm/absolute/setup.sh branches/release-0.93.1/tests/cdm/absolute/sites.xml branches/release-0.93.1/tests/cdm/absolute/tc branches/release-0.93.1/tests/functions/501-filenames.check.sh branches/release-0.93.1/tests/functions/501-filenames.out.expected branches/release-0.93.1/tests/functions/501-filenames.setup.sh branches/release-0.93.1/tests/functions/501-filenames.swift branches/release-0.93.1/tests/sites.old/ branches/release-0.93.1/tests/sites.old/README branches/release-0.93.1/tests/sites.old/UCLA_Saxon_Tier3-fork.xml branches/release-0.93.1/tests/sites.old/broken/ branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-b2-condor.xml branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-b2-fork.xml branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-condor.xml branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-fork.xml branches/release-0.93.1/tests/sites.old/broken/tp-pbs-gram4.xml branches/release-0.93.1/tests/sites.old/coaster/ branches/release-0.93.1/tests/sites.old/coaster/coaster-local.xml branches/release-0.93.1/tests/sites.old/coaster/fletch-coaster-gram2-gram2-condor.xml branches/release-0.93.1/tests/sites.old/coaster/fletch-coaster-gram2-gram2-fork.xml branches/release-0.93.1/tests/sites.old/coaster/renci-engage-coaster.xml branches/release-0.93.1/tests/sites.old/coaster/teraport-gt2-gt2-pbs.xml branches/release-0.93.1/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram2.xml branches/release-0.93.1/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram4.xml branches/release-0.93.1/tests/sites.old/coaster/uj-pbs-gram2.xml branches/release-0.93.1/tests/sites.old/communicado.ci.uchicago.edu/ branches/release-0.93.1/tests/sites.old/communicado.ci.uchicago.edu/local-condor.xml branches/release-0.93.1/tests/sites.old/fletch-condor-gram2.xml branches/release-0.93.1/tests/sites.old/fletch-fork-gram2.xml branches/release-0.93.1/tests/sites.old/gwynn.bsd.uchicago.edu/ branches/release-0.93.1/tests/sites.old/gwynn.bsd.uchicago.edu/condor-provider.xml branches/release-0.93.1/tests/sites.old/local-wrapper-args-file.xml branches/release-0.93.1/tests/sites.old/localhost.xml branches/release-0.93.1/tests/sites.old/osg-edu.cs.wisc.edu-condor.xml branches/release-0.93.1/tests/sites.old/osg-edu.cs.wisc.edu-fork.xml branches/release-0.93.1/tests/sites.old/pads-pbs-coasters.sh branches/release-0.93.1/tests/sites.old/renci-engage-condor.xml branches/release-0.93.1/tests/sites.old/run-all branches/release-0.93.1/tests/sites.old/run-site branches/release-0.93.1/tests/sites.old/tc.data branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/ branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram2.xml branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram4.xml branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram2.xml branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram4.xml branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-local.xml branches/release-0.93.1/tests/sites.old/tgncsa-hg-fork-gram2.xml branches/release-0.93.1/tests/sites.old/tgncsa-hg-fork-gram4.xml branches/release-0.93.1/tests/sites.old/tgncsa-hg-pbs-gram2.xml branches/release-0.93.1/tests/sites.old/tgncsa-hg-pbs-gram4.xml branches/release-0.93.1/tests/sites.old/tgpurdue-condor-gram2.xml branches/release-0.93.1/tests/sites.old/tgpurdue-condor-gram4.xml branches/release-0.93.1/tests/sites.old/tgpurdue-fork-gram2.xml branches/release-0.93.1/tests/sites.old/tgpurdue-fork-gram4.xml branches/release-0.93.1/tests/sites.old/tgtacc-fork-gram2.xml branches/release-0.93.1/tests/sites.old/tgtacc-lsf-gram2.xml branches/release-0.93.1/tests/sites.old/tguc-fork-gram2.xml branches/release-0.93.1/tests/sites.old/tguc-fork-gram4.xml branches/release-0.93.1/tests/sites.old/tguc-pbs-gram2-syntax1.xml branches/release-0.93.1/tests/sites.old/tguc-pbs-gram2.xml branches/release-0.93.1/tests/sites.old/tguc-pbs-gram4.xml branches/release-0.93.1/tests/sites.old/tp-fork-gram2.xml branches/release-0.93.1/tests/sites.old/tp-fork-gram4.xml branches/release-0.93.1/tests/sites.old/tp-pbs-gram2.xml branches/release-0.93.1/tests/sites.old/uj-fork-gram2.xml branches/release-0.93.1/tests/sites.old/uj-pbs-gram2.xml branches/release-0.93.1/tests/sites.old/wonky/ branches/release-0.93.1/tests/sites.old/wonky/relative-absolute-wrapper.xml branches/release-0.93.1/tests/sites.old/wonky/slow-queue-fast-queue.xml branches/release-0.93.1/tests/sites.old/wonky/wonky-80percent.xml branches/release-0.93.1/tests/sites.old/wonky/wonky-90percent.xml branches/release-0.93.1/tests/sites.old/wonky/wonky-failfirst.xml branches/release-0.93.1/tests/sites.old/wonky/wonky-good.xml branches/release-0.93.1/tests/sites.old/wonky/wonky-runawayjob.xml branches/release-0.93.1/tests/sites.old/wonky/wrongdir.xml branches/release-0.93.1/tests/sites/ branches/release-0.93.1/tests/sites/PADS/ branches/release-0.93.1/tests/sites/PADS/coasters/ branches/release-0.93.1/tests/sites/PADS/coasters/README branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0001.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0002.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0003.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0004.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0005.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0006.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0007.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0008.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0009.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0010.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.setup.sh branches/release-0.93.1/tests/sites/PADS/coasters/catsn.swift branches/release-0.93.1/tests/sites/PADS/coasters/catsn.timeout branches/release-0.93.1/tests/sites/PADS/coasters/data.txt branches/release-0.93.1/tests/sites/PADS/coasters/sites.template.xml branches/release-0.93.1/tests/sites/PADS/coasters/tc.template.data branches/release-0.93.1/tests/sites/PADS/pbs/ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0001.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0002.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0003.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0004.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0005.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0006.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0007.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0008.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0009.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0010.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.setup.sh branches/release-0.93.1/tests/sites/PADS/pbs/catsn.swift branches/release-0.93.1/tests/sites/PADS/pbs/catsn.timeout branches/release-0.93.1/tests/sites/PADS/pbs/data.txt branches/release-0.93.1/tests/sites/PADS/pbs/sites.template.xml branches/release-0.93.1/tests/sites/PADS/pbs/tc.template.data branches/release-0.93.1/tests/sites/beagle/ branches/release-0.93.1/tests/sites/beagle/coasters/ branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.check.sh branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.setup.sh branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.swift branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.timeout branches/release-0.93.1/tests/sites/beagle/coasters/data.txt branches/release-0.93.1/tests/sites/beagle/coasters/sites.template.xml branches/release-0.93.1/tests/sites/beagle/coasters/tc.template.data branches/release-0.93.1/tests/sites/beagle/coasters/title.txt branches/release-0.93.1/tests/sites/beagle/pbs/ branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.check.sh branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.setup.sh branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.swift branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.timeout branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0001.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0002.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0003.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0004.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0005.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0006.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0007.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0008.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0009.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0010.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/data.txt branches/release-0.93.1/tests/sites/beagle/pbs/sites.template.xml branches/release-0.93.1/tests/sites/beagle/pbs/tc.template.data branches/release-0.93.1/tests/sites/crow/ branches/release-0.93.1/tests/sites/crow/001-catsn.check.sh branches/release-0.93.1/tests/sites/crow/001-catsn.clean.sh branches/release-0.93.1/tests/sites/crow/001-catsn.setup.sh branches/release-0.93.1/tests/sites/crow/001-catsn.swift branches/release-0.93.1/tests/sites/crow/001-catsn.timeout branches/release-0.93.1/tests/sites/crow/big/ branches/release-0.93.1/tests/sites/crow/big/201-cps.check.sh branches/release-0.93.1/tests/sites/crow/big/201-cps.clean.sh branches/release-0.93.1/tests/sites/crow/big/201-cps.setup.sh branches/release-0.93.1/tests/sites/crow/big/201-cps.swift branches/release-0.93.1/tests/sites/crow/big/201-cps.timeout branches/release-0.93.1/tests/sites/crow/big/cps.sh branches/release-0.93.1/tests/sites/crow/big/data.txt branches/release-0.93.1/tests/sites/crow/big/sites.template.xml branches/release-0.93.1/tests/sites/crow/big/title.txt branches/release-0.93.1/tests/sites/crow/data.txt branches/release-0.93.1/tests/sites/crow/sites.template.xml branches/release-0.93.1/tests/sites/crow/tc.template.data branches/release-0.93.1/tests/sites/crow/title.txt branches/release-0.93.1/tests/sites/fusion/ branches/release-0.93.1/tests/sites/fusion/catsn.0001.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0002.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0003.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0004.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0005.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0006.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0007.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0008.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0009.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0010.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.setup.sh branches/release-0.93.1/tests/sites/fusion/catsn.swift branches/release-0.93.1/tests/sites/fusion/catsn.timeout branches/release-0.93.1/tests/sites/fusion/data.txt branches/release-0.93.1/tests/sites/fusion/sites.template.xml branches/release-0.93.1/tests/sites/fusion/tc.template.data branches/release-0.93.1/tests/sites/ibicluster/ branches/release-0.93.1/tests/sites/ibicluster/catsn.0001.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0002.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0003.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0004.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0005.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0006.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0007.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0008.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0009.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0010.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.check.sh branches/release-0.93.1/tests/sites/ibicluster/catsn.setup.sh branches/release-0.93.1/tests/sites/ibicluster/catsn.swift branches/release-0.93.1/tests/sites/ibicluster/catsn.timeout branches/release-0.93.1/tests/sites/ibicluster/data.txt branches/release-0.93.1/tests/sites/ibicluster/sites.template.xml branches/release-0.93.1/tests/sites/ibicluster/tc.template.data branches/release-0.93.1/tests/sites/ibicluster/title.txt branches/release-0.93.1/tests/sites/intrepid/ branches/release-0.93.1/tests/sites/intrepid/100-cp.check.sh branches/release-0.93.1/tests/sites/intrepid/100-cp.clean.sh branches/release-0.93.1/tests/sites/intrepid/100-cp.setup.sh branches/release-0.93.1/tests/sites/intrepid/100-cp.swift branches/release-0.93.1/tests/sites/intrepid/100-cp.timeout branches/release-0.93.1/tests/sites/intrepid/sites.template.xml branches/release-0.93.1/tests/sites/intrepid/tc.template.data branches/release-0.93.1/tests/sites/intrepid/title.txt branches/release-0.93.1/tests/sites/local-coasters/ branches/release-0.93.1/tests/sites/local-coasters/200-cp.check.sh branches/release-0.93.1/tests/sites/local-coasters/200-cp.clean.sh branches/release-0.93.1/tests/sites/local-coasters/200-cp.setup.sh branches/release-0.93.1/tests/sites/local-coasters/200-cp.swift branches/release-0.93.1/tests/sites/local-coasters/201-cp.check.sh branches/release-0.93.1/tests/sites/local-coasters/201-cp.clean.sh branches/release-0.93.1/tests/sites/local-coasters/201-cp.setup.sh branches/release-0.93.1/tests/sites/local-coasters/201-cp.swift branches/release-0.93.1/tests/sites/local-coasters/README.txt branches/release-0.93.1/tests/sites/local-coasters/sites.template.xml branches/release-0.93.1/tests/sites/local-coasters/tc.template.data branches/release-0.93.1/tests/sites/local-coasters/title.txt branches/release-0.93.1/tests/sites/local/ branches/release-0.93.1/tests/sites/local/001-catsn-local.check.sh branches/release-0.93.1/tests/sites/local/001-catsn-local.setup.sh branches/release-0.93.1/tests/sites/local/001-catsn-local.swift branches/release-0.93.1/tests/sites/local/001-catsn-local.timeout branches/release-0.93.1/tests/sites/local/catsn.0001.out.expected branches/release-0.93.1/tests/sites/local/catsn.0002.out.expected branches/release-0.93.1/tests/sites/local/catsn.0003.out.expected branches/release-0.93.1/tests/sites/local/catsn.0004.out.expected branches/release-0.93.1/tests/sites/local/catsn.0005.out.expected branches/release-0.93.1/tests/sites/local/catsn.0006.out.expected branches/release-0.93.1/tests/sites/local/catsn.0007.out.expected branches/release-0.93.1/tests/sites/local/catsn.0008.out.expected branches/release-0.93.1/tests/sites/local/catsn.0009.out.expected branches/release-0.93.1/tests/sites/local/catsn.0010.out.expected branches/release-0.93.1/tests/sites/local/data.txt branches/release-0.93.1/tests/sites/local/sites.template.xml branches/release-0.93.1/tests/sites/local/tc.template.data branches/release-0.93.1/tests/sites/local/title.txt branches/release-0.93.1/tests/sites/mcs/ branches/release-0.93.1/tests/sites/mcs/001-catsn.check.sh branches/release-0.93.1/tests/sites/mcs/001-catsn.clean.sh branches/release-0.93.1/tests/sites/mcs/001-catsn.setup.sh branches/release-0.93.1/tests/sites/mcs/001-catsn.swift branches/release-0.93.1/tests/sites/mcs/001-catsn.timeout branches/release-0.93.1/tests/sites/mcs/README branches/release-0.93.1/tests/sites/mcs/catsn.0001.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0002.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0003.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0004.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0005.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0006.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0007.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0008.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0009.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0010.out.expected branches/release-0.93.1/tests/sites/mcs/coaster-service.conf branches/release-0.93.1/tests/sites/mcs/data.txt branches/release-0.93.1/tests/sites/mcs/title.txt branches/release-0.93.1/tests/sites/queenbee/ branches/release-0.93.1/tests/sites/queenbee/pbs/ branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.check.sh branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.swift branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.timeout branches/release-0.93.1/tests/sites/queenbee/pbs/README branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0001.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0002.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0003.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0004.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0005.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0006.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0007.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0008.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0009.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0010.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/data.txt branches/release-0.93.1/tests/sites/queenbee/pbs/sites.template.xml branches/release-0.93.1/tests/sites/queenbee/pbs/tc.template.data branches/release-0.93.1/tests/sites/queenbee/pbs/title.txt branches/release-0.93.1/tests/sites/ranger/ branches/release-0.93.1/tests/sites/ranger/gt2/ branches/release-0.93.1/tests/sites/ranger/gt2/001-catsn-ranger.swift branches/release-0.93.1/tests/sites/ranger/gt2/cf branches/release-0.93.1/tests/sites/ranger/gt2/data.txt branches/release-0.93.1/tests/sites/ranger/gt2/sites.template.xml branches/release-0.93.1/tests/sites/ranger/gt2/start_proxy.sh branches/release-0.93.1/tests/sites/ranger/gt2/tc.template.data branches/release-0.93.1/tests/sites/ranger/local/ branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.check.sh branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.setup.sh branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.swift branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.timeout branches/release-0.93.1/tests/sites/ranger/local/catsn.0001.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0002.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0003.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0004.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0005.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0006.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0007.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0008.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0009.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0010.out.expected branches/release-0.93.1/tests/sites/ranger/local/data.txt branches/release-0.93.1/tests/sites/ranger/local/sites.template.xml branches/release-0.93.1/tests/sites/ranger/local/sleep.swift branches/release-0.93.1/tests/sites/ranger/local/tc.template.data branches/release-0.93.1/tests/sites/ranger/local/title.txt branches/release-0.93.1/tests/sites/surveyor/ branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.check.sh branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.setup.sh branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.swift branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.timeout branches/release-0.93.1/tests/sites/surveyor/README branches/release-0.93.1/tests/sites/surveyor/catsn.0001.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0002.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0003.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0004.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0005.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0006.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0007.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0008.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0009.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0010.out.expected branches/release-0.93.1/tests/sites/surveyor/data.txt branches/release-0.93.1/tests/sites/surveyor/sites.template.xml branches/release-0.93.1/tests/sites/surveyor/tc.template.data branches/release-0.93.1/tests/sites/surveyor/title.txt Removed: branches/release-0.93.1/docs/cookbook/.cache/cookbook.txt branches/release-0.93.1/docs/documentation/.cache/documentation.txt branches/release-0.93.1/docs/quickstart/.cache/quickstart.txt branches/release-0.93.1/docs/siteguide/.cache/siteguide.txt branches/release-0.93.1/docs/tutorial/.cache/tutorial.txt branches/release-0.93.1/docs/userguide/.cache/userguide.txt branches/release-0.93.1/docs/utils/.cache/gensites.txt branches/release-0.93.1/etc/sites/OLD/ branches/release-0.93.1/tests/cdm/absolute/100-infullpath-outfullpath.check.sh branches/release-0.93.1/tests/cdm/absolute/100-infullpath-outfullpath.swift branches/release-0.93.1/tests/cdm/absolute/200-infullpath-outrelpath.check.sh branches/release-0.93.1/tests/cdm/absolute/200-infullpath-outrelpath.swift branches/release-0.93.1/tests/cdm/absolute/300-inrelpath-outfullpath.check.sh branches/release-0.93.1/tests/cdm/absolute/300-inrelpath-outfullpath.swift branches/release-0.93.1/tests/cdm/absolute/400-inrelpath-outrelpath.check.sh branches/release-0.93.1/tests/cdm/absolute/400-inrelpath-outrelpath.swift branches/release-0.93.1/tests/cdm/absolute/README branches/release-0.93.1/tests/cdm/absolute/basic.swift branches/release-0.93.1/tests/cdm/absolute/catnap.sh branches/release-0.93.1/tests/cdm/absolute/cf.absolute branches/release-0.93.1/tests/cdm/absolute/cf.relative branches/release-0.93.1/tests/cdm/absolute/clean.sh branches/release-0.93.1/tests/cdm/absolute/data1.txt branches/release-0.93.1/tests/cdm/absolute/data2.txt branches/release-0.93.1/tests/cdm/absolute/data3.txt branches/release-0.93.1/tests/cdm/absolute/data4.txt branches/release-0.93.1/tests/cdm/absolute/ff.kml branches/release-0.93.1/tests/cdm/absolute/ff.swift branches/release-0.93.1/tests/cdm/absolute/fr.kml branches/release-0.93.1/tests/cdm/absolute/fr.swift branches/release-0.93.1/tests/cdm/absolute/fs.data branches/release-0.93.1/tests/cdm/absolute/indir/ branches/release-0.93.1/tests/cdm/absolute/indir/data1.txt branches/release-0.93.1/tests/cdm/absolute/indir/data2.txt branches/release-0.93.1/tests/cdm/absolute/indir/data3.txt branches/release-0.93.1/tests/cdm/absolute/indir/data4.txt branches/release-0.93.1/tests/cdm/absolute/out1.data branches/release-0.93.1/tests/cdm/absolute/out2.data branches/release-0.93.1/tests/cdm/absolute/out3.data branches/release-0.93.1/tests/cdm/absolute/out4.data branches/release-0.93.1/tests/cdm/absolute/rf.kml branches/release-0.93.1/tests/cdm/absolute/rf.swift branches/release-0.93.1/tests/cdm/absolute/rr.kml branches/release-0.93.1/tests/cdm/absolute/rr.swift branches/release-0.93.1/tests/cdm/absolute/run.sh branches/release-0.93.1/tests/cdm/absolute/set-env.sh branches/release-0.93.1/tests/cdm/absolute/setup.sh branches/release-0.93.1/tests/cdm/absolute/sites.xml branches/release-0.93.1/tests/cdm/absolute/tc branches/release-0.93.1/tests/providers/ branches/release-0.93.1/tests/sites.old/README branches/release-0.93.1/tests/sites.old/UCLA_Saxon_Tier3-fork.xml branches/release-0.93.1/tests/sites.old/broken/ branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-b2-condor.xml branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-b2-fork.xml branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-condor.xml branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-fork.xml branches/release-0.93.1/tests/sites.old/broken/tp-pbs-gram4.xml branches/release-0.93.1/tests/sites.old/coaster/ branches/release-0.93.1/tests/sites.old/coaster/coaster-local.xml branches/release-0.93.1/tests/sites.old/coaster/fletch-coaster-gram2-gram2-condor.xml branches/release-0.93.1/tests/sites.old/coaster/fletch-coaster-gram2-gram2-fork.xml branches/release-0.93.1/tests/sites.old/coaster/renci-engage-coaster.xml branches/release-0.93.1/tests/sites.old/coaster/teraport-gt2-gt2-pbs.xml branches/release-0.93.1/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram2.xml branches/release-0.93.1/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram4.xml branches/release-0.93.1/tests/sites.old/coaster/uj-pbs-gram2.xml branches/release-0.93.1/tests/sites.old/communicado.ci.uchicago.edu/ branches/release-0.93.1/tests/sites.old/communicado.ci.uchicago.edu/local-condor.xml branches/release-0.93.1/tests/sites.old/fletch-condor-gram2.xml branches/release-0.93.1/tests/sites.old/fletch-fork-gram2.xml branches/release-0.93.1/tests/sites.old/gwynn.bsd.uchicago.edu/ branches/release-0.93.1/tests/sites.old/gwynn.bsd.uchicago.edu/condor-provider.xml branches/release-0.93.1/tests/sites.old/local-wrapper-args-file.xml branches/release-0.93.1/tests/sites.old/localhost.xml branches/release-0.93.1/tests/sites.old/osg-edu.cs.wisc.edu-condor.xml branches/release-0.93.1/tests/sites.old/osg-edu.cs.wisc.edu-fork.xml branches/release-0.93.1/tests/sites.old/pads-pbs-coasters.sh branches/release-0.93.1/tests/sites.old/renci-engage-condor.xml branches/release-0.93.1/tests/sites.old/run-all branches/release-0.93.1/tests/sites.old/run-site branches/release-0.93.1/tests/sites.old/tc.data branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/ branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram2.xml branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram4.xml branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram2.xml branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram4.xml branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-local.xml branches/release-0.93.1/tests/sites.old/tgncsa-hg-fork-gram2.xml branches/release-0.93.1/tests/sites.old/tgncsa-hg-fork-gram4.xml branches/release-0.93.1/tests/sites.old/tgncsa-hg-pbs-gram2.xml branches/release-0.93.1/tests/sites.old/tgncsa-hg-pbs-gram4.xml branches/release-0.93.1/tests/sites.old/tgpurdue-condor-gram2.xml branches/release-0.93.1/tests/sites.old/tgpurdue-condor-gram4.xml branches/release-0.93.1/tests/sites.old/tgpurdue-fork-gram2.xml branches/release-0.93.1/tests/sites.old/tgpurdue-fork-gram4.xml branches/release-0.93.1/tests/sites.old/tgtacc-fork-gram2.xml branches/release-0.93.1/tests/sites.old/tgtacc-lsf-gram2.xml branches/release-0.93.1/tests/sites.old/tguc-fork-gram2.xml branches/release-0.93.1/tests/sites.old/tguc-fork-gram4.xml branches/release-0.93.1/tests/sites.old/tguc-pbs-gram2-syntax1.xml branches/release-0.93.1/tests/sites.old/tguc-pbs-gram2.xml branches/release-0.93.1/tests/sites.old/tguc-pbs-gram4.xml branches/release-0.93.1/tests/sites.old/tp-fork-gram2.xml branches/release-0.93.1/tests/sites.old/tp-fork-gram4.xml branches/release-0.93.1/tests/sites.old/tp-pbs-gram2.xml branches/release-0.93.1/tests/sites.old/uj-fork-gram2.xml branches/release-0.93.1/tests/sites.old/uj-pbs-gram2.xml branches/release-0.93.1/tests/sites.old/wonky/ branches/release-0.93.1/tests/sites.old/wonky/relative-absolute-wrapper.xml branches/release-0.93.1/tests/sites.old/wonky/slow-queue-fast-queue.xml branches/release-0.93.1/tests/sites.old/wonky/wonky-80percent.xml branches/release-0.93.1/tests/sites.old/wonky/wonky-90percent.xml branches/release-0.93.1/tests/sites.old/wonky/wonky-failfirst.xml branches/release-0.93.1/tests/sites.old/wonky/wonky-good.xml branches/release-0.93.1/tests/sites.old/wonky/wonky-runawayjob.xml branches/release-0.93.1/tests/sites.old/wonky/wrongdir.xml branches/release-0.93.1/tests/sites/ branches/release-0.93.1/tests/sites/PADS/ branches/release-0.93.1/tests/sites/PADS/coasters/ branches/release-0.93.1/tests/sites/PADS/coasters/README branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0001.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0002.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0003.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0004.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0005.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0006.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0007.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0008.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0009.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0010.out.expected branches/release-0.93.1/tests/sites/PADS/coasters/catsn.setup.sh branches/release-0.93.1/tests/sites/PADS/coasters/catsn.swift branches/release-0.93.1/tests/sites/PADS/coasters/catsn.timeout branches/release-0.93.1/tests/sites/PADS/coasters/data.txt branches/release-0.93.1/tests/sites/PADS/coasters/sites.template.xml branches/release-0.93.1/tests/sites/PADS/coasters/tc.template.data branches/release-0.93.1/tests/sites/PADS/pbs/ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0001.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0002.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0003.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0004.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0005.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0006.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0007.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0008.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0009.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0010.out.expected branches/release-0.93.1/tests/sites/PADS/pbs/catsn.setup.sh branches/release-0.93.1/tests/sites/PADS/pbs/catsn.swift branches/release-0.93.1/tests/sites/PADS/pbs/catsn.timeout branches/release-0.93.1/tests/sites/PADS/pbs/data.txt branches/release-0.93.1/tests/sites/PADS/pbs/sites.template.xml branches/release-0.93.1/tests/sites/PADS/pbs/tc.template.data branches/release-0.93.1/tests/sites/beagle/ branches/release-0.93.1/tests/sites/beagle/coasters/ branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.check.sh branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.setup.sh branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.swift branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.timeout branches/release-0.93.1/tests/sites/beagle/coasters/data.txt branches/release-0.93.1/tests/sites/beagle/coasters/sites.template.xml branches/release-0.93.1/tests/sites/beagle/coasters/tc.template.data branches/release-0.93.1/tests/sites/beagle/coasters/title.txt branches/release-0.93.1/tests/sites/beagle/pbs/ branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.check.sh branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.setup.sh branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.swift branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.timeout branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0001.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0002.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0003.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0004.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0005.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0006.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0007.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0008.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0009.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0010.out.expected branches/release-0.93.1/tests/sites/beagle/pbs/data.txt branches/release-0.93.1/tests/sites/beagle/pbs/sites.template.xml branches/release-0.93.1/tests/sites/beagle/pbs/tc.template.data branches/release-0.93.1/tests/sites/crow/ branches/release-0.93.1/tests/sites/crow/001-catsn.check.sh branches/release-0.93.1/tests/sites/crow/001-catsn.clean.sh branches/release-0.93.1/tests/sites/crow/001-catsn.setup.sh branches/release-0.93.1/tests/sites/crow/001-catsn.swift branches/release-0.93.1/tests/sites/crow/001-catsn.timeout branches/release-0.93.1/tests/sites/crow/big/ branches/release-0.93.1/tests/sites/crow/big/201-cps.check.sh branches/release-0.93.1/tests/sites/crow/big/201-cps.clean.sh branches/release-0.93.1/tests/sites/crow/big/201-cps.setup.sh branches/release-0.93.1/tests/sites/crow/big/201-cps.swift branches/release-0.93.1/tests/sites/crow/big/201-cps.timeout branches/release-0.93.1/tests/sites/crow/big/cps.sh branches/release-0.93.1/tests/sites/crow/big/data.txt branches/release-0.93.1/tests/sites/crow/big/sites.template.xml branches/release-0.93.1/tests/sites/crow/big/title.txt branches/release-0.93.1/tests/sites/crow/data.txt branches/release-0.93.1/tests/sites/crow/sites.template.xml branches/release-0.93.1/tests/sites/crow/tc.template.data branches/release-0.93.1/tests/sites/crow/title.txt branches/release-0.93.1/tests/sites/fusion/ branches/release-0.93.1/tests/sites/fusion/catsn.0001.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0002.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0003.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0004.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0005.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0006.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0007.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0008.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0009.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.0010.out.expected branches/release-0.93.1/tests/sites/fusion/catsn.setup.sh branches/release-0.93.1/tests/sites/fusion/catsn.swift branches/release-0.93.1/tests/sites/fusion/catsn.timeout branches/release-0.93.1/tests/sites/fusion/data.txt branches/release-0.93.1/tests/sites/fusion/sites.template.xml branches/release-0.93.1/tests/sites/fusion/tc.template.data branches/release-0.93.1/tests/sites/ibicluster/ branches/release-0.93.1/tests/sites/ibicluster/catsn.0001.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0002.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0003.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0004.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0005.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0006.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0007.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0008.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0009.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.0010.out.expected branches/release-0.93.1/tests/sites/ibicluster/catsn.check.sh branches/release-0.93.1/tests/sites/ibicluster/catsn.setup.sh branches/release-0.93.1/tests/sites/ibicluster/catsn.swift branches/release-0.93.1/tests/sites/ibicluster/catsn.timeout branches/release-0.93.1/tests/sites/ibicluster/data.txt branches/release-0.93.1/tests/sites/ibicluster/sites.template.xml branches/release-0.93.1/tests/sites/ibicluster/tc.template.data branches/release-0.93.1/tests/sites/ibicluster/title.txt branches/release-0.93.1/tests/sites/intrepid/ branches/release-0.93.1/tests/sites/intrepid/100-cp.check.sh branches/release-0.93.1/tests/sites/intrepid/100-cp.clean.sh branches/release-0.93.1/tests/sites/intrepid/100-cp.setup.sh branches/release-0.93.1/tests/sites/intrepid/100-cp.swift branches/release-0.93.1/tests/sites/intrepid/100-cp.timeout branches/release-0.93.1/tests/sites/intrepid/sites.template.xml branches/release-0.93.1/tests/sites/intrepid/tc.template.data branches/release-0.93.1/tests/sites/intrepid/title.txt branches/release-0.93.1/tests/sites/local-coasters/ branches/release-0.93.1/tests/sites/local-coasters/200-cp.check.sh branches/release-0.93.1/tests/sites/local-coasters/200-cp.clean.sh branches/release-0.93.1/tests/sites/local-coasters/200-cp.setup.sh branches/release-0.93.1/tests/sites/local-coasters/200-cp.swift branches/release-0.93.1/tests/sites/local-coasters/201-cp.check.sh branches/release-0.93.1/tests/sites/local-coasters/201-cp.clean.sh branches/release-0.93.1/tests/sites/local-coasters/201-cp.setup.sh branches/release-0.93.1/tests/sites/local-coasters/201-cp.swift branches/release-0.93.1/tests/sites/local-coasters/README.txt branches/release-0.93.1/tests/sites/local-coasters/sites.template.xml branches/release-0.93.1/tests/sites/local-coasters/tc.template.data branches/release-0.93.1/tests/sites/local-coasters/title.txt branches/release-0.93.1/tests/sites/local/ branches/release-0.93.1/tests/sites/local/001-catsn-local.check.sh branches/release-0.93.1/tests/sites/local/001-catsn-local.setup.sh branches/release-0.93.1/tests/sites/local/001-catsn-local.swift branches/release-0.93.1/tests/sites/local/001-catsn-local.timeout branches/release-0.93.1/tests/sites/local/catsn.0001.out.expected branches/release-0.93.1/tests/sites/local/catsn.0002.out.expected branches/release-0.93.1/tests/sites/local/catsn.0003.out.expected branches/release-0.93.1/tests/sites/local/catsn.0004.out.expected branches/release-0.93.1/tests/sites/local/catsn.0005.out.expected branches/release-0.93.1/tests/sites/local/catsn.0006.out.expected branches/release-0.93.1/tests/sites/local/catsn.0007.out.expected branches/release-0.93.1/tests/sites/local/catsn.0008.out.expected branches/release-0.93.1/tests/sites/local/catsn.0009.out.expected branches/release-0.93.1/tests/sites/local/catsn.0010.out.expected branches/release-0.93.1/tests/sites/local/data.txt branches/release-0.93.1/tests/sites/local/sites.template.xml branches/release-0.93.1/tests/sites/local/tc.template.data branches/release-0.93.1/tests/sites/local/title.txt branches/release-0.93.1/tests/sites/mcs/ branches/release-0.93.1/tests/sites/mcs/001-catsn.check.sh branches/release-0.93.1/tests/sites/mcs/001-catsn.clean.sh branches/release-0.93.1/tests/sites/mcs/001-catsn.setup.sh branches/release-0.93.1/tests/sites/mcs/001-catsn.swift branches/release-0.93.1/tests/sites/mcs/001-catsn.timeout branches/release-0.93.1/tests/sites/mcs/README branches/release-0.93.1/tests/sites/mcs/catsn.0001.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0002.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0003.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0004.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0005.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0006.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0007.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0008.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0009.out.expected branches/release-0.93.1/tests/sites/mcs/catsn.0010.out.expected branches/release-0.93.1/tests/sites/mcs/coaster-service.conf branches/release-0.93.1/tests/sites/mcs/data.txt branches/release-0.93.1/tests/sites/mcs/title.txt branches/release-0.93.1/tests/sites/queenbee/ branches/release-0.93.1/tests/sites/queenbee/pbs/ branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.check.sh branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.swift branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.timeout branches/release-0.93.1/tests/sites/queenbee/pbs/README branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0001.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0002.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0003.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0004.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0005.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0006.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0007.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0008.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0009.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0010.out.expected branches/release-0.93.1/tests/sites/queenbee/pbs/data.txt branches/release-0.93.1/tests/sites/queenbee/pbs/sites.template.xml branches/release-0.93.1/tests/sites/queenbee/pbs/tc.template.data branches/release-0.93.1/tests/sites/queenbee/pbs/title.txt branches/release-0.93.1/tests/sites/ranger/ branches/release-0.93.1/tests/sites/ranger/gt2/ branches/release-0.93.1/tests/sites/ranger/gt2/001-catsn-ranger.swift branches/release-0.93.1/tests/sites/ranger/gt2/cf branches/release-0.93.1/tests/sites/ranger/gt2/data.txt branches/release-0.93.1/tests/sites/ranger/gt2/sites.template.xml branches/release-0.93.1/tests/sites/ranger/gt2/start_proxy.sh branches/release-0.93.1/tests/sites/ranger/gt2/tc.template.data branches/release-0.93.1/tests/sites/ranger/local/ branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.check.sh branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.setup.sh branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.swift branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.timeout branches/release-0.93.1/tests/sites/ranger/local/catsn.0001.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0002.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0003.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0004.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0005.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0006.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0007.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0008.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0009.out.expected branches/release-0.93.1/tests/sites/ranger/local/catsn.0010.out.expected branches/release-0.93.1/tests/sites/ranger/local/data.txt branches/release-0.93.1/tests/sites/ranger/local/sites.template.xml branches/release-0.93.1/tests/sites/ranger/local/sleep.swift branches/release-0.93.1/tests/sites/ranger/local/tc.template.data branches/release-0.93.1/tests/sites/ranger/local/title.txt branches/release-0.93.1/tests/sites/surveyor/ branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.check.sh branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.setup.sh branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.swift branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.timeout branches/release-0.93.1/tests/sites/surveyor/README branches/release-0.93.1/tests/sites/surveyor/catsn.0001.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0002.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0003.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0004.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0005.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0006.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0007.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0008.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0009.out.expected branches/release-0.93.1/tests/sites/surveyor/catsn.0010.out.expected branches/release-0.93.1/tests/sites/surveyor/data.txt branches/release-0.93.1/tests/sites/surveyor/sites.template.xml branches/release-0.93.1/tests/sites/surveyor/tc.template.data branches/release-0.93.1/tests/sites/surveyor/title.txt Modified: branches/release-0.93.1/ branches/release-0.93.1/bin/gensites branches/release-0.93.1/bin/start-coaster-service branches/release-0.93.1/bin/stop-coaster-service branches/release-0.93.1/bin/swift branches/release-0.93.1/docs/build_docs.sh branches/release-0.93.1/docs/siteguide/beagle branches/release-0.93.1/docs/siteguide/fusion branches/release-0.93.1/docs/siteguide/futuregrid branches/release-0.93.1/docs/siteguide/intrepid branches/release-0.93.1/docs/siteguide/pads branches/release-0.93.1/docs/siteguide/siteguide.txt branches/release-0.93.1/docs/userguide/cdm branches/release-0.93.1/docs/userguide/userguide.txt branches/release-0.93.1/etc/coaster-service.conf branches/release-0.93.1/etc/sites/intrepid branches/release-0.93.1/etc/sites/persistent-coasters branches/release-0.93.1/libexec/_swiftwrap.staging branches/release-0.93.1/libexec/log-processing/active-state-transitions branches/release-0.93.1/libexec/log-processing/add-runid-as-prefix branches/release-0.93.1/libexec/log-processing/affine-transform branches/release-0.93.1/libexec/log-processing/aggregate.html.template branches/release-0.93.1/libexec/log-processing/all-kickstarts-to-event branches/release-0.93.1/libexec/log-processing/all-logs-active-jobsubmissions-count-graph branches/release-0.93.1/libexec/log-processing/annotate-karatasks-with-execute2-id branches/release-0.93.1/libexec/log-processing/assorted.html.template branches/release-0.93.1/libexec/log-processing/autospace-data branches/release-0.93.1/libexec/log-processing/b.plot branches/release-0.93.1/libexec/log-processing/bars branches/release-0.93.1/libexec/log-processing/cli-finished branches/release-0.93.1/libexec/log-processing/cli-version branches/release-0.93.1/libexec/log-processing/cluster-report branches/release-0.93.1/libexec/log-processing/cluster-stats branches/release-0.93.1/libexec/log-processing/colour-execute2 branches/release-0.93.1/libexec/log-processing/colour-execute2-by-falkon branches/release-0.93.1/libexec/log-processing/colour-karatasks branches/release-0.93.1/libexec/log-processing/colour.plot.template branches/release-0.93.1/libexec/log-processing/coloured-event-plot branches/release-0.93.1/libexec/log-processing/combine-execute-start-last-times branches/release-0.93.1/libexec/log-processing/combine-start-last-times branches/release-0.93.1/libexec/log-processing/combine-start-last-times-to-event branches/release-0.93.1/libexec/log-processing/compute-t-inf branches/release-0.93.1/libexec/log-processing/create-everylog-vs-versions-data branches/release-0.93.1/libexec/log-processing/duration-histogram.plot branches/release-0.93.1/libexec/log-processing/duration-of-workflow branches/release-0.93.1/libexec/log-processing/error-summary branches/release-0.93.1/libexec/log-processing/event-duration-stats branches/release-0.93.1/libexec/log-processing/events-in-progress branches/release-0.93.1/libexec/log-processing/events-in-progress-first-loop.pl branches/release-0.93.1/libexec/log-processing/events-in-progress-second-loop.pl branches/release-0.93.1/libexec/log-processing/events-in-progress-third-loop.pl branches/release-0.93.1/libexec/log-processing/everylog-active-submissions.plot branches/release-0.93.1/libexec/log-processing/everylog-durations-of-workflows branches/release-0.93.1/libexec/log-processing/everylog-summary.html branches/release-0.93.1/libexec/log-processing/everylog-time-cumulative.plot branches/release-0.93.1/libexec/log-processing/everylog-to-event branches/release-0.93.1/libexec/log-processing/everylog-version-cumulative.plot branches/release-0.93.1/libexec/log-processing/everylog-vs-versions branches/release-0.93.1/libexec/log-processing/everylog-vs-versions.plot branches/release-0.93.1/libexec/log-processing/everylog.html branches/release-0.93.1/libexec/log-processing/execstages-plot branches/release-0.93.1/libexec/log-processing/execstages.plot.template branches/release-0.93.1/libexec/log-processing/execute.html.template branches/release-0.93.1/libexec/log-processing/execute.progress branches/release-0.93.1/libexec/log-processing/execute2-by-falkon.channels branches/release-0.93.1/libexec/log-processing/execute2-status-from-log branches/release-0.93.1/libexec/log-processing/execute2-summary-from-log branches/release-0.93.1/libexec/log-processing/execute2.html.template branches/release-0.93.1/libexec/log-processing/execution-summaries branches/release-0.93.1/libexec/log-processing/extract-activity-for-subthreads-of branches/release-0.93.1/libexec/log-processing/extract-activity-for-task branches/release-0.93.1/libexec/log-processing/extract-activity-for-thread branches/release-0.93.1/libexec/log-processing/extract-completed-time-for-run-id branches/release-0.93.1/libexec/log-processing/extract-end-time branches/release-0.93.1/libexec/log-processing/extract-execute-start-times branches/release-0.93.1/libexec/log-processing/extract-failed-time-for-run-id branches/release-0.93.1/libexec/log-processing/extract-jobid-karajanid-bindings branches/release-0.93.1/libexec/log-processing/extract-last-time-for-execute branches/release-0.93.1/libexec/log-processing/extract-start-time branches/release-0.93.1/libexec/log-processing/extract-start-times branches/release-0.93.1/libexec/log-processing/falkon-to-event branches/release-0.93.1/libexec/log-processing/falkon.html.template branches/release-0.93.1/libexec/log-processing/generate-karatasks-event branches/release-0.93.1/libexec/log-processing/get-jobid-for-karajanid branches/release-0.93.1/libexec/log-processing/get-replicationid-for-execute2id branches/release-0.93.1/libexec/log-processing/get-site-for-run-id branches/release-0.93.1/libexec/log-processing/get-thread-for-run-id branches/release-0.93.1/libexec/log-processing/index.html.template branches/release-0.93.1/libexec/log-processing/info-and-karajan-actives branches/release-0.93.1/libexec/log-processing/info-and-karajan-actives.2.plot branches/release-0.93.1/libexec/log-processing/info-and-karajan-actives.plot branches/release-0.93.1/libexec/log-processing/info-to-md5 branches/release-0.93.1/libexec/log-processing/info-to-transitions branches/release-0.93.1/libexec/log-processing/info-to-zeroed-transitions branches/release-0.93.1/libexec/log-processing/info.html.template branches/release-0.93.1/libexec/log-processing/iso-to-secs branches/release-0.93.1/libexec/log-processing/karajan.html.template branches/release-0.93.1/libexec/log-processing/karatasks-coloured.channels branches/release-0.93.1/libexec/log-processing/karatasks-coloured.channels.nm branches/release-0.93.1/libexec/log-processing/karatasks-only branches/release-0.93.1/libexec/log-processing/kickstart.html.template branches/release-0.93.1/libexec/log-processing/kickstarts-to-event branches/release-0.93.1/libexec/log-processing/kickstarts-to-plot branches/release-0.93.1/libexec/log-processing/last-times branches/release-0.93.1/libexec/log-processing/last-transition-line branches/release-0.93.1/libexec/log-processing/list-known-tasks branches/release-0.93.1/libexec/log-processing/list-known-threads branches/release-0.93.1/libexec/log-processing/log-to-createdirset-transitions branches/release-0.93.1/libexec/log-processing/log-to-dostagein-transitions branches/release-0.93.1/libexec/log-processing/log-to-dostageout-transitions branches/release-0.93.1/libexec/log-processing/log-to-execute-transitions branches/release-0.93.1/libexec/log-processing/log-to-execute2-transitions branches/release-0.93.1/libexec/log-processing/log-to-initshareddir-transitions branches/release-0.93.1/libexec/log-processing/log-to-karatasks-transitions branches/release-0.93.1/libexec/log-processing/logs-for-all branches/release-0.93.1/libexec/log-processing/lookup-colour branches/release-0.93.1/libexec/log-processing/makefile branches/release-0.93.1/libexec/log-processing/makefile.cluster branches/release-0.93.1/libexec/log-processing/makefile.errors branches/release-0.93.1/libexec/log-processing/makefile.falkon branches/release-0.93.1/libexec/log-processing/makefile.implicit branches/release-0.93.1/libexec/log-processing/makefile.karatasks branches/release-0.93.1/libexec/log-processing/makefile.kickstart branches/release-0.93.1/libexec/log-processing/makefile.webpage branches/release-0.93.1/libexec/log-processing/max-duration branches/release-0.93.1/libexec/log-processing/normalise-event-start-time branches/release-0.93.1/libexec/log-processing/normalise-event-start-time-to-any branches/release-0.93.1/libexec/log-processing/number-events branches/release-0.93.1/libexec/log-processing/number-sites-list branches/release-0.93.1/libexec/log-processing/overview-reports.sh branches/release-0.93.1/libexec/log-processing/overview.html.template branches/release-0.93.1/libexec/log-processing/p1.plot branches/release-0.93.1/libexec/log-processing/per-site-execute2-durations branches/release-0.93.1/libexec/log-processing/plot-duration-histogram branches/release-0.93.1/libexec/log-processing/plot-everylogs branches/release-0.93.1/libexec/log-processing/plot1 branches/release-0.93.1/libexec/log-processing/q.plot branches/release-0.93.1/libexec/log-processing/queue-state-transitions branches/release-0.93.1/libexec/log-processing/retrycounts branches/release-0.93.1/libexec/log-processing/scheduler.html.template branches/release-0.93.1/libexec/log-processing/sec-to-utc branches/release-0.93.1/libexec/log-processing/sec-to-utc-day branches/release-0.93.1/libexec/log-processing/separate-execute-last-summary branches/release-0.93.1/libexec/log-processing/simple-event-plot branches/release-0.93.1/libexec/log-processing/slt2.plot branches/release-0.93.1/libexec/log-processing/sort-preserve branches/release-0.93.1/libexec/log-processing/sp.plot.template branches/release-0.93.1/libexec/log-processing/split-start-times-shifted branches/release-0.93.1/libexec/log-processing/start-last-times-and-kickstart branches/release-0.93.1/libexec/log-processing/start-last-times-and-kickstart.plot branches/release-0.93.1/libexec/log-processing/start-last-times.plot branches/release-0.93.1/libexec/log-processing/start-times.plot branches/release-0.93.1/libexec/log-processing/sum-tt1.pl branches/release-0.93.1/libexec/log-processing/swap-and-sort branches/release-0.93.1/libexec/log-processing/swap-and-sort-and-swap branches/release-0.93.1/libexec/log-processing/swift-standard-log-to-transition branches/release-0.93.1/libexec/log-processing/table-jobs-sites branches/release-0.93.1/libexec/log-processing/task-status-to-transitions branches/release-0.93.1/libexec/log-processing/tasks-in-cluster branches/release-0.93.1/libexec/log-processing/tie-url-filenames branches/release-0.93.1/libexec/log-processing/times-for-all-tasks branches/release-0.93.1/libexec/log-processing/toolbar.html.template branches/release-0.93.1/libexec/log-processing/total-event-plot branches/release-0.93.1/libexec/log-processing/total.plot.template branches/release-0.93.1/libexec/log-processing/trail branches/release-0.93.1/libexec/log-processing/trail-freex branches/release-0.93.1/libexec/log-processing/trail-freex.plot.template branches/release-0.93.1/libexec/log-processing/trail.plot.template branches/release-0.93.1/libexec/log-processing/transitions-to-cedps branches/release-0.93.1/libexec/log-processing/transitions-to-event branches/release-0.93.1/libexec/log-processing/tscore.sh branches/release-0.93.1/libexec/log-processing/tscores.plot branches/release-0.93.1/libexec/log-processing/weights.plot branches/release-0.93.1/libexec/log-processing/weights.sh branches/release-0.93.1/libexec/log-processing/whole-workflow-event branches/release-0.93.1/libexec/log-processing/whole-workflow-time branches/release-0.93.1/resources/swiftscript.stg branches/release-0.93.1/src/org/griphyn/vdl/engine/Karajan.java branches/release-0.93.1/src/org/griphyn/vdl/karajan/ArrayIndexFutureList.java branches/release-0.93.1/src/org/griphyn/vdl/karajan/FutureTracker.java branches/release-0.93.1/src/org/griphyn/vdl/karajan/Monitor.java branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/CreateArray.java branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/VDLFunction.java branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/swiftscript/Java.java branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java branches/release-0.93.1/src/org/griphyn/vdl/mapping/AbstractDataNode.java branches/release-0.93.1/src/org/griphyn/vdl/mapping/RootArrayDataNode.java branches/release-0.93.1/src/org/griphyn/vdl/mapping/RootDataNode.java branches/release-0.93.1/tests/ branches/release-0.93.1/tests/USAGENOTES.txt branches/release-0.93.1/tests/groups/ branches/release-0.93.1/tests/suite.sh Log: merged changes from 0.93 release branch Property changes on: branches/release-0.93.1 ___________________________________________________________________ Added: svn:mergeinfo + /branches/release-0.93:5279-5504 Modified: branches/release-0.93.1/bin/gensites =================================================================== --- branches/release-0.93.1/bin/gensites 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/bin/gensites 2012-01-22 03:23:13 UTC (rev 5505) @@ -187,6 +187,12 @@ "#site $TEMPLATE internalhostname="*|'#site internalhostname='*) INTERNALHOSTNAME=`get_value $line` ;; + "#site $TEMPLATE jobs_per_node="*|'#site jobs_per_node='*) + JOBS_PER_NODE=`get_value $line` + ;; + "#site $TEMPLATE job_throttle="*|'#site job_throttle='*) + JOB_THROTTLE=`get_value $line` + ;; '#app'*) if [ `echo $line | wc -w` == 2 ]; then for HOST in $HOSTS @@ -215,12 +221,12 @@ fi # Verify that the variables by the template are defined -for TOKEN in NODES HOST WORK PROJECT QUEUE N_GRAN N_MAX SLOTS INTERNALHOSTNAME MAXTIME EXECUTION_URL +for TOKEN in NODES HOST WORK PROJECT QUEUE N_GRAN N_MAX SLOTS INTERNALHOSTNAME MAXTIME EXECUTION_URL JOBS_PER_NODE JOB_THROTTLE do # Test for HOST/GLOBUS_HOSTNAME - the only values which don't match if [ "$TOKEN" == "HOST" ]; then if [ -z "$GLOBUS_HOSTNAME" ]; then - crash "Not specified: GLOBUS_HOSTNAME" + GLOBUS_HOSTNAME=$( hostname -f ) fi elif grep _${TOKEN}_ $TEMPLATE_PATH > /dev/null; then if [ -z "${!TOKEN}" ]; then @@ -245,6 +251,8 @@ echo "s at _EXECUTION_URL_@${EXECUTION_URL}@" echo "s at _SERVICE_COASTERS_@${SERVICE_COASTERS:-NO_URL_GIVEN}@" echo "s at _SERVICE_PORT_@${SERVICE_PORT:-NO_PORT_GIVEN}@" + echo "s at _JOBS_PER_NODE_@${JOBS_PER_NODE}@" + echo "s at _JOB_THROTTLE_@${JOB_THROTTLE}@" } > $SEDFILE Modified: branches/release-0.93.1/bin/start-coaster-service =================================================================== --- branches/release-0.93.1/bin/start-coaster-service 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/bin/start-coaster-service 2012-01-22 03:23:13 UTC (rev 5505) @@ -11,46 +11,201 @@ # Start futuregrid workers start-workers-futuregrid() { + # Setup environment PORT=$1 EXECUTION_URL=http://localhost:$PORT + export EC2_ACCESS_KEY=$FUTUREGRID_IAAS_ACCESS_KEY + export EC2_SECRET_KEY=$FUTUREGRID_IAAS_SECRET_KEY - if [ ! -d "$SWIFTVMBOOT_DIR" ] || [ ! -x "$SWIFTVMBOOT_DIR/bin/bootit.sh" ]; then + # Check that SWIFTVMBOOT_DIR looks ok + if [ ! -d "$SWIFTVMBOOT_DIR" ] || [ ! -x "$SWIFTVMBOOT_DIR/futuregrid/bin/bootit.sh" ]; then crash "SWIFTVMBOOT_DIR incorrectly defined in coaster-service.conf" fi + # Install ve + if [ ! -d "$SWIFTVMBOOT_DIR/futuregrid/ve" ]; then + echo Setting up environment + python $SWIFTVMBOOT_DIR/futuregrid/bin/virtualenv.py $SWIFTVMBOOT_DIR/futuregrid/ve + if [ $? -ne 0 ]; then + echo "Failed to created the needed python virtual environment" + exit 1 + fi + fi + + # Install cloudinitd + source $SWIFTVMBOOT_DIR/futuregrid/ve/bin/activate + easy_install cloudinitd + if [ $? -ne 0 ]; then + echo "Failed to install cloudinitd" + exit 1 + fi + + # Register key + echo "Registering the key names in all the clouds" + python $SWIFTVMBOOT_DIR/futuregrid/bin/register_key.py $SWIFTVMBOOT_DIR/futuregrid/hosts.txt + if [ $? -ne 0 ]; then + echo "Failed to register the key names" + exit 1 + fi + + # Start virtual machines echo Starting virtual machines.. please wait - $SWIFTVMBOOT_DIR/bin/bootit.sh - SWIFTVMBOOT_OUTPUT=$SWIFTVMBOOT_DIR/output.json - + $SWIFTVMBOOT_DIR/futuregrid/bin/bootit.sh | tee -a bootit.log + SWIFTVMBOOT_OUTPUT=$SWIFTVMBOOT_DIR/futuregrid/output.json if [ ! -f "$SWIFTVMBOOT_OUTPUT" ]; then crash "Error: Swift VM output file $SWIFTVMBOOT_OUTPUT does not exist!" fi - SWIFTVM_INSTANCES=`grep instance_id $SWIFTVMBOOT_OUTPUT |awk '{print $2}'|sed 's/\"//g;s/,//g;s/null//g'` - echo $SWIFTVM_INSTANCES > .swiftvm_instances - + SWIFTVM_INSTANCE=`grep "Starting up run" bootit.log |awk '{print $4}'` + echo $SWIFTVM_INSTANCE >> $HOME/.swift/.swiftvm_instances WORKER_HOSTS=`grep hostname $SWIFTVMBOOT_OUTPUT |awk '{print $2}'|sed 's/\"//g;s/,//g;s/null//g'` # Start worker script for MACHINE in $WORKER_HOSTS do - # Enable ssh tunneling if needed + echo $MACHINE >> $HOME/.swift/machines + scp $SWIFT_BIN/$WORKER $WORKER_USERNAME@$MACHINE:$WORKER_LOCATION > /dev/null 2>&1 if [ "$SSH_TUNNELING" == "yes" ]; then ssh -R *:$PORT:localhost:$PORT $WORKER_USERNAME@$MACHINE sleep 999 & echo $! >> $PID_FILE + echo "Starting worker on $MACHINE" + ssh $WORKER_USERNAME@$MACHINE "$WORKER_LOCATION/$WORKER http://localhost:$PORT $MACHINE $LOG_DIR" & + echo $! >> $PID_FILE + else + echo "Starting worker on $MACHINE" + ssh $WORKER_USERNAME@$MACHINE "$WORKER_LOCATION/$WORKER $EXECUTION_URL $MACHINE $LOG_DIR" & + echo $! >> $PID_FILE fi + + done +} +# Globus Provision workers +start-workers-gp() +{ + PORT=$1 + EXECUTION_URL=http://localhost:$PORT + + if [ ! -d "$SWIFTVMBOOT_DIR" ] || [ ! -x "$SWIFTVMBOOT_DIR/bin/gp-instance-create" ]; then + crash "SWIFTVMBOOT_DIR incorrectly defined in coaster-service.conf" + fi + + SEDFILE=`mktemp` + { + echo "s at _CLUSTER-NODES_@$EC2_NODES@" + echo "s at _INSTANCE-TYPE_@$EC2_INSTANCE_TYPE@" + echo "s at _KEYPAIR_@$EC2_KEYPAIR@" + echo "s at _KEYFILE_@$EC2_KEYFILE@" + echo "s at _AMI_@$EC2_AMI@" + } > $SEDFILE + sed -f $SEDFILE < "$SWIFTVMBOOT_DIR/ec2.template.conf" > "$SWIFTVMBOOT_DIR/ec2.conf" + rm $SEDFILE + + echo Creating instance.. + "$SWIFTVMBOOT_DIR/bin/gp-instance-create" -c "$SWIFTVMBOOT_DIR/ec2.conf" | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a gpic.out + SWIFTVM_INSTANCE=`awk '{print $4}' gpic.out` + rm gpic.out + echo $SWIFTVM_INSTANCE >> $HOME/.swift/.swiftvm_instance + + echo Starting instance.. + "$SWIFTVMBOOT_DIR/bin/gp-instance-start" "$SWIFTVM_INSTANCE" | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" + WORKER_HOSTS=`$SWIFTVMBOOT_DIR/bin/gp-instance-describe $SWIFTVM_INSTANCE|sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"|awk '{print $3}'` + + # Start worker script + if [ -f "$HOME/.swift/machines" ]; then + rm $HOME/.swift/machines + fi + for MACHINE in $WORKER_HOSTS + do + # Create a list of machines for other applications, if needed + echo $MACHINE >> $HOME/.swift/machines + + # Enable ssh tunneling if needed + if [ "$SSH_TUNNELING" == "yes" ]; then + ssh -q -o StrictHostKeyChecking=no -R *:$PORT:localhost:$PORT $WORKER_USERNAME@$MACHINE sleep 999 & + echo $! >> $PID_FILE + fi + # Copy and start worker script - scp $SWIFT_BIN/$WORKER $WORKER_USERNAME@$MACHINE:$WORKER_WORK > /dev/null 2>&1 + scp -q -o StrictHostKeyChecking=no $SWIFT_BIN/$WORKER $WORKER_USERNAME@$MACHINE:$WORKER_LOCATION > /dev/null 2>&1 echo "Starting worker on $MACHINE" - ssh $WORKER_USERNAME@$MACHINE "$WORKER_WORK/$WORKER $EXECUTION_URL $MACHINE $LOG_DIR" & - echo $! >> $PID_FILE + ssh -q -o StrictHostKeyChecking=no $WORKER_USERNAME@$MACHINE "$WORKER_LOCATION/$WORKER $EXECUTION_URL $MACHINE $LOG_DIR" & + echo $! >> $PID_FILE done } +# EC2 workers +start-workers-ec2() +{ + PORT=$1 + EXECUTION_URL=http://localhost:$PORT + if [ ! -d "$SWIFTVMBOOT_DIR" ] || [ ! -x "$SWIFTVMBOOT_DIR/ec2/bin/ec2-run-instances" ]; then + crash "SWIFTVMBOOT_DIR incorrectly defined in coaster-service.conf" + fi + + export EC2_HOME="$SWIFTVMBOOT_DIR/ec2" + export EC2_PRIVATE_KEY="$EC2_KEYFILE" + export EC2_CERT="$EC2_CERTFILE" + + echo Creating instance.. + $SWIFTVMBOOT_DIR/ec2/bin/ec2-run-instances "$EC2_AMI" -t "$EC2_INSTANCE_TYPE" -n "$EC2_NODES" -K "$EC2_KEYFILE" -C "$EC2_CERT" + SWIFTVM_INSTANCES=$( $SWIFTVMBOOT_DIR/ec2/bin/ec2-describe-instances | grep INSTANCE | grep -v terminated |awk '{print $2}' ) + echo $SWIFTVM_INSTANCES >> $HOME/.swift/.swiftvm_instances + echo Waiting for nodes to boot.. + + # Wait until all instances are listed as running + while /bin/true + do + SWIFTVM_INSTANCES_AS_STRING=$( echo $SWIFTVM_INSTANCES | tr "\\n" " ") + STATUS_LIST=$( $SWIFTVMBOOT_DIR/ec2/bin/ec2-describe-instances $SWIFTVM_INSTANCES_AS_STRING | grep INSTANCE | grep -v terminated | awk '{print $6}' |sort -u ) + if [ "$STATUS_LIST" == "running" ]; then + break + fi + sleep 5 + done + + # There is some delay between when the machines are 'running', and when system utilities like sshd are started + sleep 30 + + WORKER_HOSTS=$( $SWIFTVMBOOT_DIR/ec2/bin/ec2-describe-instances $SWIFTVM_INSTANCES_AS_STRING | grep INSTANCE | grep -v terminated | awk '{print $4}' ) + + if [ -f "$HOME/.swift/machines" ]; then + rm $HOME/.swift/machines + fi + + # Start worker script + SSH_OPTS="-i $EC2_KEYFILE -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" + for MACHINE in $WORKER_HOSTS + do + + # Create a list of machines for other applications, if needed + echo $MACHINE >> $HOME/.swift/machines + + # Copy and start worker script + scp $SSH_OPTS $SWIFT_BIN/$WORKER $WORKER_USERNAME@$MACHINE:$WORKER_LOCATION > /dev/null 2>&1 + echo $! >> $PID_FILE + + # Enable ssh tunneling if needed + if [ "$SSH_TUNNELING" == "yes" ]; then + ssh $SSH_OPTS -R *:$PORT:localhost:$PORT $WORKER_USERNAME@$MACHINE sleep 999 > /dev/null 2>&1 & + sleep 10 + ssh $SSH_OPTS $WORKER_USERNAME@$MACHINE "$WORKER_LOCATION/$WORKER http://localhost:$PORT $MACHINE $LOG_DIR" 2>&1 & + echo $! >> $PID_FILE + else + echo "Starting worker on $MACHINE" + ssh $SSH_OPTS $WORKER_USERNAME@$MACHINE "$WORKER_LOCATION/$WORKER $EXECUTION_URL $MACHINE $LOG_DIR" > /dev/null 2>&1 & + echo $! >> $PID_FILE + fi + + # Copy SSH key for easier access + cat $HOME/.ssh/*.pub | ssh $SSH_OPTS $WORKER_USERNAME@$MACHINE 'umask 077; cat >> $HOME/.ssh/authorized_keys' > /dev/null 2>&1 + done +} + + # Start SSH workers start-workers-ssh() -{ +{ PORT=$1 EXECUTION_URL=http://$IPADDR:$PORT if [ -z "$PORT" ]; then @@ -71,16 +226,17 @@ # Use a relay host if [ -n "$WORKER_RELAY_HOST" ]; then - ssh $WORKER_USERNAME@$WORKER_RELAY_HOST ssh $MACHINE mkdir -p $WORKER_WORK > /dev/null 2>&1 - ssh $WORKER_USERNAME@$WORKER_RELAY_HOST "scp /tmp/$WORKER $WORKER_USERNAME@$MACHINE:$WORKER_WORK" > /dev/null 2>&1 + ssh $WORKER_USERNAME@$WORKER_RELAY_HOST ssh $MACHINE mkdir -p $WORKER_LOCATION > /dev/null 2>&1 + ssh $WORKER_USERNAME@$WORKER_RELAY_HOST "scp /tmp/$WORKER $WORKER_USERNAME@$MACHINE:$WORKER_LOCATION" > /dev/null 2>&1 echo Starting worker on $MACHINE - ssh $WORKER_USERNAME@$WORKER_RELAY_HOST ssh $WORKER_USERNAME@$MACHINE "WORKER_LOGGING_LEVEL=$WORKER_LOGGING_LEVEL $WORKER_WORK/$WORKER $EXECUTION_URL $MACHINE $WORKER_LOG_DIR" & + ssh $WORKER_USERNAME@$WORKER_RELAY_HOST ssh $WORKER_USERNAME@$MACHINE "WORKER_LOGGING_LEVEL=$WORKER_LOGGING_LEVEL $WORKER_LOCATION/$WORKER http://localhost:$PORT $MACHINE $WORKER_LOG_DIR" & echo $! >> $PID_FILE # Connect directly - else - scp $SWIFT_BIN/$WORKER $WORKER_USERNAME@$MACHINE:$WORKER_WORK > /dev/null 2>&1 + else + ssh $WORKER_USERNAME@$MACHINE mkdir -p $WORKER_LOCATION > /dev/null 2>&1 + scp $SWIFT_BIN/$WORKER $WORKER_USERNAME@$MACHINE:$WORKER_LOCATION > /dev/null 2>&1 echo Starting worker on $MACHINE - ssh $WORKER_USERNAME@$MACHINE "$WORKER_WORK/$WORKER $EXECUTION_URL $MACHINE $LOG_DIR" & + ssh $WORKER_USERNAME@$MACHINE "$WORKER_LOCATION/$WORKER $EXECUTION_URL $MACHINE $LOG_DIR" & echo $! >> $PID_FILE fi done @@ -88,7 +244,7 @@ } # Start local workers -start-workers-local() +start-workers-local() { PORT=$1 EXECUTION_URL=http://$IPADDR:$PORT @@ -143,17 +299,24 @@ else crash "Cannot find coaster-service.conf!" fi +cp $CONFIG_FILE $HOME/.swift/.config +echo "Start-coaster-service..." +echo "Configuration: $CONFIG_FILE" + source $CONFIG_FILE -# Determine information needed about this machine +# Determine IP address to which workers should connect if [ -z "$IPADDR" ]; then - if [ -x "/sbin/ifconfig" ]; then + if [ "$SSH_TUNNELING" == "yes" ]; then + IPADDR=localhost + elif [ -x "/sbin/ifconfig" ]; then IPADDR=$( /sbin/ifconfig | grep 'inet addr' | grep -v 127.0.0.1 | cut -d ':' -f 2 | awk '{print $1}' |head -1) else crash "Unable to determine IP address of system. Please add to coaster-service.conf" fi fi +echo Service address: $IPADDR # Find swift if [ ! -x "$SWIFT" ]; then @@ -207,11 +370,11 @@ $SWIFT_BIN/coaster-service -nosec -portfile $SERVICE_PORT_FILE --localport $LOCAL_PORT -passive > $COASTER_LOG 2>&1 & elif [ -n "$SERVICE_PORT" ] && [ -n "$LOCAL_PORT" ]; then $SWIFT_BIN/coaster-service -nosec -port $SERVICE_PORT -localport $LOCAL_PORT -passive > $COASTER_LOG 2>&1 & -else +else crash "Unknown SERVICE_PORT type specified!" fi -echo $! > $PID_FILE +echo $! >> $PID_FILE sleep 5 # Determine SERVICE_PORT @@ -249,7 +412,13 @@ futuregrid) start-workers-futuregrid $LOCAL_PORT ;; - *) + gp) + start-workers-gp $LOCAL_PORT + ;; + ec2) + start-workers-ec2 $LOCAL_PORT + ;; + *) crash "Unknown WORKER_MODE. Please modify coaster-service.conf" ;; esac @@ -260,7 +429,7 @@ if [ -f "gensites.template" ]; then gensites `cat gensites.template` -p $CONFIG_FILE > $RUN_DIR/sites.xml else - gensites persistent-coasters -p $CONFIG_FILE > $RUN_DIR/sites.xml + gensites persistent-coasters -p $CONFIG_FILE > $RUN_DIR/sites.xml fi # Generate config file @@ -271,6 +440,11 @@ wrapperlog.always.transfer=false execution.retries=0 provider.staging.pin.swiftfiles=false +sitedir.keep=false EOF fi +# Local Variables: +# tab-width: 3 +# sh-basic-offset: 3 +# End: Modified: branches/release-0.93.1/bin/stop-coaster-service =================================================================== --- branches/release-0.93.1/bin/stop-coaster-service 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/bin/stop-coaster-service 2012-01-22 03:23:13 UTC (rev 5505) @@ -13,16 +13,7 @@ SWIFTVM_INSTANCES="$HOME/.swift/.swiftvm_instances" # Import settings -if [ -f "./coaster-service.conf" ]; then - CONFIG_FILE="./coaster-service.conf" -elif [ -f "$HOME/.swift/coaster-service.conf" ]; then - CONFIG_FILE="$HOME/.swift/coaster-service.conf" -elif [ -f "$(dirname $(readlink -f $0))/../etc/coaster-service.conf" ]; then - CONFIG_FILE="$(dirname $(readlink -f $0))/../etc/coaster-service.conf" -else - crash "Cannot find coaster-service.conf!" -fi - +CONFIG_FILE=$HOME/.swift/.config source "$CONFIG_FILE" echo Ending coaster processes.. @@ -32,22 +23,46 @@ #echo "$pid" for i in `ps -ef| awk '$3 == '$pid' { print $2 }'` do - #echo "$i" + echo "Killing process $i" kill $i > /dev/null 2>&1 done kill $pid > /dev/null 2>&1 done rm $PID_FILE > /dev/null 2>&1 fi -echo Done -if [ $WORKER_MODE == "futuregrid" ] && [ -f "$SWIFTVM_INSTANCES" ]; then +if [ "$WORKER_MODE" == "futuregrid" ] && [ -f "$SWIFTVM_INSTANCES" ]; then for INSTANCE in `cat $SWIFTVM_INSTANCES` do - $SWIFTVMBOOT_DIR/ve/bin/cloudinitd terminate $INSTANCE + $SWIFTVMBOOT_DIR/futuregrid/ve/bin/cloudinitd terminate $INSTANCE done rm $SWIFTVM_INSTANCES > /dev/null 2>&1 fi +if [ "$WORKER_MODE" == "gp" ] && [ -f "$SWIFTVM_INSTANCES" ]; then + for INSTANCE in `cat $SWIFTVM_INSTANCES` + do + echo Stopping ec2 instance $INSTANCE... + $SWIFTVMBOOT_DIR/bin/gp-instance-terminate $INSTANCE | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" + done + rm $SWIFTVM_INSTANCES > /dev/null 2>&1 +fi + +if [ "$WORKER_MODE" == "ec2" ] && [ -f "$SWIFTVM_INSTANCES" ]; then + export EC2_HOME="$SWIFTVMBOOT_DIR/ec2" + export EC2_PRIVATE_KEY="$EC2_KEYFILE" + export EC2_CERT="$EC2_CERTFILE" + INSTANCES_AS_STRING=$( cat $SWIFTVM_INSTANCES | tr "\\n" " ") + $SWIFTVMBOOT_DIR/ec2/bin/ec2-terminate-instances $INSTANCES_AS_STRING + if [ -f "$HOME/.swift/.swiftvm_instances" ]; then + rm $HOME/.swift/.swiftvm_instances + fi +fi + +if [ -f "$HOME/.swift/machines" ]; then + rm "$HOME/.swift/machines" +fi + popd > /dev/null 2>&1 +echo Done Modified: branches/release-0.93.1/bin/swift =================================================================== --- branches/release-0.93.1/bin/swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/bin/swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -86,6 +86,7 @@ updateOptions "$X509_USER_PROXY" "X509_USER_PROXY" updateOptions "$SWIFT_HOME" "COG_INSTALL_PATH" updateOptions "$SWIFT_HOME" "swift.home" +updateOptions "$SWIFT_USERHOME" "user.home" #Use /dev/urandom instead of /dev/random for seeding RNGs #This will lower the randomness of the seed, but avoid #large delays if /dev/random does not have enough entropy collected Modified: branches/release-0.93.1/docs/build_docs.sh =================================================================== --- branches/release-0.93.1/docs/build_docs.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/docs/build_docs.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -40,12 +40,32 @@ do pushd $directory > /dev/null 2>&1 FILES=`ls -1 *.txt 2>/dev/null` + CONTENTFILES=`find . -maxdepth 1 -type f ! -iname *.pdf` + for file in $FILES do - echo Converting $directory"$file" to HTML - asciidoc -a toc -a max-width=750px -a stylesheet=$(pwd)/../stylesheets/asciidoc.css $file - echo Converting $directory"$file" to PDF - a2x --format=pdf --no-xmllint $file + doflag=0 + for contentfile in $CONTENTFILES + do + diff $contentfile .cache/$contentfile >/dev/null 2>/dev/null + if [ $? -ne 0 ] + then + doflag=1 + fi + done + if [ $doflag -eq 1 ] + then + echo "updating cache" + for newcontent in $CONTENTFILES + do + cp $newcontent .cache/ + done + echo Converting $directory"$file" to HTML + asciidoc -a toc -a max-width=750px -a stylesheet=$(pwd)/../stylesheets/asciidoc.css $file + echo Converting $directory"$file" to PDF + a2x --format=pdf --no-xmllint $file + fi + #fi done if [ ! -d "$INSTALLATION_DIRECTORY/$VERSION" ]; then Deleted: branches/release-0.93.1/docs/cookbook/.cache/cookbook.txt =================================================================== --- branches/release-0.93/docs/cookbook/.cache/cookbook.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/docs/cookbook/.cache/cookbook.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,16 +0,0 @@ -Swift Cookbook -============== -Swift team -v0.92, March 2011 - -include::overview[] - -include::swift_basics[] - -include::coasters[] - -include::diverse_infrastructures[] - -include::debugging_swift[] - -include::log_processing[] Copied: branches/release-0.93.1/docs/cookbook/.cache/cookbook.txt (from rev 5504, branches/release-0.93/docs/cookbook/.cache/cookbook.txt) =================================================================== --- branches/release-0.93.1/docs/cookbook/.cache/cookbook.txt (rev 0) +++ branches/release-0.93.1/docs/cookbook/.cache/cookbook.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,16 @@ +Swift Cookbook +============== +Swift team +v0.92, March 2011 + +include::overview[] + +include::swift_basics[] + +include::coasters[] + +include::diverse_infrastructures[] + +include::debugging_swift[] + +include::log_processing[] Deleted: branches/release-0.93.1/docs/documentation/.cache/documentation.txt =================================================================== --- branches/release-0.93/docs/documentation/.cache/documentation.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/docs/documentation/.cache/documentation.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,11 +0,0 @@ -Swift Document Generation -========================= - -include::overview[] - -include::structure[] - -include::building[] - -include::automation[] - Copied: branches/release-0.93.1/docs/documentation/.cache/documentation.txt (from rev 5504, branches/release-0.93/docs/documentation/.cache/documentation.txt) =================================================================== --- branches/release-0.93.1/docs/documentation/.cache/documentation.txt (rev 0) +++ branches/release-0.93.1/docs/documentation/.cache/documentation.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,11 @@ +Swift Document Generation +========================= + +include::overview[] + +include::structure[] + +include::building[] + +include::automation[] + Deleted: branches/release-0.93.1/docs/quickstart/.cache/quickstart.txt =================================================================== --- branches/release-0.93/docs/quickstart/.cache/quickstart.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/docs/quickstart/.cache/quickstart.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,101 +0,0 @@ -Swift Quickstart -================ - -[abstract] -Abstract --------- -This guide describes the steps needed to download, install, configure, -and run the basic examples for Swift. If you are using a pre-installed -version of Swift, you can skip directly to the configuration section. - -Stable Releases vs. Development Releases ----------------------------------------- -Stable releases of Swift have undergone more extensive testing than development releases. -In general, they are more stable, have fewer bugs, and have been tested on a variety of -systems. - -The development version of Swift is aimed at developers and testers. The development -code has the highest chance of containing buggy and untested code. If you need stability -please use the latest stable release. - -Downloading a Swift Distribution --------------------------------- -There are two main ways of getting the Swift implementation: binary -releases and the source repository. - -Binary Releases -~~~~~~~~~~~~~~~ -For the majority of users, downloading and installing binary releases is recommended. -Since Swift is written in Java, the binary packages will run on all supported platforms with -Java Runtime Environment 1.5 or greater. Binary releases can be obtained from the -http://www.ci.uchicago.edu/swift/downloads/index.php[Swift downloads page]. - -Once downloaded, simply unpack the downloaded package (swift-.tar.gz) into a -directory of your choice: - ------ -tar -xzvf swift-.tar.gz ------ - -This will create a swift- directory containing the build. - -Source Repository -~~~~~~~~~~~~~~~~~ -The source code for Swift is available to developers who have an interest in contributing -new features. To build Swift from source code, you will need http://ant.apache.org/[Apache Ant] -and http://www.oracle.com/technetwork/java/javase/downloads/index.html[Java JDK]. Once -built, the dist/swift-svn directory will contain your build. - -To download and build Swift 0.93, follow these instructions: ------ -$ mkdir swift-0.93 -$ cd swift-0.93 -$ svn co https://cogkit.svn.sourceforge.net/svnroot/cogkit/branches/4.1.9/src/cog -$ cd cog/modules -$ svn co https://svn.ci.uchicago.edu/svn/vdl2/branches/release-0.93 swift -$ cd swift -$ ant redist ------ - -Setting your PATH ------------------ -Once Swift is installed, it is useful to add the swift binary to your PATH -environment variable. To do this, first determine where the Swift bin -directory is located. If you installed Swift from a binary release, it will -be in the swift-0.93/bin directory where you installed it. If you followed -the instructions above for installing Swift from a source repository, it -will be located in swift-0.93/cog/modules/swift/dist/swift-svn/bin. - -Add the following line to the bottom of ~/.bashrc: - ------ -export PATH=$PATH:/full/path/to/swift ------ - -When you login, test this out by typing the command ------ -$ which swift ------ - -This should point you to the path of the Swift binary. - -Running Swift Examples ----------------------- -The Swift examples can be found in the examples directory in the Swift -distribution. The examples are written in the SwiftScript language, and -have .swift as a file extension. - -Execution of a Swift workflow is done using the swift command, which -takes the Swift workflow file name as an argument: - ------ -cd examples/tutorial -swift hello.swift ------ - -When you run this application, it should create a file called hello.txt. -If this file gets created, you have successfully ran your first -Swift script! - -More documentation on how to run Swift can be found at -http://www.ci.uchicago.edu/swift/docs/index.php, Copied: branches/release-0.93.1/docs/quickstart/.cache/quickstart.txt (from rev 5504, branches/release-0.93/docs/quickstart/.cache/quickstart.txt) =================================================================== --- branches/release-0.93.1/docs/quickstart/.cache/quickstart.txt (rev 0) +++ branches/release-0.93.1/docs/quickstart/.cache/quickstart.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,101 @@ +Swift Quickstart +================ + +[abstract] +Abstract +-------- +This guide describes the steps needed to download, install, configure, +and run the basic examples for Swift. If you are using a pre-installed +version of Swift, you can skip directly to the configuration section. + +Stable Releases vs. Development Releases +---------------------------------------- +Stable releases of Swift have undergone more extensive testing than development releases. +In general, they are more stable, have fewer bugs, and have been tested on a variety of +systems. + +The development version of Swift is aimed at developers and testers. The development +code has the highest chance of containing buggy and untested code. If you need stability +please use the latest stable release. + +Downloading a Swift Distribution +-------------------------------- +There are two main ways of getting the Swift implementation: binary +releases and the source repository. + +Binary Releases +~~~~~~~~~~~~~~~ +For the majority of users, downloading and installing binary releases is recommended. +Since Swift is written in Java, the binary packages will run on all supported platforms with +Java Runtime Environment 1.5 or greater. Binary releases can be obtained from the +http://www.ci.uchicago.edu/swift/downloads/index.php[Swift downloads page]. + +Once downloaded, simply unpack the downloaded package (swift-.tar.gz) into a +directory of your choice: + +----- +tar -xzvf swift-.tar.gz +----- + +This will create a swift- directory containing the build. + +Source Repository +~~~~~~~~~~~~~~~~~ +The source code for Swift is available to developers who have an interest in contributing +new features. To build Swift from source code, you will need http://ant.apache.org/[Apache Ant] +and http://www.oracle.com/technetwork/java/javase/downloads/index.html[Java JDK]. Once +built, the dist/swift-svn directory will contain your build. + +To download and build Swift 0.93, follow these instructions: +----- +$ mkdir swift-0.93 +$ cd swift-0.93 +$ svn co https://cogkit.svn.sourceforge.net/svnroot/cogkit/branches/4.1.9/src/cog +$ cd cog/modules +$ svn co https://svn.ci.uchicago.edu/svn/vdl2/branches/release-0.93 swift +$ cd swift +$ ant redist +----- + +Setting your PATH +----------------- +Once Swift is installed, it is useful to add the swift binary to your PATH +environment variable. To do this, first determine where the Swift bin +directory is located. If you installed Swift from a binary release, it will +be in the swift-0.93/bin directory where you installed it. If you followed +the instructions above for installing Swift from a source repository, it +will be located in swift-0.93/cog/modules/swift/dist/swift-svn/bin. + +Add the following line to the bottom of ~/.bashrc: + +----- +export PATH=$PATH:/full/path/to/swift +----- + +When you login, test this out by typing the command +----- +$ which swift +----- + +This should point you to the path of the Swift binary. + +Running Swift Examples +---------------------- +The Swift examples can be found in the examples directory in the Swift +distribution. The examples are written in the SwiftScript language, and +have .swift as a file extension. + +Execution of a Swift workflow is done using the swift command, which +takes the Swift workflow file name as an argument: + +----- +cd examples/tutorial +swift hello.swift +----- + +When you run this application, it should create a file called hello.txt. +If this file gets created, you have successfully ran your first +Swift script! + +More documentation on how to run Swift can be found at +http://www.ci.uchicago.edu/swift/docs/index.php, Deleted: branches/release-0.93.1/docs/siteguide/.cache/siteguide.txt =================================================================== --- branches/release-0.93/docs/siteguide/.cache/siteguide.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/docs/siteguide/.cache/siteguide.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,24 +0,0 @@ -Site Configuration Guide -======================== - -:toc: -:icons: -:website: http://www.ci.uchicago.edu/swift/guides/siteguide.php -:numbered: - -include::prereqs[] - -include::bag_of_workstations[] - -include::beagle[] - -include::fusion[] - -include::futuregrid[] - -include::intrepid[] - -include::mcs[] - -include::pads[] - Copied: branches/release-0.93.1/docs/siteguide/.cache/siteguide.txt (from rev 5504, branches/release-0.93/docs/siteguide/.cache/siteguide.txt) =================================================================== --- branches/release-0.93.1/docs/siteguide/.cache/siteguide.txt (rev 0) +++ branches/release-0.93.1/docs/siteguide/.cache/siteguide.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,24 @@ +Site Configuration Guide +======================== + +:toc: +:icons: +:website: http://www.ci.uchicago.edu/swift/guides/siteguide.php +:numbered: + +include::prereqs[] + +include::bag_of_workstations[] + +include::beagle[] + +include::fusion[] + +include::futuregrid[] + +include::intrepid[] + +include::mcs[] + +include::pads[] + Copied: branches/release-0.93.1/docs/siteguide/bag_of_workstations (from rev 5504, branches/release-0.93/docs/siteguide/bag_of_workstations) =================================================================== --- branches/release-0.93.1/docs/siteguide/bag_of_workstations (rev 0) +++ branches/release-0.93.1/docs/siteguide/bag_of_workstations 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,109 @@ +?Bag of Workstations +------------------- +"Bag of workstations" refers to a collection of machines that are not connected +together as part of a cluster or supercomputer. + +Prerequisites +~~~~~~~~~~~~~ +In order to run Swift on a bag of workstations, the following prerequisites must +be met: + +- The machines must be running Linux +- The machines must have Perl available +- A user account must be created on each machine (the username you create must be the same on each machine) +- You must be able to SSH into the accounts without being prompted for a password. This usually involves creating an SSH key and setting up your authorized_keys. More information on how to do this can be found at http://www.openssh.org. + +Create a coaster-service.conf +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To begin, copy the text below and paste it into the directory +where your swift script is located. Name this file coaster-service.conf. + +----- +include::../../etc/coaster-service.conf[] +----- + +Modify coaster-service.conf +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The coaster-service.conf file contains information about your setup. +There are a few settings you must customize. + +The first is the name of the machines which will be used as workers. Modify +the line below to reflect the names of the machines you want to use. +----- +export WORKER_HOSTS="myhost1.mydomain myhost2.mydomain" +----- + +Update the value for JOBS_PER_NODE to reflect the number of CPUs available per node. + +The JOB_THROTTLE setting determines the maximum number of active jobs. Use the formula +to determine the ideal value: + +jobs per node * number of nodes - 0.1 / 100 + +Example: Suppose you have 10 machines each with 8 cores +----- +8 jobs per node * 10 cores = 80 +80 - 0.1 = 79.9 +79.9 / 100 = 0.799 +----- + +In this example, you would set the job throttle to 0.799 +----- +export JOB_THROTTLE=0.799 +----- + +By default, this setup assumes there are no firewall rescrictions. If there +is a firewall rescricting SSH access, set tunneling to true with this command + +----- +export SSH_TUNNELING=yes +----- + +This setup also assumes that these machines are not using a shared filesystem (NFS/AFS/CIFS, etc). +If these systems are all sharing a common filesystem, add the setting below. + +----- +export SHARED_FILESYSTEM=no +----- + +Starting the Coaster Service +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Change directories to the location where you would like to run a +Swift script and start the coaster service with this +command: + +----- +start-coaster-service +----- + +This will create a configuration file that Swift needs +called sites.xml. + +WARNING: Any existing sites.xml files in this directory +will be overwritten. Be sure to make a copy of any +custom configuration files you may have. + +Run Swift +~~~~~~~~~ + +Next, run Swift. If you do not have a particular script +in mind, you can test Swift by using a Swift script in +the examples/ directory. + +Run the following command to run the script: +----- +swift -sites.file sites.xml -tc.file tc.data yourscript.swift +----- + +Stopping the Coaster Service +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The coaster service will run indefinitely. The stop-coaster-service +script will terminate the coaster service. + +----- +$ stop-coaster-service +----- + +This will kill the coaster service and kill the worker scripts on remote systems. + Modified: branches/release-0.93.1/docs/siteguide/beagle =================================================================== --- branches/release-0.93.1/docs/siteguide/beagle 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/docs/siteguide/beagle 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,6 +1,10 @@ Beagle ------ +Introduction +~~~~~~~~~~~~ +Beagle is a Cray XE6 supercomputer at UChicago. It employs a batch-oriented computational model where-in a PBS schedular accepts user's jobs and queues them in the queueing system for execution. The computational model requires a user to prepare the submit files, track job submissions, chackpointing, managing input/output data and handling exceptional conditions manually. Running Swift under Beagle can accomplish the above tasks with least manual user intervention and maximal oppurtunistic computation time on Beagle queues. In the following sections, we discuss more about specifics of running Swift on Beagle. A more detailed information about Swift and its workings can be found on Swift documentation page here: http://www.ci.uchicago.edu/swift/wwwdev/docs/index.php . More information on Beagle can be found on UChicago Beagle website here: http://beagle.ci.uchicago.edu . + Requesting Access ~~~~~~~~~~~~~~~~~ If you do not already have a Computation Institute account, you can request @@ -15,9 +19,15 @@ node with the following command: ----- -ssh yourusername at login.beagle.ci.uchicago.edu +ssh -l username login.beagle.ci.uchicago.edu -A ----- +or to log on to the sandbox: + +----- +ssh -l username sandbox.beagle.ci.uchicago.edu -A +----- + Follow the steps outlined below to get started with Swift on Beagle: *step 1.* Load the Swift module on Beagle as follows: +module load swift+ @@ -26,26 +36,97 @@ stay. (say, +mkdir swift-lab+, followed by, +cd swift-lab+) *step 3.* To get started with a simple example running +/bin/cat+ to read an -input file +data.txt+ and write to an output file +f.nnn.out+, copy the folder -at +/home/ketan/catsn+ to the above directory. (+cp -r /home/ketan/catsn -.+ followed by +cd catsn+). +input file +data.txt+ and write to an output file +f.nnn.out+, start with writing a simple swift source script as follows: -*step 4.* In the sites file: +beagle-coaster.xml+, make the following two -changes: *1)* change the path of +workdirectory+ to your preferred location -(say to +/lustre/beagle/$USER/swift-lab/swift.workdir+) and *2)* Change the -project name to your project (+CI-CCR000013+) . The workdirectory will contain -execution data related to each run, e.g. wrapper scripts, system information, -inputs and outputs. +----- +type file; -*step 5.* Run the example using following commandline (also found in run.sh): -+swift -config cf -tc.file tc -sites.file beagle-coaster.xml catsn.swift -n=1+ -. You can further change the value of +-n+ to any arbitrary number to run that -many number of concurrent +cat+ +/* App definitio */ +app (file o) cat (file i) +{ + cat @i stdout=@o; +} -*step 6.* Check the output in the generated +outdir+ directory (+ls outdir+) +file out[]; +file data<"data.txt">; +/* App invocation: n times */ +foreach j in [1:@toint(@arg("n","1"))] { + out[j] = cat(data); +} +----- + +*step 4.* The next step is to create a sites file. An example sites file (sites.xml) is shown as follows: + +----- + + + + + CI-CCR000013 + + + pbs.aprun;pbs.mpp;depth=24 + + 24 + 1000 + 1 + 1 + 1 + + .63 + 10000 + + + + /lustre/beagle/ketan/swift.workdir + + +----- + +*step 5.* In this step, we will see the config and tc files. The config file (cf) is as follows: + +----- +wrapperlog.always.transfer=true +sitedir.keep=true +execution.retries=1 +lazy.errors=true +use.provider.staging=true +provider.staging.pin.swiftfiles=false +foreach.max.threads=100 +provenance.log=false +----- + +The tc file (tc) is as follows: + +----- +pbs cat /bin/cat null null null +----- + +More about config and tc file options can be found in the swift userguide here: http://www.ci.uchicago.edu/swift/wwwdev/guides/release-0.93/userguide/userguide.html#_swift_configuration_properties. + +*step 6.* Run the example using following commandline: + +----- +swift -config cf -tc.file tc -sites.file sites.xml catsn.swift -n=1 +----- + +You can further change the value of +-n+ to any arbitrary number to run that +many number of concurrent +cat+ tasks. + +*step 7.* Swift will show a status message as "done" after the job has completed its run in the queue. Check the output in the generated +outdir+ directory (+ls outdir+) + +---- +Swift 0.93RC5 swift-r5285 cog-r3322 + +RunID: 20111218-0246-6ai8g7f0 +Progress: time: Sun, 18 Dec 2011 02:46:33 +0000 +Progress: time: Sun, 18 Dec 2011 02:46:42 +0000 Active:1 +Final status: time: Sun, 18 Dec 2011 02:46:43 +0000 Finished successfully:1 +---- + Note: Running from sandbox node or requesting 30 minutes walltime for upto 3 nodes -will get fast prioritized execution. Good for small tests. +will get fast prioritized execution. Suitable for small tests. Larger Runs on Beagle ~~~~~~~~~~~~~~~~~~~~~ @@ -53,13 +134,13 @@ The following sites.xml parameters must be set to scale that is intended for a large run: * *maxTime* : The expected walltime for completion of your run. This parameter is accepted in seconds. - * *slots* : This parameter specifies the maximum number of jobs/blocks that the coaster scheduler will have running at any given time. On Beagle, this number will determine how many qsubs swift will submit for your run. Typical values range between 40 and 60 for large runs. + * *slots* : This parameter specifies the maximum number of pbs jobs/blocks that the coaster scheduler will have running at any given time. On Beagle, this number will determine how many qsubs swift will submit for your run. Typical values range between 40 and 60 for large runs. * *nodeGranularity* : Determines the number of nodes per job. It restricts the number of nodes in a job to a multiple of this value. The total number of workers will then be a multiple of jobsPerNode * nodeGranularity. For Beagle, jobsPerNode value is 24 corresponding to its 24 cores per node. * *maxNodes* : Determines the maximum number of nodes a job must pack into its qsub. This parameter determines the largest single job that your run will submit. * *jobThrottle* : A factor that determines the number of tasks dispatched simultaneously. The intended number of simultaneous tasks must match the number of cores targeted. The number of tasks is calculated from the jobThrottle factor is as follows: ---- -Number of Tasks = (JobThrottle x 100) + 1 +Number of parallel Tasks = (JobThrottle x 100) + 1 ---- Following is an example sites.xml for a 50 slots run with each slot occupying 4 nodes (thus, a 200 node run): @@ -91,3 +172,97 @@ ----- +Resuming Large Runs +~~~~~~~~~~~~~~~~~~~ +Oftentimes, the application runs with a large number of tasks needed to be resumed after they have run to a certain point. The reasons for resume could be among others, application error, trainsient errors such as Beagle's availability or accidental shutdowns of the runs. In such cases, the *resume* feature of Swift is very handy. Resume starts the run from the point it left of. One can resume a stopped run using the same swift commandline plus adding the option -resume followed by a resume log (extension .rlog) that is created by Swift in your run directory. An example of such a resume follows: + +----- +$ swift -resume catsn-ht0adgi315l61.0.rlog catsn.swift +----- + +Troubleshooting +~~~~~~~~~~~~~~~ + +In this section we will discuss some of the common issues and remedies while using Swift on Beagle. The origin of these issues can be Swift or the Beagle's configuration, state and user configuration among other factors. We try to identify maximum known issues and address them here: + +* Command not found: Swift is installed on Beagle as a module. If you see the following error message: + +----- +If 'swift' is not a typo you can run the following command to lookup the +package that contains the binary: + command-not-found swift +-bash: swift: command not found +----- + +The most likely cause is the Swift module is not loaded. Do the following to load the Swift module: + +----- +$ module load swift +Swift version swift-0.93RC5 loaded +----- + +* Failed to transfer *wrapperlog* for job cat-nmobtbkk and/or Job failed with an exit code of 254. This is a most likely symptom of compute node trying to write to a non-writable filesystem. Check the element on the sites.xml file. + +----- +/home/ketan/swift.workdir +----- + +It is likely that it is set to a path where the compute nodes can not write, e.g. your /home directory. The remedy for this error is to set your workdirectory to the /lustre path where swift could write from compute nodes. + +----- +/lustre/beagle/ketan/swift.workdir +----- + +* Out of heap space error is a typical error that you get when running large number of tasks in parallel from a submit host such as Beagle login nodes. + +----- +java.lang.OutOfMemoryError: Java heap space +----- + +A simple solution to this problem is to increase the java heap space. This can be solved by increasing the heap space Swift gets by the following environment variable: + +----- +SWIFT_HEAP_MAX=5000M swift -config cf -tc.file tc -sites.file sites.xml catsn.swift -n=10000 +----- + +* Application invocation fails or application returns a non-zero exit status. An application invocation might fail for a variety of reasons. Some of the common reasons include a faulty command line, out-of-memory, non-availability of data, library dependencies unmet, among others. In another set of failures, the application invocation might fail for a partial number of datasets. In these conditions, one might want to to continue for the rest of application invocations. In most cases, these conditions could be handled by catching various exitcodes and logging the erroneous invocations for later inspection. In the rest of this section, we provide some such examples. + - Handling exitcodes in wrapperscript. The following code snippet from an application, handles the erroneous exitcode so that the erroneous runs could be logged and dealt with later: + +---- +call_to_app $1 $2 +if [ "$exit_status" -ne 0 ]; then + echo $2 | awk '{ print $1 }' >> /lustre/beagle/ketan/App_FailedList.txt +fi +---- + +- Advanced Handling of Out of Memory (OOM) Conditions. The following code snippet handles a case of OOM error conditions by monitoring the available memory at each invocation: + +---- +# if mem is low, wait for it to recover before starting +for i in $(seq 0 $maxtries); do + freeMB=$(free -m | grep cache: | awk '{print $4}') + if [ $freeMB -lt $lowmem ]; then + if [ $i = $maxtries ]; then + echo "$host $(date) freeMB = $freeMB below yellow mark $lowmem after $maxtries \ + $startsleep sec pauses. Exiting." >>$oomlog + exit 7 + else + echo "$host $(date) freeMB = $freeMB below yellow mark $lowmem on try $i. Sleeping \ + $startsleep sec." >>$oomlog + sleep $startsleep + fi + else + break + fi +done + +app_invocation $args +---- + +More Help +~~~~~~~~ + +If the error messages you get does not give much clue, you can go about one of the following approaches to find more help: + - Search for the particular error message on the swift mailing list archive from here: http://www.ci.uchicago.edu/swift/wwwdev/support/index.php. It is likely someone has encountered the issue before and there is a ready remedy posted by one of the Swift team members. + - Subscribe to the swift-user lists and post your questions here: https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user. Please attach the Swift-generated log file and the sites file with your question. + Modified: branches/release-0.93.1/docs/siteguide/fusion =================================================================== --- branches/release-0.93.1/docs/siteguide/fusion 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/docs/siteguide/fusion 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,13 +1,49 @@ Fusion ----- +------ +Fusion is a 320-node computing cluster for the Argonne +National Laboratory community. The primary goal of the LCRC is to +facilitate mid-range computing in all of the scientific programs of +Argonne and the University of Chicago. -Fusion Quickstart -~~~~~~~~~~~~~~~ This section will walk you through running a simple Swift script on Fusion. +Requesting Access +~~~~~~~~~~~~~~~~~ +If you do not already have a Fusion account, you can request one at +https://accounts.lcrc.anl.gov/request.php. Email support at lcrc.anl.gov +for additional help. + +Projects +~~~~~~~~ +In order to run a job on a Fusion compute node, you must first be associated +with a project. + +Each project has one or more Primary Investigators, or PIs. These PIs are +responsible for adding and removing users to a project. Contact the PI of +your project to be added. + +More information on this process can be found at +http://www.lcrc.anl.gov/info/Projects. + +SSH Keys +~~~~~~~~ +Before accessing Fusion, be sure to have your SSH keys configured correctly. +SSH keys are required to access fusion. You should see information about +this when you request your account. Email support at lcrc.anl.gov for +additional help. + +Connecting to a login node +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Once your keys are configured, you should be able to access a Fusion login +node with the following command: + +----- +ssh yourusername at fusion.lcrc.anl.gov +----- + Creating sites.xml -^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~ Swift relies on various configuration files to determine how to run. This section will provide a working configuration file which you can copy and paste to get running quickly. The sites.xml file @@ -29,7 +65,7 @@ ----- Creating tc.data -^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~ The tc.data configuration file gives information about the applications that will be called by Swift. More information about the format of tc.data can be found in the Swift User's guide. @@ -41,8 +77,7 @@ ----- Copy a Swift Script -^^^^^^^^^^^^^^^^^^^ - +~~~~~~~~~~~~~~~~~~~~ Within the Swift directory is an examples directory which contains several introductory Swift scripts. The example we will use in this section is called catsn.swift. Copy this script to the same directory @@ -55,8 +90,7 @@ TIP: The location of your swift directory may vary depending on how you installed it. Change this to the examples/misc directory of your installation as needed. Run Swift -^^^^^^^^^ - +~~~~~~~~~ Finally, run the script ----- $ swift -sites.file sites.xml -tc.file tc.data catsn.swift @@ -65,40 +99,6 @@ You should see 10 new text files get created, named catsn*.out. If you see these files, then you have succesfully run Swift on Fusion! -Requesting Access -~~~~~~~~~~~~~~~~~ -If you do not already have a Fusion account, you can request one at -https://accounts.lcrc.anl.gov/request.php. Email support at lcrc.anl.gov -for additional help. - -SSH Keys -~~~~~~~~ -Before accessing Fusion, be sure to have your SSH keys configured correctly. -SSH keys are required to access fusion. You should see information about -this when you request your account. Email support at lcrc.anl.gov for -additional help. - -Connecting to a login node -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Once your keys are configured, you should be able to access a Fusion login -node with the following command: - ------ -ssh yourusername at fusion.lcrc.anl.gov ------ - -Projects -~~~~~~~~ -In order to run a job on a Fusion compute node, you must first be associated -with a project. - -Each project has one or more Primary Investigators, or PIs. These PIs are -responsible for adding and removing users to a project. Contact the PI of -your project to be added. - -More information on this process can be found at -http://www.lcrc.anl.gov/info/Projects. - Queues ~~~~~~ Fusion has two queues: shared and batch. The shared queue has a maximum 1 Modified: branches/release-0.93.1/docs/siteguide/futuregrid =================================================================== --- branches/release-0.93.1/docs/siteguide/futuregrid 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/docs/siteguide/futuregrid 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,26 +1,11 @@ Futuregrid Quickstart Guide --------------------------- +FutureGrid is a distributed, high-performance test-bed that allows +scientists to collaboratively develop and test innovative approaches +to parallel, grid, and cloud computing. -Downloading and Building Swift -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most recent versions of Swift can be found at -http://www.ci.uchicago.edu/swift/downloads/index.php. To run on futuregrid, -you will need to use Swift 0.93 or later. +More information on futuregrid can be found at https://portal.futuregrid.org/. -Adding Swift to your PATH -~~~~~~~~~~~~~~~~~~~~~~~~~ -Once you have installed Swift, add the Swift binary to your PATH so you can -easily run it from any directory. - -In your home directory, edit the file ".bashrc". - -If you have installed Swift via a source repository, add the following line -at the bottom of .bashrc. - ------ -export PATH=$PATH:$HOME/cog/modules/swift/dist/swift-svn/bin ------ - Requesting Futuregrid Access ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you do not already have a futuregrid account, you can follow the @@ -51,45 +36,57 @@ called vws.repository.s3id and vws.repository.s3key. Copy these values for the next step. -Configuring Swift VM Tools -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Change directories into the swift-vm-boot directory. Edit the file -called env.sh. There are two settings here that you will need to -modify: FUTUREGRID_IAAS_ACCESS_KEY and FUTUREGRID_IAAS_SECRET_KEY. -Paste your access key (s3id) and secret key (s3key) here and save -the file. By default, env.sh requests 2 nodes on hotel and 2 nodes -on sierra. Change these values as needed. Run install.sh from the -swift-vm-boot directory to complete the installation of Swift VM -Tools. The Swift VM Tools may require a fairly recent version of -Python. If you run into problems while running the install.sh -script, please try a more recent version of Python and associated -libraries. - Configuring coaster-service.conf ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Within your swift distribution's etc directory is a file called -coaster-service.conf. There are many options here you can modify -as needed, but these are the settings that will be required -to run on futuregrid: +To run on futuregrid, you will need a file called coaster-service.conf. +This file contains many options to control how things run. Here is +an example of a working coaster-service.conf on futuregrid. ----- -export WORKER_WORK=/tmp +# Where to copy worker.pl on the remote machine for sites.xml +export WORKER_LOCATION=/tmp + +# How to launch workers: local, ssh, cobalt, or futuregrid export WORKER_MODE=futuregrid + +# Do all the worker nodes you're using have a shared filesystem? (yes/no) export SHARED_FILESYSTEM=no + +# Username to use on worker nodes export WORKER_USERNAME=root + +# Enable SSH tunneling? (yes/no) export SSH_TUNNELING=yes + +# Directory to keep log files, relative to working directory when launching start-coaster-service +export LOG_DIR=logs + +# Location of the swift-vm-boot scripts export SWIFTVMBOOT_DIR=$HOME/swift-vm-boot + +# Futuregrid settings +export FUTUREGRID_IAAS_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXX +export FUTUREGRID_IAAS_SECRET_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +export FUTUREGRID_HOTEL_NODES=0 +export FUTUREGRID_SIERRA_NODES=2 +export FUTUREGRID_CPUS_PER_NODE=1 + +# Swift information for creating sites.xml export WORK=/tmp +export JOBS_PER_NODE=$FUTUREGRID_CPUS_PER_NODE +export JOB_THROTTLE=$( echo "scale=5; ($JOBS_PER_NODE * $(($FUTUREGRID_HOTEL_NODES + $FUTUREGRID_SIERRA_NODES)))/100 - 0.00001"|bc ) + +# Application locations for tc.data +#app convert=/usr/bin/convert ----- -These is a brief description of these settings in the coaster-service.conf file. -Tunneling should be used when you are restricted by a firewall. If your local -machine has multiple network interfaces, you should also manually set the IP -address of your machine with export IPADDR=your.ip.address.here. +Paste your credentials from the hotel.conf file into the FUTUREGRID_IAAS_ACCESS_KEY and FUTUREGRID_IAAS_SECRET_KEY fields. +Adjust the number of nodes you would like to allocate here by changing the values of FUTUREGRID_HOTEL_NODES and FUTUREGRID_SIERRA_NODES. +Add a list of any applications you want to run in the format "#app myapp=/path/to/app". Starting the Coaster Service Script ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Now that everything is configured, change to a temporary directory +Now that everything is configured, change to the location of the coaster-service.conf file and run this command to start the coaster service: ----- Modified: branches/release-0.93.1/docs/siteguide/intrepid =================================================================== --- branches/release-0.93.1/docs/siteguide/intrepid 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/docs/siteguide/intrepid 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,5 +1,8 @@ Intrepid -------- +Intrepid is an IBM Blue Gene/P supercomputer located at the Argonne Leadership +Computing Facility. More information on Intrepid can be found at +http://www.alcf.anl.gov/. Requesting Access ~~~~~~~~~~~~~~~~~ @@ -125,7 +128,7 @@ TODO: Update the rest below here ----- -include::../../tests/providers/local-cobalt/intrepid/sites.template.xml[] +include::../../tests/providers/intrepid/sites.template.xml[] ----- The values to note here are the ones that are listed between underscores. In the example above, they are \_QUEUE_, and \_WORK_. Queue is the PADS queue to use and WORK is the swift work directory. These are placeholder values you will need to modify to fit your needs. Copy and paste this template, replace the values, and call it sites.xml. @@ -135,7 +138,7 @@ Below is the tc.data file used by Swift's test suite for running on PADS. ----- -include::../../tests/providers/local-cobalt/intrepid/tc.template.data[] +include::../../tests/providers/intrepid/tc.template.data[] ------ Copy these commands and save it as tc.data. Copied: branches/release-0.93.1/docs/siteguide/mcs (from rev 5504, branches/release-0.93/docs/siteguide/mcs) =================================================================== --- branches/release-0.93.1/docs/siteguide/mcs (rev 0) +++ branches/release-0.93.1/docs/siteguide/mcs 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,55 @@ +MCS Workstations +---------------- +This sections describes how to use the general use compute servers for +the MCS division of Argonne National Laboratory. + +Create a coaster-service.conf +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To begin, copy the text below and paste it into your Swift distribution's etc +directory. Name the file coaster-service.conf. + +----- +include::../../tests/providers/mcs/coaster-service.conf[] +----- + +Starting the Coaster Service +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Change directories to the location you would like to run a +Swift script and start the coaster service with this +command: + +----- +start-coaster-service +----- + +This will create a configuration file that Swift needs +called sites.xml. + +WARNING: Any existing sites.xml files in this directory +will be overwritten. Be sure to make a copy of any +custom configuration files you may have. + +Run Swift +~~~~~~~~~ + +Next, run Swift. If you do not have a particular script +in mind, you can test Swift by using a Swift script in +the examples/ directory. + +Run the following command to run the script: +----- +swift -sites.file sites.xml -tc.file tc.data yourscript.swift +----- + +Stopping the Coaster Service +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The coaster service will run indefinitely. The stop-coaster-service +script will terminate the coaster service. + +----- +$ stop-coaster-service +----- + +This will kill the coaster service and kill the worker scripts on remote systems. + Modified: branches/release-0.93.1/docs/siteguide/pads =================================================================== --- branches/release-0.93.1/docs/siteguide/pads 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/docs/siteguide/pads 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,17 +1,41 @@ PADS ---- +PADS is a petabyte-scale, data intense computing resource located +at the joint Argonne National Laboratory/University of Chicago +Computation Institute. More information about PADS can be found +at http://pads.ci.uchicago.edu. -PADS Quickstart -~~~~~~~~~~~~~~~ -This section will walk you through running a simple Swift script -on PADS. It will explain how to setup software packages, how -to create the required Swift configuration files, and finally -how to run Swift. +Requesting Access +~~~~~~~~~~~~~~~~~ +If you do not already have a Computation Institute account, you can request +access at https://www.ci.uchicago.edu/accounts. This page will give you a list +of resources you can request access to. Be sure that PADS is selected. If +you already have an existing CI account, but do not have access to PADS, +send an email to support at ci.uchicago.edu to request access. +SSH Keys +~~~~~~~~ +Before accessing PADS, be sure to have your SSH keys configured correctly. +There is some basic information about SSH and how to generate your key at +http://www.ci.uchicago.edu/wiki/bin/view/Resources/SshKeys. Once you have +followed those instructions, you can add your key at +https://www.ci.uchicago.edu/support/sshkeys/. + +Connecting to a login node +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Once your keys are configured, you should be able to access a PADS login +node with the following command: + +----- +ssh yourusername at login.pads.ci.uchicago.edu +----- + Adding Software Packages -^^^^^^^^^^^^^^^^^^^^^^^^ -In your home directory, edit a file called .soft and add these -lines (in this order): +~~~~~~~~~~~~~~~~~~~~~~~~ +Softenv is a system used for managing applications. In order to run Swift, +the softenv environment will have to be modified slightly. Softenv is +configured by a file in your home directory called .soft. Edit this file +to look like this: ----- +java-sun +maui @@ -21,6 +45,37 @@ Log out of PADS, and log back in for these changes to take effect. +Which project(s) are you a member of? +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +PADS requires that you are a member of a project. You can determine this by +running the following command: + +----- +$ projects --available + +The following projects are available for your use + +Project PI Title +CI-CCR000013 Michael Wilde The Swift Parallel Scripting System +----- + +If you are not a member of a project, you must first request access +to a project at http://www.ci.uchicago.edu/hpc/projects. + +You should make sure that you have a project set as default. Run +the projects command with no arguments to determine if you have a default. + +------ +$ projects +You have no default project set. +----- + +To set your default project, use projects --set +------ +$ projects --set CI-CCR000013 --all +Your default project for all CI clusters has been set to CI-CCR000013. +----- + Creating sites.xml ^^^^^^^^^^^^^^^^^^ Swift relies on various configuration files to determine how to @@ -57,7 +112,6 @@ Copy a Swift Script ^^^^^^^^^^^^^^^^^^^ - Within the Swift directory is an examples directory which contains several introductory Swift scripts. The example we will use in this section is called catsn.swift. Copy this script to the same directory @@ -69,6 +123,7 @@ ----- TIP: The location of your swift directory may vary depending on how you installed it. Change this to the examples/misc directory of your installation as needed. + Run Swift ^^^^^^^^^ @@ -77,99 +132,21 @@ $ swift -sites.file sites.xml -tc.file tc.data catsn.swift ----- -You should see 10 new text files get created, named catsn*.out. If -you see these files, then you have succesfully run Swift on PADS! +You should see several new files being created, called catsn.0001.out, catsn.0002.out, etc. Each of these +files should contain the contents of what you placed into data.txt. If this happens, your job has run +successfully on PADS! TIP: Make sure your default project is defined. Read on for more information. Read on for more detailed information about running Swift on PADS. -Requesting Access -~~~~~~~~~~~~~~~~~ -If you do not already have a Computation Institute account, you can request -one at https://www.ci.uchicago.edu/accounts. This page will give you a list -of resources you can request access to. Be sure that PADS is selected. If -you already have an existing CI account, but do not have access to PADS, -send an email to support at ci.uchicago.edu to request access. -SSH Keys -~~~~~~~~ -Before accessing PADS, be sure to have your SSH keys configured correctly. -There is some basic information about SSH and how to generate your key at -http://www.ci.uchicago.edu/wiki/bin/view/Resources/SshKeys. Once you have -followed those instructions, you can add your key at -https://www.ci.uchicago.edu/support/sshkeys/. +Queues +^^^^^^ -Connecting to a login node -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Once your keys are configured, you should be able to access a PADS login -node with the following command: +As you run more application in the future, you will likely need +to change queues. ------ -ssh yourusername at login.pads.ci.uchicago.edu ------ - -Configuring softenv -~~~~~~~~~~~~~~~~~~~ -Softenv is a system used for managing applications. In order to run Swift, -the softenv environment will have to be modified slightly. Softenv is -configured by a file in your home directory called .soft. Edit this file -to look like this: ------ -+java-sun -+maui -+torque - at default ------ - -Swift Work Directory -^^^^^^^^^^^^^^^^^^^^ -The Swift work directory is a directory which Swift uses for processing work. -This directory needs to be writable and available to all worker nodes on -a shared filesystem. - -.Examples ------ -/home/username/swiftwork -/home/username/work -/autonfs/gpfs-pads/projects/CI-CCR000013/myusername ------ - -Which project(s) are you a member of? -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -PADS requires that you are a member of a project. You can determine this by -running the following command: - ------ -$ projects --available - -The following projects are available for your use - -Project PI Title - -CI-CCR000013 Michael Wilde The Swift Parallel Scripting System ------ - -If you are not a member of a project, you must first request access -to a project at http://www.ci.uchicago.edu/hpc/projects. - -You should make sure that you have a project set as default. Run -the projects command with no arguments to determine if you have a default. - ------- -$ projects -You have no default project set. ------ - -To set your default project, use projects --set ------- -$ projects --set CI-CCR000013 --all -Your default project for all CI clusters has been set to CI-CCR000013. ------ - -Determine your Queue -^^^^^^^^^^^^^^^^^^^^ - PADS has several different queues you can submit jobs to depending on the type of work you will be doing. The command "qstat -q" will print the most up to date list of this information. @@ -185,59 +162,13 @@ |long |-- |-- |24:00:00|-- |232|130|-- | E R |========================================================= -Generating Configuration Files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Now that you know what queue to use, your project, and your work directory, it is time to -set up Swift. Swift uses a configuration file called sites.xml to determine how it should run. -There are two methods you can use for creating this file. You can manually edit -the configuration file, or generate it with a utility called gensites. +When you determine your computing requirements, modify this line in your +sites.xml: -Manually Editing sites.xml -^^^^^^^^^^^^^^^^^^^^^^^^^^ -Below is the template that is used by Swift's test suite for running on PADS. - ----- -include::../../tests/providers/PADS/coasters/sites.template.xml[] +fast ----- -Before you can use this configuration file, you will need to modify \_WORK_ to a directory writable by you, -and have your default project defined. Copy this template, replace \_WORK_, and then save as sites.xml. - -If you wanted to use a different queue, replace "fast" with the desired queue name. - -Manually Editing tc.data -~~~~~~~~~~~~~~~~~~~~~~~~ -Below is the tc.data file used by Swift's test suite for running on PADS. - ------ -include::../../tests/providers/PADS/coasters/tc.template.data[] ------- - -Copy these commands and save it as tc.data. - -Catsn.swift -~~~~~~~~~~~ -The swift script we will run is called catsn.swift. It simply cats a file and saves the result. This is -a nice simple test to ensure jobs are running correctly. Create a file called data.txt which contains -some simple input - a "hello world" will do the trick. - ------ -include::../../examples/misc/catsn.swift[] ------ - - -Running Swift -~~~~~~~~~~~~~ -Now that everything is in place, run Swift with the following command: - ------ -swift -sites.file sites.xml -tc.file tc.data catsn.swift -n=10 ------ - -You should see several new files being created, called catsn.0001.out, catsn.0002.out, etc. Each of these -files should contain the contents of what you placed into data.txt. If this happens, your job has run -successfully on PADS! - More Help ~~~~~~~~~ The best place for additional help is the Swift user mailing list. You can subscribe to this list at Modified: branches/release-0.93.1/docs/siteguide/siteguide.txt =================================================================== --- branches/release-0.93.1/docs/siteguide/siteguide.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/docs/siteguide/siteguide.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -8,12 +8,17 @@ include::prereqs[] -include::pads[] +include::bag_of_workstations[] +include::beagle[] + include::fusion[] -include::beagle[] - include::futuregrid[] include::intrepid[] + +include::mcs[] + +include::pads[] + Deleted: branches/release-0.93.1/docs/tutorial/.cache/tutorial.txt =================================================================== --- branches/release-0.93/docs/tutorial/.cache/tutorial.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/docs/tutorial/.cache/tutorial.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,17 +0,0 @@ -A Swift Tutorial -================ - -:toc: -:icons: -:website: http://www.ci.uchicago.edu/swift/guides/tutorial.php -:numbered: - -include::introduction[] - -include::hello_world[] - -include::language_features[] - -include::runtime_features[] - -include::bits[] Copied: branches/release-0.93.1/docs/tutorial/.cache/tutorial.txt (from rev 5504, branches/release-0.93/docs/tutorial/.cache/tutorial.txt) =================================================================== --- branches/release-0.93.1/docs/tutorial/.cache/tutorial.txt (rev 0) +++ branches/release-0.93.1/docs/tutorial/.cache/tutorial.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,17 @@ +A Swift Tutorial +================ + +:toc: +:icons: +:website: http://www.ci.uchicago.edu/swift/guides/tutorial.php +:numbered: + +include::introduction[] + +include::hello_world[] + +include::language_features[] + +include::runtime_features[] + +include::bits[] Deleted: branches/release-0.93.1/docs/userguide/.cache/userguide.txt =================================================================== --- branches/release-0.93/docs/userguide/.cache/userguide.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/docs/userguide/.cache/userguide.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,43 +0,0 @@ -Swift User Guide -================ - -:toc: -:icons: -:website: http://www.ci.uchicago.edu/swift/guides/userguide.php -:numbered: - -include::overview[] - -include::language[] - -include::mappers[] - -include::commands[] - -include::app_procedures[] - -include::configuration_properties[] - -include::profiles[] - -include::site_catalog[] - -include::transformation_catalog[] - -include::build_options[] - -include::kickstart[] - -include::reliability_mechanisms[] - -include::clustering[] - -include::coasters[] - -include::howto_tips[] - -include::cdm[] - -include::log-processing[] - -include::troubleshooting[] Copied: branches/release-0.93.1/docs/userguide/.cache/userguide.txt (from rev 5504, branches/release-0.93/docs/userguide/.cache/userguide.txt) =================================================================== --- branches/release-0.93.1/docs/userguide/.cache/userguide.txt (rev 0) +++ branches/release-0.93.1/docs/userguide/.cache/userguide.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,43 @@ +Swift User Guide +================ + +:toc: +:icons: +:website: http://www.ci.uchicago.edu/swift/guides/userguide.php +:numbered: + +include::overview[] + +include::language[] + +include::mappers[] + +include::commands[] + +include::app_procedures[] + +include::configuration_properties[] + +include::profiles[] + +include::site_catalog[] + +include::transformation_catalog[] + +include::build_options[] + +include::kickstart[] + +include::reliability_mechanisms[] + +include::clustering[] + +include::coasters[] + +include::howto_tips[] + +include::cdm[] + +include::log-processing[] + +include::troubleshooting[] Modified: branches/release-0.93.1/docs/userguide/cdm =================================================================== --- branches/release-0.93.1/docs/userguide/cdm 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/docs/userguide/cdm 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,12 +1,16 @@ Collective Data Management -------------------------- +What is CDM +~~~~~~~~~~~ +CDM is a Swift feature that broadly enables improved management of data based on its nature and location. + Overview ~~~~~~~~ . The user specifies a CDM policy in a file, customarily fs.data. . fs.data is given to Swift on the command line. . The Swift data module (org.globus.swift.data) is informed of the CDM policy. -. At job launch time, the VDL Karajan code queries the CDM policy, +. At job launch time, the CDM policy is queried, .. altering the file staging phase, and .. sending fs.data to the compute site. . At job run time, the Swift wrapper script Copied: branches/release-0.93.1/docs/userguide/troubleshooting (from rev 5504, branches/release-0.93/docs/userguide/troubleshooting) =================================================================== --- branches/release-0.93.1/docs/userguide/troubleshooting (rev 0) +++ branches/release-0.93.1/docs/userguide/troubleshooting 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,28 @@ +Troubleshooting +--------------- + +In this section we will discuss some of the common issues and remedies while using Swift. The origin of these issues can be Swift or the configuration of the target site, state and us +er configuration among other factors. We try to identify known issues and address them here: + +* Command not found: Swift is installed but not in path. If you see the following error message: + +----- +If 'swift' is not a typo you can run the following command to lookup the +package that contains the binary: + command-not-found swift +-bash: swift: command not found +----- + +The most likely cause is the Swift is not part of the environment. Do the following to load the Swift module: + +----- +$ export PATH=/bin:$PATH +----- + +Note: If you are running Swift on a system where it is installed as a module, do module load swift. For instance, on the Beagle supercomputer, Swift is loaded as follows: + +---- +$ module load swift +Swift version swift-0.93RC5 loaded +---- + Modified: branches/release-0.93.1/docs/userguide/userguide.txt =================================================================== --- branches/release-0.93.1/docs/userguide/userguide.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/docs/userguide/userguide.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -39,3 +39,5 @@ include::cdm[] include::log-processing[] + +include::troubleshooting[] Deleted: branches/release-0.93.1/docs/utils/.cache/gensites.txt =================================================================== --- branches/release-0.93/docs/utils/.cache/gensites.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/docs/utils/.cache/gensites.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,235 +0,0 @@ -Gensites -========== -:toc: -:icons: -:website: http://www.ci.uchicago.edu/swift -:numbered: - -Overview --------- -To simplify this configuration process, versions of Swift starting with -0.92 include a utility called gensites. The gensites command is used -to generate a sites.xml file for running a swift workflow on a given -site. It accomplishes this by using a series of templates. The templates -used by gensites are the same templates used for internal testing, so -they are likely up to date and known to work on a given site. - - -Viewing All Available Site Templates ------------------------------------- -To view a list of all available templates, run the following command: - ------ -$ gensites -T ------ - -You should see output similar to this: ------ -intrepid -local -local-pbs-coasters -pads -queenbee -sge-local -ssh -ssh-pbs-coasters -surveyor ------ - -You will notice that the templates can be specific to a particular set -of machines like Intrepid and Queenbee, or they may be more general and -aim to work across a variety of machines, as in the case of -local-pbs-coasters. Gensites will look in three directories for available -templates: your current directory, $SWIFT_HOME/etc/sites and $HOME/.swift/sites. - -Listing the Template --------------------- -To view the contents of a template, type: - ------ -$ gensites -l templatename ------ - -Running this command will print some information about the template and give -you an idea of what settings you will need to specify. You should see -something like this: - ------ -Description: Template for Intrepid. More information about this system can be found at http://www.alcf.anl.gov/support/gettingstarted/index.php -Required Tokens: host work project queue ------ - -The required tokens are required to properly use the templates. These are placeholder -values you will need to specify in the -following steps. - -Providing Site Specific Values ------------------------------- - -The gensites script needs to know how to replace the placeholder values -in the template. This is done by configuring the swift.properties file. -Gensites will first look for a swift.properties file in the current -directory. If it does not exist, it will next look in $HOME/.swift. - -To add site specific values to swift.properties, add a line in the -follow format: - ------ -#site templatename setting=value ------ - -Continuing the previous example, here is what you could add to -swift.properties to replace the values of project, queue and work for -the surveyor template: - ------ -#site surveyor project=MyProject -#site surveyor queue=MyQueue -#site surveyor work=/path/to/workdir ------ - -Now, running the command 'gensites surveyor' will produce the following -valid configuration file: - ------ - - - - - MyProject - MyQueue - zeptoos - true - 21 - 10000 - 1 - DEBUG - 1 - 900 - 64 - 64 - /path/to/workdir - - ------ - -Generating Application Configurations with Gensites ---------------------------------------------------- -Gensites can also be used to create a valid application catalog, commonly -called tc.data. Here are some examples of how to specify applications within -your swift.properties file: - ------ -#app intrepid echo=/usr/bin/echo ------ - -This first example shows a site specific application. The #app definition -tells gensites this is related to an application rather than a #site -definition. In the second part, echo=/usr/bin/echo, the left hand side -is the name of the application that will be called from within swift. The -right hand site is the path name which points to the binary. - ------ -#app intrepid echo=$HOME/bin/echo ------ - -Environment variables will be interpreted and converted to full path names -for Swift. - ------ -#app intrepid echo=bin/echo ------ - -Gensites can take relative paths (relative to your current directory) and -translate them to full path names for Swift. - -WARNING: Running gensites with #app definitions will replace any file -called tc.data in your current directory. If a file called tc.data exists, -it will be renamed to tc.data.old. If you run gensites twice, the original -contents of your tc.data will be lost. Please either rename your tc file -or copy to a different location. - -Running Swift With the New Configuration ----------------------------------------- - -Now that the gensites is configured and producing a valid configuration -file, Swift needs to know to use it. The first step is to create a -unique config file based on the preferences you specified. - ------ -$ gensites surveyor > myconfig.xml ------ - -This will send the output of gensites to myconfig.xml. This example will -use a swift.properties location in the default directories (your current -directory, ~/.swift/swift.properties). To specify a different location -to the swift.properties, use: - ------ -$ gensites surveyor -p myswift.properties > myconfig.xml ------ - -Next, provide the configuration filename to swift: ------ -$ swift -sites.file myconfig.xml myscript.swift ------ - -Alternatively, if you have specified applications, be sure to load that into -Swift ------ -$ swift -sites.file myconfig.xml -tc.file tc.data mycript.swift ------ - -Providing Default Values for All Templates ------------------------------------------- -It is also possible to specify a default value for a setting, regardless -of template you use. If you want to set your queue to default to "fast" -across all templates, you can do this by omitting the template name. -Consider the following swift.properties: - ------ -#site queue=fast -#site surveyor project=MyProject -#site surveyor work=/path/to/workdir ------ -By omitting the template name, the default value for queue on surveyor -(and any other template you use) will be set to "fast". One thing to -keep in mind when setting default values is that order matters. Be sure -to set your default values first before setting template specific values. - -Just like the #site definitions, when a site name is not specified, an app -will be created for every site that is defined in your template. ------ -#app echo=/bin/echo ------ - -More Help ---------- -The gensites script provides additional options not discussed here, such -as using templates and swift.properties in non-standard directories. For -more information, run gensites -h. Here is a full list of all options -available. - ------ -$ gensites -help - - usage: gensites template [-p properties.file] [-L template_directory] [-h] [-T] [-l] - - template Name of template to use - -p properties.file Specify a swift.properties to use - -L template_directory Specify a non-standard template directory - -T List all templates available - -h Help / usage information - -l List the contents of a specific template - - Examples: - - Create a site configuration file for sites.xml using default properties.file in current directory - $ gensites pads > sites.xml - - Use a specific properties file for a site - $ gensites -p sites.properties pads > sites.xml - - Specify a non-standard directory where templates are located - $ gensites -L template.dir pads > sites.xml ------ Copied: branches/release-0.93.1/docs/utils/.cache/gensites.txt (from rev 5504, branches/release-0.93/docs/utils/.cache/gensites.txt) =================================================================== --- branches/release-0.93.1/docs/utils/.cache/gensites.txt (rev 0) +++ branches/release-0.93.1/docs/utils/.cache/gensites.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,235 @@ +Gensites +========== +:toc: +:icons: +:website: http://www.ci.uchicago.edu/swift +:numbered: + +Overview +-------- +To simplify this configuration process, versions of Swift starting with +0.92 include a utility called gensites. The gensites command is used +to generate a sites.xml file for running a swift workflow on a given +site. It accomplishes this by using a series of templates. The templates +used by gensites are the same templates used for internal testing, so +they are likely up to date and known to work on a given site. + + +Viewing All Available Site Templates +------------------------------------ +To view a list of all available templates, run the following command: + +----- +$ gensites -T +----- + +You should see output similar to this: +----- +intrepid +local +local-pbs-coasters +pads +queenbee +sge-local +ssh +ssh-pbs-coasters +surveyor +----- + +You will notice that the templates can be specific to a particular set +of machines like Intrepid and Queenbee, or they may be more general and +aim to work across a variety of machines, as in the case of +local-pbs-coasters. Gensites will look in three directories for available +templates: your current directory, $SWIFT_HOME/etc/sites and $HOME/.swift/sites. + +Listing the Template +-------------------- +To view the contents of a template, type: + +----- +$ gensites -l templatename +----- + +Running this command will print some information about the template and give +you an idea of what settings you will need to specify. You should see +something like this: + +----- +Description: Template for Intrepid. More information about this system can be found at http://www.alcf.anl.gov/support/gettingstarted/index.php +Required Tokens: host work project queue +----- + +The required tokens are required to properly use the templates. These are placeholder +values you will need to specify in the +following steps. + +Providing Site Specific Values +------------------------------ + +The gensites script needs to know how to replace the placeholder values +in the template. This is done by configuring the swift.properties file. +Gensites will first look for a swift.properties file in the current +directory. If it does not exist, it will next look in $HOME/.swift. + +To add site specific values to swift.properties, add a line in the +follow format: + +----- +#site templatename setting=value +----- + +Continuing the previous example, here is what you could add to +swift.properties to replace the values of project, queue and work for +the surveyor template: + +----- +#site surveyor project=MyProject +#site surveyor queue=MyQueue +#site surveyor work=/path/to/workdir +----- + +Now, running the command 'gensites surveyor' will produce the following +valid configuration file: + +----- + + + + + MyProject + MyQueue + zeptoos + true + 21 + 10000 + 1 + DEBUG + 1 + 900 + 64 + 64 + /path/to/workdir + + +----- + +Generating Application Configurations with Gensites +--------------------------------------------------- +Gensites can also be used to create a valid application catalog, commonly +called tc.data. Here are some examples of how to specify applications within +your swift.properties file: + +----- +#app intrepid echo=/usr/bin/echo +----- + +This first example shows a site specific application. The #app definition +tells gensites this is related to an application rather than a #site +definition. In the second part, echo=/usr/bin/echo, the left hand side +is the name of the application that will be called from within swift. The +right hand site is the path name which points to the binary. + +----- +#app intrepid echo=$HOME/bin/echo +----- + +Environment variables will be interpreted and converted to full path names +for Swift. + +----- +#app intrepid echo=bin/echo +----- + +Gensites can take relative paths (relative to your current directory) and +translate them to full path names for Swift. + +WARNING: Running gensites with #app definitions will replace any file +called tc.data in your current directory. If a file called tc.data exists, +it will be renamed to tc.data.old. If you run gensites twice, the original +contents of your tc.data will be lost. Please either rename your tc file +or copy to a different location. + +Running Swift With the New Configuration +---------------------------------------- + +Now that the gensites is configured and producing a valid configuration +file, Swift needs to know to use it. The first step is to create a +unique config file based on the preferences you specified. + +----- +$ gensites surveyor > myconfig.xml +----- + +This will send the output of gensites to myconfig.xml. This example will +use a swift.properties location in the default directories (your current +directory, ~/.swift/swift.properties). To specify a different location +to the swift.properties, use: + +----- +$ gensites surveyor -p myswift.properties > myconfig.xml +----- + +Next, provide the configuration filename to swift: +----- +$ swift -sites.file myconfig.xml myscript.swift +----- + +Alternatively, if you have specified applications, be sure to load that into +Swift +----- +$ swift -sites.file myconfig.xml -tc.file tc.data mycript.swift +----- + +Providing Default Values for All Templates +------------------------------------------ +It is also possible to specify a default value for a setting, regardless +of template you use. If you want to set your queue to default to "fast" +across all templates, you can do this by omitting the template name. +Consider the following swift.properties: + +----- +#site queue=fast +#site surveyor project=MyProject +#site surveyor work=/path/to/workdir +----- +By omitting the template name, the default value for queue on surveyor +(and any other template you use) will be set to "fast". One thing to +keep in mind when setting default values is that order matters. Be sure +to set your default values first before setting template specific values. + +Just like the #site definitions, when a site name is not specified, an app +will be created for every site that is defined in your template. +----- +#app echo=/bin/echo +----- + +More Help +--------- +The gensites script provides additional options not discussed here, such +as using templates and swift.properties in non-standard directories. For +more information, run gensites -h. Here is a full list of all options +available. + +----- +$ gensites -help + + usage: gensites template [-p properties.file] [-L template_directory] [-h] [-T] [-l] + + template Name of template to use + -p properties.file Specify a swift.properties to use + -L template_directory Specify a non-standard template directory + -T List all templates available + -h Help / usage information + -l List the contents of a specific template + + Examples: + + Create a site configuration file for sites.xml using default properties.file in current directory + $ gensites pads > sites.xml + + Use a specific properties file for a site + $ gensites -p sites.properties pads > sites.xml + + Specify a non-standard directory where templates are located + $ gensites -L template.dir pads > sites.xml +----- Modified: branches/release-0.93.1/etc/coaster-service.conf =================================================================== --- branches/release-0.93.1/etc/coaster-service.conf 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/etc/coaster-service.conf 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,11 +1,8 @@ -# Keep all interesting settings in one place -# User should modify this to fit environment - # Location of SWIFT. If empty, PATH is searched export SWIFT= # Where to copy worker.pl on the remote machine for sites.xml -export WORKER_WORK=$HOME/swiftwork +export WORKER_LOCATION=$HOME/swiftwork # How to launch workers: local, ssh, cobalt, or futuregrid export WORKER_MODE=ssh @@ -29,7 +26,10 @@ export LOCAL_PORT= export SERVICE_PORT= -# start-coaster-service tries to automatically detect the IP address of this system. Specify here if you have multiple network interfaces +# This is the IP address to which the workers will connect +# If not given, start-coaster-service tries to automatically detect +# the IP address of this system via ifconfig +# Specify this if you have multiple network interfaces export IPADDR= # Location of the swift-vm-boot scripts @@ -37,6 +37,10 @@ # Swift information for creating sites.xml export WORK=$HOME/swiftwork -export QUEUE=prod-devel -export MAXTIME=20 -export NODE=64 + +# Jobs per node is usually equal to the number of CPUs per node +export JOBS_PER_NODE=2 + +# To calculate job throttle: +# jobs per node * nodes - 0.1 / 100 +export JOB_THROTTLE=0.059 Modified: branches/release-0.93.1/etc/sites/intrepid =================================================================== --- branches/release-0.93.1/etc/sites/intrepid 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/etc/sites/intrepid 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,3 +1,5 @@ + + @@ -4,7 +6,6 @@ _WORK_ - 0.04 file @@ -12,7 +13,6 @@ - _HOST_ _PROJECT_ _QUEUE_ @@ -23,7 +23,7 @@ 1 DEBUG 1 - 900 + 900 64 64 _WORK_ Copied: branches/release-0.93.1/etc/sites/mcs (from rev 5504, branches/release-0.93/etc/sites/mcs) =================================================================== --- branches/release-0.93.1/etc/sites/mcs (rev 0) +++ branches/release-0.93.1/etc/sites/mcs 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,13 @@ + + + + passive + _JOBS_PER_NODE + _JOB_THROTTLE_ + 10000 + + _WORK_ + + Modified: branches/release-0.93.1/etc/sites/persistent-coasters =================================================================== --- branches/release-0.93.1/etc/sites/persistent-coasters 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/etc/sites/persistent-coasters 2012-01-22 03:23:13 UTC (rev 5505) @@ -4,8 +4,8 @@ url="_EXECUTION_URL_" jobmanager="local:local"/> passive - 4 - .03 + _JOBS_PER_NODE_ + _JOB_THROTTLE_ 10000 _WORK_ Copied: branches/release-0.93.1/examples/misc/data.txt (from rev 5504, branches/release-0.93/examples/misc/data.txt) =================================================================== --- branches/release-0.93.1/examples/misc/data.txt (rev 0) +++ branches/release-0.93.1/examples/misc/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +hello Modified: branches/release-0.93.1/libexec/_swiftwrap.staging =================================================================== --- branches/release-0.93.1/libexec/_swiftwrap.staging 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/libexec/_swiftwrap.staging 2012-01-22 03:23:13 UTC (rev 5505) @@ -302,15 +302,6 @@ fi checkError $? "Application $EXEC failed with an exit code of $?" <$STDERR -if [ ! -s "$STDOUT" ]; then - log "Removing empty stdout" - rm -f $STDOUT -fi -if [ ! -s "$STDERR" ]; then - log "Removing empty stderr" - rm -f $STDERR -fi - logstate "EXECUTE_DONE" log "Job ran successfully" Property changes on: branches/release-0.93.1/libexec/log-processing/active-state-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/add-runid-as-prefix ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/affine-transform ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/aggregate.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/all-kickstarts-to-event ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/all-logs-active-jobsubmissions-count-graph ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/annotate-karatasks-with-execute2-id ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/assorted.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/autospace-data ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/b.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/bars ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/cli-finished ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/cli-version ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/cluster-report ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/cluster-stats ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/colour-execute2 ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/colour-execute2-by-falkon ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/colour-karatasks ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/colour.plot.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/coloured-event-plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/combine-execute-start-last-times ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/combine-start-last-times ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/combine-start-last-times-to-event ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/compute-t-inf ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/create-everylog-vs-versions-data ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/duration-histogram.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/duration-of-workflow ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/error-summary ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/event-duration-stats ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/events-in-progress ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/events-in-progress-first-loop.pl ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/events-in-progress-second-loop.pl ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/events-in-progress-third-loop.pl ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/everylog-active-submissions.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/everylog-durations-of-workflows ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/everylog-summary.html ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/everylog-time-cumulative.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/everylog-to-event ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/everylog-version-cumulative.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/everylog-vs-versions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/everylog-vs-versions.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/everylog.html ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/execstages-plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/execstages.plot.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/execute.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/execute.progress ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/execute2-by-falkon.channels ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/execute2-status-from-log ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/execute2-summary-from-log ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/execute2.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/execution-summaries ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/extract-activity-for-subthreads-of ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/extract-activity-for-task ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/extract-activity-for-thread ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/extract-completed-time-for-run-id ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/extract-end-time ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/extract-execute-start-times ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/extract-failed-time-for-run-id ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/extract-jobid-karajanid-bindings ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/extract-last-time-for-execute ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/extract-start-time ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/extract-start-times ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/falkon-to-event ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/falkon.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/generate-karatasks-event ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/get-jobid-for-karajanid ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/get-replicationid-for-execute2id ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/get-site-for-run-id ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/get-thread-for-run-id ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/index.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/info-and-karajan-actives ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/info-and-karajan-actives.2.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/info-and-karajan-actives.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/info-to-md5 ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/info-to-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/info-to-zeroed-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/info.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/iso-to-secs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/karajan.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/karatasks-coloured.channels ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/karatasks-coloured.channels.nm ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/karatasks-only ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/kickstart.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/kickstarts-to-event ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/kickstarts-to-plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/last-times ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/last-transition-line ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/list-known-tasks ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/list-known-threads ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/log-to-createdirset-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/log-to-dostagein-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/log-to-dostageout-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/log-to-execute-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/log-to-execute2-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/log-to-initshareddir-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/log-to-karatasks-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/logs-for-all ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/lookup-colour ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/makefile ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/makefile.cluster ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/makefile.errors ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/makefile.falkon ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/makefile.implicit ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/makefile.karatasks ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/makefile.kickstart ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/makefile.webpage ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/max-duration ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/normalise-event-start-time ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/normalise-event-start-time-to-any ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/number-events ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/number-sites-list ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/overview-reports.sh ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/overview.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/p1.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/per-site-execute2-durations ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/plot-duration-histogram ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/plot-everylogs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/plot1 ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/q.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/queue-state-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/retrycounts ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/scheduler.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/sec-to-utc ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/sec-to-utc-day ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/separate-execute-last-summary ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/simple-event-plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/slt2.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/sort-preserve ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/sp.plot.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/split-start-times-shifted ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/start-last-times-and-kickstart ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/start-last-times-and-kickstart.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/start-last-times.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/start-times.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/sum-tt1.pl ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/swap-and-sort ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/swap-and-sort-and-swap ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/swift-standard-log-to-transition ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/table-jobs-sites ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/task-status-to-transitions ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/tasks-in-cluster ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/tie-url-filenames ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/times-for-all-tasks ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/toolbar.html.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/total-event-plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/total.plot.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/trail ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/trail-freex ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/trail-freex.plot.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/trail.plot.template ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/transitions-to-cedps ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/transitions-to-event ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/tscore.sh ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/tscores.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/weights.plot ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/weights.sh ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/whole-workflow-event ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/libexec/log-processing/whole-workflow-time ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/release-0.93.1/resources/swiftscript.stg ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: branches/release-0.93.1/src/org/griphyn/vdl/engine/Karajan.java =================================================================== --- branches/release-0.93.1/src/org/griphyn/vdl/engine/Karajan.java 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/src/org/griphyn/vdl/engine/Karajan.java 2012-01-22 03:23:13 UTC (rev 5505) @@ -157,28 +157,23 @@ logger.debug("Importing module "+moduleToImport); if(!importedNames.contains(moduleToImport)) { - // TODO PATH/PERL5LIB-style path handling - //String swiftfilename = "./"+moduleToImport+".swift"; - //String xmlfilename = "./"+moduleToImport+".xml"; String lib_path = System.getenv("SWIFT_LIB"); - String swiftfilename = moduleToImport+".swift"; - String xmlfilename = moduleToImport+".xml"; + String swiftfilename = "./"+moduleToImport+".swift"; + String xmlfilename = "./"+moduleToImport+".xml"; File local = new File(swiftfilename); if( !( lib_path == null || local.exists() ) ) { - StringTokenizer st = new StringTokenizer(lib_path, ":"); - while(st.hasMoreTokens()) + String[] path = lib_path.split(":"); + for(String entry : path) { - String path = st.nextToken(); - String lib_script_location = path + "/" + swiftfilename; - File tmp = new File(lib_script_location); + String lib_script_location = entry + "/" + swiftfilename; + File file = new File(lib_script_location); - if(tmp.exists()) + if(file.exists()) { - swiftfilename = path + "/" + swiftfilename; - xmlfilename = path + "/" + xmlfilename; - moduleToImport = path + "/" + moduleToImport; + swiftfilename = entry + "/" + swiftfilename; + moduleToImport = entry + "/" + moduleToImport; break; } } Modified: branches/release-0.93.1/src/org/griphyn/vdl/karajan/ArrayIndexFutureList.java =================================================================== --- branches/release-0.93.1/src/org/griphyn/vdl/karajan/ArrayIndexFutureList.java 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/src/org/griphyn/vdl/karajan/ArrayIndexFutureList.java 2012-01-22 03:23:13 UTC (rev 5505) @@ -21,11 +21,12 @@ import org.globus.cog.karajan.workflow.futures.ListenerStackPair; import org.griphyn.vdl.mapping.ArrayDataNode; -public class ArrayIndexFutureList implements FutureList, FutureWrapper { +public class ArrayIndexFutureList implements FutureList, FutureWrapper { private ArrayList keys; private Map values; private List listeners; private ArrayDataNode node; + private boolean purged; public ArrayIndexFutureList(ArrayDataNode node, Map values) { this.node = node; @@ -50,11 +51,15 @@ } public int available() { - return keys.size(); + synchronized(node) { + return keys.size(); + } } public void addKey(Object key) { - keys.add(key); + synchronized(node) { + keys.add(key); + } notifyListeners(); } @@ -67,10 +72,7 @@ } public void close() { - synchronized(node) { - purge(); - } - notifyListeners(); + throw new UnsupportedOperationException("Not used here"); } private void purge() { @@ -78,11 +80,18 @@ allkeys.removeAll(keys); // remaining keys must be added keys.addAll(allkeys); + purged = true; } public boolean isClosed() { synchronized(node) { - return node.isClosed(); + boolean closed = node.isClosed(); + if (closed && !purged) { + // this is done here because no explicit close() is + // ever called on this object + purge(); + } + return closed; } } Modified: branches/release-0.93.1/src/org/griphyn/vdl/karajan/FutureTracker.java =================================================================== --- branches/release-0.93.1/src/org/griphyn/vdl/karajan/FutureTracker.java 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/src/org/griphyn/vdl/karajan/FutureTracker.java 2012-01-22 03:23:13 UTC (rev 5505) @@ -46,4 +46,8 @@ public Map getMap() { return futures; } + + public synchronized Map getMapSafe() { + return new HashMap(futures); + } } Modified: branches/release-0.93.1/src/org/griphyn/vdl/karajan/Monitor.java =================================================================== --- branches/release-0.93.1/src/org/griphyn/vdl/karajan/Monitor.java 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/src/org/griphyn/vdl/karajan/Monitor.java 2012-01-22 03:23:13 UTC (rev 5505) @@ -200,7 +200,7 @@ public static void dumpVariables(PrintStream ps) { ps.println("\nRegistered futures:"); - Map map = FutureTracker.get().getMap(); + Map map = FutureTracker.get().getMapSafe(); synchronized (map) { for (Map.Entry en : map.entrySet()) { Future f = en.getValue(); Modified: branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/CreateArray.java =================================================================== --- branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/CreateArray.java 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/CreateArray.java 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,16 +1,19 @@ package org.griphyn.vdl.karajan.lib; -import java.util.Iterator; +import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import org.apache.log4j.Logger; - import org.globus.cog.karajan.arguments.Arg; import org.globus.cog.karajan.stack.VariableStack; import org.globus.cog.karajan.workflow.ExecutionException; +import org.globus.cog.karajan.workflow.futures.FutureFault; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.mapping.Path; import org.griphyn.vdl.mapping.RootArrayDataNode; +import org.griphyn.vdl.type.Field; import org.griphyn.vdl.type.Type; public class CreateArray extends VDLFunction { @@ -23,7 +26,8 @@ setArguments(CreateArray.class, new Arg[] { PA_VALUE }); } - public Object function(VariableStack stack) throws ExecutionException { + @SuppressWarnings("unchecked") + public Object function(VariableStack stack) throws ExecutionException { Object value = PA_VALUE.getValue(stack); try { @@ -32,56 +36,105 @@ "An array variable can only be initialized with a list of values"); } - Type type = null; + Type type = checkTypes((List) value); + + DSHandle handle = new RootArrayDataNode(type.arrayType()); + if (hasMappableFields(type)) { + setMapper(handle); + } - Iterator i = ((List) value).iterator(); - while (i.hasNext()) { - Object o = i.next(); - if (o instanceof DSHandle) { - DSHandle d = (DSHandle)o; - Type thisType = d.getType(); - if(type == null) { - // this first element - type = thisType; - } else { - // other elements, when we have a type to expect - if(!(type.equals(thisType))) { - throw new RuntimeException( - "Expecting all array elements to have SwiftScript type "+type+" but found an element with type "+thisType); - } - } - } - else { - throw new RuntimeException("An array variable can only be initialized by a list of DSHandle values."); - } - + if (logger.isInfoEnabled()) { + logger.info("CREATEARRAY START array=" + handle.getIdentifier()); } - DSHandle handle = new RootArrayDataNode(type.arrayType()); - - logger.info("CREATEARRAY START array="+handle.getIdentifier()); - int index = 0; - i = ((List) value).iterator(); - while (i.hasNext()) { + for (Object o : (List) value) { // TODO check type consistency of elements with // the type of the array - DSHandle n = (DSHandle) i.next(); + DSHandle n = (DSHandle) o; // we know this DSHandle cast will work because we checked // it in the previous scan of the array contents Path p = Path.EMPTY_PATH.addLast(String.valueOf(index), true); + + DSHandle dst = handle.getField(p); - handle.getField(p).set(n); - logger.info("CREATEARRAY MEMBER array="+handle.getIdentifier()+" index="+index+" member="+n.getIdentifier()); + SetFieldValue.deepCopy(dst, n, stack, 1); + + if (logger.isInfoEnabled()) { + logger.info("CREATEARRAY MEMBER array=" + handle.getIdentifier() + + " index=" + index + " member=" + n.getIdentifier()); + } index++; } + handle.closeShallow(); - logger.info("CREATEARRAY COMPLETED array="+handle.getIdentifier()); + + if (logger.isInfoEnabled()) { + logger.info("CREATEARRAY COMPLETED array=" + handle.getIdentifier()); + } return handle; } + catch (FutureFault e) { + throw e; + } catch (Exception e) { throw new ExecutionException(e); } } + + private void setMapper(DSHandle handle) { + // slap a concurrent mapper on this + Map params = new HashMap(); + params.put("descriptor", "concurrent_mapper"); + params.put("dbgname", "arrayexpr"); + handle.init(params); + } + + private boolean hasMappableFields(Type type) { + if (type.isPrimitive()) { + return false; + } + else if (!type.isComposite()) { + return true; + } + else if (type.isArray()) { + return hasMappableFields(type.itemType()); + } + else { + // struct + for (Field f : type.getFields()) { + if (hasMappableFields(f.getType())) { + return true; + } + } + return false; + } + } + + private Type checkTypes(List value) { + Type type = null; + + for (Object o : value) { + if (o instanceof DSHandle) { + DSHandle d = (DSHandle)o; + Type thisType = d.getType(); + if(type == null) { + // this first element + type = thisType; + } else { + // other elements, when we have a type to expect + if(!(type.equals(thisType))) { + throw new RuntimeException( + "Expecting all array elements to have SwiftScript type " + + type + " but found an element with type "+thisType); + } + } + } + else { + throw new RuntimeException("An array variable can only be initialized by a list of DSHandle values."); + } + } + return type; + } } Modified: branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java =================================================================== --- branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java 2012-01-22 03:23:13 UTC (rev 5505) @@ -17,7 +17,10 @@ import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.mapping.InvalidPathException; +import org.griphyn.vdl.mapping.Mapper; import org.griphyn.vdl.mapping.Path; +import org.griphyn.vdl.type.Field; +import org.griphyn.vdl.type.Type; public class SetFieldValue extends VDLFunction { public static final Logger logger = Logger.getLogger(SetFieldValue.class); @@ -81,15 +84,17 @@ String unpackHandles(Map handles) { StringBuilder sb = new StringBuilder(); sb.append("{"); - Iterator> it = - handles.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry entry = it.next(); - sb.append(entry.getKey()); - sb.append('='); - sb.append(entry.getValue().getValue()); - if (it.hasNext()) - sb.append(", "); + synchronized(handles) { + Iterator> it = + handles.entrySet().iterator(); + while (it.hasNext()) { + Map.Entry entry = it.next(); + sb.append(entry.getKey()); + sb.append('='); + sb.append(entry.getValue().getValue()); + if (it.hasNext()) + sb.append(", "); + } } sb.append("}"); return sb.toString(); @@ -97,83 +102,114 @@ /** make dest look like source - if its a simple value, copy that and if its an array then recursively copy */ - void deepCopy(DSHandle dest, DSHandle source, VariableStack stack, int level) throws ExecutionException { + public static void deepCopy(DSHandle dest, DSHandle source, VariableStack stack, int level) throws ExecutionException { ((AbstractDataNode) source).waitFor(); if (source.getType().isPrimitive()) { dest.setValue(source.getValue()); } else if (source.getType().isArray()) { - PairIterator it; - if (stack.isDefined("it" + level)) { - it = (PairIterator) stack.getVar("it" + level); - } - else { - it = new PairIterator(source.getArrayValue()); - stack.setVar("it" + level, it); - } - while (it.hasNext()) { - Pair pair = (Pair) it.next(); - Object lhs = pair.get(0); - DSHandle rhs = (DSHandle) pair.get(1); - Path memberPath; - if (lhs instanceof Double) { - memberPath = Path.EMPTY_PATH.addLast(String.valueOf(((Double) lhs).intValue()), true); - } - else { - memberPath = Path.EMPTY_PATH.addLast(String.valueOf(lhs), true); - } - DSHandle field; - try { - field = dest.getField(memberPath); - } - catch (InvalidPathException ipe) { - throw new ExecutionException("Could not get destination field",ipe); - } - deepCopy(field, rhs, stack, level + 1); - } - stack.currentFrame().deleteVar("it" + level); - dest.closeShallow(); - } - else if (!source.getType().isComposite()) { - Path dpath = dest.getPathFromRoot(); - if (dest.getMapper().canBeRemapped(dpath)) { - if (logger.isDebugEnabled()) { - logger.debug("Remapping " + dest + " to " + source); - } - dest.getMapper().remap(dpath, source.getMapper().map(source.getPathFromRoot())); - dest.closeShallow(); - } - else { - if (stack.currentFrame().isDefined("fc")) { - FileCopier fc = (FileCopier) stack.currentFrame().getVar("fc"); - if (!fc.isClosed()) { - throw new FutureNotYetAvailable(fc); - } - else { - if (fc.getException() != null) { - throw new ExecutionException("Failed to copy " + source + " to " + dest, fc.getException()); - } - } - dest.closeShallow(); - } - else { - FileCopier fc = new FileCopier(source.getMapper().map(source.getPathFromRoot()), - dest.getMapper().map(dpath)); - stack.setVar("fc", fc); - try { - fc.start(); - } - catch (Exception e) { - throw new ExecutionException("Failed to start file copy", e); - } - throw new FutureNotYetAvailable(fc); - } - } + copyArray(dest, source, stack, level); } + else if (source.getType().isComposite()) { + copyStructure(dest, source, stack, level); + } else { - // TODO implement this - //throw new RuntimeException("Deep non-array structure copying not implemented, when trying to copy "+source); + copyNonComposite(dest, source, stack, level); } } + private static void copyStructure(DSHandle dest, DSHandle source, + VariableStack stack, int level) throws ExecutionException { + Type type = dest.getType(); + for (String fname : type.getFieldNames()) { + Path fpath = Path.EMPTY_PATH.addFirst(fname); + try { + DSHandle dstf = dest.getField(fpath); + try { + DSHandle srcf = source.getField(fpath); + deepCopy(dstf, srcf, stack, level + 1); + } + catch (InvalidPathException e) { + // do nothing. It's an unused field in the source. + } + } + catch (InvalidPathException e) { + throw new ExecutionException("Internal type inconsistency detected. " + + dest + " claims not to have a " + fname + " field"); + } + } + } + + private static void copyNonComposite(DSHandle dest, DSHandle source, + VariableStack stack, int level) throws ExecutionException { + Path dpath = dest.getPathFromRoot(); + Mapper dmapper = dest.getRoot().getMapper(); + if (dmapper.canBeRemapped(dpath)) { + if (logger.isDebugEnabled()) { + logger.debug("Remapping " + dest + " to " + source); + } + dmapper.remap(dpath, source.getMapper().map(source.getPathFromRoot())); + dest.closeShallow(); + } + else { + if (stack.currentFrame().isDefined("fc")) { + FileCopier fc = (FileCopier) stack.currentFrame().getVar("fc"); + if (!fc.isClosed()) { + throw new FutureNotYetAvailable(fc); + } + else { + if (fc.getException() != null) { + throw new ExecutionException("Failed to copy " + source + " to " + dest, fc.getException()); + } + } + dest.closeShallow(); + } + else { + FileCopier fc = new FileCopier(source.getMapper().map(source.getPathFromRoot()), + dest.getMapper().map(dpath)); + stack.setVar("fc", fc); + try { + fc.start(); + } + catch (Exception e) { + throw new ExecutionException("Failed to start file copy", e); + } + throw new FutureNotYetAvailable(fc); + } + } + } + + private static void copyArray(DSHandle dest, DSHandle source, + VariableStack stack, int level) throws ExecutionException { + PairIterator it; + if (stack.isDefined("it" + level)) { + it = (PairIterator) stack.getVar("it" + level); + } + else { + it = new PairIterator(source.getArrayValue()); + stack.setVar("it" + level, it); + } + while (it.hasNext()) { + Pair pair = (Pair) it.next(); + Object lhs = pair.get(0); + DSHandle rhs = (DSHandle) pair.get(1); + Path memberPath; + if (lhs instanceof Double) { + memberPath = Path.EMPTY_PATH.addLast(String.valueOf(((Double) lhs).intValue()), true); + } + else { + memberPath = Path.EMPTY_PATH.addLast(String.valueOf(lhs), true); + } + DSHandle field; + try { + field = dest.getField(memberPath); + } + catch (InvalidPathException ipe) { + throw new ExecutionException("Could not get destination field",ipe); + } + deepCopy(field, rhs, stack, level + 1); + } + stack.currentFrame().deleteVar("it" + level); + dest.closeShallow(); + } } Modified: branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/VDLFunction.java =================================================================== --- branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/VDLFunction.java 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/VDLFunction.java 2012-01-22 03:23:13 UTC (rev 5505) @@ -197,9 +197,15 @@ private static String[] leavesFileNames(DSHandle var) throws ExecutionException, HandleOpenException { Mapper mapper; + synchronized (var.getRoot()) { mapper = var.getMapper(); } + + if (mapper == null) { + throw new ExecutionException(var.getType() + " is not a mapped type"); + } + List l = new ArrayList(); try { Collection fp = var.getFringePaths(); Modified: branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/swiftscript/Java.java =================================================================== --- branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/swiftscript/Java.java 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/swiftscript/Java.java 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,6 +1,7 @@ package org.griphyn.vdl.karajan.lib.swiftscript; import java.lang.reflect.Method; +import java.util.Arrays; import org.globus.cog.karajan.arguments.Arg; import org.globus.cog.karajan.stack.VariableStack; @@ -8,78 +9,97 @@ import org.griphyn.vdl.karajan.lib.VDLFunction; import org.griphyn.vdl.mapping.AbstractDataNode; import org.griphyn.vdl.mapping.DSHandle; -import org.griphyn.vdl.mapping.HandleOpenException; import org.griphyn.vdl.mapping.RootDataNode; import org.griphyn.vdl.type.Type; import org.griphyn.vdl.type.Types; -public class Java extends VDLFunction { +public class Java extends VDLFunction +{ - static { + static + { setArguments(Java.class, new Arg[] { Arg.VARGS }); } - - protected Object function(VariableStack stack) throws ExecutionException { + + protected Object function(VariableStack stack) throws ExecutionException + { AbstractDataNode[] args = waitForAllVargs(stack); - - Method method = getMethod(args); + + Method method = getMethod(args); Object[] p = convertInputs(method, args); Type type = returnType(method); Object value = invoke(method, p); DSHandle result = swiftResult(type, value); - + return result; } - - /** + + /** Given the user args, locate the Java Method. */ - Method getMethod(DSHandle[] args) { - Method result = null; - Class clazz; - + + Method getMethod(DSHandle[] args) + { + Method result; + Class clazz; + String lib = "unset"; String name = "unset"; - + + Class[] parameterTypes = new Class[args.length-2]; + if (args.length < 2) throw new RuntimeException - ("@java() requires at least two arguments"); - - try { - lib = (String)args[0].getValue(); - name = (String)args[1].getValue(); - clazz = Class.forName(lib); - Method[] methods = clazz.getMethods(); - result = null; - for (Method m : methods) { - if (m.getName().equals(name)) { - result = m; - break; - } + ("@java() requires at least two arguments"); + + try + { + lib = (String) args[0].getValue(); + name = (String) args[1].getValue(); + clazz = Class.forName(lib); + + for (int i = 2; i < args.length; i++) + { + Class p = null; + Type t = args[i].getType(); + + if (t.equals(Types.FLOAT)) p = double.class; + else if (t.equals(Types.INT)) p = int.class; + else if (t.equals(Types.BOOLEAN)) p = boolean.class; + else if (t.equals(Types.STRING)) p = String.class; + else throw new RuntimeException("Cannot use @java with non-primitive types"); + + parameterTypes[i-2] = p; } - } - catch (Exception e) { - e.printStackTrace(); + result = clazz.getMethod(name, parameterTypes); + } + catch (Exception e) + { + e.printStackTrace(); throw new RuntimeException - ("@java(): Error attempting to use: " + args[0]); + ("@java(): Error attempting to use: " + args[0].getValue()); } - - if (result == null) + + if (result == null) throw new RuntimeException - ("No method: " + name + " in " + lib); + ("No method: " + name + " in " + lib + "with parameter types" + Arrays.toString(parameterTypes)); + return result; } - - /** - Convert the user args to a Java Object array. + + /** + Convert the user args to a Java Object array. */ - Object[] convertInputs(Method method, DSHandle[] args) { + Object[] convertInputs(Method method, DSHandle[] args) + { Object[] result = new Object[args.length-2]; Object a = null; - try { - for (int i = 2; i < args.length; i++) { + try + { + for (int i = 2; i < args.length; i++) + { Type t = args[i].getType(); - Object v = args[i].getValue(); + Object v = args[i].getValue(); if (t.equals(Types.FLOAT)) a = (Double) v; else if (t.equals(Types.INT)) @@ -88,25 +108,25 @@ a = (Boolean) v; else if (t.equals(Types.STRING)) a = (String) v; - result[i-2] = a; + result[i-2] = a; } } catch (Exception e) { e.printStackTrace(); throw new RuntimeException - ("Error converting input arguments: \n" + - " to: " + method.getDeclaringClass() + - "." + method + " \n argument: " + a); + ("Error converting input arguments: \n" + + " to: " + method.getDeclaringClass() + + "." + method + " \n argument: " + a); } return result; } - + Type returnType(Method method) { Type result = null; - - Class rt = method.getReturnType(); + + Class rt = method.getReturnType(); if (rt.equals(Double.TYPE)) - result = Types.FLOAT; + result = Types.FLOAT; else if (rt.equals(Integer.TYPE)) result = Types.INT; else if (rt.equals(Boolean.TYPE)) @@ -115,22 +135,26 @@ result = Types.STRING; return result; } - - Object invoke(Method method, Object[] p) { - Object result = null; - try { + + Object invoke(Method method, Object[] p) + { + Object result = null; + try + { result = method.invoke(null, p); } - catch (Exception e) { - e.printStackTrace(); + catch (Exception e) + { + e.printStackTrace(); throw new RuntimeException - ("Error attempting to invoke: " + - method.getDeclaringClass() + "." + method); + ("Error attempting to invoke: " + + method.getDeclaringClass() + "." + method); } return result; } - - DSHandle swiftResult(Type type, Object value) { + + DSHandle swiftResult(Type type, Object value) + { DSHandle result = new RootDataNode(type); result.setValue(value); result.closeShallow(); Modified: branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java =================================================================== --- branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,6 +1,7 @@ package org.griphyn.vdl.karajan.lib.swiftscript; import java.io.IOException; +import java.util.Iterator; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -15,8 +16,8 @@ import org.griphyn.vdl.karajan.lib.VDLFunction; import org.griphyn.vdl.mapping.AbsFile; import org.griphyn.vdl.mapping.AbstractDataNode; -import org.griphyn.vdl.mapping.ArrayDataNode; import org.griphyn.vdl.mapping.DSHandle; +import org.griphyn.vdl.mapping.HandleOpenException; import org.griphyn.vdl.mapping.InvalidPathException; import org.griphyn.vdl.mapping.Path; import org.griphyn.vdl.mapping.RootArrayDataNode; @@ -83,7 +84,23 @@ if (h.getType().isPrimitive()) { buf.append(o); } - + else if (h.getType().isArray()) { + try { + Iterator i = h.getFields(Path.CHILDREN).iterator(); + buf.append('['); + while (i.hasNext()) { + prettyPrint(buf, i.next()); + if (i.hasNext()) { + buf.append(", "); + } + } + buf.append(']'); + } + catch (HandleOpenException e) { + } + catch (InvalidPathException e) { + } + } } } Modified: branches/release-0.93.1/src/org/griphyn/vdl/mapping/AbstractDataNode.java =================================================================== --- branches/release-0.93.1/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2012-01-22 03:23:13 UTC (rev 5505) @@ -12,7 +12,6 @@ import org.apache.log4j.Logger; import org.globus.cog.karajan.workflow.futures.Future; -import org.globus.cog.karajan.workflow.futures.FutureFault; import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable; import org.griphyn.vdl.karajan.DSHandleFutureWrapper; import org.griphyn.vdl.karajan.FutureTracker; @@ -199,8 +198,6 @@ return handle; } catch (NoSuchFieldException e) { - logger.warn("could not find variable: " + field.getName() + - " " + path); throw new InvalidPathException(path, this); } } @@ -513,7 +510,7 @@ } } - protected Mapper getActualMapper() { + public Mapper getActualMapper() { return null; } Modified: branches/release-0.93.1/src/org/griphyn/vdl/mapping/RootArrayDataNode.java =================================================================== --- branches/release-0.93.1/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2012-01-22 03:23:13 UTC (rev 5505) @@ -30,7 +30,7 @@ this.params = params; if (this.params == null) { initialized(); - } + } else { innerInit(); } @@ -99,11 +99,15 @@ if (initialized) { return mapper; } - assert(waitingMapperParam != null); - throw new FutureNotYetAvailable(waitingMapperParam.getFutureWrapper()); + if (waitingMapperParam == null) { + return null; + } + else { + throw new FutureNotYetAvailable(waitingMapperParam.getFutureWrapper()); + } } - protected Mapper getActualMapper() { + public Mapper getActualMapper() { return mapper; } Modified: branches/release-0.93.1/src/org/griphyn/vdl/mapping/RootDataNode.java =================================================================== --- branches/release-0.93.1/src/org/griphyn/vdl/mapping/RootDataNode.java 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/src/org/griphyn/vdl/mapping/RootDataNode.java 2012-01-22 03:23:13 UTC (rev 5505) @@ -209,11 +209,15 @@ if (initialized) { return mapper; } - assert (waitingMapperParam != null); - throw new FutureNotYetAvailable(waitingMapperParam.getFutureWrapper()); + if (waitingMapperParam == null) { + return null; + } + else { + throw new FutureNotYetAvailable(waitingMapperParam.getFutureWrapper()); + } } - protected Mapper getActualMapper() { + public Mapper getActualMapper() { return mapper; } Property changes on: branches/release-0.93.1/tests ___________________________________________________________________ Modified: svn:mergeinfo - /trunk/tests:4762-4946 + /branches/release-0.93/tests:5279-5504 /trunk/tests:4762-4946 Modified: branches/release-0.93.1/tests/USAGENOTES.txt =================================================================== --- branches/release-0.93.1/tests/USAGENOTES.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/USAGENOTES.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -74,6 +74,7 @@ - *.check.sh* - *.clean.sh* - *.timeout specifier.* +- *.repeat (number of times to repeat this test) The scripts may setup and inspect files in *RUNDIR* including *exec.out* which must be accessed in *stdout.txt* Deleted: branches/release-0.93.1/tests/cdm/absolute/100-infullpath-outfullpath.check.sh =================================================================== --- branches/release-0.93/tests/cdm/absolute/100-infullpath-outfullpath.check.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/100-infullpath-outfullpath.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,12 +0,0 @@ -#!/bin/bash - -for aline in `ls -1 /tmp/outdir` -do -theline= echo $aline | cut -c 1-3 -if [ $theline == "out" ] -then - ; #pass -else - exit 1 #fail -fi - Copied: branches/release-0.93.1/tests/cdm/absolute/100-infullpath-outfullpath.check.sh (from rev 5504, branches/release-0.93/tests/cdm/absolute/100-infullpath-outfullpath.check.sh) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/100-infullpath-outfullpath.check.sh (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/100-infullpath-outfullpath.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,12 @@ +#!/bin/bash + +for aline in `ls -1 /tmp/outdir` +do +theline= echo $aline | cut -c 1-3 +if [ $theline == "out" ] +then + ; #pass +else + exit 1 #fail +fi + Deleted: branches/release-0.93.1/tests/cdm/absolute/100-infullpath-outfullpath.swift =================================================================== --- branches/release-0.93/tests/cdm/absolute/100-infullpath-outfullpath.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/100-infullpath-outfullpath.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,19 +0,0 @@ - -type file; - -app (file o) catnap (string _delay, file i) -{ - catnap _delay @i stdout=@o; -} - -string delay=@arg("s","1"); - -file data[]; - -file out[]; - - -foreach o, j in out { - out[j] = catnap(delay,data[j]); -} - Copied: branches/release-0.93.1/tests/cdm/absolute/100-infullpath-outfullpath.swift (from rev 5504, branches/release-0.93/tests/cdm/absolute/100-infullpath-outfullpath.swift) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/100-infullpath-outfullpath.swift (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/100-infullpath-outfullpath.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,19 @@ + +type file; + +app (file o) catnap (string _delay, file i) +{ + catnap _delay @i stdout=@o; +} + +string delay=@arg("s","1"); + +file data[]; + +file out[]; + + +foreach o, j in out { + out[j] = catnap(delay,data[j]); +} + Deleted: branches/release-0.93.1/tests/cdm/absolute/200-infullpath-outrelpath.check.sh =================================================================== Copied: branches/release-0.93.1/tests/cdm/absolute/200-infullpath-outrelpath.check.sh (from rev 5504, branches/release-0.93/tests/cdm/absolute/200-infullpath-outrelpath.check.sh) =================================================================== Deleted: branches/release-0.93.1/tests/cdm/absolute/200-infullpath-outrelpath.swift =================================================================== --- branches/release-0.93/tests/cdm/absolute/200-infullpath-outrelpath.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/200-infullpath-outrelpath.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,18 +0,0 @@ - -type file; - -app (file o) catnap (string _delay, file i) -{ - catnap _delay @i stdout=@o; -} - -string delay=@arg("s","1"); - -file data[]; - -file out[]; - -foreach o, j in out { - out[j] = catnap(delay,data[j]); -} - Copied: branches/release-0.93.1/tests/cdm/absolute/200-infullpath-outrelpath.swift (from rev 5504, branches/release-0.93/tests/cdm/absolute/200-infullpath-outrelpath.swift) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/200-infullpath-outrelpath.swift (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/200-infullpath-outrelpath.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,18 @@ + +type file; + +app (file o) catnap (string _delay, file i) +{ + catnap _delay @i stdout=@o; +} + +string delay=@arg("s","1"); + +file data[]; + +file out[]; + +foreach o, j in out { + out[j] = catnap(delay,data[j]); +} + Deleted: branches/release-0.93.1/tests/cdm/absolute/300-inrelpath-outfullpath.check.sh =================================================================== Copied: branches/release-0.93.1/tests/cdm/absolute/300-inrelpath-outfullpath.check.sh (from rev 5504, branches/release-0.93/tests/cdm/absolute/300-inrelpath-outfullpath.check.sh) =================================================================== Deleted: branches/release-0.93.1/tests/cdm/absolute/300-inrelpath-outfullpath.swift =================================================================== --- branches/release-0.93/tests/cdm/absolute/300-inrelpath-outfullpath.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/300-inrelpath-outfullpath.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,17 +0,0 @@ - -type file; - -app (file o) catnap (string _delay, file i) -{ - catnap _delay @i stdout=@o; -} - -string delay=@arg("s","1"); -file data[]; - -file out[]; - -foreach o, j in out { - out[j] = catnap(delay,data[j]); -} - Copied: branches/release-0.93.1/tests/cdm/absolute/300-inrelpath-outfullpath.swift (from rev 5504, branches/release-0.93/tests/cdm/absolute/300-inrelpath-outfullpath.swift) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/300-inrelpath-outfullpath.swift (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/300-inrelpath-outfullpath.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,17 @@ + +type file; + +app (file o) catnap (string _delay, file i) +{ + catnap _delay @i stdout=@o; +} + +string delay=@arg("s","1"); +file data[]; + +file out[]; + +foreach o, j in out { + out[j] = catnap(delay,data[j]); +} + Deleted: branches/release-0.93.1/tests/cdm/absolute/400-inrelpath-outrelpath.check.sh =================================================================== Copied: branches/release-0.93.1/tests/cdm/absolute/400-inrelpath-outrelpath.check.sh (from rev 5504, branches/release-0.93/tests/cdm/absolute/400-inrelpath-outrelpath.check.sh) =================================================================== Deleted: branches/release-0.93.1/tests/cdm/absolute/400-inrelpath-outrelpath.swift =================================================================== --- branches/release-0.93/tests/cdm/absolute/400-inrelpath-outrelpath.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/400-inrelpath-outrelpath.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,18 +0,0 @@ - -type file; - -app (file o) catnap (string _delay, file i) -{ - catnap _delay @i stdout=@o; -} - -string delay=@arg("s","1"); - -file out[]; - -file data[]; - -foreach o, j in out { - out[j] = catnap(delay,data[j]); -} - Copied: branches/release-0.93.1/tests/cdm/absolute/400-inrelpath-outrelpath.swift (from rev 5504, branches/release-0.93/tests/cdm/absolute/400-inrelpath-outrelpath.swift) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/400-inrelpath-outrelpath.swift (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/400-inrelpath-outrelpath.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,18 @@ + +type file; + +app (file o) catnap (string _delay, file i) +{ + catnap _delay @i stdout=@o; +} + +string delay=@arg("s","1"); + +file out[]; + +file data[]; + +foreach o, j in out { + out[j] = catnap(delay,data[j]); +} + Deleted: branches/release-0.93.1/tests/cdm/absolute/README =================================================================== --- branches/release-0.93/tests/cdm/absolute/README 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/README 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,23 +0,0 @@ -This directory contains testcases to test the Swift CDM for the following cases: -case 1. When input data is specified as relative or full path name. -case 2. When the output data is specified as relative or full path name. -case 3. When the config option wrapper.invocation.mode is set to 'absolute' or 'relative' - -The above cases lead to 8 possible combinations of input/output data specification and the wrapper.invocation.mode value. - -The naming of swift scripts are given based on how the data is specified: - -ff=both input and output data is specified as *fullpaths* -rf=input data in relative path and output data in fullpath -fr=input data in full path and output data in relative path -rr=both input and output data in relative path - -Two different versions of config files represent the absolute and relative options for wrapper.invocation.mode: -cf.absolute -cf.relative - -A run.sh file contains the commandlines to run all the combinations. - -You will need to adapt the absolute pathnames in the swift sources based on where you run. - -The CDM policy file is fs.data. Copied: branches/release-0.93.1/tests/cdm/absolute/README (from rev 5504, branches/release-0.93/tests/cdm/absolute/README) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/README (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/README 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,23 @@ +This directory contains testcases to test the Swift CDM for the following cases: +case 1. When input data is specified as relative or full path name. +case 2. When the output data is specified as relative or full path name. +case 3. When the config option wrapper.invocation.mode is set to 'absolute' or 'relative' + +The above cases lead to 8 possible combinations of input/output data specification and the wrapper.invocation.mode value. + +The naming of swift scripts are given based on how the data is specified: + +ff=both input and output data is specified as *fullpaths* +rf=input data in relative path and output data in fullpath +fr=input data in full path and output data in relative path +rr=both input and output data in relative path + +Two different versions of config files represent the absolute and relative options for wrapper.invocation.mode: +cf.absolute +cf.relative + +A run.sh file contains the commandlines to run all the combinations. + +You will need to adapt the absolute pathnames in the swift sources based on where you run. + +The CDM policy file is fs.data. Deleted: branches/release-0.93.1/tests/cdm/absolute/basic.swift =================================================================== --- branches/release-0.93/tests/cdm/absolute/basic.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/basic.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,18 +0,0 @@ - -type file; - -app (file o) catnap (string delay, file i) -{ - catnap delay @i stdout=@o; -} - -string delay=@arg("s","1"); - -file out[]; - -file data[]; - -foreach o, j in out { - out[j] = catnap(delay,data[j]); -} - Copied: branches/release-0.93.1/tests/cdm/absolute/basic.swift (from rev 5504, branches/release-0.93/tests/cdm/absolute/basic.swift) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/basic.swift (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/basic.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,18 @@ + +type file; + +app (file o) catnap (string delay, file i) +{ + catnap delay @i stdout=@o; +} + +string delay=@arg("s","1"); + +file out[]; + +file data[]; + +foreach o, j in out { + out[j] = catnap(delay,data[j]); +} + Deleted: branches/release-0.93.1/tests/cdm/absolute/catnap.sh =================================================================== --- branches/release-0.93/tests/cdm/absolute/catnap.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/catnap.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,4 +0,0 @@ -#! /bin/sh -sleep $1 -shift -cat $* Copied: branches/release-0.93.1/tests/cdm/absolute/catnap.sh (from rev 5504, branches/release-0.93/tests/cdm/absolute/catnap.sh) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/catnap.sh (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/catnap.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,4 @@ +#! /bin/sh +sleep $1 +shift +cat $* Deleted: branches/release-0.93.1/tests/cdm/absolute/cf.absolute =================================================================== --- branches/release-0.93/tests/cdm/absolute/cf.absolute 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/cf.absolute 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,8 +0,0 @@ -wrapperlog.always.transfer=true -sitedir.keep=true -execution.retries=0 -lazy.errors=false -status.mode=provider -use.provider.staging=false -provider.staging.pin.swiftfiles=false -wrapper.invocation.mode=absolute Copied: branches/release-0.93.1/tests/cdm/absolute/cf.absolute (from rev 5504, branches/release-0.93/tests/cdm/absolute/cf.absolute) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/cf.absolute (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/cf.absolute 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,8 @@ +wrapperlog.always.transfer=true +sitedir.keep=true +execution.retries=0 +lazy.errors=false +status.mode=provider +use.provider.staging=false +provider.staging.pin.swiftfiles=false +wrapper.invocation.mode=absolute Deleted: branches/release-0.93.1/tests/cdm/absolute/cf.relative =================================================================== --- branches/release-0.93/tests/cdm/absolute/cf.relative 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/cf.relative 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,8 +0,0 @@ -wrapperlog.always.transfer=true -sitedir.keep=true -execution.retries=0 -lazy.errors=false -status.mode=provider -use.provider.staging=false -provider.staging.pin.swiftfiles=false -wrapper.invocation.mode=relative Copied: branches/release-0.93.1/tests/cdm/absolute/cf.relative (from rev 5504, branches/release-0.93/tests/cdm/absolute/cf.relative) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/cf.relative (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/cf.relative 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,8 @@ +wrapperlog.always.transfer=true +sitedir.keep=true +execution.retries=0 +lazy.errors=false +status.mode=provider +use.provider.staging=false +provider.staging.pin.swiftfiles=false +wrapper.invocation.mode=relative Deleted: branches/release-0.93.1/tests/cdm/absolute/clean.sh =================================================================== --- branches/release-0.93/tests/cdm/absolute/clean.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/clean.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,6 +0,0 @@ -#!/bin/bash - -rm -v outdir/* || exit 1 - -exit 0 - Copied: branches/release-0.93.1/tests/cdm/absolute/clean.sh (from rev 5504, branches/release-0.93/tests/cdm/absolute/clean.sh) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/clean.sh (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/clean.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,6 @@ +#!/bin/bash + +rm -v outdir/* || exit 1 + +exit 0 + Deleted: branches/release-0.93.1/tests/cdm/absolute/data1.txt =================================================================== --- branches/release-0.93/tests/cdm/absolute/data1.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/data1.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -hello from data1 Copied: branches/release-0.93.1/tests/cdm/absolute/data1.txt (from rev 5504, branches/release-0.93/tests/cdm/absolute/data1.txt) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/data1.txt (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/data1.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +hello from data1 Deleted: branches/release-0.93.1/tests/cdm/absolute/data2.txt =================================================================== --- branches/release-0.93/tests/cdm/absolute/data2.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/data2.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -hello from data2 Copied: branches/release-0.93.1/tests/cdm/absolute/data2.txt (from rev 5504, branches/release-0.93/tests/cdm/absolute/data2.txt) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/data2.txt (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/data2.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +hello from data2 Deleted: branches/release-0.93.1/tests/cdm/absolute/data3.txt =================================================================== --- branches/release-0.93/tests/cdm/absolute/data3.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/data3.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -hello from data3 Copied: branches/release-0.93.1/tests/cdm/absolute/data3.txt (from rev 5504, branches/release-0.93/tests/cdm/absolute/data3.txt) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/data3.txt (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/data3.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +hello from data3 Deleted: branches/release-0.93.1/tests/cdm/absolute/data4.txt =================================================================== --- branches/release-0.93/tests/cdm/absolute/data4.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/data4.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -hello from data4 Copied: branches/release-0.93.1/tests/cdm/absolute/data4.txt (from rev 5504, branches/release-0.93/tests/cdm/absolute/data4.txt) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/data4.txt (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/data4.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +hello from data4 Deleted: branches/release-0.93.1/tests/cdm/absolute/ff.kml =================================================================== --- branches/release-0.93/tests/cdm/absolute/ff.kml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/ff.kml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,223 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - input - _delay - - {#thread} - - - input - i - - {#thread} - - - output - o - - {#thread} - - - - catnap - - - - - _delay - - i - - - - - o - - - - - - - - - - - intermediate - delay - - {#thread} - - - - - - intermediate - swift#mapper#17002 - - {#thread} - - - - - swift#mapper#17002 - - - - - intermediate - out - - {#thread} - - - - - - intermediate - swift#mapper#17007 - - {#thread} - - - - - swift#mapper#17007 - - - - - - intermediate - data - - {#thread} - - - - - - - - - - delay - - - - swift#string#17000swift#string#17001 - - - - - - - - - swift#mapper#17002 - - - - - swift#string#17003 - swift#string#17004 - swift#string#17005 - swift#string#17006 - - - - - - - - - swift#mapper#17007 - - - - - swift#string#17008 - swift#string#17009 - swift#string#17010 - swift#string#17010 - - - - - - - - out - - - - - - - SCOPE thread={#thread} - - - - - - - out - j - - delay - - data - j - - - - - - - - - - - - - - - Copied: branches/release-0.93.1/tests/cdm/absolute/ff.kml (from rev 5504, branches/release-0.93/tests/cdm/absolute/ff.kml) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/ff.kml (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/ff.kml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + input + _delay + + {#thread} + + + input + i + + {#thread} + + + output + o + + {#thread} + + + + catnap + + + + + _delay + + i + + + + + o + + + + + + + + + + + intermediate + delay + + {#thread} + + + + + + intermediate + swift#mapper#17002 + + {#thread} + + + + + swift#mapper#17002 + + + + + intermediate + out + + {#thread} + + + + + + intermediate + swift#mapper#17007 + + {#thread} + + + + + swift#mapper#17007 + + + + + + intermediate + data + + {#thread} + + + + + + + + + + delay + + + + swift#string#17000swift#string#17001 + + + + + + + + + swift#mapper#17002 + + + + + swift#string#17003 + swift#string#17004 + swift#string#17005 + swift#string#17006 + + + + + + + + + swift#mapper#17007 + + + + + swift#string#17008 + swift#string#17009 + swift#string#17010 + swift#string#17010 + + + + + + + + out + + + + + + + SCOPE thread={#thread} + + + + + + + out + j + + delay + + data + j + + + + + + + + + + + + + + + Deleted: branches/release-0.93.1/tests/cdm/absolute/ff.swift =================================================================== --- branches/release-0.93/tests/cdm/absolute/ff.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/ff.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,18 +0,0 @@ - -type file; - -app (file o) catnap (string _delay, file i) -{ - catnap _delay @i stdout=@o; -} - -string delay=@arg("s","1"); - -file out[]; - -file data[]; - -foreach o, j in out { - out[j] = catnap(delay,data[j]); -} - Copied: branches/release-0.93.1/tests/cdm/absolute/ff.swift (from rev 5504, branches/release-0.93/tests/cdm/absolute/ff.swift) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/ff.swift (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/ff.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,18 @@ + +type file; + +app (file o) catnap (string _delay, file i) +{ + catnap _delay @i stdout=@o; +} + +string delay=@arg("s","1"); + +file out[]; + +file data[]; + +foreach o, j in out { + out[j] = catnap(delay,data[j]); +} + Deleted: branches/release-0.93.1/tests/cdm/absolute/fr.kml =================================================================== --- branches/release-0.93/tests/cdm/absolute/fr.kml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/fr.kml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,223 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - input - _delay - - {#thread} - - - input - i - - {#thread} - - - output - o - - {#thread} - - - - catnap - - - - - _delay - - i - - - - - o - - - - - - - - - - - intermediate - delay - - {#thread} - - - - - - intermediate - swift#mapper#17002 - - {#thread} - - - - - swift#mapper#17002 - - - - - intermediate - out - - {#thread} - - - - - - intermediate - swift#mapper#17007 - - {#thread} - - - - - swift#mapper#17007 - - - - - - intermediate - data - - {#thread} - - - - - - - - - - delay - - - - swift#string#17000swift#string#17001 - - - - - - - - - swift#mapper#17002 - - - - - swift#string#17003 - swift#string#17004 - swift#string#17005 - swift#string#17006 - - - - - - - - - swift#mapper#17007 - - - - - swift#string#17008 - swift#string#17009 - swift#string#17010 - swift#string#17010 - - - - - - - - out - - - - - - - SCOPE thread={#thread} - - - - - - - out - j - - delay - - data - j - - - - - - - - - - - - - - - Copied: branches/release-0.93.1/tests/cdm/absolute/fr.kml (from rev 5504, branches/release-0.93/tests/cdm/absolute/fr.kml) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/fr.kml (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/fr.kml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + input + _delay + + {#thread} + + + input + i + + {#thread} + + + output + o + + {#thread} + + + + catnap + + + + + _delay + + i + + + + + o + + + + + + + + + + + intermediate + delay + + {#thread} + + + + + + intermediate + swift#mapper#17002 + + {#thread} + + + + + swift#mapper#17002 + + + + + intermediate + out + + {#thread} + + + + + + intermediate + swift#mapper#17007 + + {#thread} + + + + + swift#mapper#17007 + + + + + + intermediate + data + + {#thread} + + + + + + + + + + delay + + + + swift#string#17000swift#string#17001 + + + + + + + + + swift#mapper#17002 + + + + + swift#string#17003 + swift#string#17004 + swift#string#17005 + swift#string#17006 + + + + + + + + + swift#mapper#17007 + + + + + swift#string#17008 + swift#string#17009 + swift#string#17010 + swift#string#17010 + + + + + + + + out + + + + + + + SCOPE thread={#thread} + + + + + + + out + j + + delay + + data + j + + + + + + + + + + + + + + + Deleted: branches/release-0.93.1/tests/cdm/absolute/fr.swift =================================================================== --- branches/release-0.93/tests/cdm/absolute/fr.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/fr.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,18 +0,0 @@ - -type file; - -app (file o) catnap (string _delay, file i) -{ - catnap _delay @i stdout=@o; -} - -string delay=@arg("s","1"); - -file out[]; - -file data[]; - -foreach o, j in out { - out[j] = catnap(delay,data[j]); -} - Copied: branches/release-0.93.1/tests/cdm/absolute/fr.swift (from rev 5504, branches/release-0.93/tests/cdm/absolute/fr.swift) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/fr.swift (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/fr.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,18 @@ + +type file; + +app (file o) catnap (string _delay, file i) +{ + catnap _delay @i stdout=@o; +} + +string delay=@arg("s","1"); + +file out[]; + +file data[]; + +foreach o, j in out { + out[j] = catnap(delay,data[j]); +} + Deleted: branches/release-0.93.1/tests/cdm/absolute/fs.data =================================================================== --- branches/release-0.93/tests/cdm/absolute/fs.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/fs.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,2 +0,0 @@ -rule \./outdir/.* DIRECT /home/ketan/swift-install/0.93/cog/modules/swift/tests/cdm/absolute -rule \./indir/.* DIRECT /home/ketan/swift-install/0.93/cog/modules/swift/tests/cdm/absolute Copied: branches/release-0.93.1/tests/cdm/absolute/fs.data (from rev 5504, branches/release-0.93/tests/cdm/absolute/fs.data) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/fs.data (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/fs.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,2 @@ +rule \./outdir/.* DIRECT /home/ketan/swift-install/0.93/cog/modules/swift/tests/cdm/absolute +rule \./indir/.* DIRECT /home/ketan/swift-install/0.93/cog/modules/swift/tests/cdm/absolute Deleted: branches/release-0.93.1/tests/cdm/absolute/indir/data1.txt =================================================================== --- branches/release-0.93/tests/cdm/absolute/indir/data1.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/indir/data1.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -hello from data1 Copied: branches/release-0.93.1/tests/cdm/absolute/indir/data1.txt (from rev 5504, branches/release-0.93/tests/cdm/absolute/indir/data1.txt) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/indir/data1.txt (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/indir/data1.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +hello from data1 Deleted: branches/release-0.93.1/tests/cdm/absolute/indir/data2.txt =================================================================== --- branches/release-0.93/tests/cdm/absolute/indir/data2.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/indir/data2.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -hello from data2 Copied: branches/release-0.93.1/tests/cdm/absolute/indir/data2.txt (from rev 5504, branches/release-0.93/tests/cdm/absolute/indir/data2.txt) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/indir/data2.txt (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/indir/data2.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +hello from data2 Deleted: branches/release-0.93.1/tests/cdm/absolute/indir/data3.txt =================================================================== --- branches/release-0.93/tests/cdm/absolute/indir/data3.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/indir/data3.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -hello from data3 Copied: branches/release-0.93.1/tests/cdm/absolute/indir/data3.txt (from rev 5504, branches/release-0.93/tests/cdm/absolute/indir/data3.txt) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/indir/data3.txt (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/indir/data3.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +hello from data3 Deleted: branches/release-0.93.1/tests/cdm/absolute/indir/data4.txt =================================================================== --- branches/release-0.93/tests/cdm/absolute/indir/data4.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/indir/data4.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -hello from data4 Copied: branches/release-0.93.1/tests/cdm/absolute/indir/data4.txt (from rev 5504, branches/release-0.93/tests/cdm/absolute/indir/data4.txt) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/indir/data4.txt (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/indir/data4.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +hello from data4 Deleted: branches/release-0.93.1/tests/cdm/absolute/out1.data =================================================================== --- branches/release-0.93/tests/cdm/absolute/out1.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/out1.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -hello from data1 Copied: branches/release-0.93.1/tests/cdm/absolute/out1.data (from rev 5504, branches/release-0.93/tests/cdm/absolute/out1.data) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/out1.data (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/out1.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +hello from data1 Deleted: branches/release-0.93.1/tests/cdm/absolute/out2.data =================================================================== --- branches/release-0.93/tests/cdm/absolute/out2.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/out2.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -hello from data2 Copied: branches/release-0.93.1/tests/cdm/absolute/out2.data (from rev 5504, branches/release-0.93/tests/cdm/absolute/out2.data) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/out2.data (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/out2.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +hello from data2 Deleted: branches/release-0.93.1/tests/cdm/absolute/out3.data =================================================================== --- branches/release-0.93/tests/cdm/absolute/out3.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/out3.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -hello from data4 Copied: branches/release-0.93.1/tests/cdm/absolute/out3.data (from rev 5504, branches/release-0.93/tests/cdm/absolute/out3.data) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/out3.data (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/out3.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +hello from data4 Deleted: branches/release-0.93.1/tests/cdm/absolute/out4.data =================================================================== --- branches/release-0.93/tests/cdm/absolute/out4.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/out4.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -hello from data4 Copied: branches/release-0.93.1/tests/cdm/absolute/out4.data (from rev 5504, branches/release-0.93/tests/cdm/absolute/out4.data) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/out4.data (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/out4.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +hello from data4 Deleted: branches/release-0.93.1/tests/cdm/absolute/rf.kml =================================================================== --- branches/release-0.93/tests/cdm/absolute/rf.kml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/rf.kml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,223 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - input - _delay - - {#thread} - - - input - i - - {#thread} - - - output - o - - {#thread} - - - - catnap - - - - - _delay - - i - - - - - o - - - - - - - - - - - intermediate - delay - - {#thread} - - - - - - intermediate - swift#mapper#17002 - - {#thread} - - - - - swift#mapper#17002 - - - - - intermediate - out - - {#thread} - - - - - - intermediate - swift#mapper#17007 - - {#thread} - - - - - swift#mapper#17007 - - - - - - intermediate - data - - {#thread} - - - - - - - - - - delay - - - - swift#string#17000swift#string#17001 - - - - - - - - - swift#mapper#17002 - - - - - swift#string#17003 - swift#string#17004 - swift#string#17005 - swift#string#17006 - - - - - - - - - swift#mapper#17007 - - - - - swift#string#17008 - swift#string#17009 - swift#string#17010 - swift#string#17010 - - - - - - - - out - - - - - - - SCOPE thread={#thread} - - - - - - - out - j - - delay - - data - j - - - - - - - - - - - - - - - Copied: branches/release-0.93.1/tests/cdm/absolute/rf.kml (from rev 5504, branches/release-0.93/tests/cdm/absolute/rf.kml) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/rf.kml (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/rf.kml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + input + _delay + + {#thread} + + + input + i + + {#thread} + + + output + o + + {#thread} + + + + catnap + + + + + _delay + + i + + + + + o + + + + + + + + + + + intermediate + delay + + {#thread} + + + + + + intermediate + swift#mapper#17002 + + {#thread} + + + + + swift#mapper#17002 + + + + + intermediate + out + + {#thread} + + + + + + intermediate + swift#mapper#17007 + + {#thread} + + + + + swift#mapper#17007 + + + + + + intermediate + data + + {#thread} + + + + + + + + + + delay + + + + swift#string#17000swift#string#17001 + + + + + + + + + swift#mapper#17002 + + + + + swift#string#17003 + swift#string#17004 + swift#string#17005 + swift#string#17006 + + + + + + + + + swift#mapper#17007 + + + + + swift#string#17008 + swift#string#17009 + swift#string#17010 + swift#string#17010 + + + + + + + + out + + + + + + + SCOPE thread={#thread} + + + + + + + out + j + + delay + + data + j + + + + + + + + + + + + + + + Deleted: branches/release-0.93.1/tests/cdm/absolute/rf.swift =================================================================== --- branches/release-0.93/tests/cdm/absolute/rf.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/rf.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,18 +0,0 @@ - -type file; - -app (file o) catnap (string _delay, file i) -{ - catnap _delay @i stdout=@o; -} - -string delay=@arg("s","1"); - -file out[]; - -file data[]; - -foreach o, j in out { - out[j] = catnap(delay,data[j]); -} - Copied: branches/release-0.93.1/tests/cdm/absolute/rf.swift (from rev 5504, branches/release-0.93/tests/cdm/absolute/rf.swift) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/rf.swift (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/rf.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,18 @@ + +type file; + +app (file o) catnap (string _delay, file i) +{ + catnap _delay @i stdout=@o; +} + +string delay=@arg("s","1"); + +file out[]; + +file data[]; + +foreach o, j in out { + out[j] = catnap(delay,data[j]); +} + Deleted: branches/release-0.93.1/tests/cdm/absolute/rr.kml =================================================================== --- branches/release-0.93/tests/cdm/absolute/rr.kml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/rr.kml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,223 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - input - _delay - - {#thread} - - - input - i - - {#thread} - - - output - o - - {#thread} - - - - catnap - - - - - _delay - - i - - - - - o - - - - - - - - - - - intermediate - delay - - {#thread} - - - - - - intermediate - swift#mapper#17002 - - {#thread} - - - - - swift#mapper#17002 - - - - - intermediate - out - - {#thread} - - - - - - intermediate - swift#mapper#17007 - - {#thread} - - - - - swift#mapper#17007 - - - - - - intermediate - data - - {#thread} - - - - - - - - - - delay - - - - swift#string#17000swift#string#17001 - - - - - - - - - swift#mapper#17002 - - - - - swift#string#17003 - swift#string#17004 - swift#string#17005 - swift#string#17006 - - - - - - - - - swift#mapper#17007 - - - - - swift#string#17008 - swift#string#17009 - swift#string#17010 - swift#string#17010 - - - - - - - - out - - - - - - - SCOPE thread={#thread} - - - - - - - out - j - - delay - - data - j - - - - - - - - - - - - - - - Copied: branches/release-0.93.1/tests/cdm/absolute/rr.kml (from rev 5504, branches/release-0.93/tests/cdm/absolute/rr.kml) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/rr.kml (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/rr.kml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + input + _delay + + {#thread} + + + input + i + + {#thread} + + + output + o + + {#thread} + + + + catnap + + + + + _delay + + i + + + + + o + + + + + + + + + + + intermediate + delay + + {#thread} + + + + + + intermediate + swift#mapper#17002 + + {#thread} + + + + + swift#mapper#17002 + + + + + intermediate + out + + {#thread} + + + + + + intermediate + swift#mapper#17007 + + {#thread} + + + + + swift#mapper#17007 + + + + + + intermediate + data + + {#thread} + + + + + + + + + + delay + + + + swift#string#17000swift#string#17001 + + + + + + + + + swift#mapper#17002 + + + + + swift#string#17003 + swift#string#17004 + swift#string#17005 + swift#string#17006 + + + + + + + + + swift#mapper#17007 + + + + + swift#string#17008 + swift#string#17009 + swift#string#17010 + swift#string#17010 + + + + + + + + out + + + + + + + SCOPE thread={#thread} + + + + + + + out + j + + delay + + data + j + + + + + + + + + + + + + + + Deleted: branches/release-0.93.1/tests/cdm/absolute/rr.swift =================================================================== --- branches/release-0.93/tests/cdm/absolute/rr.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/rr.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,18 +0,0 @@ - -type file; - -app (file o) catnap (string _delay, file i) -{ - catnap _delay @i stdout=@o; -} - -string delay=@arg("s","1"); - -file out[]; - -file data[]; - -foreach o, j in out { - out[j] = catnap(delay,data[j]); -} - Copied: branches/release-0.93.1/tests/cdm/absolute/rr.swift (from rev 5504, branches/release-0.93/tests/cdm/absolute/rr.swift) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/rr.swift (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/rr.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,18 @@ + +type file; + +app (file o) catnap (string _delay, file i) +{ + catnap _delay @i stdout=@o; +} + +string delay=@arg("s","1"); + +file out[]; + +file data[]; + +foreach o, j in out { + out[j] = catnap(delay,data[j]); +} + Deleted: branches/release-0.93.1/tests/cdm/absolute/run.sh =================================================================== --- branches/release-0.93/tests/cdm/absolute/run.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/run.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,16 +0,0 @@ -swift -config cf.absolute -sites.file sites.xml -tc.file tc -cdm.file fs.data -runid ff_config_abs ff.swift - -swift -config cf.absolute -sites.file sites.xml -tc.file tc -cdm.file fs.data -runid fr_config_abs fr.swift - -swift -config cf.absolute -sites.file sites.xml -tc.file tc -cdm.file fs.data -runid rf_config_abs rf.swift - -swift -config cf.absolute -sites.file sites.xml -tc.file tc -cdm.file fs.data -runid rr_config_abs rr.swift - -swift -config cf.relative -sites.file sites.xml -tc.file tc -cdm.file fs.data -runid ff_config_rel ff.swift - -swift -config cf.relative -sites.file sites.xml -tc.file tc -cdm.file fs.data -runid fr_config_rel fr.swift - -swift -config cf.relative -sites.file sites.xml -tc.file tc -cdm.file fs.data -runid rf_config_rel rf.swift - -swift -config cf.relative -sites.file sites.xml -tc.file tc -cdm.file fs.data -runid rr_config_rel rr.swift - Copied: branches/release-0.93.1/tests/cdm/absolute/run.sh (from rev 5504, branches/release-0.93/tests/cdm/absolute/run.sh) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/run.sh (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/run.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,16 @@ +swift -config cf.absolute -sites.file sites.xml -tc.file tc -cdm.file fs.data -runid ff_config_abs ff.swift + +swift -config cf.absolute -sites.file sites.xml -tc.file tc -cdm.file fs.data -runid fr_config_abs fr.swift + +swift -config cf.absolute -sites.file sites.xml -tc.file tc -cdm.file fs.data -runid rf_config_abs rf.swift + +swift -config cf.absolute -sites.file sites.xml -tc.file tc -cdm.file fs.data -runid rr_config_abs rr.swift + +swift -config cf.relative -sites.file sites.xml -tc.file tc -cdm.file fs.data -runid ff_config_rel ff.swift + +swift -config cf.relative -sites.file sites.xml -tc.file tc -cdm.file fs.data -runid fr_config_rel fr.swift + +swift -config cf.relative -sites.file sites.xml -tc.file tc -cdm.file fs.data -runid rf_config_rel rf.swift + +swift -config cf.relative -sites.file sites.xml -tc.file tc -cdm.file fs.data -runid rr_config_rel rr.swift + Deleted: branches/release-0.93.1/tests/cdm/absolute/set-env.sh =================================================================== --- branches/release-0.93/tests/cdm/absolute/set-env.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/set-env.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -export PATH=/home/ketan/swift-install/trunk/cog/modules/swift/bin/grid:/home/ketan/swift-install/0.93/cog/modules/swift/dist/swift-svn/bin:$PATH Copied: branches/release-0.93.1/tests/cdm/absolute/set-env.sh (from rev 5504, branches/release-0.93/tests/cdm/absolute/set-env.sh) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/set-env.sh (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/set-env.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +export PATH=/home/ketan/swift-install/trunk/cog/modules/swift/bin/grid:/home/ketan/swift-install/0.93/cog/modules/swift/dist/swift-svn/bin:$PATH Deleted: branches/release-0.93.1/tests/cdm/absolute/setup.sh =================================================================== --- branches/release-0.93/tests/cdm/absolute/setup.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,6 +0,0 @@ -#!/bin/bash - -rm -rfv /tmp/outdir -cp -r -v indir/ /tmp/ - -exit 0 Copied: branches/release-0.93.1/tests/cdm/absolute/setup.sh (from rev 5504, branches/release-0.93/tests/cdm/absolute/setup.sh) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/setup.sh (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,6 @@ +#!/bin/bash + +rm -rfv /tmp/outdir +cp -r -v indir/ /tmp/ + +exit 0 Deleted: branches/release-0.93.1/tests/cdm/absolute/sites.xml =================================================================== --- branches/release-0.93/tests/cdm/absolute/sites.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/sites.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ - - - - - work/ - - Copied: branches/release-0.93.1/tests/cdm/absolute/sites.xml (from rev 5504, branches/release-0.93/tests/cdm/absolute/sites.xml) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/sites.xml (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/sites.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ + + + + + work/ + + Deleted: branches/release-0.93.1/tests/cdm/absolute/tc =================================================================== --- branches/release-0.93/tests/cdm/absolute/tc 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/cdm/absolute/tc 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,3 +0,0 @@ -localhost sh /bin/sh null null null -localhost catnap /home/ketan/cdm_tests/catnap.sh null null GLOBUS::maxwalltime="00:01:00" - Copied: branches/release-0.93.1/tests/cdm/absolute/tc (from rev 5504, branches/release-0.93/tests/cdm/absolute/tc) =================================================================== --- branches/release-0.93.1/tests/cdm/absolute/tc (rev 0) +++ branches/release-0.93.1/tests/cdm/absolute/tc 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,3 @@ +localhost sh /bin/sh null null null +localhost catnap /home/ketan/cdm_tests/catnap.sh null null GLOBUS::maxwalltime="00:01:00" + Copied: branches/release-0.93.1/tests/functions/501-filenames.check.sh (from rev 5504, branches/release-0.93/tests/functions/501-filenames.check.sh) =================================================================== --- branches/release-0.93.1/tests/functions/501-filenames.check.sh (rev 0) +++ branches/release-0.93.1/tests/functions/501-filenames.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,11 @@ +#!/bin/bash + +sum1=`sum 501-filenames.out` +sum2=`sum 501-filenames.out.expected` + +if [ "$sum1" != "$sum2" ]; then + echo Error: Created file does not match expected output + exit 1 +fi + +exit 0 Copied: branches/release-0.93.1/tests/functions/501-filenames.out.expected (from rev 5504, branches/release-0.93/tests/functions/501-filenames.out.expected) =================================================================== --- branches/release-0.93.1/tests/functions/501-filenames.out.expected (rev 0) +++ branches/release-0.93.1/tests/functions/501-filenames.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +a.txt b.txt c.txt Copied: branches/release-0.93.1/tests/functions/501-filenames.setup.sh (from rev 5504, branches/release-0.93/tests/functions/501-filenames.setup.sh) =================================================================== --- branches/release-0.93.1/tests/functions/501-filenames.setup.sh (rev 0) +++ branches/release-0.93.1/tests/functions/501-filenames.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,6 @@ +#!/bin/bash + +cp $GROUP/501-filenames.out.expected . +echo blah > a.txt +echo blah > b.txt +echo blah > c.txt Copied: branches/release-0.93.1/tests/functions/501-filenames.swift (from rev 5504, branches/release-0.93/tests/functions/501-filenames.swift) =================================================================== --- branches/release-0.93.1/tests/functions/501-filenames.swift (rev 0) +++ branches/release-0.93.1/tests/functions/501-filenames.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,11 @@ +type file; + +app (file o) echo ( file files[] ) +{ + echo @filenames(files) stdout=@o; +} + +string s[] = [ "a.txt", "b.txt", "c.txt" ]; +file f[] ; +file output<"501-filenames.out">; +output = echo(f); Property changes on: branches/release-0.93.1/tests/groups ___________________________________________________________________ Modified: svn:mergeinfo - /trunk/tests/groups:4761-5134 + /branches/release-0.93/tests/groups:5279-5504 /trunk/tests/groups:4761-5134 Property changes on: branches/release-0.93.1/tests/sites ___________________________________________________________________ Added: svn:mergeinfo + /branches/release-0.93/tests/sites:5279-5504 /trunk/tests/providers:4761-5115 /trunk/tests/sites:4762-4946 Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/README =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/README 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/README 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,2 +0,0 @@ -Provider test for PADS with coasters and pbs -Make sure you have your default project set up (run 'projects' or 'projects -h' for more info) Copied: branches/release-0.93.1/tests/sites/PADS/coasters/README (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/README) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/README (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/README 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,2 @@ +Provider test for PADS with coasters and pbs +Make sure you have your default project set up (run 'projects' or 'projects -h' for more info) Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0001.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/catsn.0001.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0001.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/catsn.0001.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0001.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0002.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/catsn.0002.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0002.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/catsn.0002.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0002.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0003.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/catsn.0003.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0003.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/catsn.0003.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0003.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0004.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/catsn.0004.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0004.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/catsn.0004.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0004.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0005.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/catsn.0005.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0005.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/catsn.0005.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0005.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0006.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/catsn.0006.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0006.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/catsn.0006.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0006.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0007.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/catsn.0007.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0007.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/catsn.0007.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0007.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0008.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/catsn.0008.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0008.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/catsn.0008.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0008.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0009.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/catsn.0009.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0009.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/catsn.0009.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0009.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0010.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/catsn.0010.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0010.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/catsn.0010.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0010.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.setup.sh =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/catsn.setup.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,3 +0,0 @@ -#!/bin/bash - -cp -v $GROUP/data.txt . || exit 1 Copied: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.setup.sh (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/catsn.setup.sh) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/catsn.setup.sh (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,3 @@ +#!/bin/bash + +cp -v $GROUP/data.txt . || exit 1 Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.swift =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/catsn.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,15 +0,0 @@ -type file; - -app (file o) cat (file i) -{ - cat @i stdout=@o; -} - -string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -string char[] = @strsplit(t, ""); - -file out[]; -foreach j in [1:@toint(@arg("n","10"))] { - file data<"data.txt">; - out[j] = cat(data); -} Copied: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.swift (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/catsn.swift) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/catsn.swift (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,15 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; +string char[] = @strsplit(t, ""); + +file out[]; +foreach j in [1:@toint(@arg("n","10"))] { + file data<"data.txt">; + out[j] = cat(data); +} Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.timeout =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/catsn.timeout 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,2 +0,0 @@ -7200 - Copied: branches/release-0.93.1/tests/sites/PADS/coasters/catsn.timeout (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/catsn.timeout) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/catsn.timeout (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/catsn.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,2 @@ +7200 + Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/data.txt =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/data.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/coasters/data.txt (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/data.txt) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/data.txt (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/sites.template.xml =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/sites.template.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,16 +0,0 @@ - - - - - 2 - 300 - 1 - 1 - 1 - 1 - fast - 5.99 - 10000 - _WORK_ - - Copied: branches/release-0.93.1/tests/sites/PADS/coasters/sites.template.xml (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/sites.template.xml) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/sites.template.xml (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,16 @@ + + + + + 2 + 300 + 1 + 1 + 1 + 1 + fast + 5.99 + 10000 + _WORK_ + + Deleted: branches/release-0.93.1/tests/sites/PADS/coasters/tc.template.data =================================================================== --- branches/release-0.93/tests/sites/PADS/coasters/tc.template.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/coasters/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -PADS-coasters echo /bin/echo INSTALLED INTEL32::LINUX null -PADS-coasters cat /bin/cat INSTALLED INTEL32::LINUX null -PADS-coasters ls /bin/ls INSTALLED INTEL32::LINUX null -PADS-coasters grep /bin/grep INSTALLED INTEL32::LINUX null -PADS-coasters sort /bin/sort INSTALLED INTEL32::LINUX null -PADS-coasters paste /bin/paste INSTALLED INTEL32::LINUX null -PADS-coasters wc /usr/bin/wc INSTALLED INTEL32::LINUX null Copied: branches/release-0.93.1/tests/sites/PADS/coasters/tc.template.data (from rev 5504, branches/release-0.93/tests/sites/PADS/coasters/tc.template.data) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/coasters/tc.template.data (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/coasters/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +PADS-coasters echo /bin/echo INSTALLED INTEL32::LINUX null +PADS-coasters cat /bin/cat INSTALLED INTEL32::LINUX null +PADS-coasters ls /bin/ls INSTALLED INTEL32::LINUX null +PADS-coasters grep /bin/grep INSTALLED INTEL32::LINUX null +PADS-coasters sort /bin/sort INSTALLED INTEL32::LINUX null +PADS-coasters paste /bin/paste INSTALLED INTEL32::LINUX null +PADS-coasters wc /usr/bin/wc INSTALLED INTEL32::LINUX null Deleted: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0001.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/pbs/catsn.0001.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0001.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/pbs/catsn.0001.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0001.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0002.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/pbs/catsn.0002.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0002.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/pbs/catsn.0002.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0002.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0003.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/pbs/catsn.0003.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0003.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/pbs/catsn.0003.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0003.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0004.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/pbs/catsn.0004.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0004.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/pbs/catsn.0004.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0004.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0005.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/pbs/catsn.0005.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0005.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/pbs/catsn.0005.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0005.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0006.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/pbs/catsn.0006.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0006.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/pbs/catsn.0006.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0006.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0007.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/pbs/catsn.0007.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0007.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/pbs/catsn.0007.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0007.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0008.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/pbs/catsn.0008.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0008.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/pbs/catsn.0008.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0008.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0009.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/pbs/catsn.0009.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0009.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/pbs/catsn.0009.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0009.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0010.out.expected =================================================================== --- branches/release-0.93/tests/sites/PADS/pbs/catsn.0010.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0010.out.expected (from rev 5504, branches/release-0.93/tests/sites/PADS/pbs/catsn.0010.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0010.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.setup.sh =================================================================== --- branches/release-0.93/tests/sites/PADS/pbs/catsn.setup.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,3 +0,0 @@ -#!/bin/bash - -cp -v $GROUP/data.txt . || exit 1 Copied: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.setup.sh (from rev 5504, branches/release-0.93/tests/sites/PADS/pbs/catsn.setup.sh) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/pbs/catsn.setup.sh (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,3 @@ +#!/bin/bash + +cp -v $GROUP/data.txt . || exit 1 Deleted: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.swift =================================================================== --- branches/release-0.93/tests/sites/PADS/pbs/catsn.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,15 +0,0 @@ -type file; - -app (file o) cat (file i) -{ - cat @i stdout=@o; -} - -string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -string char[] = @strsplit(t, ""); - -file out[]; -foreach j in [1:@toint(@arg("n","10"))] { - file data<"data.txt">; - out[j] = cat(data); -} Copied: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.swift (from rev 5504, branches/release-0.93/tests/sites/PADS/pbs/catsn.swift) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/pbs/catsn.swift (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,15 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; +string char[] = @strsplit(t, ""); + +file out[]; +foreach j in [1:@toint(@arg("n","10"))] { + file data<"data.txt">; + out[j] = cat(data); +} Deleted: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.timeout =================================================================== --- branches/release-0.93/tests/sites/PADS/pbs/catsn.timeout 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,2 +0,0 @@ -7200 - Copied: branches/release-0.93.1/tests/sites/PADS/pbs/catsn.timeout (from rev 5504, branches/release-0.93/tests/sites/PADS/pbs/catsn.timeout) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/pbs/catsn.timeout (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/pbs/catsn.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,2 @@ +7200 + Deleted: branches/release-0.93.1/tests/sites/PADS/pbs/data.txt =================================================================== --- branches/release-0.93/tests/sites/PADS/pbs/data.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/pbs/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/PADS/pbs/data.txt (from rev 5504, branches/release-0.93/tests/sites/PADS/pbs/data.txt) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/pbs/data.txt (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/pbs/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/PADS/pbs/sites.template.xml =================================================================== --- branches/release-0.93/tests/sites/PADS/pbs/sites.template.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/pbs/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,16 +0,0 @@ - - - - - 2 - 300 - 1 - 1 - 1 - 1 - fast - 5.99 - 10000 - _WORK_ - - Copied: branches/release-0.93.1/tests/sites/PADS/pbs/sites.template.xml (from rev 5504, branches/release-0.93/tests/sites/PADS/pbs/sites.template.xml) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/pbs/sites.template.xml (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/pbs/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,16 @@ + + + + + 2 + 300 + 1 + 1 + 1 + 1 + fast + 5.99 + 10000 + _WORK_ + + Deleted: branches/release-0.93.1/tests/sites/PADS/pbs/tc.template.data =================================================================== --- branches/release-0.93/tests/sites/PADS/pbs/tc.template.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/PADS/pbs/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -PADS-pbs echo /bin/echo INSTALLED INTEL32::LINUX null -PADS-pbs cat /bin/cat INSTALLED INTEL32::LINUX null -PADS-pbs ls /bin/ls INSTALLED INTEL32::LINUX null -PADS-pbs grep /bin/grep INSTALLED INTEL32::LINUX null -PADS-pbs sort /bin/sort INSTALLED INTEL32::LINUX null -PADS-pbs paste /bin/paste INSTALLED INTEL32::LINUX null -PADS-pbs wc /usr/bin/wc INSTALLED INTEL32::LINUX null Copied: branches/release-0.93.1/tests/sites/PADS/pbs/tc.template.data (from rev 5504, branches/release-0.93/tests/sites/PADS/pbs/tc.template.data) =================================================================== --- branches/release-0.93.1/tests/sites/PADS/pbs/tc.template.data (rev 0) +++ branches/release-0.93.1/tests/sites/PADS/pbs/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +PADS-pbs echo /bin/echo INSTALLED INTEL32::LINUX null +PADS-pbs cat /bin/cat INSTALLED INTEL32::LINUX null +PADS-pbs ls /bin/ls INSTALLED INTEL32::LINUX null +PADS-pbs grep /bin/grep INSTALLED INTEL32::LINUX null +PADS-pbs sort /bin/sort INSTALLED INTEL32::LINUX null +PADS-pbs paste /bin/paste INSTALLED INTEL32::LINUX null +PADS-pbs wc /usr/bin/wc INSTALLED INTEL32::LINUX null Deleted: branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.check.sh =================================================================== --- branches/release-0.93/tests/sites/beagle/coasters/001-catsn.check.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ -#!/bin/bash - -# Pseudo-code for now - -# for f in *.out.expected -# do -# assert *.out exists -# assert *.out == data.txt -# done Copied: branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.check.sh (from rev 5504, branches/release-0.93/tests/sites/beagle/coasters/001-catsn.check.sh) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.check.sh (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ +#!/bin/bash + +# Pseudo-code for now + +# for f in *.out.expected +# do +# assert *.out exists +# assert *.out == data.txt +# done Deleted: branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.setup.sh =================================================================== --- branches/release-0.93/tests/sites/beagle/coasters/001-catsn.setup.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,3 +0,0 @@ -#!/bin/bash - -cp -v $GROUP/data.txt . || exit 1 Copied: branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.setup.sh (from rev 5504, branches/release-0.93/tests/sites/beagle/coasters/001-catsn.setup.sh) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.setup.sh (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,3 @@ +#!/bin/bash + +cp -v $GROUP/data.txt . || exit 1 Deleted: branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.swift =================================================================== --- branches/release-0.93/tests/sites/beagle/coasters/001-catsn.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,15 +0,0 @@ -type file; - -app (file o) cat (file i) -{ - cat @i stdout=@o; -} - -// string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -// string char[] = @strsplit(t, ""); - -file out[]; -foreach j in [1:@toint(@arg("n","10"))] { - file data<"data.txt">; - out[j] = cat(data); -} Copied: branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.swift (from rev 5504, branches/release-0.93/tests/sites/beagle/coasters/001-catsn.swift) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.swift (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,15 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +// string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; +// string char[] = @strsplit(t, ""); + +file out[]; +foreach j in [1:@toint(@arg("n","10"))] { + file data<"data.txt">; + out[j] = cat(data); +} Deleted: branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.timeout =================================================================== --- branches/release-0.93/tests/sites/beagle/coasters/001-catsn.timeout 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -180 Copied: branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.timeout (from rev 5504, branches/release-0.93/tests/sites/beagle/coasters/001-catsn.timeout) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.timeout (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/coasters/001-catsn.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +180 Deleted: branches/release-0.93.1/tests/sites/beagle/coasters/data.txt =================================================================== --- branches/release-0.93/tests/sites/beagle/coasters/data.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/coasters/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -HELLO Copied: branches/release-0.93.1/tests/sites/beagle/coasters/data.txt (from rev 5504, branches/release-0.93/tests/sites/beagle/coasters/data.txt) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/coasters/data.txt (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/coasters/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +HELLO Deleted: branches/release-0.93.1/tests/sites/beagle/coasters/sites.template.xml =================================================================== --- branches/release-0.93/tests/sites/beagle/coasters/sites.template.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/coasters/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,33 +0,0 @@ - - - - - - - - - - 1 - 7200 - - - pbs.aprun;pbs.mpp;depth=24 - - 24 - 1 - 1 - 1 - batch - DEBUG - {wdir} - 5.99 - 10000 - _PROJECT_ - _QUEUE_ - {wdir} - - - - Copied: branches/release-0.93.1/tests/sites/beagle/coasters/sites.template.xml (from rev 5504, branches/release-0.93/tests/sites/beagle/coasters/sites.template.xml) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/coasters/sites.template.xml (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/coasters/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,33 @@ + + + + + + + + + + 1 + 7200 + + + pbs.aprun;pbs.mpp;depth=24 + + 24 + 1 + 1 + 1 + batch + DEBUG + {wdir} + 5.99 + 10000 + _PROJECT_ + _QUEUE_ + {wdir} + + + + Deleted: branches/release-0.93.1/tests/sites/beagle/coasters/tc.template.data =================================================================== --- branches/release-0.93/tests/sites/beagle/coasters/tc.template.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/coasters/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -beagle-pbs echo /bin/echo INSTALLED INTEL32::LINUX -beagle-pbs cat /bin/cat INSTALLED INTEL32::LINUX -beagle-pbs ls /bin/ls INSTALLED INTEL32::LINUX -beagle-pbs grep /bin/grep INSTALLED INTEL32::LINUX -beagle-pbs sort /bin/sort INSTALLED INTEL32::LINUX -beagle-pbs paste /bin/paste INSTALLED INTEL32::LINUX -beagle-pbs wc /usr/bin/wc INSTALLED INTEL32::LINUX Copied: branches/release-0.93.1/tests/sites/beagle/coasters/tc.template.data (from rev 5504, branches/release-0.93/tests/sites/beagle/coasters/tc.template.data) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/coasters/tc.template.data (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/coasters/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +beagle-pbs echo /bin/echo INSTALLED INTEL32::LINUX +beagle-pbs cat /bin/cat INSTALLED INTEL32::LINUX +beagle-pbs ls /bin/ls INSTALLED INTEL32::LINUX +beagle-pbs grep /bin/grep INSTALLED INTEL32::LINUX +beagle-pbs sort /bin/sort INSTALLED INTEL32::LINUX +beagle-pbs paste /bin/paste INSTALLED INTEL32::LINUX +beagle-pbs wc /usr/bin/wc INSTALLED INTEL32::LINUX Deleted: branches/release-0.93.1/tests/sites/beagle/coasters/title.txt =================================================================== --- branches/release-0.93/tests/sites/beagle/coasters/title.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/coasters/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Local PBS Coasters: Beagle Copied: branches/release-0.93.1/tests/sites/beagle/coasters/title.txt (from rev 5504, branches/release-0.93/tests/sites/beagle/coasters/title.txt) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/coasters/title.txt (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/coasters/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Local PBS Coasters: Beagle Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.check.sh =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/001-catsn.check.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ -#!/bin/bash - -# Pseudo-code for now - -# for f in *.out.expected -# do -# assert *.out exists -# assert *.out.expected == *.out -# done Copied: branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.check.sh (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/001-catsn.check.sh) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.check.sh (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ +#!/bin/bash + +# Pseudo-code for now + +# for f in *.out.expected +# do +# assert *.out exists +# assert *.out.expected == *.out +# done Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.setup.sh =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/001-catsn.setup.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,4 +0,0 @@ -#!/bin/bash - -cp -v $GROUP/data.txt . || exit 1 -cp -v $GROUP/*expected . || exit 1 Copied: branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.setup.sh (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/001-catsn.setup.sh) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.setup.sh (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,4 @@ +#!/bin/bash + +cp -v $GROUP/data.txt . || exit 1 +cp -v $GROUP/*expected . || exit 1 Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.swift =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/001-catsn.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,15 +0,0 @@ -type file; - -app (file o) cat (file i) -{ - cat @i stdout=@o; -} - -// string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -// string char[] = @strsplit(t, ""); - -file out[]; -foreach j in [1:@toint(@arg("n","10"))] { - file data<"data.txt">; - out[j] = cat(data); -} Copied: branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.swift (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/001-catsn.swift) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.swift (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,15 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +// string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; +// string char[] = @strsplit(t, ""); + +file out[]; +foreach j in [1:@toint(@arg("n","10"))] { + file data<"data.txt">; + out[j] = cat(data); +} Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.timeout =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/001-catsn.timeout 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -180 Copied: branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.timeout (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/001-catsn.timeout) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.timeout (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/001-catsn.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +180 Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0001.out.expected =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/catsn.0001.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0001.out.expected (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/catsn.0001.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0001.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0002.out.expected =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/catsn.0002.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0002.out.expected (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/catsn.0002.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0002.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0003.out.expected =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/catsn.0003.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0003.out.expected (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/catsn.0003.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0003.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0004.out.expected =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/catsn.0004.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0004.out.expected (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/catsn.0004.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0004.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0005.out.expected =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/catsn.0005.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0005.out.expected (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/catsn.0005.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0005.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0006.out.expected =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/catsn.0006.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0006.out.expected (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/catsn.0006.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0006.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0007.out.expected =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/catsn.0007.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0007.out.expected (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/catsn.0007.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0007.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0008.out.expected =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/catsn.0008.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0008.out.expected (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/catsn.0008.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0008.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0009.out.expected =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/catsn.0009.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0009.out.expected (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/catsn.0009.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0009.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0010.out.expected =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/catsn.0010.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0010.out.expected (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/catsn.0010.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0010.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/data.txt =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/data.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/beagle/pbs/data.txt (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/data.txt) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/data.txt (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/sites.template.xml =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/sites.template.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,18 +0,0 @@ - - - - - - - - - - - - {wdir} - - - - Copied: branches/release-0.93.1/tests/sites/beagle/pbs/sites.template.xml (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/sites.template.xml) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/sites.template.xml (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,18 @@ + + + + + + + + + + + + {wdir} + + + + Deleted: branches/release-0.93.1/tests/sites/beagle/pbs/tc.template.data =================================================================== --- branches/release-0.93/tests/sites/beagle/pbs/tc.template.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/beagle/pbs/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -beagle-pbs echo /bin/echo INSTALLED INTEL32::LINUX -beagle-pbs cat /bin/cat INSTALLED INTEL32::LINUX -beagle-pbs ls /bin/ls INSTALLED INTEL32::LINUX -beagle-pbs grep /bin/grep INSTALLED INTEL32::LINUX -beagle-pbs sort /bin/sort INSTALLED INTEL32::LINUX -beagle-pbs paste /bin/paste INSTALLED INTEL32::LINUX -beagle-pbs wc /usr/bin/wc INSTALLED INTEL32::LINUX Copied: branches/release-0.93.1/tests/sites/beagle/pbs/tc.template.data (from rev 5504, branches/release-0.93/tests/sites/beagle/pbs/tc.template.data) =================================================================== --- branches/release-0.93.1/tests/sites/beagle/pbs/tc.template.data (rev 0) +++ branches/release-0.93.1/tests/sites/beagle/pbs/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +beagle-pbs echo /bin/echo INSTALLED INTEL32::LINUX +beagle-pbs cat /bin/cat INSTALLED INTEL32::LINUX +beagle-pbs ls /bin/ls INSTALLED INTEL32::LINUX +beagle-pbs grep /bin/grep INSTALLED INTEL32::LINUX +beagle-pbs sort /bin/sort INSTALLED INTEL32::LINUX +beagle-pbs paste /bin/paste INSTALLED INTEL32::LINUX +beagle-pbs wc /usr/bin/wc INSTALLED INTEL32::LINUX Deleted: branches/release-0.93.1/tests/sites/crow/001-catsn.check.sh =================================================================== --- branches/release-0.93/tests/sites/crow/001-catsn.check.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/001-catsn.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,8 +0,0 @@ -#!/bin/bash - -set -x - -COUNT=$( ls catsn.*.out | wc -l ) -[[ $COUNT == 10 ]] || exit 1 - -exit 0 Copied: branches/release-0.93.1/tests/sites/crow/001-catsn.check.sh (from rev 5504, branches/release-0.93/tests/sites/crow/001-catsn.check.sh) =================================================================== --- branches/release-0.93.1/tests/sites/crow/001-catsn.check.sh (rev 0) +++ branches/release-0.93.1/tests/sites/crow/001-catsn.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,8 @@ +#!/bin/bash + +set -x + +COUNT=$( ls catsn.*.out | wc -l ) +[[ $COUNT == 10 ]] || exit 1 + +exit 0 Deleted: branches/release-0.93.1/tests/sites/crow/001-catsn.clean.sh =================================================================== --- branches/release-0.93/tests/sites/crow/001-catsn.clean.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/001-catsn.clean.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -#!/bin/bash - -set -x - -rm -v catsn.*.out || exit 1 - -exit 0 Copied: branches/release-0.93.1/tests/sites/crow/001-catsn.clean.sh (from rev 5504, branches/release-0.93/tests/sites/crow/001-catsn.clean.sh) =================================================================== --- branches/release-0.93.1/tests/sites/crow/001-catsn.clean.sh (rev 0) +++ branches/release-0.93.1/tests/sites/crow/001-catsn.clean.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +#!/bin/bash + +set -x + +rm -v catsn.*.out || exit 1 + +exit 0 Deleted: branches/release-0.93.1/tests/sites/crow/001-catsn.setup.sh =================================================================== --- branches/release-0.93/tests/sites/crow/001-catsn.setup.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/001-catsn.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,3 +0,0 @@ -#!/bin/bash - -cp -v $GROUP/data.txt . || exit 1 Copied: branches/release-0.93.1/tests/sites/crow/001-catsn.setup.sh (from rev 5504, branches/release-0.93/tests/sites/crow/001-catsn.setup.sh) =================================================================== --- branches/release-0.93.1/tests/sites/crow/001-catsn.setup.sh (rev 0) +++ branches/release-0.93.1/tests/sites/crow/001-catsn.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,3 @@ +#!/bin/bash + +cp -v $GROUP/data.txt . || exit 1 Deleted: branches/release-0.93.1/tests/sites/crow/001-catsn.swift =================================================================== --- branches/release-0.93/tests/sites/crow/001-catsn.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/001-catsn.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,12 +0,0 @@ -type file; - -app (file o) cat (file i) -{ - cat @i stdout=@o; -} - -file out[]; -foreach j in [1:@toint(@arg("n","10"))] { - file data<"data.txt">; - out[j] = cat(data); -} Copied: branches/release-0.93.1/tests/sites/crow/001-catsn.swift (from rev 5504, branches/release-0.93/tests/sites/crow/001-catsn.swift) =================================================================== --- branches/release-0.93.1/tests/sites/crow/001-catsn.swift (rev 0) +++ branches/release-0.93.1/tests/sites/crow/001-catsn.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,12 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +file out[]; +foreach j in [1:@toint(@arg("n","10"))] { + file data<"data.txt">; + out[j] = cat(data); +} Deleted: branches/release-0.93.1/tests/sites/crow/001-catsn.timeout =================================================================== --- branches/release-0.93/tests/sites/crow/001-catsn.timeout 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/001-catsn.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -1000 Copied: branches/release-0.93.1/tests/sites/crow/001-catsn.timeout (from rev 5504, branches/release-0.93/tests/sites/crow/001-catsn.timeout) =================================================================== --- branches/release-0.93.1/tests/sites/crow/001-catsn.timeout (rev 0) +++ branches/release-0.93.1/tests/sites/crow/001-catsn.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +1000 Deleted: branches/release-0.93.1/tests/sites/crow/big/201-cps.check.sh =================================================================== --- branches/release-0.93/tests/sites/crow/big/201-cps.check.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/big/201-cps.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ -#!/bin/sh - -set -x - -COUNT=$( ls 201-output* | wc -l ) - -[[ $COUNT == 40 ]] || exit 1 - -exit 0 Copied: branches/release-0.93.1/tests/sites/crow/big/201-cps.check.sh (from rev 5504, branches/release-0.93/tests/sites/crow/big/201-cps.check.sh) =================================================================== --- branches/release-0.93.1/tests/sites/crow/big/201-cps.check.sh (rev 0) +++ branches/release-0.93.1/tests/sites/crow/big/201-cps.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ +#!/bin/sh + +set -x + +COUNT=$( ls 201-output* | wc -l ) + +[[ $COUNT == 40 ]] || exit 1 + +exit 0 Deleted: branches/release-0.93.1/tests/sites/crow/big/201-cps.clean.sh =================================================================== --- branches/release-0.93/tests/sites/crow/big/201-cps.clean.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/big/201-cps.clean.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -#!/bin/sh - -set -x - -rm -rv 201-output-[12]-*.txt || exit 1 - -exit 0 Copied: branches/release-0.93.1/tests/sites/crow/big/201-cps.clean.sh (from rev 5504, branches/release-0.93/tests/sites/crow/big/201-cps.clean.sh) =================================================================== --- branches/release-0.93.1/tests/sites/crow/big/201-cps.clean.sh (rev 0) +++ branches/release-0.93.1/tests/sites/crow/big/201-cps.clean.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +#!/bin/sh + +set -x + +rm -rv 201-output-[12]-*.txt || exit 1 + +exit 0 Deleted: branches/release-0.93.1/tests/sites/crow/big/201-cps.setup.sh =================================================================== --- branches/release-0.93/tests/sites/crow/big/201-cps.setup.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/big/201-cps.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,12 +0,0 @@ -#!/bin/sh - -set -x - -{ - uname -a - date -} > 201-input-1.txt - -cp -v 201-input-1.txt 201-input-2.txt - -exit 0 Copied: branches/release-0.93.1/tests/sites/crow/big/201-cps.setup.sh (from rev 5504, branches/release-0.93/tests/sites/crow/big/201-cps.setup.sh) =================================================================== --- branches/release-0.93.1/tests/sites/crow/big/201-cps.setup.sh (rev 0) +++ branches/release-0.93.1/tests/sites/crow/big/201-cps.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,12 @@ +#!/bin/sh + +set -x + +{ + uname -a + date +} > 201-input-1.txt + +cp -v 201-input-1.txt 201-input-2.txt + +exit 0 Deleted: branches/release-0.93.1/tests/sites/crow/big/201-cps.swift =================================================================== --- branches/release-0.93/tests/sites/crow/big/201-cps.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/big/201-cps.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,24 +0,0 @@ - -type file; - -app (file o) cps(file i, int s) -{ - cps @o @i s; -} - -file input1<"201-input-1.txt">; -file input2<"201-input-2.txt">; - -foreach i in [1:20] -{ - string s = @strcat("201-output-1-", i, ".txt"); - file output; - output = cps(input1, i); -} - -foreach j in [1:20] -{ - string s = @strcat("201-output-2-", j, ".txt"); - file output; - output = cps(input2, 10+j); -} Copied: branches/release-0.93.1/tests/sites/crow/big/201-cps.swift (from rev 5504, branches/release-0.93/tests/sites/crow/big/201-cps.swift) =================================================================== --- branches/release-0.93.1/tests/sites/crow/big/201-cps.swift (rev 0) +++ branches/release-0.93.1/tests/sites/crow/big/201-cps.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,24 @@ + +type file; + +app (file o) cps(file i, int s) +{ + cps @o @i s; +} + +file input1<"201-input-1.txt">; +file input2<"201-input-2.txt">; + +foreach i in [1:20] +{ + string s = @strcat("201-output-1-", i, ".txt"); + file output; + output = cps(input1, i); +} + +foreach j in [1:20] +{ + string s = @strcat("201-output-2-", j, ".txt"); + file output; + output = cps(input2, 10+j); +} Deleted: branches/release-0.93.1/tests/sites/crow/big/201-cps.timeout =================================================================== --- branches/release-0.93/tests/sites/crow/big/201-cps.timeout 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/big/201-cps.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -1000 Copied: branches/release-0.93.1/tests/sites/crow/big/201-cps.timeout (from rev 5504, branches/release-0.93/tests/sites/crow/big/201-cps.timeout) =================================================================== --- branches/release-0.93.1/tests/sites/crow/big/201-cps.timeout (rev 0) +++ branches/release-0.93.1/tests/sites/crow/big/201-cps.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +1000 Deleted: branches/release-0.93.1/tests/sites/crow/big/cps.sh =================================================================== --- branches/release-0.93/tests/sites/crow/big/cps.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/big/cps.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ -#!/bin/sh - -DEST=$1 -SRC=$2 -DURATION=$3 - -sleep $DURATION -cp -v $SRC $DEST - Copied: branches/release-0.93.1/tests/sites/crow/big/cps.sh (from rev 5504, branches/release-0.93/tests/sites/crow/big/cps.sh) =================================================================== --- branches/release-0.93.1/tests/sites/crow/big/cps.sh (rev 0) +++ branches/release-0.93.1/tests/sites/crow/big/cps.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ +#!/bin/sh + +DEST=$1 +SRC=$2 +DURATION=$3 + +sleep $DURATION +cp -v $SRC $DEST + Deleted: branches/release-0.93.1/tests/sites/crow/big/data.txt =================================================================== --- branches/release-0.93/tests/sites/crow/big/data.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/big/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -HELLO Copied: branches/release-0.93.1/tests/sites/crow/big/data.txt (from rev 5504, branches/release-0.93/tests/sites/crow/big/data.txt) =================================================================== --- branches/release-0.93.1/tests/sites/crow/big/data.txt (rev 0) +++ branches/release-0.93.1/tests/sites/crow/big/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +HELLO Deleted: branches/release-0.93.1/tests/sites/crow/big/sites.template.xml =================================================================== --- branches/release-0.93/tests/sites/crow/big/sites.template.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/big/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,29 +0,0 @@ - - - - - - - - - 1 - 7200 - - - pbs.aprun;pbs.mpp;depth=6 - - 6 - 2 - 4 - 16 - DEBUG - {wdir} - 5.99 - 10000 - {wdir} - - - - Copied: branches/release-0.93.1/tests/sites/crow/big/sites.template.xml (from rev 5504, branches/release-0.93/tests/sites/crow/big/sites.template.xml) =================================================================== --- branches/release-0.93.1/tests/sites/crow/big/sites.template.xml (rev 0) +++ branches/release-0.93.1/tests/sites/crow/big/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,29 @@ + + + + + + + + + 1 + 7200 + + + pbs.aprun;pbs.mpp;depth=6 + + 6 + 2 + 4 + 16 + DEBUG + {wdir} + 5.99 + 10000 + {wdir} + + + + Deleted: branches/release-0.93.1/tests/sites/crow/big/title.txt =================================================================== --- branches/release-0.93/tests/sites/crow/big/title.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/big/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Local PBS Coasters: Crow big Copied: branches/release-0.93.1/tests/sites/crow/big/title.txt (from rev 5504, branches/release-0.93/tests/sites/crow/big/title.txt) =================================================================== --- branches/release-0.93.1/tests/sites/crow/big/title.txt (rev 0) +++ branches/release-0.93.1/tests/sites/crow/big/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Local PBS Coasters: Crow big Deleted: branches/release-0.93.1/tests/sites/crow/data.txt =================================================================== --- branches/release-0.93/tests/sites/crow/data.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -HELLO Copied: branches/release-0.93.1/tests/sites/crow/data.txt (from rev 5504, branches/release-0.93/tests/sites/crow/data.txt) =================================================================== --- branches/release-0.93.1/tests/sites/crow/data.txt (rev 0) +++ branches/release-0.93.1/tests/sites/crow/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +HELLO Deleted: branches/release-0.93.1/tests/sites/crow/sites.template.xml =================================================================== --- branches/release-0.93/tests/sites/crow/sites.template.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,31 +0,0 @@ - - - - - - - - - - - 1 - 7200 - - - pbs.aprun;pbs.mpp;depth=6 - - 6 - 1 - 1 - 1 - DEBUG - {wdir} - 5.99 - 10000 - {wdir} - - - - Copied: branches/release-0.93.1/tests/sites/crow/sites.template.xml (from rev 5504, branches/release-0.93/tests/sites/crow/sites.template.xml) =================================================================== --- branches/release-0.93.1/tests/sites/crow/sites.template.xml (rev 0) +++ branches/release-0.93.1/tests/sites/crow/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,31 @@ + + + + + + + + + + + 1 + 7200 + + + pbs.aprun;pbs.mpp;depth=6 + + 6 + 1 + 1 + 1 + DEBUG + {wdir} + 5.99 + 10000 + {wdir} + + + + Deleted: branches/release-0.93.1/tests/sites/crow/tc.template.data =================================================================== --- branches/release-0.93/tests/sites/crow/tc.template.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -crow echo /bin/echo INSTALLED INTEL32::LINUX -crow cat /bin/cat INSTALLED INTEL32::LINUX -crow ls /bin/ls INSTALLED INTEL32::LINUX -crow grep /bin/grep INSTALLED INTEL32::LINUX -crow sort /bin/sort INSTALLED INTEL32::LINUX -crow paste /bin/paste INSTALLED INTEL32::LINUX -crow wc /usr/bin/wc INSTALLED INTEL32::LINUX Copied: branches/release-0.93.1/tests/sites/crow/tc.template.data (from rev 5504, branches/release-0.93/tests/sites/crow/tc.template.data) =================================================================== --- branches/release-0.93.1/tests/sites/crow/tc.template.data (rev 0) +++ branches/release-0.93.1/tests/sites/crow/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +crow echo /bin/echo INSTALLED INTEL32::LINUX +crow cat /bin/cat INSTALLED INTEL32::LINUX +crow ls /bin/ls INSTALLED INTEL32::LINUX +crow grep /bin/grep INSTALLED INTEL32::LINUX +crow sort /bin/sort INSTALLED INTEL32::LINUX +crow paste /bin/paste INSTALLED INTEL32::LINUX +crow wc /usr/bin/wc INSTALLED INTEL32::LINUX Deleted: branches/release-0.93.1/tests/sites/crow/title.txt =================================================================== --- branches/release-0.93/tests/sites/crow/title.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/crow/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Local PBS Coasters: Crow Copied: branches/release-0.93.1/tests/sites/crow/title.txt (from rev 5504, branches/release-0.93/tests/sites/crow/title.txt) =================================================================== --- branches/release-0.93.1/tests/sites/crow/title.txt (rev 0) +++ branches/release-0.93.1/tests/sites/crow/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Local PBS Coasters: Crow Deleted: branches/release-0.93.1/tests/sites/fusion/catsn.0001.out.expected =================================================================== --- branches/release-0.93/tests/sites/fusion/catsn.0001.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/fusion/catsn.0001.out.expected (from rev 5504, branches/release-0.93/tests/sites/fusion/catsn.0001.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/fusion/catsn.0001.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/fusion/catsn.0002.out.expected =================================================================== --- branches/release-0.93/tests/sites/fusion/catsn.0002.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/fusion/catsn.0002.out.expected (from rev 5504, branches/release-0.93/tests/sites/fusion/catsn.0002.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/fusion/catsn.0002.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/fusion/catsn.0003.out.expected =================================================================== --- branches/release-0.93/tests/sites/fusion/catsn.0003.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/fusion/catsn.0003.out.expected (from rev 5504, branches/release-0.93/tests/sites/fusion/catsn.0003.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/fusion/catsn.0003.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/fusion/catsn.0004.out.expected =================================================================== --- branches/release-0.93/tests/sites/fusion/catsn.0004.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/fusion/catsn.0004.out.expected (from rev 5504, branches/release-0.93/tests/sites/fusion/catsn.0004.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/fusion/catsn.0004.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/fusion/catsn.0005.out.expected =================================================================== --- branches/release-0.93/tests/sites/fusion/catsn.0005.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/fusion/catsn.0005.out.expected (from rev 5504, branches/release-0.93/tests/sites/fusion/catsn.0005.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/fusion/catsn.0005.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/fusion/catsn.0006.out.expected =================================================================== --- branches/release-0.93/tests/sites/fusion/catsn.0006.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/fusion/catsn.0006.out.expected (from rev 5504, branches/release-0.93/tests/sites/fusion/catsn.0006.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/fusion/catsn.0006.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/fusion/catsn.0007.out.expected =================================================================== --- branches/release-0.93/tests/sites/fusion/catsn.0007.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/fusion/catsn.0007.out.expected (from rev 5504, branches/release-0.93/tests/sites/fusion/catsn.0007.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/fusion/catsn.0007.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/fusion/catsn.0008.out.expected =================================================================== --- branches/release-0.93/tests/sites/fusion/catsn.0008.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/fusion/catsn.0008.out.expected (from rev 5504, branches/release-0.93/tests/sites/fusion/catsn.0008.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/fusion/catsn.0008.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/fusion/catsn.0009.out.expected =================================================================== --- branches/release-0.93/tests/sites/fusion/catsn.0009.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/fusion/catsn.0009.out.expected (from rev 5504, branches/release-0.93/tests/sites/fusion/catsn.0009.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/fusion/catsn.0009.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/fusion/catsn.0010.out.expected =================================================================== --- branches/release-0.93/tests/sites/fusion/catsn.0010.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/fusion/catsn.0010.out.expected (from rev 5504, branches/release-0.93/tests/sites/fusion/catsn.0010.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/fusion/catsn.0010.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/fusion/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/fusion/catsn.setup.sh =================================================================== --- branches/release-0.93/tests/sites/fusion/catsn.setup.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/fusion/catsn.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,6 +0,0 @@ -#!/bin/bash - -cp -v $GROUP/data.txt . || exit 1 -ipaddr=$( ifconfig | grep inet | head -1 | cut -d ':' -f 2 | awk '{print $1}' ) -export GLOBUS_HOSTNAME=$ipaddr - Copied: branches/release-0.93.1/tests/sites/fusion/catsn.setup.sh (from rev 5504, branches/release-0.93/tests/sites/fusion/catsn.setup.sh) =================================================================== --- branches/release-0.93.1/tests/sites/fusion/catsn.setup.sh (rev 0) +++ branches/release-0.93.1/tests/sites/fusion/catsn.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,6 @@ +#!/bin/bash + +cp -v $GROUP/data.txt . || exit 1 +ipaddr=$( ifconfig | grep inet | head -1 | cut -d ':' -f 2 | awk '{print $1}' ) +export GLOBUS_HOSTNAME=$ipaddr + Deleted: branches/release-0.93.1/tests/sites/fusion/catsn.swift =================================================================== --- branches/release-0.93/tests/sites/fusion/catsn.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/fusion/catsn.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,15 +0,0 @@ -type file; - -app (file o) cat (file i) -{ - cat @i stdout=@o; -} - -string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -string char[] = @strsplit(t, ""); - -file out[]; -foreach j in [1:@toint(@arg("n","10"))] { - file data<"data.txt">; - out[j] = cat(data); -} Copied: branches/release-0.93.1/tests/sites/fusion/catsn.swift (from rev 5504, branches/release-0.93/tests/sites/fusion/catsn.swift) =================================================================== --- branches/release-0.93.1/tests/sites/fusion/catsn.swift (rev 0) +++ branches/release-0.93.1/tests/sites/fusion/catsn.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,15 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; +string char[] = @strsplit(t, ""); + +file out[]; +foreach j in [1:@toint(@arg("n","10"))] { + file data<"data.txt">; + out[j] = cat(data); +} Deleted: branches/release-0.93.1/tests/sites/fusion/catsn.timeout =================================================================== --- branches/release-0.93/tests/sites/fusion/catsn.timeout 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/fusion/catsn.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -30 Copied: branches/release-0.93.1/tests/sites/fusion/catsn.timeout (from rev 5504, branches/release-0.93/tests/sites/fusion/catsn.timeout) =================================================================== --- branches/release-0.93.1/tests/sites/fusion/catsn.timeout (rev 0) +++ branches/release-0.93.1/tests/sites/fusion/catsn.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +30 Deleted: branches/release-0.93.1/tests/sites/fusion/data.txt =================================================================== --- branches/release-0.93/tests/sites/fusion/data.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/fusion/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/fusion/data.txt (from rev 5504, branches/release-0.93/tests/sites/fusion/data.txt) =================================================================== --- branches/release-0.93.1/tests/sites/fusion/data.txt (rev 0) +++ branches/release-0.93.1/tests/sites/fusion/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/fusion/sites.template.xml =================================================================== --- branches/release-0.93/tests/sites/fusion/sites.template.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/fusion/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,16 +0,0 @@ - - - - - 750 - 1 - 1 - 1 - 2 - shared - 5.99 - 10000 - _WORK_ - - - Copied: branches/release-0.93.1/tests/sites/fusion/sites.template.xml (from rev 5504, branches/release-0.93/tests/sites/fusion/sites.template.xml) =================================================================== --- branches/release-0.93.1/tests/sites/fusion/sites.template.xml (rev 0) +++ branches/release-0.93.1/tests/sites/fusion/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,16 @@ + + + + + 750 + 1 + 1 + 1 + 2 + shared + 5.99 + 10000 + _WORK_ + + + Deleted: branches/release-0.93.1/tests/sites/fusion/tc.template.data =================================================================== --- branches/release-0.93/tests/sites/fusion/tc.template.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/fusion/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -fusion echo /bin/echo INSTALLED INTEL32::LINUX -fusion cat /bin/cat INSTALLED INTEL32::LINUX -fusion ls /bin/ls INSTALLED INTEL32::LINUX -fusion grep /bin/grep INSTALLED INTEL32::LINUX -fusion sort /bin/sort INSTALLED INTEL32::LINUX -fusion paste /bin/paste INSTALLED INTEL32::LINUX -fusion wc /usr/bin/wc INSTALLED INTEL32::LINUX Copied: branches/release-0.93.1/tests/sites/fusion/tc.template.data (from rev 5504, branches/release-0.93/tests/sites/fusion/tc.template.data) =================================================================== --- branches/release-0.93.1/tests/sites/fusion/tc.template.data (rev 0) +++ branches/release-0.93.1/tests/sites/fusion/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +fusion echo /bin/echo INSTALLED INTEL32::LINUX +fusion cat /bin/cat INSTALLED INTEL32::LINUX +fusion ls /bin/ls INSTALLED INTEL32::LINUX +fusion grep /bin/grep INSTALLED INTEL32::LINUX +fusion sort /bin/sort INSTALLED INTEL32::LINUX +fusion paste /bin/paste INSTALLED INTEL32::LINUX +fusion wc /usr/bin/wc INSTALLED INTEL32::LINUX Deleted: branches/release-0.93.1/tests/sites/ibicluster/catsn.0001.out.expected =================================================================== --- branches/release-0.93/tests/sites/ibicluster/catsn.0001.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -blah blah Copied: branches/release-0.93.1/tests/sites/ibicluster/catsn.0001.out.expected (from rev 5504, branches/release-0.93/tests/sites/ibicluster/catsn.0001.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/catsn.0001.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +blah blah Deleted: branches/release-0.93.1/tests/sites/ibicluster/catsn.0002.out.expected =================================================================== --- branches/release-0.93/tests/sites/ibicluster/catsn.0002.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -blah blah Copied: branches/release-0.93.1/tests/sites/ibicluster/catsn.0002.out.expected (from rev 5504, branches/release-0.93/tests/sites/ibicluster/catsn.0002.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/catsn.0002.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +blah blah Deleted: branches/release-0.93.1/tests/sites/ibicluster/catsn.0003.out.expected =================================================================== --- branches/release-0.93/tests/sites/ibicluster/catsn.0003.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -blah blah Copied: branches/release-0.93.1/tests/sites/ibicluster/catsn.0003.out.expected (from rev 5504, branches/release-0.93/tests/sites/ibicluster/catsn.0003.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/catsn.0003.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +blah blah Deleted: branches/release-0.93.1/tests/sites/ibicluster/catsn.0004.out.expected =================================================================== --- branches/release-0.93/tests/sites/ibicluster/catsn.0004.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -blah blah Copied: branches/release-0.93.1/tests/sites/ibicluster/catsn.0004.out.expected (from rev 5504, branches/release-0.93/tests/sites/ibicluster/catsn.0004.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/catsn.0004.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +blah blah Deleted: branches/release-0.93.1/tests/sites/ibicluster/catsn.0005.out.expected =================================================================== --- branches/release-0.93/tests/sites/ibicluster/catsn.0005.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -blah blah Copied: branches/release-0.93.1/tests/sites/ibicluster/catsn.0005.out.expected (from rev 5504, branches/release-0.93/tests/sites/ibicluster/catsn.0005.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/catsn.0005.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +blah blah Deleted: branches/release-0.93.1/tests/sites/ibicluster/catsn.0006.out.expected =================================================================== --- branches/release-0.93/tests/sites/ibicluster/catsn.0006.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -blah blah Copied: branches/release-0.93.1/tests/sites/ibicluster/catsn.0006.out.expected (from rev 5504, branches/release-0.93/tests/sites/ibicluster/catsn.0006.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/catsn.0006.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +blah blah Deleted: branches/release-0.93.1/tests/sites/ibicluster/catsn.0007.out.expected =================================================================== --- branches/release-0.93/tests/sites/ibicluster/catsn.0007.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -blah blah Copied: branches/release-0.93.1/tests/sites/ibicluster/catsn.0007.out.expected (from rev 5504, branches/release-0.93/tests/sites/ibicluster/catsn.0007.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/catsn.0007.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +blah blah Deleted: branches/release-0.93.1/tests/sites/ibicluster/catsn.0008.out.expected =================================================================== --- branches/release-0.93/tests/sites/ibicluster/catsn.0008.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -blah blah Copied: branches/release-0.93.1/tests/sites/ibicluster/catsn.0008.out.expected (from rev 5504, branches/release-0.93/tests/sites/ibicluster/catsn.0008.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/catsn.0008.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +blah blah Deleted: branches/release-0.93.1/tests/sites/ibicluster/catsn.0009.out.expected =================================================================== --- branches/release-0.93/tests/sites/ibicluster/catsn.0009.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -blah blah Copied: branches/release-0.93.1/tests/sites/ibicluster/catsn.0009.out.expected (from rev 5504, branches/release-0.93/tests/sites/ibicluster/catsn.0009.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/catsn.0009.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +blah blah Deleted: branches/release-0.93.1/tests/sites/ibicluster/catsn.0010.out.expected =================================================================== --- branches/release-0.93/tests/sites/ibicluster/catsn.0010.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -blah blah Copied: branches/release-0.93.1/tests/sites/ibicluster/catsn.0010.out.expected (from rev 5504, branches/release-0.93/tests/sites/ibicluster/catsn.0010.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/catsn.0010.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +blah blah Deleted: branches/release-0.93.1/tests/sites/ibicluster/catsn.check.sh =================================================================== --- branches/release-0.93/tests/sites/ibicluster/catsn.check.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,12 +0,0 @@ -#!/bin/bash - -set -x - -for count in `seq --format "%04.f" 1 1 10` -do - [ -f catsn.$count.out ] || exit 1 - CONTENTS1=$( cat catsn.$count.out.expected ) - CONTENTS2=$( cat catsn.$count.out ) - [[ $CONTENTS1 == $CONTENTS2 ]] || exit 1 -done -exit 0 Copied: branches/release-0.93.1/tests/sites/ibicluster/catsn.check.sh (from rev 5504, branches/release-0.93/tests/sites/ibicluster/catsn.check.sh) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/catsn.check.sh (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,12 @@ +#!/bin/bash + +set -x + +for count in `seq --format "%04.f" 1 1 10` +do + [ -f catsn.$count.out ] || exit 1 + CONTENTS1=$( cat catsn.$count.out.expected ) + CONTENTS2=$( cat catsn.$count.out ) + [[ $CONTENTS1 == $CONTENTS2 ]] || exit 1 +done +exit 0 Deleted: branches/release-0.93.1/tests/sites/ibicluster/catsn.setup.sh =================================================================== --- branches/release-0.93/tests/sites/ibicluster/catsn.setup.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -#!/bin/bash - -cp -v $GROUP/data.txt . || exit 1 -cp -v $GROUP/*expected . || exit 1 - -export QUEUE=normal - Copied: branches/release-0.93.1/tests/sites/ibicluster/catsn.setup.sh (from rev 5504, branches/release-0.93/tests/sites/ibicluster/catsn.setup.sh) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/catsn.setup.sh (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +#!/bin/bash + +cp -v $GROUP/data.txt . || exit 1 +cp -v $GROUP/*expected . || exit 1 + +export QUEUE=normal + Deleted: branches/release-0.93.1/tests/sites/ibicluster/catsn.swift =================================================================== --- branches/release-0.93/tests/sites/ibicluster/catsn.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,12 +0,0 @@ -type file; - -app (file o) cat (file i) -{ - cat @i stdout=@o; -} - -file out[]; -foreach j in [1:@toint(@arg("n","10"))] { - file data<"data.txt">; - out[j] = cat(data); -} Copied: branches/release-0.93.1/tests/sites/ibicluster/catsn.swift (from rev 5504, branches/release-0.93/tests/sites/ibicluster/catsn.swift) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/catsn.swift (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,12 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +file out[]; +foreach j in [1:@toint(@arg("n","10"))] { + file data<"data.txt">; + out[j] = cat(data); +} Deleted: branches/release-0.93.1/tests/sites/ibicluster/catsn.timeout =================================================================== --- branches/release-0.93/tests/sites/ibicluster/catsn.timeout 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -1800 Copied: branches/release-0.93.1/tests/sites/ibicluster/catsn.timeout (from rev 5504, branches/release-0.93/tests/sites/ibicluster/catsn.timeout) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/catsn.timeout (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/catsn.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +1800 Deleted: branches/release-0.93.1/tests/sites/ibicluster/data.txt =================================================================== --- branches/release-0.93/tests/sites/ibicluster/data.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -blah blah Copied: branches/release-0.93.1/tests/sites/ibicluster/data.txt (from rev 5504, branches/release-0.93/tests/sites/ibicluster/data.txt) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/data.txt (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +blah blah Deleted: branches/release-0.93.1/tests/sites/ibicluster/sites.template.xml =================================================================== --- branches/release-0.93/tests/sites/ibicluster/sites.template.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,14 +0,0 @@ - - - - threaded - all.q - 8 - 1 - 2 - 0.159 - 10000 - - _WORK_ - - Copied: branches/release-0.93.1/tests/sites/ibicluster/sites.template.xml (from rev 5504, branches/release-0.93/tests/sites/ibicluster/sites.template.xml) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/sites.template.xml (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,14 @@ + + + + threaded + all.q + 8 + 1 + 2 + 0.159 + 10000 + + _WORK_ + + Deleted: branches/release-0.93.1/tests/sites/ibicluster/tc.template.data =================================================================== --- branches/release-0.93/tests/sites/ibicluster/tc.template.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,8 +0,0 @@ -ibicluster echo /bin/echo INSTALLED INTEL32::LINUX -ibicluster cat /bin/cat INSTALLED INTEL32::LINUX -ibicluster ls /bin/ls INSTALLED INTEL32::LINUX -ibicluster grep /bin/grep INSTALLED INTEL32::LINUX -ibicluster sort /bin/sort INSTALLED INTEL32::LINUX -ibicluster paste /bin/paste INSTALLED INTEL32::LINUX -ibicluster wc /usr/bin/wc INSTALLED INTEL32::LINUX - Copied: branches/release-0.93.1/tests/sites/ibicluster/tc.template.data (from rev 5504, branches/release-0.93/tests/sites/ibicluster/tc.template.data) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/tc.template.data (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,8 @@ +ibicluster echo /bin/echo INSTALLED INTEL32::LINUX +ibicluster cat /bin/cat INSTALLED INTEL32::LINUX +ibicluster ls /bin/ls INSTALLED INTEL32::LINUX +ibicluster grep /bin/grep INSTALLED INTEL32::LINUX +ibicluster sort /bin/sort INSTALLED INTEL32::LINUX +ibicluster paste /bin/paste INSTALLED INTEL32::LINUX +ibicluster wc /usr/bin/wc INSTALLED INTEL32::LINUX + Deleted: branches/release-0.93.1/tests/sites/ibicluster/title.txt =================================================================== --- branches/release-0.93/tests/sites/ibicluster/title.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ibicluster/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -IBICluster SGE Test Copied: branches/release-0.93.1/tests/sites/ibicluster/title.txt (from rev 5504, branches/release-0.93/tests/sites/ibicluster/title.txt) =================================================================== --- branches/release-0.93.1/tests/sites/ibicluster/title.txt (rev 0) +++ branches/release-0.93.1/tests/sites/ibicluster/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +IBICluster SGE Test Deleted: branches/release-0.93.1/tests/sites/intrepid/100-cp.check.sh =================================================================== --- branches/release-0.93/tests/sites/intrepid/100-cp.check.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/intrepid/100-cp.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -#!/bin/sh - -set -x - -grep $( uname -m ) 100-cp-output.txt || exit 1 - -exit 0 Copied: branches/release-0.93.1/tests/sites/intrepid/100-cp.check.sh (from rev 5504, branches/release-0.93/tests/sites/intrepid/100-cp.check.sh) =================================================================== --- branches/release-0.93.1/tests/sites/intrepid/100-cp.check.sh (rev 0) +++ branches/release-0.93.1/tests/sites/intrepid/100-cp.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +#!/bin/sh + +set -x + +grep $( uname -m ) 100-cp-output.txt || exit 1 + +exit 0 Deleted: branches/release-0.93.1/tests/sites/intrepid/100-cp.clean.sh =================================================================== --- branches/release-0.93/tests/sites/intrepid/100-cp.clean.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/intrepid/100-cp.clean.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -#!/bin/sh - -set -x - -rm -v 100-cp-input.txt 100-cp-output.txt || exit 1 - -exit 0 Copied: branches/release-0.93.1/tests/sites/intrepid/100-cp.clean.sh (from rev 5504, branches/release-0.93/tests/sites/intrepid/100-cp.clean.sh) =================================================================== --- branches/release-0.93.1/tests/sites/intrepid/100-cp.clean.sh (rev 0) +++ branches/release-0.93.1/tests/sites/intrepid/100-cp.clean.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +#!/bin/sh + +set -x + +rm -v 100-cp-input.txt 100-cp-output.txt || exit 1 + +exit 0 Deleted: branches/release-0.93.1/tests/sites/intrepid/100-cp.setup.sh =================================================================== --- branches/release-0.93/tests/sites/intrepid/100-cp.setup.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/intrepid/100-cp.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -#!/bin/sh - -set -x - -uname -a > 100-cp-input.txt || exit 1 - -exit 0 Copied: branches/release-0.93.1/tests/sites/intrepid/100-cp.setup.sh (from rev 5504, branches/release-0.93/tests/sites/intrepid/100-cp.setup.sh) =================================================================== --- branches/release-0.93.1/tests/sites/intrepid/100-cp.setup.sh (rev 0) +++ branches/release-0.93.1/tests/sites/intrepid/100-cp.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +#!/bin/sh + +set -x + +uname -a > 100-cp-input.txt || exit 1 + +exit 0 Deleted: branches/release-0.93.1/tests/sites/intrepid/100-cp.swift =================================================================== --- branches/release-0.93/tests/sites/intrepid/100-cp.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/intrepid/100-cp.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,13 +0,0 @@ - -type file; - -app (file o) cp(file i) -{ - cp @i @o; -} - -file input<"100-cp-input.txt">; -file output<"100-cp-output.txt">; - -output = cp(input); - Copied: branches/release-0.93.1/tests/sites/intrepid/100-cp.swift (from rev 5504, branches/release-0.93/tests/sites/intrepid/100-cp.swift) =================================================================== --- branches/release-0.93.1/tests/sites/intrepid/100-cp.swift (rev 0) +++ branches/release-0.93.1/tests/sites/intrepid/100-cp.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,13 @@ + +type file; + +app (file o) cp(file i) +{ + cp @i @o; +} + +file input<"100-cp-input.txt">; +file output<"100-cp-output.txt">; + +output = cp(input); + Deleted: branches/release-0.93.1/tests/sites/intrepid/100-cp.timeout =================================================================== --- branches/release-0.93/tests/sites/intrepid/100-cp.timeout 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/intrepid/100-cp.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -3000 Copied: branches/release-0.93.1/tests/sites/intrepid/100-cp.timeout (from rev 5504, branches/release-0.93/tests/sites/intrepid/100-cp.timeout) =================================================================== --- branches/release-0.93.1/tests/sites/intrepid/100-cp.timeout (rev 0) +++ branches/release-0.93.1/tests/sites/intrepid/100-cp.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +3000 Deleted: branches/release-0.93.1/tests/sites/intrepid/sites.template.xml =================================================================== --- branches/release-0.93/tests/sites/intrepid/sites.template.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/intrepid/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,32 +0,0 @@ - - - - - - /scratch/wozniak/work - - 0.04 - file - - - - - - - _HOST_ - _PROJECT_ - _QUEUE_ - zeptoos - true - 21 - 10000 - 1 - DEBUG - 1 - 900 - 64 - 64 - _WORK_ - - - Copied: branches/release-0.93.1/tests/sites/intrepid/sites.template.xml (from rev 5504, branches/release-0.93/tests/sites/intrepid/sites.template.xml) =================================================================== --- branches/release-0.93.1/tests/sites/intrepid/sites.template.xml (rev 0) +++ branches/release-0.93.1/tests/sites/intrepid/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,32 @@ + + + + + + /scratch/wozniak/work + + 0.04 + file + + + + + + + _HOST_ + _PROJECT_ + _QUEUE_ + zeptoos + true + 21 + 10000 + 1 + DEBUG + 1 + 900 + 64 + 64 + _WORK_ + + + Deleted: branches/release-0.93.1/tests/sites/intrepid/tc.template.data =================================================================== --- branches/release-0.93/tests/sites/intrepid/tc.template.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/intrepid/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -coasters_alcfbgp cp /bin/cp INSTALLED INTEL32::LINUX null Copied: branches/release-0.93.1/tests/sites/intrepid/tc.template.data (from rev 5504, branches/release-0.93/tests/sites/intrepid/tc.template.data) =================================================================== --- branches/release-0.93.1/tests/sites/intrepid/tc.template.data (rev 0) +++ branches/release-0.93.1/tests/sites/intrepid/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +coasters_alcfbgp cp /bin/cp INSTALLED INTEL32::LINUX null Deleted: branches/release-0.93.1/tests/sites/intrepid/title.txt =================================================================== --- branches/release-0.93/tests/sites/intrepid/title.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/intrepid/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Site Test: BG/P: Intrepid Copied: branches/release-0.93.1/tests/sites/intrepid/title.txt (from rev 5504, branches/release-0.93/tests/sites/intrepid/title.txt) =================================================================== --- branches/release-0.93.1/tests/sites/intrepid/title.txt (rev 0) +++ branches/release-0.93.1/tests/sites/intrepid/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Site Test: BG/P: Intrepid Deleted: branches/release-0.93.1/tests/sites/local/001-catsn-local.check.sh =================================================================== --- branches/release-0.93/tests/sites/local/001-catsn-local.check.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/001-catsn-local.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,12 +0,0 @@ -#!/bin/bash - -set -x - -for count in `seq --format "%04.f" 1 1 10` -do - [ -f catsn.$count.out ] || exit 1 - CONTENTS1=$( cat catsn.$count.out.expected ) - CONTENTS2=$( cat catsn.$count.out ) - [[ $CONTENTS1 == $CONTENTS2 ]] || exit 1 -done -exit 0 Copied: branches/release-0.93.1/tests/sites/local/001-catsn-local.check.sh (from rev 5504, branches/release-0.93/tests/sites/local/001-catsn-local.check.sh) =================================================================== --- branches/release-0.93.1/tests/sites/local/001-catsn-local.check.sh (rev 0) +++ branches/release-0.93.1/tests/sites/local/001-catsn-local.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,12 @@ +#!/bin/bash + +set -x + +for count in `seq --format "%04.f" 1 1 10` +do + [ -f catsn.$count.out ] || exit 1 + CONTENTS1=$( cat catsn.$count.out.expected ) + CONTENTS2=$( cat catsn.$count.out ) + [[ $CONTENTS1 == $CONTENTS2 ]] || exit 1 +done +exit 0 Deleted: branches/release-0.93.1/tests/sites/local/001-catsn-local.setup.sh =================================================================== --- branches/release-0.93/tests/sites/local/001-catsn-local.setup.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/001-catsn-local.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,4 +0,0 @@ -#!/bin/bash - -cp -v $GROUP/data.txt . || exit 1 -cp -v $GROUP/*expected . || exit 1 Copied: branches/release-0.93.1/tests/sites/local/001-catsn-local.setup.sh (from rev 5504, branches/release-0.93/tests/sites/local/001-catsn-local.setup.sh) =================================================================== --- branches/release-0.93.1/tests/sites/local/001-catsn-local.setup.sh (rev 0) +++ branches/release-0.93.1/tests/sites/local/001-catsn-local.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,4 @@ +#!/bin/bash + +cp -v $GROUP/data.txt . || exit 1 +cp -v $GROUP/*expected . || exit 1 Deleted: branches/release-0.93.1/tests/sites/local/001-catsn-local.swift =================================================================== --- branches/release-0.93/tests/sites/local/001-catsn-local.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/001-catsn-local.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,15 +0,0 @@ -type file; - -app (file o) cat (file i) -{ - cat @i stdout=@o; -} - -string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -string char[] = @strsplit(t, ""); - -file out[]; -foreach j in [1:@toint(@arg("n","10"))] { - file data<"data.txt">; - out[j] = cat(data); -} Copied: branches/release-0.93.1/tests/sites/local/001-catsn-local.swift (from rev 5504, branches/release-0.93/tests/sites/local/001-catsn-local.swift) =================================================================== --- branches/release-0.93.1/tests/sites/local/001-catsn-local.swift (rev 0) +++ branches/release-0.93.1/tests/sites/local/001-catsn-local.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,15 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; +string char[] = @strsplit(t, ""); + +file out[]; +foreach j in [1:@toint(@arg("n","10"))] { + file data<"data.txt">; + out[j] = cat(data); +} Deleted: branches/release-0.93.1/tests/sites/local/001-catsn-local.timeout =================================================================== --- branches/release-0.93/tests/sites/local/001-catsn-local.timeout 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/001-catsn-local.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -30 Copied: branches/release-0.93.1/tests/sites/local/001-catsn-local.timeout (from rev 5504, branches/release-0.93/tests/sites/local/001-catsn-local.timeout) =================================================================== --- branches/release-0.93.1/tests/sites/local/001-catsn-local.timeout (rev 0) +++ branches/release-0.93.1/tests/sites/local/001-catsn-local.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +30 Deleted: branches/release-0.93.1/tests/sites/local/catsn.0001.out.expected =================================================================== --- branches/release-0.93/tests/sites/local/catsn.0001.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/local/catsn.0001.out.expected (from rev 5504, branches/release-0.93/tests/sites/local/catsn.0001.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/local/catsn.0001.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/local/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/local/catsn.0002.out.expected =================================================================== --- branches/release-0.93/tests/sites/local/catsn.0002.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/local/catsn.0002.out.expected (from rev 5504, branches/release-0.93/tests/sites/local/catsn.0002.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/local/catsn.0002.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/local/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/local/catsn.0003.out.expected =================================================================== --- branches/release-0.93/tests/sites/local/catsn.0003.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/local/catsn.0003.out.expected (from rev 5504, branches/release-0.93/tests/sites/local/catsn.0003.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/local/catsn.0003.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/local/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/local/catsn.0004.out.expected =================================================================== --- branches/release-0.93/tests/sites/local/catsn.0004.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/local/catsn.0004.out.expected (from rev 5504, branches/release-0.93/tests/sites/local/catsn.0004.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/local/catsn.0004.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/local/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/local/catsn.0005.out.expected =================================================================== --- branches/release-0.93/tests/sites/local/catsn.0005.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/local/catsn.0005.out.expected (from rev 5504, branches/release-0.93/tests/sites/local/catsn.0005.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/local/catsn.0005.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/local/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/local/catsn.0006.out.expected =================================================================== --- branches/release-0.93/tests/sites/local/catsn.0006.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/local/catsn.0006.out.expected (from rev 5504, branches/release-0.93/tests/sites/local/catsn.0006.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/local/catsn.0006.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/local/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/local/catsn.0007.out.expected =================================================================== --- branches/release-0.93/tests/sites/local/catsn.0007.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/local/catsn.0007.out.expected (from rev 5504, branches/release-0.93/tests/sites/local/catsn.0007.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/local/catsn.0007.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/local/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/local/catsn.0008.out.expected =================================================================== --- branches/release-0.93/tests/sites/local/catsn.0008.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/local/catsn.0008.out.expected (from rev 5504, branches/release-0.93/tests/sites/local/catsn.0008.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/local/catsn.0008.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/local/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/local/catsn.0009.out.expected =================================================================== --- branches/release-0.93/tests/sites/local/catsn.0009.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/local/catsn.0009.out.expected (from rev 5504, branches/release-0.93/tests/sites/local/catsn.0009.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/local/catsn.0009.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/local/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/local/catsn.0010.out.expected =================================================================== --- branches/release-0.93/tests/sites/local/catsn.0010.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/local/catsn.0010.out.expected (from rev 5504, branches/release-0.93/tests/sites/local/catsn.0010.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/local/catsn.0010.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/local/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/local/data.txt =================================================================== --- branches/release-0.93/tests/sites/local/data.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/local/data.txt (from rev 5504, branches/release-0.93/tests/sites/local/data.txt) =================================================================== --- branches/release-0.93.1/tests/sites/local/data.txt (rev 0) +++ branches/release-0.93.1/tests/sites/local/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/local/sites.template.xml =================================================================== --- branches/release-0.93/tests/sites/local/sites.template.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - 10000 - .31 - _WORK_ - - Copied: branches/release-0.93.1/tests/sites/local/sites.template.xml (from rev 5504, branches/release-0.93/tests/sites/local/sites.template.xml) =================================================================== --- branches/release-0.93.1/tests/sites/local/sites.template.xml (rev 0) +++ branches/release-0.93.1/tests/sites/local/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + 10000 + .31 + _WORK_ + + Deleted: branches/release-0.93.1/tests/sites/local/tc.template.data =================================================================== --- branches/release-0.93/tests/sites/local/tc.template.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,8 +0,0 @@ -localhost echo /bin/echo INSTALLED INTEL32::LINUX -localhost cat /bin/cat INSTALLED INTEL32::LINUX -localhost ls /bin/ls INSTALLED INTEL32::LINUX -localhost grep /bin/grep INSTALLED INTEL32::LINUX -localhost sort /bin/sort INSTALLED INTEL32::LINUX -localhost paste /bin/paste INSTALLED INTEL32::LINUX -localhost wc /usr/bin/wc INSTALLED INTEL32::LINUX - Copied: branches/release-0.93.1/tests/sites/local/tc.template.data (from rev 5504, branches/release-0.93/tests/sites/local/tc.template.data) =================================================================== --- branches/release-0.93.1/tests/sites/local/tc.template.data (rev 0) +++ branches/release-0.93.1/tests/sites/local/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,8 @@ +localhost echo /bin/echo INSTALLED INTEL32::LINUX +localhost cat /bin/cat INSTALLED INTEL32::LINUX +localhost ls /bin/ls INSTALLED INTEL32::LINUX +localhost grep /bin/grep INSTALLED INTEL32::LINUX +localhost sort /bin/sort INSTALLED INTEL32::LINUX +localhost paste /bin/paste INSTALLED INTEL32::LINUX +localhost wc /usr/bin/wc INSTALLED INTEL32::LINUX + Deleted: branches/release-0.93.1/tests/sites/local/title.txt =================================================================== --- branches/release-0.93/tests/sites/local/title.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Local Configuration Test Copied: branches/release-0.93.1/tests/sites/local/title.txt (from rev 5504, branches/release-0.93/tests/sites/local/title.txt) =================================================================== --- branches/release-0.93.1/tests/sites/local/title.txt (rev 0) +++ branches/release-0.93.1/tests/sites/local/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Local Configuration Test Property changes on: branches/release-0.93.1/tests/sites/local-coasters ___________________________________________________________________ Added: svn:ignore + 200-input.txt Deleted: branches/release-0.93.1/tests/sites/local-coasters/200-cp.check.sh =================================================================== --- branches/release-0.93/tests/sites/local-coasters/200-cp.check.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local-coasters/200-cp.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,8 +0,0 @@ -#!/bin/sh - -set -x - -grep $( uname -m ) 200-input.txt || exit 1 -grep $( uname -m ) 200-output.txt || exit 1 - -exit 0 Copied: branches/release-0.93.1/tests/sites/local-coasters/200-cp.check.sh (from rev 5504, branches/release-0.93/tests/sites/local-coasters/200-cp.check.sh) =================================================================== --- branches/release-0.93.1/tests/sites/local-coasters/200-cp.check.sh (rev 0) +++ branches/release-0.93.1/tests/sites/local-coasters/200-cp.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,8 @@ +#!/bin/sh + +set -x + +grep $( uname -m ) 200-input.txt || exit 1 +grep $( uname -m ) 200-output.txt || exit 1 + +exit 0 Deleted: branches/release-0.93.1/tests/sites/local-coasters/200-cp.clean.sh =================================================================== --- branches/release-0.93/tests/sites/local-coasters/200-cp.clean.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local-coasters/200-cp.clean.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -#!/bin/sh - -set -x - -rm -rv 200-output.txt || exit 1 - -exit 0 Copied: branches/release-0.93.1/tests/sites/local-coasters/200-cp.clean.sh (from rev 5504, branches/release-0.93/tests/sites/local-coasters/200-cp.clean.sh) =================================================================== --- branches/release-0.93.1/tests/sites/local-coasters/200-cp.clean.sh (rev 0) +++ branches/release-0.93.1/tests/sites/local-coasters/200-cp.clean.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +#!/bin/sh + +set -x + +rm -rv 200-output.txt || exit 1 + +exit 0 Deleted: branches/release-0.93.1/tests/sites/local-coasters/200-cp.setup.sh =================================================================== --- branches/release-0.93/tests/sites/local-coasters/200-cp.setup.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local-coasters/200-cp.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,10 +0,0 @@ -#!/bin/sh - -set -x - -{ - uname -a - date -} > 200-input.txt - -exit 0 Copied: branches/release-0.93.1/tests/sites/local-coasters/200-cp.setup.sh (from rev 5504, branches/release-0.93/tests/sites/local-coasters/200-cp.setup.sh) =================================================================== --- branches/release-0.93.1/tests/sites/local-coasters/200-cp.setup.sh (rev 0) +++ branches/release-0.93.1/tests/sites/local-coasters/200-cp.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,10 @@ +#!/bin/sh + +set -x + +{ + uname -a + date +} > 200-input.txt + +exit 0 Deleted: branches/release-0.93.1/tests/sites/local-coasters/200-cp.swift =================================================================== --- branches/release-0.93/tests/sites/local-coasters/200-cp.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local-coasters/200-cp.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,10 +0,0 @@ - -type file; - -app (file o) cp(file i) -{ - cp @i @o; -} - -file input<"200-input.txt">; -file output<"200-output.txt"> = cp(input); Copied: branches/release-0.93.1/tests/sites/local-coasters/200-cp.swift (from rev 5504, branches/release-0.93/tests/sites/local-coasters/200-cp.swift) =================================================================== --- branches/release-0.93.1/tests/sites/local-coasters/200-cp.swift (rev 0) +++ branches/release-0.93.1/tests/sites/local-coasters/200-cp.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,10 @@ + +type file; + +app (file o) cp(file i) +{ + cp @i @o; +} + +file input<"200-input.txt">; +file output<"200-output.txt"> = cp(input); Deleted: branches/release-0.93.1/tests/sites/local-coasters/201-cp.check.sh =================================================================== --- branches/release-0.93/tests/sites/local-coasters/201-cp.check.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local-coasters/201-cp.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ -#!/bin/sh - -set -x - -COUNT=$( ls 201-output* | wc -l ) - -[[ $COUNT == 40 ]] || exit 1 - -exit 0 Copied: branches/release-0.93.1/tests/sites/local-coasters/201-cp.check.sh (from rev 5504, branches/release-0.93/tests/sites/local-coasters/201-cp.check.sh) =================================================================== --- branches/release-0.93.1/tests/sites/local-coasters/201-cp.check.sh (rev 0) +++ branches/release-0.93.1/tests/sites/local-coasters/201-cp.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ +#!/bin/sh + +set -x + +COUNT=$( ls 201-output* | wc -l ) + +[[ $COUNT == 40 ]] || exit 1 + +exit 0 Deleted: branches/release-0.93.1/tests/sites/local-coasters/201-cp.clean.sh =================================================================== --- branches/release-0.93/tests/sites/local-coasters/201-cp.clean.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local-coasters/201-cp.clean.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -#!/bin/sh - -set -x - -rm -rv 201-output-[12]-*.txt || exit 1 - -exit 0 Copied: branches/release-0.93.1/tests/sites/local-coasters/201-cp.clean.sh (from rev 5504, branches/release-0.93/tests/sites/local-coasters/201-cp.clean.sh) =================================================================== --- branches/release-0.93.1/tests/sites/local-coasters/201-cp.clean.sh (rev 0) +++ branches/release-0.93.1/tests/sites/local-coasters/201-cp.clean.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +#!/bin/sh + +set -x + +rm -rv 201-output-[12]-*.txt || exit 1 + +exit 0 Deleted: branches/release-0.93.1/tests/sites/local-coasters/201-cp.setup.sh =================================================================== --- branches/release-0.93/tests/sites/local-coasters/201-cp.setup.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local-coasters/201-cp.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,12 +0,0 @@ -#!/bin/sh - -set -x - -{ - uname -a - date -} > 201-input-1.txt - -cp -v 201-input-1.txt 201-input-2.txt - -exit 0 Copied: branches/release-0.93.1/tests/sites/local-coasters/201-cp.setup.sh (from rev 5504, branches/release-0.93/tests/sites/local-coasters/201-cp.setup.sh) =================================================================== --- branches/release-0.93.1/tests/sites/local-coasters/201-cp.setup.sh (rev 0) +++ branches/release-0.93.1/tests/sites/local-coasters/201-cp.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,12 @@ +#!/bin/sh + +set -x + +{ + uname -a + date +} > 201-input-1.txt + +cp -v 201-input-1.txt 201-input-2.txt + +exit 0 Deleted: branches/release-0.93.1/tests/sites/local-coasters/201-cp.swift =================================================================== --- branches/release-0.93/tests/sites/local-coasters/201-cp.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local-coasters/201-cp.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,24 +0,0 @@ - -type file; - -app (file o) cp(file i) -{ - cp @i @o; -} - -file input1<"201-input-1.txt">; -file input2<"201-input-2.txt">; - -foreach i in [1:20] -{ - string s = @strcat("201-output-1-", i, ".txt"); - file output; - output = cp(input1); -} - -foreach j in [1:20] -{ - string s = @strcat("201-output-2-", j, ".txt"); - file output; - output = cp(input2); -} Copied: branches/release-0.93.1/tests/sites/local-coasters/201-cp.swift (from rev 5504, branches/release-0.93/tests/sites/local-coasters/201-cp.swift) =================================================================== --- branches/release-0.93.1/tests/sites/local-coasters/201-cp.swift (rev 0) +++ branches/release-0.93.1/tests/sites/local-coasters/201-cp.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,24 @@ + +type file; + +app (file o) cp(file i) +{ + cp @i @o; +} + +file input1<"201-input-1.txt">; +file input2<"201-input-2.txt">; + +foreach i in [1:20] +{ + string s = @strcat("201-output-1-", i, ".txt"); + file output; + output = cp(input1); +} + +foreach j in [1:20] +{ + string s = @strcat("201-output-2-", j, ".txt"); + file output; + output = cp(input2); +} Deleted: branches/release-0.93.1/tests/sites/local-coasters/README.txt =================================================================== --- branches/release-0.93/tests/sites/local-coasters/README.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local-coasters/README.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,5 +0,0 @@ - -Tests for basic Coasters functionality on local machine - -200 series: Simple jobs, simple settings - Copied: branches/release-0.93.1/tests/sites/local-coasters/README.txt (from rev 5504, branches/release-0.93/tests/sites/local-coasters/README.txt) =================================================================== --- branches/release-0.93.1/tests/sites/local-coasters/README.txt (rev 0) +++ branches/release-0.93.1/tests/sites/local-coasters/README.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,5 @@ + +Tests for basic Coasters functionality on local machine + +200 series: Simple jobs, simple settings + Deleted: branches/release-0.93.1/tests/sites/local-coasters/sites.template.xml =================================================================== --- branches/release-0.93/tests/sites/local-coasters/sites.template.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local-coasters/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,24 +0,0 @@ - - - - - - _WORK_ - file - - - - - - _HOST_ - 2.55 - 10000 - 4 - 8 - 1000 - 1 - 4 - _WORK_ - - - Copied: branches/release-0.93.1/tests/sites/local-coasters/sites.template.xml (from rev 5504, branches/release-0.93/tests/sites/local-coasters/sites.template.xml) =================================================================== --- branches/release-0.93.1/tests/sites/local-coasters/sites.template.xml (rev 0) +++ branches/release-0.93.1/tests/sites/local-coasters/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,24 @@ + + + + + + _WORK_ + file + + + + + + _HOST_ + 2.55 + 10000 + 4 + 8 + 1000 + 1 + 4 + _WORK_ + + + Deleted: branches/release-0.93.1/tests/sites/local-coasters/tc.template.data =================================================================== --- branches/release-0.93/tests/sites/local-coasters/tc.template.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local-coasters/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,19 +0,0 @@ -#This is the transformation catalog. -# -#It comes pre-configured with a number of simple transformations with -#paths that are likely to work on a linux box. However, on some systems, -#the paths to these executables will be different (for example, sometimes -#some of these programs are found in /usr/bin rather than in /bin) -# -#NOTE WELL: fields in this file must be separated by tabs, not spaces; and -#there must be no trailing whitespace at the end of each line. -# -# sitename transformation path INSTALLED platform profiles -localhost echo /bin/echo INSTALLED INTEL32::LINUX null -localhost cat /bin/cat INSTALLED INTEL32::LINUX null -localhost ls /bin/ls INSTALLED INTEL32::LINUX null -localhost grep /bin/grep INSTALLED INTEL32::LINUX null -localhost sort /bin/sort INSTALLED INTEL32::LINUX null -localhost paste /bin/paste INSTALLED INTEL32::LINUX null - -coasterslocal cp /bin/cp INSTALLED INTEL32::LINUX null Copied: branches/release-0.93.1/tests/sites/local-coasters/tc.template.data (from rev 5504, branches/release-0.93/tests/sites/local-coasters/tc.template.data) =================================================================== --- branches/release-0.93.1/tests/sites/local-coasters/tc.template.data (rev 0) +++ branches/release-0.93.1/tests/sites/local-coasters/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,19 @@ +#This is the transformation catalog. +# +#It comes pre-configured with a number of simple transformations with +#paths that are likely to work on a linux box. However, on some systems, +#the paths to these executables will be different (for example, sometimes +#some of these programs are found in /usr/bin rather than in /bin) +# +#NOTE WELL: fields in this file must be separated by tabs, not spaces; and +#there must be no trailing whitespace at the end of each line. +# +# sitename transformation path INSTALLED platform profiles +localhost echo /bin/echo INSTALLED INTEL32::LINUX null +localhost cat /bin/cat INSTALLED INTEL32::LINUX null +localhost ls /bin/ls INSTALLED INTEL32::LINUX null +localhost grep /bin/grep INSTALLED INTEL32::LINUX null +localhost sort /bin/sort INSTALLED INTEL32::LINUX null +localhost paste /bin/paste INSTALLED INTEL32::LINUX null + +coasterslocal cp /bin/cp INSTALLED INTEL32::LINUX null Deleted: branches/release-0.93.1/tests/sites/local-coasters/title.txt =================================================================== --- branches/release-0.93/tests/sites/local-coasters/title.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/local-coasters/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Local coasters Copied: branches/release-0.93.1/tests/sites/local-coasters/title.txt (from rev 5504, branches/release-0.93/tests/sites/local-coasters/title.txt) =================================================================== --- branches/release-0.93.1/tests/sites/local-coasters/title.txt (rev 0) +++ branches/release-0.93.1/tests/sites/local-coasters/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Local coasters Deleted: branches/release-0.93.1/tests/sites/mcs/001-catsn.check.sh =================================================================== --- branches/release-0.93/tests/sites/mcs/001-catsn.check.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/001-catsn.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,12 +0,0 @@ -#!/bin/bash - -set -x - -for count in `seq --format "%04.f" 1 1 10` -do - [ -f catsn.$count.out ] || exit 1 - CONTENTS1=$( cat catsn.$count.out.expected ) - CONTENTS2=$( cat catsn.$count.out ) - [[ $CONTENTS1 == $CONTENTS2 ]] || exit 1 -done -exit 0 Copied: branches/release-0.93.1/tests/sites/mcs/001-catsn.check.sh (from rev 5504, branches/release-0.93/tests/sites/mcs/001-catsn.check.sh) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/001-catsn.check.sh (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/001-catsn.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,12 @@ +#!/bin/bash + +set -x + +for count in `seq --format "%04.f" 1 1 10` +do + [ -f catsn.$count.out ] || exit 1 + CONTENTS1=$( cat catsn.$count.out.expected ) + CONTENTS2=$( cat catsn.$count.out ) + [[ $CONTENTS1 == $CONTENTS2 ]] || exit 1 +done +exit 0 Deleted: branches/release-0.93.1/tests/sites/mcs/001-catsn.clean.sh =================================================================== --- branches/release-0.93/tests/sites/mcs/001-catsn.clean.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/001-catsn.clean.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,3 +0,0 @@ -#!/bin/bash - -stop-coaster-service Copied: branches/release-0.93.1/tests/sites/mcs/001-catsn.clean.sh (from rev 5504, branches/release-0.93/tests/sites/mcs/001-catsn.clean.sh) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/001-catsn.clean.sh (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/001-catsn.clean.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,3 @@ +#!/bin/bash + +stop-coaster-service Deleted: branches/release-0.93.1/tests/sites/mcs/001-catsn.setup.sh =================================================================== --- branches/release-0.93/tests/sites/mcs/001-catsn.setup.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/001-catsn.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -#!/bin/bash - -mkdir -p ~/work -cp -v $GROUP/data.txt . || exit 1 -cp -v $GROUP/*expected . || exit 1 -export WORK=$HOME/work -start-coaster-service || exit 1 Copied: branches/release-0.93.1/tests/sites/mcs/001-catsn.setup.sh (from rev 5504, branches/release-0.93/tests/sites/mcs/001-catsn.setup.sh) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/001-catsn.setup.sh (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/001-catsn.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +#!/bin/bash + +mkdir -p ~/work +cp -v $GROUP/data.txt . || exit 1 +cp -v $GROUP/*expected . || exit 1 +export WORK=$HOME/work +start-coaster-service || exit 1 Deleted: branches/release-0.93.1/tests/sites/mcs/001-catsn.swift =================================================================== --- branches/release-0.93/tests/sites/mcs/001-catsn.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/001-catsn.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,12 +0,0 @@ -type file; - -app (file o) cat (file i) -{ - cat @i stdout=@o; -} - -file out[]; -foreach j in [1:@toint(@arg("n","10"))] { - file data<"data.txt">; - out[j] = cat(data); -} Copied: branches/release-0.93.1/tests/sites/mcs/001-catsn.swift (from rev 5504, branches/release-0.93/tests/sites/mcs/001-catsn.swift) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/001-catsn.swift (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/001-catsn.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,12 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +file out[]; +foreach j in [1:@toint(@arg("n","10"))] { + file data<"data.txt">; + out[j] = cat(data); +} Deleted: branches/release-0.93.1/tests/sites/mcs/001-catsn.timeout =================================================================== --- branches/release-0.93/tests/sites/mcs/001-catsn.timeout 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/001-catsn.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -180 Copied: branches/release-0.93.1/tests/sites/mcs/001-catsn.timeout (from rev 5504, branches/release-0.93/tests/sites/mcs/001-catsn.timeout) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/001-catsn.timeout (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/001-catsn.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +180 Deleted: branches/release-0.93.1/tests/sites/mcs/README =================================================================== --- branches/release-0.93/tests/sites/mcs/README 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/README 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,58 +0,0 @@ -Before running this test, be sure to copy coaster-service.conf to your swift etc directory - -There are no templates in this directory. start-coaster-service generates sites.xml from the persistent-coasters template - -Be sure that you have all the hosts properly configured in ~/.ssh/auth.defaults. You can use the example below as a template. - -crush.mcs.anl.gov.type=key -crush.mcs.anl.gov.username=davidk -crush.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa -crush.mcs.anl.gov.passphrase=your passphrase here - -thwomp.mcs.anl.gov.type=key -thwomp.mcs.anl.gov.username=davidk -thwomp.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa -thwomp.mcs.anl.gov.passphrase=your passphrase here - -stomp.mcs.anl.gov.type=key -stomp.mcs.anl.gov.username=davidk -stomp.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa -stomp.mcs.anl.gov.passphrase=your passphrase here - -crank.mcs.anl.gov.type=key -crank.mcs.anl.gov.username=davidk -crank.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa -crank.mcs.anl.gov.passphrase=your passphrase here - -steamroller.mcs.anl.gov.type=key -steamroller.mcs.anl.gov.username=davidk -steamroller.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa -steamroller.mcs.anl.gov.passphrase=your passphrase here - -grind.mcs.anl.gov.type=key -grind.mcs.anl.gov.username=davidk -grind.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa -grind.mcs.anl.gov.passphrase=your passphrase here - -churn.mcs.anl.gov.type=key -churn.mcs.anl.gov.username=davidk -churn.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa -churn.mcs.anl.gov.passphrase=your passphrase here - -trounce.mcs.anl.gov.type=key -trounce.mcs.anl.gov.username=davidk -trounce.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa -trounce.mcs.anl.gov.passphrase=your passphrase here - -thrash.mcs.anl.gov.type=key -thrash.mcs.anl.gov.username=davidk -thrash.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa -thrash.mcs.anl.gov.passphrase=your passphrase here - -vanquish.mcs.anl.gov.type=key -vanquish.mcs.anl.gov.username=davidk -vanquish.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa -vanquish.mcs.anl.gov.passphrase=your passphrase here - - - Copied: branches/release-0.93.1/tests/sites/mcs/README (from rev 5504, branches/release-0.93/tests/sites/mcs/README) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/README (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/README 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,58 @@ +Before running this test, be sure to copy coaster-service.conf to your swift etc directory + +There are no templates in this directory. start-coaster-service generates sites.xml from the persistent-coasters template + +Be sure that you have all the hosts properly configured in ~/.ssh/auth.defaults. You can use the example below as a template. + +crush.mcs.anl.gov.type=key +crush.mcs.anl.gov.username=davidk +crush.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa +crush.mcs.anl.gov.passphrase=your passphrase here + +thwomp.mcs.anl.gov.type=key +thwomp.mcs.anl.gov.username=davidk +thwomp.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa +thwomp.mcs.anl.gov.passphrase=your passphrase here + +stomp.mcs.anl.gov.type=key +stomp.mcs.anl.gov.username=davidk +stomp.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa +stomp.mcs.anl.gov.passphrase=your passphrase here + +crank.mcs.anl.gov.type=key +crank.mcs.anl.gov.username=davidk +crank.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa +crank.mcs.anl.gov.passphrase=your passphrase here + +steamroller.mcs.anl.gov.type=key +steamroller.mcs.anl.gov.username=davidk +steamroller.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa +steamroller.mcs.anl.gov.passphrase=your passphrase here + +grind.mcs.anl.gov.type=key +grind.mcs.anl.gov.username=davidk +grind.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa +grind.mcs.anl.gov.passphrase=your passphrase here + +churn.mcs.anl.gov.type=key +churn.mcs.anl.gov.username=davidk +churn.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa +churn.mcs.anl.gov.passphrase=your passphrase here + +trounce.mcs.anl.gov.type=key +trounce.mcs.anl.gov.username=davidk +trounce.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa +trounce.mcs.anl.gov.passphrase=your passphrase here + +thrash.mcs.anl.gov.type=key +thrash.mcs.anl.gov.username=davidk +thrash.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa +thrash.mcs.anl.gov.passphrase=your passphrase here + +vanquish.mcs.anl.gov.type=key +vanquish.mcs.anl.gov.username=davidk +vanquish.mcs.anl.gov.key=/home/davidk/.ssh/id_rsa +vanquish.mcs.anl.gov.passphrase=your passphrase here + + + Deleted: branches/release-0.93.1/tests/sites/mcs/catsn.0001.out.expected =================================================================== --- branches/release-0.93/tests/sites/mcs/catsn.0001.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/mcs/catsn.0001.out.expected (from rev 5504, branches/release-0.93/tests/sites/mcs/catsn.0001.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/catsn.0001.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/mcs/catsn.0002.out.expected =================================================================== --- branches/release-0.93/tests/sites/mcs/catsn.0002.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/mcs/catsn.0002.out.expected (from rev 5504, branches/release-0.93/tests/sites/mcs/catsn.0002.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/catsn.0002.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/mcs/catsn.0003.out.expected =================================================================== --- branches/release-0.93/tests/sites/mcs/catsn.0003.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/mcs/catsn.0003.out.expected (from rev 5504, branches/release-0.93/tests/sites/mcs/catsn.0003.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/catsn.0003.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/mcs/catsn.0004.out.expected =================================================================== --- branches/release-0.93/tests/sites/mcs/catsn.0004.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/mcs/catsn.0004.out.expected (from rev 5504, branches/release-0.93/tests/sites/mcs/catsn.0004.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/catsn.0004.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/mcs/catsn.0005.out.expected =================================================================== --- branches/release-0.93/tests/sites/mcs/catsn.0005.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/mcs/catsn.0005.out.expected (from rev 5504, branches/release-0.93/tests/sites/mcs/catsn.0005.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/catsn.0005.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/mcs/catsn.0006.out.expected =================================================================== --- branches/release-0.93/tests/sites/mcs/catsn.0006.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/mcs/catsn.0006.out.expected (from rev 5504, branches/release-0.93/tests/sites/mcs/catsn.0006.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/catsn.0006.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/mcs/catsn.0007.out.expected =================================================================== --- branches/release-0.93/tests/sites/mcs/catsn.0007.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/mcs/catsn.0007.out.expected (from rev 5504, branches/release-0.93/tests/sites/mcs/catsn.0007.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/catsn.0007.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/mcs/catsn.0008.out.expected =================================================================== --- branches/release-0.93/tests/sites/mcs/catsn.0008.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/mcs/catsn.0008.out.expected (from rev 5504, branches/release-0.93/tests/sites/mcs/catsn.0008.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/catsn.0008.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/mcs/catsn.0009.out.expected =================================================================== --- branches/release-0.93/tests/sites/mcs/catsn.0009.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/mcs/catsn.0009.out.expected (from rev 5504, branches/release-0.93/tests/sites/mcs/catsn.0009.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/catsn.0009.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/mcs/catsn.0010.out.expected =================================================================== --- branches/release-0.93/tests/sites/mcs/catsn.0010.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/mcs/catsn.0010.out.expected (from rev 5504, branches/release-0.93/tests/sites/mcs/catsn.0010.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/catsn.0010.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/mcs/coaster-service.conf =================================================================== --- branches/release-0.93/tests/sites/mcs/coaster-service.conf 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/coaster-service.conf 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,30 +0,0 @@ -# Keep all interesting settings in one place -# User should modify this to fit environment - -# Location of SWIFT. If empty, PATH is referenced -export SWIFT= - -# Where to place/launch worker.pl on the remote machine for sites.xml -export WORKER_WORK=/home/${USER}/work - -# How to launch workers: local, ssh, or cobalt -export WORKER_MODE=ssh - -# Worker logging setting passed to worker.pl for sites.xml -export WORKER_LOGGING=INFO - -# Worker host names for ssh -export WORKER_HOSTS="crush.mcs.anl.gov thwomp.mcs.anl.gov stomp.mcs.anl.gov crank.mcs.anl.gov -steamroller.mcs.anl.gov grind.mcs.anl.gov churn.mcs.anl.gov trounce.mcs.anl.gov -thrash.mcs.anl.gov vanquish.mcs.anl.gov" - -# Directory to keep log files, relative to working directory when launching start-coaster-service -export LOG_DIR=logs - -# Manually define ports. If not specified, ports will be automatically generated -export LOCAL_PORT= -export SERVICE_PORT= - -# start-coaster-service tries to automatically detect IP address. -# Specify here if auto detection is not working correctly -export IPADDR= Copied: branches/release-0.93.1/tests/sites/mcs/coaster-service.conf (from rev 5504, branches/release-0.93/tests/sites/mcs/coaster-service.conf) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/coaster-service.conf (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/coaster-service.conf 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,30 @@ +# Keep all interesting settings in one place +# User should modify this to fit environment + +# Location of SWIFT. If empty, PATH is referenced +export SWIFT= + +# Where to place/launch worker.pl on the remote machine for sites.xml +export WORKER_WORK=/home/${USER}/work + +# How to launch workers: local, ssh, or cobalt +export WORKER_MODE=ssh + +# Worker logging setting passed to worker.pl for sites.xml +export WORKER_LOGGING=INFO + +# Worker host names for ssh +export WORKER_HOSTS="crush.mcs.anl.gov thwomp.mcs.anl.gov stomp.mcs.anl.gov crank.mcs.anl.gov +steamroller.mcs.anl.gov grind.mcs.anl.gov churn.mcs.anl.gov trounce.mcs.anl.gov +thrash.mcs.anl.gov vanquish.mcs.anl.gov" + +# Directory to keep log files, relative to working directory when launching start-coaster-service +export LOG_DIR=logs + +# Manually define ports. If not specified, ports will be automatically generated +export LOCAL_PORT= +export SERVICE_PORT= + +# start-coaster-service tries to automatically detect IP address. +# Specify here if auto detection is not working correctly +export IPADDR= Deleted: branches/release-0.93.1/tests/sites/mcs/data.txt =================================================================== --- branches/release-0.93/tests/sites/mcs/data.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/mcs/data.txt (from rev 5504, branches/release-0.93/tests/sites/mcs/data.txt) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/data.txt (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/mcs/title.txt =================================================================== --- branches/release-0.93/tests/sites/mcs/title.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/mcs/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -MCS Machines with Persistent Coasters and SSH Copied: branches/release-0.93.1/tests/sites/mcs/title.txt (from rev 5504, branches/release-0.93/tests/sites/mcs/title.txt) =================================================================== --- branches/release-0.93.1/tests/sites/mcs/title.txt (rev 0) +++ branches/release-0.93.1/tests/sites/mcs/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +MCS Machines with Persistent Coasters and SSH Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.check.sh =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.check.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,4 +0,0 @@ -#!/bin/bash - -cp -v $GROUP/data.txt . || exit 1 -cp -v $GROUP/*expected . || exit 1 Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.check.sh (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.check.sh) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.check.sh (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,4 @@ +#!/bin/bash + +cp -v $GROUP/data.txt . || exit 1 +cp -v $GROUP/*expected . || exit 1 Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.swift =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,15 +0,0 @@ -type file; - -app (file o) cat (file i) -{ - cat @i stdout=@o; -} - -string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -string char[] = @strsplit(t, ""); - -file out[]; -foreach j in [1:@toint(@arg("n","10"))] { - file data<"data.txt">; - out[j] = cat(data); -} Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.swift (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.swift) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.swift (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,15 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; +string char[] = @strsplit(t, ""); + +file out[]; +foreach j in [1:@toint(@arg("n","10"))] { + file data<"data.txt">; + out[j] = cat(data); +} Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.timeout =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.timeout 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -180 Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.timeout (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.timeout) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.timeout (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/001-catsn-queenbee-pbs.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +180 Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/README =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/README 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/README 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,2 +0,0 @@ -Queenbee uses an older version of bash which does not work with the nightly.sh by default -In order to run these tests, download and compile a newer version of bash from ftp.gnu.org/pub/bash Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/README (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/README) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/README (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/README 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,2 @@ +Queenbee uses an older version of bash which does not work with the nightly.sh by default +In order to run these tests, download and compile a newer version of bash from ftp.gnu.org/pub/bash Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0001.out.expected =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/catsn.0001.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0001.out.expected (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/catsn.0001.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0001.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0002.out.expected =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/catsn.0002.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0002.out.expected (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/catsn.0002.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0002.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0003.out.expected =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/catsn.0003.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0003.out.expected (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/catsn.0003.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0003.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0004.out.expected =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/catsn.0004.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0004.out.expected (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/catsn.0004.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0004.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0005.out.expected =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/catsn.0005.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0005.out.expected (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/catsn.0005.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0005.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0006.out.expected =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/catsn.0006.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0006.out.expected (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/catsn.0006.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0006.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0007.out.expected =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/catsn.0007.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0007.out.expected (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/catsn.0007.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0007.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0008.out.expected =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/catsn.0008.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0008.out.expected (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/catsn.0008.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0008.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0009.out.expected =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/catsn.0009.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0009.out.expected (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/catsn.0009.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0009.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0010.out.expected =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/catsn.0010.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0010.out.expected (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/catsn.0010.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0010.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/data.txt =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/data.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/data.txt (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/data.txt) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/data.txt (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/sites.template.xml =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/sites.template.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,8 +0,0 @@ - - - - - 0 - _WORK_ - - Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/sites.template.xml (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/sites.template.xml) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/sites.template.xml (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,8 @@ + + + + + 0 + _WORK_ + + Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/tc.template.data =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/tc.template.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -queenbee-pbs echo /bin/echo INSTALLED INTEL32::LINUX -queenbee-pbs cat /bin/cat INSTALLED INTEL32::LINUX -queenbee-pbs ls /bin/ls INSTALLED INTEL32::LINUX -queenbee-pbs grep /bin/grep INSTALLED INTEL32::LINUX -queenbee-pbs sort /bin/sort INSTALLED INTEL32::LINUX -queenbee-pbs paste /bin/paste INSTALLED INTEL32::LINUX -queenbee-pbs wc /usr/bin/wc INSTALLED INTEL32::LINUX Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/tc.template.data (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/tc.template.data) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/tc.template.data (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +queenbee-pbs echo /bin/echo INSTALLED INTEL32::LINUX +queenbee-pbs cat /bin/cat INSTALLED INTEL32::LINUX +queenbee-pbs ls /bin/ls INSTALLED INTEL32::LINUX +queenbee-pbs grep /bin/grep INSTALLED INTEL32::LINUX +queenbee-pbs sort /bin/sort INSTALLED INTEL32::LINUX +queenbee-pbs paste /bin/paste INSTALLED INTEL32::LINUX +queenbee-pbs wc /usr/bin/wc INSTALLED INTEL32::LINUX Deleted: branches/release-0.93.1/tests/sites/queenbee/pbs/title.txt =================================================================== --- branches/release-0.93/tests/sites/queenbee/pbs/title.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -QueenBee PBS Configuration Test Copied: branches/release-0.93.1/tests/sites/queenbee/pbs/title.txt (from rev 5504, branches/release-0.93/tests/sites/queenbee/pbs/title.txt) =================================================================== --- branches/release-0.93.1/tests/sites/queenbee/pbs/title.txt (rev 0) +++ branches/release-0.93.1/tests/sites/queenbee/pbs/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +QueenBee PBS Configuration Test Deleted: branches/release-0.93.1/tests/sites/ranger/gt2/001-catsn-ranger.swift =================================================================== --- branches/release-0.93/tests/sites/ranger/gt2/001-catsn-ranger.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/gt2/001-catsn-ranger.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,15 +0,0 @@ -type file; - -app (file o) cat (file i) -{ - cat @i stdout=@o; -} - -string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -string char[] = @strsplit(t, ""); - -file out[]; -foreach j in [1:@toint(@arg("n","10"))] { - file data<"data.txt">; - out[j] = cat(data); -} Copied: branches/release-0.93.1/tests/sites/ranger/gt2/001-catsn-ranger.swift (from rev 5504, branches/release-0.93/tests/sites/ranger/gt2/001-catsn-ranger.swift) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/gt2/001-catsn-ranger.swift (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/gt2/001-catsn-ranger.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,15 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; +string char[] = @strsplit(t, ""); + +file out[]; +foreach j in [1:@toint(@arg("n","10"))] { + file data<"data.txt">; + out[j] = cat(data); +} Deleted: branches/release-0.93.1/tests/sites/ranger/gt2/cf =================================================================== --- branches/release-0.93/tests/sites/ranger/gt2/cf 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/gt2/cf 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -wrapperlog.always.transfer=true -sitedir.keep=true -execution.retries=0 -lazy.errors=false -status.mode=provider -use.provider.staging=true -provider.staging.pin.swiftfiles=false Copied: branches/release-0.93.1/tests/sites/ranger/gt2/cf (from rev 5504, branches/release-0.93/tests/sites/ranger/gt2/cf) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/gt2/cf (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/gt2/cf 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +wrapperlog.always.transfer=true +sitedir.keep=true +execution.retries=0 +lazy.errors=false +status.mode=provider +use.provider.staging=true +provider.staging.pin.swiftfiles=false Deleted: branches/release-0.93.1/tests/sites/ranger/gt2/data.txt =================================================================== --- branches/release-0.93/tests/sites/ranger/gt2/data.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/gt2/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -ranger testing yeehaw Copied: branches/release-0.93.1/tests/sites/ranger/gt2/data.txt (from rev 5504, branches/release-0.93/tests/sites/ranger/gt2/data.txt) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/gt2/data.txt (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/gt2/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +ranger testing yeehaw Deleted: branches/release-0.93.1/tests/sites/ranger/gt2/sites.template.xml =================================================================== --- branches/release-0.93/tests/sites/ranger/gt2/sites.template.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/gt2/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,16 +0,0 @@ - - - - - 3600 - 00:00:03 - 1 - 16 - 16 - development - 0.9 - TG-DBS080004N - 16way - _WORK_ - - Copied: branches/release-0.93.1/tests/sites/ranger/gt2/sites.template.xml (from rev 5504, branches/release-0.93/tests/sites/ranger/gt2/sites.template.xml) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/gt2/sites.template.xml (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/gt2/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,16 @@ + + + + + 3600 + 00:00:03 + 1 + 16 + 16 + development + 0.9 + TG-DBS080004N + 16way + _WORK_ + + Deleted: branches/release-0.93.1/tests/sites/ranger/gt2/start_proxy.sh =================================================================== --- branches/release-0.93/tests/sites/ranger/gt2/start_proxy.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/gt2/start_proxy.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -myproxy-logon -l dkelly -s myproxy.teragrid.org Copied: branches/release-0.93.1/tests/sites/ranger/gt2/start_proxy.sh (from rev 5504, branches/release-0.93/tests/sites/ranger/gt2/start_proxy.sh) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/gt2/start_proxy.sh (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/gt2/start_proxy.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +myproxy-logon -l dkelly -s myproxy.teragrid.org Deleted: branches/release-0.93.1/tests/sites/ranger/gt2/tc.template.data =================================================================== --- branches/release-0.93/tests/sites/ranger/gt2/tc.template.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/gt2/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -ranger cat /bin/cat Copied: branches/release-0.93.1/tests/sites/ranger/gt2/tc.template.data (from rev 5504, branches/release-0.93/tests/sites/ranger/gt2/tc.template.data) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/gt2/tc.template.data (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/gt2/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +ranger cat /bin/cat Deleted: branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.check.sh =================================================================== --- branches/release-0.93/tests/sites/ranger/local/001-catsn-ranger.check.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,12 +0,0 @@ -#!/bin/bash - -set -x - -for count in `seq --format "%04.f" 1 1 10` -do - [ -f catsn.$count.out ] || exit 1 - CONTENTS1=$( cat catsn.$count.out.expected ) - CONTENTS2=$( cat catsn.$count.out ) - [[ $CONTENTS1 == $CONTENTS2 ]] || exit 1 -done -exit 0 Copied: branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.check.sh (from rev 5504, branches/release-0.93/tests/sites/ranger/local/001-catsn-ranger.check.sh) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.check.sh (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,12 @@ +#!/bin/bash + +set -x + +for count in `seq --format "%04.f" 1 1 10` +do + [ -f catsn.$count.out ] || exit 1 + CONTENTS1=$( cat catsn.$count.out.expected ) + CONTENTS2=$( cat catsn.$count.out ) + [[ $CONTENTS1 == $CONTENTS2 ]] || exit 1 +done +exit 0 Deleted: branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.setup.sh =================================================================== --- branches/release-0.93/tests/sites/ranger/local/001-catsn-ranger.setup.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -#!/bin/bash - -cp -v $GROUP/data.txt . || exit 1 -cp -v $GROUP/*expected . || exit 1 - -export QUEUE=normal - Copied: branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.setup.sh (from rev 5504, branches/release-0.93/tests/sites/ranger/local/001-catsn-ranger.setup.sh) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.setup.sh (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +#!/bin/bash + +cp -v $GROUP/data.txt . || exit 1 +cp -v $GROUP/*expected . || exit 1 + +export QUEUE=normal + Deleted: branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.swift =================================================================== --- branches/release-0.93/tests/sites/ranger/local/001-catsn-ranger.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,15 +0,0 @@ -type file; - -app (file o) cat (file i) -{ - cat @i stdout=@o; -} - -string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -string char[] = @strsplit(t, ""); - -file out[]; -foreach j in [1:@toint(@arg("n","10"))] { - file data<"data.txt">; - out[j] = cat(data); -} Copied: branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.swift (from rev 5504, branches/release-0.93/tests/sites/ranger/local/001-catsn-ranger.swift) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.swift (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,15 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; +string char[] = @strsplit(t, ""); + +file out[]; +foreach j in [1:@toint(@arg("n","10"))] { + file data<"data.txt">; + out[j] = cat(data); +} Deleted: branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.timeout =================================================================== --- branches/release-0.93/tests/sites/ranger/local/001-catsn-ranger.timeout 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,2 +0,0 @@ -7200 - Copied: branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.timeout (from rev 5504, branches/release-0.93/tests/sites/ranger/local/001-catsn-ranger.timeout) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.timeout (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/001-catsn-ranger.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,2 @@ +7200 + Deleted: branches/release-0.93.1/tests/sites/ranger/local/catsn.0001.out.expected =================================================================== --- branches/release-0.93/tests/sites/ranger/local/catsn.0001.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/ranger/local/catsn.0001.out.expected (from rev 5504, branches/release-0.93/tests/sites/ranger/local/catsn.0001.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/catsn.0001.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/ranger/local/catsn.0002.out.expected =================================================================== --- branches/release-0.93/tests/sites/ranger/local/catsn.0002.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/ranger/local/catsn.0002.out.expected (from rev 5504, branches/release-0.93/tests/sites/ranger/local/catsn.0002.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/catsn.0002.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/ranger/local/catsn.0003.out.expected =================================================================== --- branches/release-0.93/tests/sites/ranger/local/catsn.0003.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/ranger/local/catsn.0003.out.expected (from rev 5504, branches/release-0.93/tests/sites/ranger/local/catsn.0003.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/catsn.0003.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/ranger/local/catsn.0004.out.expected =================================================================== --- branches/release-0.93/tests/sites/ranger/local/catsn.0004.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/ranger/local/catsn.0004.out.expected (from rev 5504, branches/release-0.93/tests/sites/ranger/local/catsn.0004.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/catsn.0004.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/ranger/local/catsn.0005.out.expected =================================================================== --- branches/release-0.93/tests/sites/ranger/local/catsn.0005.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/ranger/local/catsn.0005.out.expected (from rev 5504, branches/release-0.93/tests/sites/ranger/local/catsn.0005.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/catsn.0005.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/ranger/local/catsn.0006.out.expected =================================================================== --- branches/release-0.93/tests/sites/ranger/local/catsn.0006.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/ranger/local/catsn.0006.out.expected (from rev 5504, branches/release-0.93/tests/sites/ranger/local/catsn.0006.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/catsn.0006.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/ranger/local/catsn.0007.out.expected =================================================================== --- branches/release-0.93/tests/sites/ranger/local/catsn.0007.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/ranger/local/catsn.0007.out.expected (from rev 5504, branches/release-0.93/tests/sites/ranger/local/catsn.0007.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/catsn.0007.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/ranger/local/catsn.0008.out.expected =================================================================== --- branches/release-0.93/tests/sites/ranger/local/catsn.0008.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/ranger/local/catsn.0008.out.expected (from rev 5504, branches/release-0.93/tests/sites/ranger/local/catsn.0008.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/catsn.0008.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/ranger/local/catsn.0009.out.expected =================================================================== --- branches/release-0.93/tests/sites/ranger/local/catsn.0009.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/ranger/local/catsn.0009.out.expected (from rev 5504, branches/release-0.93/tests/sites/ranger/local/catsn.0009.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/catsn.0009.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/ranger/local/catsn.0010.out.expected =================================================================== --- branches/release-0.93/tests/sites/ranger/local/catsn.0010.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/ranger/local/catsn.0010.out.expected (from rev 5504, branches/release-0.93/tests/sites/ranger/local/catsn.0010.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/catsn.0010.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/ranger/local/data.txt =================================================================== --- branches/release-0.93/tests/sites/ranger/local/data.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/ranger/local/data.txt (from rev 5504, branches/release-0.93/tests/sites/ranger/local/data.txt) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/data.txt (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/ranger/local/sites.template.xml =================================================================== --- branches/release-0.93/tests/sites/ranger/local/sites.template.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,17 +0,0 @@ - - - - - 2 - 300 - 1 - 1 - 16 - 16 - development - 5.99 - 10000 - TG-DBS080004N - _WORK_ - - Copied: branches/release-0.93.1/tests/sites/ranger/local/sites.template.xml (from rev 5504, branches/release-0.93/tests/sites/ranger/local/sites.template.xml) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/sites.template.xml (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,17 @@ + + + + + 2 + 300 + 1 + 1 + 16 + 16 + development + 5.99 + 10000 + TG-DBS080004N + _WORK_ + + Deleted: branches/release-0.93.1/tests/sites/ranger/local/sleep.swift =================================================================== --- branches/release-0.93/tests/sites/ranger/local/sleep.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/sleep.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -// *_THIS-SCRIPT-SHOULD-FAIL_* -app sleep (int i) -{ - sleep i; -} - -sleep(@toint(@arg("n","300"))); Copied: branches/release-0.93.1/tests/sites/ranger/local/sleep.swift (from rev 5504, branches/release-0.93/tests/sites/ranger/local/sleep.swift) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/sleep.swift (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/sleep.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +// *_THIS-SCRIPT-SHOULD-FAIL_* +app sleep (int i) +{ + sleep i; +} + +sleep(@toint(@arg("n","300"))); Deleted: branches/release-0.93.1/tests/sites/ranger/local/tc.template.data =================================================================== --- branches/release-0.93/tests/sites/ranger/local/tc.template.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,8 +0,0 @@ -ranger echo /bin/echo INSTALLED INTEL32::LINUX null -ranger cat /bin/cat INSTALLED INTEL32::LINUX null -ranger ls /bin/ls INSTALLED INTEL32::LINUX null -ranger grep /bin/grep INSTALLED INTEL32::LINUX null -ranger sort /bin/sort INSTALLED INTEL32::LINUX null -ranger paste /bin/paste INSTALLED INTEL32::LINUX null -ranger wc /usr/bin/wc INSTALLED INTEL32::LINUX null -ranger sleep /bin/sleep null null null Copied: branches/release-0.93.1/tests/sites/ranger/local/tc.template.data (from rev 5504, branches/release-0.93/tests/sites/ranger/local/tc.template.data) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/tc.template.data (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,8 @@ +ranger echo /bin/echo INSTALLED INTEL32::LINUX null +ranger cat /bin/cat INSTALLED INTEL32::LINUX null +ranger ls /bin/ls INSTALLED INTEL32::LINUX null +ranger grep /bin/grep INSTALLED INTEL32::LINUX null +ranger sort /bin/sort INSTALLED INTEL32::LINUX null +ranger paste /bin/paste INSTALLED INTEL32::LINUX null +ranger wc /usr/bin/wc INSTALLED INTEL32::LINUX null +ranger sleep /bin/sleep null null null Deleted: branches/release-0.93.1/tests/sites/ranger/local/title.txt =================================================================== --- branches/release-0.93/tests/sites/ranger/local/title.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/ranger/local/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Ranger local SGE Copied: branches/release-0.93.1/tests/sites/ranger/local/title.txt (from rev 5504, branches/release-0.93/tests/sites/ranger/local/title.txt) =================================================================== --- branches/release-0.93.1/tests/sites/ranger/local/title.txt (rev 0) +++ branches/release-0.93.1/tests/sites/ranger/local/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Ranger local SGE Deleted: branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.check.sh =================================================================== --- branches/release-0.93/tests/sites/surveyor/001-catsn-surveyor.check.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,12 +0,0 @@ -#!/bin/bash - -set -x - -for count in `seq --format "%04.f" 1 1 10` -do - [ -f catsn.$count.out ] || exit 1 - CONTENTS1=$( cat catsn.$count.out.expected ) - CONTENTS2=$( cat catsn.$count.out ) - [[ $CONTENTS1 == $CONTENTS2 ]] || exit 1 -done -exit 0 Copied: branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.check.sh (from rev 5504, branches/release-0.93/tests/sites/surveyor/001-catsn-surveyor.check.sh) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.check.sh (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.check.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,12 @@ +#!/bin/bash + +set -x + +for count in `seq --format "%04.f" 1 1 10` +do + [ -f catsn.$count.out ] || exit 1 + CONTENTS1=$( cat catsn.$count.out.expected ) + CONTENTS2=$( cat catsn.$count.out ) + [[ $CONTENTS1 == $CONTENTS2 ]] || exit 1 +done +exit 0 Deleted: branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.setup.sh =================================================================== --- branches/release-0.93/tests/sites/surveyor/001-catsn-surveyor.setup.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,4 +0,0 @@ -#!/bin/bash - -cp -v $GROUP/data.txt . || exit 1 -cp -v $GROUP/*expected . || exit 1 Copied: branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.setup.sh (from rev 5504, branches/release-0.93/tests/sites/surveyor/001-catsn-surveyor.setup.sh) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.setup.sh (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.setup.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,4 @@ +#!/bin/bash + +cp -v $GROUP/data.txt . || exit 1 +cp -v $GROUP/*expected . || exit 1 Deleted: branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.swift =================================================================== --- branches/release-0.93/tests/sites/surveyor/001-catsn-surveyor.swift 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,15 +0,0 @@ -type file; - -app (file o) cat (file i) -{ - cat @i stdout=@o; -} - -string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -string char[] = @strsplit(t, ""); - -file out[]; -foreach j in [1:@toint(@arg("n","10"))] { - file data<"data.txt">; - out[j] = cat(data); -} Copied: branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.swift (from rev 5504, branches/release-0.93/tests/sites/surveyor/001-catsn-surveyor.swift) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.swift (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.swift 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,15 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +string t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; +string char[] = @strsplit(t, ""); + +file out[]; +foreach j in [1:@toint(@arg("n","10"))] { + file data<"data.txt">; + out[j] = cat(data); +} Deleted: branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.timeout =================================================================== --- branches/release-0.93/tests/sites/surveyor/001-catsn-surveyor.timeout 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -1000 Copied: branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.timeout (from rev 5504, branches/release-0.93/tests/sites/surveyor/001-catsn-surveyor.timeout) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.timeout (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/001-catsn-surveyor.timeout 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +1000 Deleted: branches/release-0.93.1/tests/sites/surveyor/README =================================================================== --- branches/release-0.93/tests/sites/surveyor/README 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/README 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,3 +0,0 @@ -Be sure to set PROJECT and QUEUE. These settings worked for me, but unsure if they are universal -export PROJECT=HTCScienceApps -export QUEUE=default Copied: branches/release-0.93.1/tests/sites/surveyor/README (from rev 5504, branches/release-0.93/tests/sites/surveyor/README) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/README (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/README 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,3 @@ +Be sure to set PROJECT and QUEUE. These settings worked for me, but unsure if they are universal +export PROJECT=HTCScienceApps +export QUEUE=default Deleted: branches/release-0.93.1/tests/sites/surveyor/catsn.0001.out.expected =================================================================== --- branches/release-0.93/tests/sites/surveyor/catsn.0001.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/surveyor/catsn.0001.out.expected (from rev 5504, branches/release-0.93/tests/sites/surveyor/catsn.0001.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/catsn.0001.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0001.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/surveyor/catsn.0002.out.expected =================================================================== --- branches/release-0.93/tests/sites/surveyor/catsn.0002.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/surveyor/catsn.0002.out.expected (from rev 5504, branches/release-0.93/tests/sites/surveyor/catsn.0002.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/catsn.0002.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0002.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/surveyor/catsn.0003.out.expected =================================================================== --- branches/release-0.93/tests/sites/surveyor/catsn.0003.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/surveyor/catsn.0003.out.expected (from rev 5504, branches/release-0.93/tests/sites/surveyor/catsn.0003.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/catsn.0003.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0003.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/surveyor/catsn.0004.out.expected =================================================================== --- branches/release-0.93/tests/sites/surveyor/catsn.0004.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/surveyor/catsn.0004.out.expected (from rev 5504, branches/release-0.93/tests/sites/surveyor/catsn.0004.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/catsn.0004.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0004.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/surveyor/catsn.0005.out.expected =================================================================== --- branches/release-0.93/tests/sites/surveyor/catsn.0005.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/surveyor/catsn.0005.out.expected (from rev 5504, branches/release-0.93/tests/sites/surveyor/catsn.0005.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/catsn.0005.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0005.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/surveyor/catsn.0006.out.expected =================================================================== --- branches/release-0.93/tests/sites/surveyor/catsn.0006.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/surveyor/catsn.0006.out.expected (from rev 5504, branches/release-0.93/tests/sites/surveyor/catsn.0006.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/catsn.0006.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0006.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/surveyor/catsn.0007.out.expected =================================================================== --- branches/release-0.93/tests/sites/surveyor/catsn.0007.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/surveyor/catsn.0007.out.expected (from rev 5504, branches/release-0.93/tests/sites/surveyor/catsn.0007.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/catsn.0007.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0007.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/surveyor/catsn.0008.out.expected =================================================================== --- branches/release-0.93/tests/sites/surveyor/catsn.0008.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/surveyor/catsn.0008.out.expected (from rev 5504, branches/release-0.93/tests/sites/surveyor/catsn.0008.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/catsn.0008.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0008.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/surveyor/catsn.0009.out.expected =================================================================== --- branches/release-0.93/tests/sites/surveyor/catsn.0009.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/surveyor/catsn.0009.out.expected (from rev 5504, branches/release-0.93/tests/sites/surveyor/catsn.0009.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/catsn.0009.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0009.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/surveyor/catsn.0010.out.expected =================================================================== --- branches/release-0.93/tests/sites/surveyor/catsn.0010.out.expected 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/surveyor/catsn.0010.out.expected (from rev 5504, branches/release-0.93/tests/sites/surveyor/catsn.0010.out.expected) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/catsn.0010.out.expected (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/catsn.0010.out.expected 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/surveyor/data.txt =================================================================== --- branches/release-0.93/tests/sites/surveyor/data.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Hello world Copied: branches/release-0.93.1/tests/sites/surveyor/data.txt (from rev 5504, branches/release-0.93/tests/sites/surveyor/data.txt) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/data.txt (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/data.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Hello world Deleted: branches/release-0.93.1/tests/sites/surveyor/sites.template.xml =================================================================== --- branches/release-0.93/tests/sites/surveyor/sites.template.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,22 +0,0 @@ - - - - - - _HOST_ - _PROJECT_ - _QUEUE_ - zeptoos - true - 21 - 10000 - 1 - DEBUG - 1 - 900 - 64 - 64 - _WORK_ - - - Copied: branches/release-0.93.1/tests/sites/surveyor/sites.template.xml (from rev 5504, branches/release-0.93/tests/sites/surveyor/sites.template.xml) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/sites.template.xml (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/sites.template.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,22 @@ + + + + + + _HOST_ + _PROJECT_ + _QUEUE_ + zeptoos + true + 21 + 10000 + 1 + DEBUG + 1 + 900 + 64 + 64 + _WORK_ + + + Deleted: branches/release-0.93.1/tests/sites/surveyor/tc.template.data =================================================================== --- branches/release-0.93/tests/sites/surveyor/tc.template.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,7 +0,0 @@ -surveyor echo /bin/echo INSTALLED INTEL32::LINUX -surveyor cat /bin/cat INSTALLED INTEL32::LINUX -surveyor ls /bin/ls INSTALLED INTEL32::LINUX -surveyor grep /bin/grep INSTALLED INTEL32::LINUX -surveyor sort /bin/sort INSTALLED INTEL32::LINUX -surveyor paste /bin/paste INSTALLED INTEL32::LINUX -surveyor wc /usr/bin/wc INSTALLED INTEL32::LINUX Copied: branches/release-0.93.1/tests/sites/surveyor/tc.template.data (from rev 5504, branches/release-0.93/tests/sites/surveyor/tc.template.data) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/tc.template.data (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/tc.template.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,7 @@ +surveyor echo /bin/echo INSTALLED INTEL32::LINUX +surveyor cat /bin/cat INSTALLED INTEL32::LINUX +surveyor ls /bin/ls INSTALLED INTEL32::LINUX +surveyor grep /bin/grep INSTALLED INTEL32::LINUX +surveyor sort /bin/sort INSTALLED INTEL32::LINUX +surveyor paste /bin/paste INSTALLED INTEL32::LINUX +surveyor wc /usr/bin/wc INSTALLED INTEL32::LINUX Deleted: branches/release-0.93.1/tests/sites/surveyor/title.txt =================================================================== --- branches/release-0.93/tests/sites/surveyor/title.txt 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites/surveyor/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -1 +0,0 @@ -Surveyor Site Configuration Test Copied: branches/release-0.93.1/tests/sites/surveyor/title.txt (from rev 5504, branches/release-0.93/tests/sites/surveyor/title.txt) =================================================================== --- branches/release-0.93.1/tests/sites/surveyor/title.txt (rev 0) +++ branches/release-0.93.1/tests/sites/surveyor/title.txt 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1 @@ +Surveyor Site Configuration Test Deleted: branches/release-0.93.1/tests/sites.old/README =================================================================== --- branches/release-0.93/tests/sites.old/README 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/README 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,28 +0,0 @@ -Site tests -========== - -To run all tests in the root, say: - - $ ./run-all - -To run a single site test, say: - - $ ./run-site - -To run a subdirectory of tests, say: - - $ ./run-all subdirectory/ - -The trailing / is important. - -The tests in the root of sites/ should generally work for users associated -with Swift (for example, by being on Swift teragrid allocations or by being -in an OSG VO) - -Tests in wonky/ should run locally against a Swift built with provider-wonky. -These generally should test the reliabilty mechanisms of Swift. - -Tests defined in subdirectories named after hosts (eg tg-login.uc.teragrid.org) -should be run on that host, and should test functionality available on that -host (such as a local PBS or condor installation). - Copied: branches/release-0.93.1/tests/sites.old/README (from rev 5504, branches/release-0.93/tests/sites.old/README) =================================================================== --- branches/release-0.93.1/tests/sites.old/README (rev 0) +++ branches/release-0.93.1/tests/sites.old/README 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,28 @@ +Site tests +========== + +To run all tests in the root, say: + + $ ./run-all + +To run a single site test, say: + + $ ./run-site + +To run a subdirectory of tests, say: + + $ ./run-all subdirectory/ + +The trailing / is important. + +The tests in the root of sites/ should generally work for users associated +with Swift (for example, by being on Swift teragrid allocations or by being +in an OSG VO) + +Tests in wonky/ should run locally against a Swift built with provider-wonky. +These generally should test the reliabilty mechanisms of Swift. + +Tests defined in subdirectories named after hosts (eg tg-login.uc.teragrid.org) +should be run on that host, and should test functionality available on that +host (such as a local PBS or condor installation). + Deleted: branches/release-0.93.1/tests/sites.old/UCLA_Saxon_Tier3-fork.xml =================================================================== --- branches/release-0.93/tests/sites.old/UCLA_Saxon_Tier3-fork.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/UCLA_Saxon_Tier3-fork.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /u/osgdata - - - Copied: branches/release-0.93.1/tests/sites.old/UCLA_Saxon_Tier3-fork.xml (from rev 5504, branches/release-0.93/tests/sites.old/UCLA_Saxon_Tier3-fork.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/UCLA_Saxon_Tier3-fork.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/UCLA_Saxon_Tier3-fork.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /u/osgdata + + + Deleted: branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-b2-condor.xml =================================================================== --- branches/release-0.93/tests/sites.old/broken/osg-ucsdt2-b2-condor.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-b2-condor.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - /osgfs/data/lixi - .542 - 0.05 - - Copied: branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-b2-condor.xml (from rev 5504, branches/release-0.93/tests/sites.old/broken/osg-ucsdt2-b2-condor.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-b2-condor.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-b2-condor.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + /osgfs/data/lixi + .542 + 0.05 + + Deleted: branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-b2-fork.xml =================================================================== --- branches/release-0.93/tests/sites.old/broken/osg-ucsdt2-b2-fork.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-b2-fork.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - /osgfs/data/lixi - .542 - 0.05 - - Copied: branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-b2-fork.xml (from rev 5504, branches/release-0.93/tests/sites.old/broken/osg-ucsdt2-b2-fork.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-b2-fork.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-b2-fork.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + /osgfs/data/lixi + .542 + 0.05 + + Deleted: branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-condor.xml =================================================================== --- branches/release-0.93/tests/sites.old/broken/osg-ucsdt2-condor.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-condor.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,10 +0,0 @@ - - - - - - - /osgfs/data - - - Copied: branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-condor.xml (from rev 5504, branches/release-0.93/tests/sites.old/broken/osg-ucsdt2-condor.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-condor.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-condor.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,10 @@ + + + + + + + /osgfs/data + + + Deleted: branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-fork.xml =================================================================== --- branches/release-0.93/tests/sites.old/broken/osg-ucsdt2-fork.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-fork.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,10 +0,0 @@ - - - - - - - /osgfs/data - - - Copied: branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-fork.xml (from rev 5504, branches/release-0.93/tests/sites.old/broken/osg-ucsdt2-fork.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-fork.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/broken/osg-ucsdt2-fork.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,10 @@ + + + + + + + /osgfs/data + + + Deleted: branches/release-0.93.1/tests/sites.old/broken/tp-pbs-gram4.xml =================================================================== --- branches/release-0.93/tests/sites.old/broken/tp-pbs-gram4.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/broken/tp-pbs-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /home/benc/swifttest - - - Copied: branches/release-0.93.1/tests/sites.old/broken/tp-pbs-gram4.xml (from rev 5504, branches/release-0.93/tests/sites.old/broken/tp-pbs-gram4.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/broken/tp-pbs-gram4.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/broken/tp-pbs-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /home/benc/swifttest + + + Deleted: branches/release-0.93.1/tests/sites.old/coaster/coaster-local.xml =================================================================== --- branches/release-0.93/tests/sites.old/coaster/coaster-local.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/coaster/coaster-local.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,21 +0,0 @@ - - - - - - - - - /var/tmp - 5 - - - Copied: branches/release-0.93.1/tests/sites.old/coaster/coaster-local.xml (from rev 5504, branches/release-0.93/tests/sites.old/coaster/coaster-local.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/coaster/coaster-local.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/coaster/coaster-local.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,21 @@ + + + + + + + + + /var/tmp + 5 + + + Deleted: branches/release-0.93.1/tests/sites.old/coaster/fletch-coaster-gram2-gram2-condor.xml =================================================================== --- branches/release-0.93/tests/sites.old/coaster/fletch-coaster-gram2-gram2-condor.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/coaster/fletch-coaster-gram2-gram2-condor.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /disks/gpfs/swift/site-test - - - Copied: branches/release-0.93.1/tests/sites.old/coaster/fletch-coaster-gram2-gram2-condor.xml (from rev 5504, branches/release-0.93/tests/sites.old/coaster/fletch-coaster-gram2-gram2-condor.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/coaster/fletch-coaster-gram2-gram2-condor.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/coaster/fletch-coaster-gram2-gram2-condor.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /disks/gpfs/swift/site-test + + + Deleted: branches/release-0.93.1/tests/sites.old/coaster/fletch-coaster-gram2-gram2-fork.xml =================================================================== --- branches/release-0.93/tests/sites.old/coaster/fletch-coaster-gram2-gram2-fork.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/coaster/fletch-coaster-gram2-gram2-fork.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /disks/gpfs/swift/site-test - - - Copied: branches/release-0.93.1/tests/sites.old/coaster/fletch-coaster-gram2-gram2-fork.xml (from rev 5504, branches/release-0.93/tests/sites.old/coaster/fletch-coaster-gram2-gram2-fork.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/coaster/fletch-coaster-gram2-gram2-fork.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/coaster/fletch-coaster-gram2-gram2-fork.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /disks/gpfs/swift/site-test + + + Deleted: branches/release-0.93.1/tests/sites.old/coaster/renci-engage-coaster.xml =================================================================== --- branches/release-0.93/tests/sites.old/coaster/renci-engage-coaster.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/coaster/renci-engage-coaster.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,11 +0,0 @@ - - - - - - - /nfs/osg-data/osgedu/benc/swift -192.168.1.11 - - - Copied: branches/release-0.93.1/tests/sites.old/coaster/renci-engage-coaster.xml (from rev 5504, branches/release-0.93/tests/sites.old/coaster/renci-engage-coaster.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/coaster/renci-engage-coaster.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/coaster/renci-engage-coaster.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,11 @@ + + + + + + + /nfs/osg-data/osgedu/benc/swift +192.168.1.11 + + + Deleted: branches/release-0.93.1/tests/sites.old/coaster/teraport-gt2-gt2-pbs.xml =================================================================== --- branches/release-0.93/tests/sites.old/coaster/teraport-gt2-gt2-pbs.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/coaster/teraport-gt2-gt2-pbs.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - fast - 00:05:00 - - - /gpfs/teraport/benc/swifttest - - Copied: branches/release-0.93.1/tests/sites.old/coaster/teraport-gt2-gt2-pbs.xml (from rev 5504, branches/release-0.93/tests/sites.old/coaster/teraport-gt2-gt2-pbs.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/coaster/teraport-gt2-gt2-pbs.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/coaster/teraport-gt2-gt2-pbs.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + fast + 00:05:00 + + + /gpfs/teraport/benc/swifttest + + Deleted: branches/release-0.93.1/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,12 +0,0 @@ - - - - - - - /home/ac/benc - TG-CCR080002N - 4 - - - Copied: branches/release-0.93.1/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,12 @@ + + + + + + + /home/ac/benc + TG-CCR080002N + 4 + + + Deleted: branches/release-0.93.1/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram4.xml =================================================================== --- branches/release-0.93/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram4.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,12 +0,0 @@ - - - - - - - /home/ac/benc - TG-CCR080002N - 4 - - - Copied: branches/release-0.93.1/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram4.xml (from rev 5504, branches/release-0.93/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram4.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram4.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/coaster/tgncsa-hg-coaster-pbs-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,12 @@ + + + + + + + /home/ac/benc + TG-CCR080002N + 4 + + + Deleted: branches/release-0.93.1/tests/sites.old/coaster/uj-pbs-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/coaster/uj-pbs-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/coaster/uj-pbs-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,11 +0,0 @@ - - - - - - - /nfs/home/benc/swifttest - 4 - - - Copied: branches/release-0.93.1/tests/sites.old/coaster/uj-pbs-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/coaster/uj-pbs-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/coaster/uj-pbs-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/coaster/uj-pbs-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,11 @@ + + + + + + + /nfs/home/benc/swifttest + 4 + + + Deleted: branches/release-0.93.1/tests/sites.old/communicado.ci.uchicago.edu/local-condor.xml =================================================================== --- branches/release-0.93/tests/sites.old/communicado.ci.uchicago.edu/local-condor.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/communicado.ci.uchicago.edu/local-condor.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /home/benc/swifttest - - - Copied: branches/release-0.93.1/tests/sites.old/communicado.ci.uchicago.edu/local-condor.xml (from rev 5504, branches/release-0.93/tests/sites.old/communicado.ci.uchicago.edu/local-condor.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/communicado.ci.uchicago.edu/local-condor.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/communicado.ci.uchicago.edu/local-condor.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /home/benc/swifttest + + + Deleted: branches/release-0.93.1/tests/sites.old/fletch-condor-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/fletch-condor-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/fletch-condor-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /disks/gpfs/swift/site-test - - - Copied: branches/release-0.93.1/tests/sites.old/fletch-condor-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/fletch-condor-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/fletch-condor-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/fletch-condor-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /disks/gpfs/swift/site-test + + + Deleted: branches/release-0.93.1/tests/sites.old/fletch-fork-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/fletch-fork-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/fletch-fork-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /disks/gpfs/swift/site-test - - - Copied: branches/release-0.93.1/tests/sites.old/fletch-fork-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/fletch-fork-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/fletch-fork-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/fletch-fork-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /disks/gpfs/swift/site-test + + + Deleted: branches/release-0.93.1/tests/sites.old/gwynn.bsd.uchicago.edu/condor-provider.xml =================================================================== --- branches/release-0.93/tests/sites.old/gwynn.bsd.uchicago.edu/condor-provider.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/gwynn.bsd.uchicago.edu/condor-provider.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /disks/gpfs/swift/site-test - - - Copied: branches/release-0.93.1/tests/sites.old/gwynn.bsd.uchicago.edu/condor-provider.xml (from rev 5504, branches/release-0.93/tests/sites.old/gwynn.bsd.uchicago.edu/condor-provider.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/gwynn.bsd.uchicago.edu/condor-provider.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/gwynn.bsd.uchicago.edu/condor-provider.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /disks/gpfs/swift/site-test + + + Deleted: branches/release-0.93.1/tests/sites.old/local-wrapper-args-file.xml =================================================================== --- branches/release-0.93/tests/sites.old/local-wrapper-args-file.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/local-wrapper-args-file.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,12 +0,0 @@ - - - - - - /var/tmp - 0 - 0 - files - - - Copied: branches/release-0.93.1/tests/sites.old/local-wrapper-args-file.xml (from rev 5504, branches/release-0.93/tests/sites.old/local-wrapper-args-file.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/local-wrapper-args-file.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/local-wrapper-args-file.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,12 @@ + + + + + + /var/tmp + 0 + 0 + files + + + Deleted: branches/release-0.93.1/tests/sites.old/localhost.xml =================================================================== --- branches/release-0.93/tests/sites.old/localhost.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/localhost.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,14 +0,0 @@ - - - - - - - - - _WORK_ - 0.08 - 10000 - - - Copied: branches/release-0.93.1/tests/sites.old/localhost.xml (from rev 5504, branches/release-0.93/tests/sites.old/localhost.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/localhost.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/localhost.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,14 @@ + + + + + + + + + _WORK_ + 0.08 + 10000 + + + Deleted: branches/release-0.93.1/tests/sites.old/osg-edu.cs.wisc.edu-condor.xml =================================================================== --- branches/release-0.93/tests/sites.old/osg-edu.cs.wisc.edu-condor.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/osg-edu.cs.wisc.edu-condor.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /nfs/osg-app - - - Copied: branches/release-0.93.1/tests/sites.old/osg-edu.cs.wisc.edu-condor.xml (from rev 5504, branches/release-0.93/tests/sites.old/osg-edu.cs.wisc.edu-condor.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/osg-edu.cs.wisc.edu-condor.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/osg-edu.cs.wisc.edu-condor.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /nfs/osg-app + + + Deleted: branches/release-0.93.1/tests/sites.old/osg-edu.cs.wisc.edu-fork.xml =================================================================== --- branches/release-0.93/tests/sites.old/osg-edu.cs.wisc.edu-fork.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/osg-edu.cs.wisc.edu-fork.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /nfs/osg-app - - - Copied: branches/release-0.93.1/tests/sites.old/osg-edu.cs.wisc.edu-fork.xml (from rev 5504, branches/release-0.93/tests/sites.old/osg-edu.cs.wisc.edu-fork.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/osg-edu.cs.wisc.edu-fork.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/osg-edu.cs.wisc.edu-fork.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /nfs/osg-app + + + Deleted: branches/release-0.93.1/tests/sites.old/pads-pbs-coasters.sh =================================================================== --- branches/release-0.93/tests/sites.old/pads-pbs-coasters.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/pads-pbs-coasters.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,6 +0,0 @@ - -# GROUPLIST definition to run pbs tests - -GROUPLIST=( - $TESTDIR/providers/local-pbs-coasters \ -) Copied: branches/release-0.93.1/tests/sites.old/pads-pbs-coasters.sh (from rev 5504, branches/release-0.93/tests/sites.old/pads-pbs-coasters.sh) =================================================================== --- branches/release-0.93.1/tests/sites.old/pads-pbs-coasters.sh (rev 0) +++ branches/release-0.93.1/tests/sites.old/pads-pbs-coasters.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,6 @@ + +# GROUPLIST definition to run pbs tests + +GROUPLIST=( + $TESTDIR/providers/local-pbs-coasters \ +) Deleted: branches/release-0.93.1/tests/sites.old/renci-engage-condor.xml =================================================================== --- branches/release-0.93/tests/sites.old/renci-engage-condor.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/renci-engage-condor.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /nfs/osg-data/osgedu/benc/swift - - - Copied: branches/release-0.93.1/tests/sites.old/renci-engage-condor.xml (from rev 5504, branches/release-0.93/tests/sites.old/renci-engage-condor.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/renci-engage-condor.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/renci-engage-condor.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /nfs/osg-data/osgedu/benc/swift + + + Deleted: branches/release-0.93.1/tests/sites.old/run-all =================================================================== --- branches/release-0.93/tests/sites.old/run-all 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/run-all 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,25 +0,0 @@ -#!/bin/bash - -export WORKED="" -export FAILED="" - -for BASE in $1*.xml; do - ./run-site $BASE - EC=$? - if [ "$EC" != "0" ]; then - echo SITE FAIL! Exit code $EC for site definition $BASE - FAILED="$FAILED $BASE" - else - WORKED="$WORKED $BASE" - fi -done - -if [ "X$FAILED" = "" ]; then - echo No tests failed - exit 0 -else - echo These sites failed: $FAILED - echo These sites worked: $WORKED - exit 1 -fi - Copied: branches/release-0.93.1/tests/sites.old/run-all (from rev 5504, branches/release-0.93/tests/sites.old/run-all) =================================================================== --- branches/release-0.93.1/tests/sites.old/run-all (rev 0) +++ branches/release-0.93.1/tests/sites.old/run-all 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,25 @@ +#!/bin/bash + +export WORKED="" +export FAILED="" + +for BASE in $1*.xml; do + ./run-site $BASE + EC=$? + if [ "$EC" != "0" ]; then + echo SITE FAIL! Exit code $EC for site definition $BASE + FAILED="$FAILED $BASE" + else + WORKED="$WORKED $BASE" + fi +done + +if [ "X$FAILED" = "" ]; then + echo No tests failed + exit 0 +else + echo These sites failed: $FAILED + echo These sites worked: $WORKED + exit 1 +fi + Deleted: branches/release-0.93.1/tests/sites.old/run-site =================================================================== --- branches/release-0.93/tests/sites.old/run-site 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/run-site 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,18 +0,0 @@ -#!/bin/bash - -cd ../language-behaviour - -./generate-tc.data - -cat tc.data ../sites/tc.data > tmp.tc.data.sites - -SITE=$1 - -echo testing site configuration: $SITE - -export SWIFT_TEST_PARAMS="-sites.file ../sites/${SITE} -tc.file tmp.tc.data.sites" -export SWIFT_TEST_EXCEPTIONS=no - - -./run 061-cattwo 130-fmri 103-quote.swift 1032-singlequote.swift 1031-quote.swift 1033-singlequote.swift 141-space-in-filename 142-space-and-quotes -#./run 061-cattwo Copied: branches/release-0.93.1/tests/sites.old/run-site (from rev 5504, branches/release-0.93/tests/sites.old/run-site) =================================================================== --- branches/release-0.93.1/tests/sites.old/run-site (rev 0) +++ branches/release-0.93.1/tests/sites.old/run-site 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,18 @@ +#!/bin/bash + +cd ../language-behaviour + +./generate-tc.data + +cat tc.data ../sites/tc.data > tmp.tc.data.sites + +SITE=$1 + +echo testing site configuration: $SITE + +export SWIFT_TEST_PARAMS="-sites.file ../sites/${SITE} -tc.file tmp.tc.data.sites" +export SWIFT_TEST_EXCEPTIONS=no + + +./run 061-cattwo 130-fmri 103-quote.swift 1032-singlequote.swift 1031-quote.swift 1033-singlequote.swift 141-space-in-filename 142-space-and-quotes +#./run 061-cattwo Deleted: branches/release-0.93.1/tests/sites.old/tc.data =================================================================== --- branches/release-0.93/tests/sites.old/tc.data 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tc.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,81 +0,0 @@ -#This is the transformation catalog. -# -#It comes pre-configured with a number of simple transformations with -#paths that are likely to work on a linux box. However, on some systems, -#the paths to these executables will be different (for example, sometimes -#some of these programs are found in /usr/bin rather than in /bin) -# -#NOTE WELL: fields in this file must be separated by tabs, not spaces; and -#there must be no trailing whitespace at the end of each line. -# -# sitename transformation path INSTALLED platform profiles -teraport echo /bin/echo INSTALLED INTEL32::LINUX null -teraport cat /bin/cat INSTALLED INTEL32::LINUX null -teraport ls /bin/ls INSTALLED INTEL32::LINUX null -teraport wc /bin/wc INSTALLED INTEL32::LINUX null -teraport grep /bin/grep INSTALLED INTEL32::LINUX null -teraport sort /bin/sort INSTALLED INTEL32::LINUX null -teraport paste /bin/paste INSTALLED INTEL32::LINUX null -teraport touch /bin/touch INSTALLED INTEL32::LINUX null -tguc echo /bin/echo INSTALLED INTEL32::LINUX null -tguc cat /bin/cat INSTALLED INTEL32::LINUX null -tguc ls /bin/ls INSTALLED INTEL32::LINUX null -tguc wc /bin/wc INSTALLED INTEL32::LINUX null -tguc grep /bin/grep INSTALLED INTEL32::LINUX null -tguc sort /bin/sort INSTALLED INTEL32::LINUX null -tguc paste /bin/paste INSTALLED INTEL32::LINUX null -tguc touch /bin/touch INSTALLED INTEL32::LINUX null -osg-edu.cs.wisc.edu echo /bin/echo INSTALLED INTEL32::LINUX null -osg-edu.cs.wisc.edu cat /bin/cat INSTALLED INTEL32::LINUX null -osg-edu.cs.wisc.edu ls /bin/ls INSTALLED INTEL32::LINUX null -osg-edu.cs.wisc.edu wc /bin/wc INSTALLED INTEL32::LINUX null -osg-edu.cs.wisc.edu grep /bin/grep INSTALLED INTEL32::LINUX null -osg-edu.cs.wisc.edu sort /bin/sort INSTALLED INTEL32::LINUX null -osg-edu.cs.wisc.edu paste /bin/paste INSTALLED INTEL32::LINUX null -osg-edu.cs.wisc.edu touch /bin/touch INSTALLED INTEL32::LINUX null -UCLA_Saxon_Tier3 echo /bin/echo INSTALLED INTEL32::LINUX null -UCLA_Saxon_Tier3 cat /bin/cat INSTALLED INTEL32::LINUX null -UCLA_Saxon_Tier3 ls /bin/ls INSTALLED INTEL32::LINUX null -UCLA_Saxon_Tier3 wc /bin/wc INSTALLED INTEL32::LINUX null -UCLA_Saxon_Tier3 grep /bin/grep INSTALLED INTEL32::LINUX null -UCLA_Saxon_Tier3 sort /bin/sort INSTALLED INTEL32::LINUX null -UCLA_Saxon_Tier3 paste /bin/paste INSTALLED INTEL32::LINUX null -UCLA_Saxon_Tier3 touch /bin/touch INSTALLED INTEL32::LINUX null -tgtacc echo /bin/echo INSTALLED INTEL32::LINUX null -tgtacc cat /bin/cat INSTALLED INTEL32::LINUX null -tgtacc ls /bin/ls INSTALLED INTEL32::LINUX null -tgtacc wc /bin/wc INSTALLED INTEL32::LINUX null -tgtacc grep /bin/grep INSTALLED INTEL32::LINUX null -tgtacc sort /bin/sort INSTALLED INTEL32::LINUX null -tgtacc paste /bin/paste INSTALLED INTEL32::LINUX null -tgtacc touch /bin/touch INSTALLED INTEL32::LINUX null -tgncsa-hg echo /bin/echo INSTALLED INTEL32::LINUX null -tgncsa-hg cat /bin/cat INSTALLED INTEL32::LINUX null -tgncsa-hg ls /bin/ls INSTALLED INTEL32::LINUX null -tgncsa-hg wc /bin/wc INSTALLED INTEL32::LINUX null -tgncsa-hg grep /bin/grep INSTALLED INTEL32::LINUX null -tgncsa-hg sort /bin/sort INSTALLED INTEL32::LINUX null -tgncsa-hg paste /bin/paste INSTALLED INTEL32::LINUX null -tgncsa-hg touch /bin/touch INSTALLED INTEL32::LINUX null -tgpurdue echo /bin/echo INSTALLED INTEL32::LINUX null -tgpurdue cat /bin/cat INSTALLED INTEL32::LINUX null -tgpurdue ls /bin/ls INSTALLED INTEL32::LINUX null -tgpurdue wc /bin/wc INSTALLED INTEL32::LINUX null -tgpurdue grep /bin/grep INSTALLED INTEL32::LINUX null -tgpurdue sort /bin/sort INSTALLED INTEL32::LINUX null -tgpurdue paste /bin/paste INSTALLED INTEL32::LINUX null -tgpurdue touch /bin/touch INSTALLED INTEL32::LINUX null -localhost echo /bin/echo INSTALLED INTEL32::LINUX null -localhost cat /bin/cat INSTALLED INTEL32::LINUX null -localhost ls /bin/ls INSTALLED INTEL32::LINUX null -localhost grep /bin/grep INSTALLED INTEL32::LINUX null -localhost sort /bin/sort INSTALLED INTEL32::LINUX null -localhost paste /bin/paste INSTALLED INTEL32::LINUX null -renci-engage echo /bin/echo INSTALLED INTEL32::LINUX null -renci-engage cat /bin/cat INSTALLED INTEL32::LINUX null -renci-engage ls /bin/ls INSTALLED INTEL32::LINUX null -renci-engage wc /bin/wc INSTALLED INTEL32::LINUX null -renci-engage grep /bin/grep INSTALLED INTEL32::LINUX null -renci-engage sort /bin/sort INSTALLED INTEL32::LINUX null -renci-engage paste /bin/paste INSTALLED INTEL32::LINUX null -renci-engage touch /bin/touch INSTALLED INTEL32::LINUX null Copied: branches/release-0.93.1/tests/sites.old/tc.data (from rev 5504, branches/release-0.93/tests/sites.old/tc.data) =================================================================== --- branches/release-0.93.1/tests/sites.old/tc.data (rev 0) +++ branches/release-0.93.1/tests/sites.old/tc.data 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,81 @@ +#This is the transformation catalog. +# +#It comes pre-configured with a number of simple transformations with +#paths that are likely to work on a linux box. However, on some systems, +#the paths to these executables will be different (for example, sometimes +#some of these programs are found in /usr/bin rather than in /bin) +# +#NOTE WELL: fields in this file must be separated by tabs, not spaces; and +#there must be no trailing whitespace at the end of each line. +# +# sitename transformation path INSTALLED platform profiles +teraport echo /bin/echo INSTALLED INTEL32::LINUX null +teraport cat /bin/cat INSTALLED INTEL32::LINUX null +teraport ls /bin/ls INSTALLED INTEL32::LINUX null +teraport wc /bin/wc INSTALLED INTEL32::LINUX null +teraport grep /bin/grep INSTALLED INTEL32::LINUX null +teraport sort /bin/sort INSTALLED INTEL32::LINUX null +teraport paste /bin/paste INSTALLED INTEL32::LINUX null +teraport touch /bin/touch INSTALLED INTEL32::LINUX null +tguc echo /bin/echo INSTALLED INTEL32::LINUX null +tguc cat /bin/cat INSTALLED INTEL32::LINUX null +tguc ls /bin/ls INSTALLED INTEL32::LINUX null +tguc wc /bin/wc INSTALLED INTEL32::LINUX null +tguc grep /bin/grep INSTALLED INTEL32::LINUX null +tguc sort /bin/sort INSTALLED INTEL32::LINUX null +tguc paste /bin/paste INSTALLED INTEL32::LINUX null +tguc touch /bin/touch INSTALLED INTEL32::LINUX null +osg-edu.cs.wisc.edu echo /bin/echo INSTALLED INTEL32::LINUX null +osg-edu.cs.wisc.edu cat /bin/cat INSTALLED INTEL32::LINUX null +osg-edu.cs.wisc.edu ls /bin/ls INSTALLED INTEL32::LINUX null +osg-edu.cs.wisc.edu wc /bin/wc INSTALLED INTEL32::LINUX null +osg-edu.cs.wisc.edu grep /bin/grep INSTALLED INTEL32::LINUX null +osg-edu.cs.wisc.edu sort /bin/sort INSTALLED INTEL32::LINUX null +osg-edu.cs.wisc.edu paste /bin/paste INSTALLED INTEL32::LINUX null +osg-edu.cs.wisc.edu touch /bin/touch INSTALLED INTEL32::LINUX null +UCLA_Saxon_Tier3 echo /bin/echo INSTALLED INTEL32::LINUX null +UCLA_Saxon_Tier3 cat /bin/cat INSTALLED INTEL32::LINUX null +UCLA_Saxon_Tier3 ls /bin/ls INSTALLED INTEL32::LINUX null +UCLA_Saxon_Tier3 wc /bin/wc INSTALLED INTEL32::LINUX null +UCLA_Saxon_Tier3 grep /bin/grep INSTALLED INTEL32::LINUX null +UCLA_Saxon_Tier3 sort /bin/sort INSTALLED INTEL32::LINUX null +UCLA_Saxon_Tier3 paste /bin/paste INSTALLED INTEL32::LINUX null +UCLA_Saxon_Tier3 touch /bin/touch INSTALLED INTEL32::LINUX null +tgtacc echo /bin/echo INSTALLED INTEL32::LINUX null +tgtacc cat /bin/cat INSTALLED INTEL32::LINUX null +tgtacc ls /bin/ls INSTALLED INTEL32::LINUX null +tgtacc wc /bin/wc INSTALLED INTEL32::LINUX null +tgtacc grep /bin/grep INSTALLED INTEL32::LINUX null +tgtacc sort /bin/sort INSTALLED INTEL32::LINUX null +tgtacc paste /bin/paste INSTALLED INTEL32::LINUX null +tgtacc touch /bin/touch INSTALLED INTEL32::LINUX null +tgncsa-hg echo /bin/echo INSTALLED INTEL32::LINUX null +tgncsa-hg cat /bin/cat INSTALLED INTEL32::LINUX null +tgncsa-hg ls /bin/ls INSTALLED INTEL32::LINUX null +tgncsa-hg wc /bin/wc INSTALLED INTEL32::LINUX null +tgncsa-hg grep /bin/grep INSTALLED INTEL32::LINUX null +tgncsa-hg sort /bin/sort INSTALLED INTEL32::LINUX null +tgncsa-hg paste /bin/paste INSTALLED INTEL32::LINUX null +tgncsa-hg touch /bin/touch INSTALLED INTEL32::LINUX null +tgpurdue echo /bin/echo INSTALLED INTEL32::LINUX null +tgpurdue cat /bin/cat INSTALLED INTEL32::LINUX null +tgpurdue ls /bin/ls INSTALLED INTEL32::LINUX null +tgpurdue wc /bin/wc INSTALLED INTEL32::LINUX null +tgpurdue grep /bin/grep INSTALLED INTEL32::LINUX null +tgpurdue sort /bin/sort INSTALLED INTEL32::LINUX null +tgpurdue paste /bin/paste INSTALLED INTEL32::LINUX null +tgpurdue touch /bin/touch INSTALLED INTEL32::LINUX null +localhost echo /bin/echo INSTALLED INTEL32::LINUX null +localhost cat /bin/cat INSTALLED INTEL32::LINUX null +localhost ls /bin/ls INSTALLED INTEL32::LINUX null +localhost grep /bin/grep INSTALLED INTEL32::LINUX null +localhost sort /bin/sort INSTALLED INTEL32::LINUX null +localhost paste /bin/paste INSTALLED INTEL32::LINUX null +renci-engage echo /bin/echo INSTALLED INTEL32::LINUX null +renci-engage cat /bin/cat INSTALLED INTEL32::LINUX null +renci-engage ls /bin/ls INSTALLED INTEL32::LINUX null +renci-engage wc /bin/wc INSTALLED INTEL32::LINUX null +renci-engage grep /bin/grep INSTALLED INTEL32::LINUX null +renci-engage sort /bin/sort INSTALLED INTEL32::LINUX null +renci-engage paste /bin/paste INSTALLED INTEL32::LINUX null +renci-engage touch /bin/touch INSTALLED INTEL32::LINUX null Deleted: branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /home/benc - - - Copied: branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /home/benc + + + Deleted: branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram4.xml =================================================================== --- branches/release-0.93/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram4.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /home/benc - - - Copied: branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram4.xml (from rev 5504, branches/release-0.93/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram4.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram4.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-fork-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /home/benc + + + Deleted: branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,10 +0,0 @@ - - - - - - /home/benc - TG-CCR080002N - - - Copied: branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,10 @@ + + + + + + /home/benc + TG-CCR080002N + + + Deleted: branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram4.xml =================================================================== --- branches/release-0.93/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram4.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,10 +0,0 @@ - - - - - - /home/benc - TG-CCR080002N - - - Copied: branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram4.xml (from rev 5504, branches/release-0.93/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram4.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram4.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,10 @@ + + + + + + /home/benc + TG-CCR080002N + + + Deleted: branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-local.xml =================================================================== --- branches/release-0.93/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-local.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-local.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,12 +0,0 @@ - - - - - - - /home/benc - TG-CCR080002N - - - - Copied: branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-local.xml (from rev 5504, branches/release-0.93/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-local.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-local.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tg-login.uc.teragrid.org/tguc-pbs-local.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,12 @@ + + + + + + + /home/benc + TG-CCR080002N + + + + Deleted: branches/release-0.93.1/tests/sites.old/tgncsa-hg-fork-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/tgncsa-hg-fork-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tgncsa-hg-fork-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /home/ac/benc/swifttest - - - Copied: branches/release-0.93.1/tests/sites.old/tgncsa-hg-fork-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/tgncsa-hg-fork-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tgncsa-hg-fork-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tgncsa-hg-fork-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /home/ac/benc/swifttest + + + Deleted: branches/release-0.93.1/tests/sites.old/tgncsa-hg-fork-gram4.xml =================================================================== --- branches/release-0.93/tests/sites.old/tgncsa-hg-fork-gram4.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tgncsa-hg-fork-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /home/ac/benc/swifttest - - - Copied: branches/release-0.93.1/tests/sites.old/tgncsa-hg-fork-gram4.xml (from rev 5504, branches/release-0.93/tests/sites.old/tgncsa-hg-fork-gram4.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tgncsa-hg-fork-gram4.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tgncsa-hg-fork-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /home/ac/benc/swifttest + + + Deleted: branches/release-0.93.1/tests/sites.old/tgncsa-hg-pbs-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/tgncsa-hg-pbs-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tgncsa-hg-pbs-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,10 +0,0 @@ - - - - - - /home/ac/benc/swifttest - TG-CCR080002N - - - Copied: branches/release-0.93.1/tests/sites.old/tgncsa-hg-pbs-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/tgncsa-hg-pbs-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tgncsa-hg-pbs-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tgncsa-hg-pbs-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,10 @@ + + + + + + /home/ac/benc/swifttest + TG-CCR080002N + + + Deleted: branches/release-0.93.1/tests/sites.old/tgncsa-hg-pbs-gram4.xml =================================================================== --- branches/release-0.93/tests/sites.old/tgncsa-hg-pbs-gram4.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tgncsa-hg-pbs-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,11 +0,0 @@ - - - - - - /home/ac/benc/swifttest - TG-CCR080002N - 4 - - - Copied: branches/release-0.93.1/tests/sites.old/tgncsa-hg-pbs-gram4.xml (from rev 5504, branches/release-0.93/tests/sites.old/tgncsa-hg-pbs-gram4.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tgncsa-hg-pbs-gram4.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tgncsa-hg-pbs-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,11 @@ + + + + + + /home/ac/benc/swifttest + TG-CCR080002N + 4 + + + Deleted: branches/release-0.93.1/tests/sites.old/tgpurdue-condor-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/tgpurdue-condor-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tgpurdue-condor-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,11 +0,0 @@ - - - - - - /autohome/u102/benc/swifttest - TG-CCR080002N - - - - Copied: branches/release-0.93.1/tests/sites.old/tgpurdue-condor-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/tgpurdue-condor-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tgpurdue-condor-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tgpurdue-condor-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,11 @@ + + + + + + /autohome/u102/benc/swifttest + TG-CCR080002N + + + + Deleted: branches/release-0.93.1/tests/sites.old/tgpurdue-condor-gram4.xml =================================================================== --- branches/release-0.93/tests/sites.old/tgpurdue-condor-gram4.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tgpurdue-condor-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,11 +0,0 @@ - - - - - - /autohome/u102/benc/swifttest - TG-CCR080002N - - - - Copied: branches/release-0.93.1/tests/sites.old/tgpurdue-condor-gram4.xml (from rev 5504, branches/release-0.93/tests/sites.old/tgpurdue-condor-gram4.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tgpurdue-condor-gram4.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tgpurdue-condor-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,11 @@ + + + + + + /autohome/u102/benc/swifttest + TG-CCR080002N + + + + Deleted: branches/release-0.93.1/tests/sites.old/tgpurdue-fork-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/tgpurdue-fork-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tgpurdue-fork-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /autohome/u102/benc/swifttest - - - Copied: branches/release-0.93.1/tests/sites.old/tgpurdue-fork-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/tgpurdue-fork-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tgpurdue-fork-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tgpurdue-fork-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /autohome/u102/benc/swifttest + + + Deleted: branches/release-0.93.1/tests/sites.old/tgpurdue-fork-gram4.xml =================================================================== --- branches/release-0.93/tests/sites.old/tgpurdue-fork-gram4.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tgpurdue-fork-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,10 +0,0 @@ - - - - - - /autohome/u102/benc/swifttest - - - - Copied: branches/release-0.93.1/tests/sites.old/tgpurdue-fork-gram4.xml (from rev 5504, branches/release-0.93/tests/sites.old/tgpurdue-fork-gram4.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tgpurdue-fork-gram4.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tgpurdue-fork-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,10 @@ + + + + + + /autohome/u102/benc/swifttest + + + + Deleted: branches/release-0.93.1/tests/sites.old/tgtacc-fork-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/tgtacc-fork-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tgtacc-fork-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /home/teragrid/tg458015/swifttest - - - Copied: branches/release-0.93.1/tests/sites.old/tgtacc-fork-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/tgtacc-fork-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tgtacc-fork-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tgtacc-fork-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /home/teragrid/tg458015/swifttest + + + Deleted: branches/release-0.93.1/tests/sites.old/tgtacc-lsf-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/tgtacc-lsf-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tgtacc-lsf-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,11 +0,0 @@ - - - - - - /home/teragrid/tg458015/swifttest - development - 1 - - - Copied: branches/release-0.93.1/tests/sites.old/tgtacc-lsf-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/tgtacc-lsf-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tgtacc-lsf-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tgtacc-lsf-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,11 @@ + + + + + + /home/teragrid/tg458015/swifttest + development + 1 + + + Deleted: branches/release-0.93.1/tests/sites.old/tguc-fork-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/tguc-fork-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tguc-fork-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /home/benc/swifttest - - - Copied: branches/release-0.93.1/tests/sites.old/tguc-fork-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/tguc-fork-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tguc-fork-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tguc-fork-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /home/benc/swifttest + + + Deleted: branches/release-0.93.1/tests/sites.old/tguc-fork-gram4.xml =================================================================== --- branches/release-0.93/tests/sites.old/tguc-fork-gram4.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tguc-fork-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /home/benc/swifttest - - - Copied: branches/release-0.93.1/tests/sites.old/tguc-fork-gram4.xml (from rev 5504, branches/release-0.93/tests/sites.old/tguc-fork-gram4.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tguc-fork-gram4.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tguc-fork-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /home/benc/swifttest + + + Deleted: branches/release-0.93.1/tests/sites.old/tguc-pbs-gram2-syntax1.xml =================================================================== --- branches/release-0.93/tests/sites.old/tguc-pbs-gram2-syntax1.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tguc-pbs-gram2-syntax1.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,10 +0,0 @@ - - - - - - /home/benc/swifttest - TG-CCR080002N - - - Copied: branches/release-0.93.1/tests/sites.old/tguc-pbs-gram2-syntax1.xml (from rev 5504, branches/release-0.93/tests/sites.old/tguc-pbs-gram2-syntax1.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tguc-pbs-gram2-syntax1.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tguc-pbs-gram2-syntax1.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,10 @@ + + + + + + /home/benc/swifttest + TG-CCR080002N + + + Deleted: branches/release-0.93.1/tests/sites.old/tguc-pbs-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/tguc-pbs-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tguc-pbs-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,10 +0,0 @@ - - - - - - TG-DBS080005N - /home/benc/swifttest - - - Copied: branches/release-0.93.1/tests/sites.old/tguc-pbs-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/tguc-pbs-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tguc-pbs-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tguc-pbs-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,10 @@ + + + + + + TG-DBS080005N + /home/benc/swifttest + + + Deleted: branches/release-0.93.1/tests/sites.old/tguc-pbs-gram4.xml =================================================================== --- branches/release-0.93/tests/sites.old/tguc-pbs-gram4.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tguc-pbs-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,11 +0,0 @@ - - - - - - /home/benc/swifttest - TG-CCR080002N - 4 - - - Copied: branches/release-0.93.1/tests/sites.old/tguc-pbs-gram4.xml (from rev 5504, branches/release-0.93/tests/sites.old/tguc-pbs-gram4.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tguc-pbs-gram4.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tguc-pbs-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,11 @@ + + + + + + /home/benc/swifttest + TG-CCR080002N + 4 + + + Deleted: branches/release-0.93.1/tests/sites.old/tp-fork-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/tp-fork-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tp-fork-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,10 +0,0 @@ - - - - - - /home/benc/swifttest -YES - - - Copied: branches/release-0.93.1/tests/sites.old/tp-fork-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/tp-fork-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tp-fork-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tp-fork-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,10 @@ + + + + + + /home/benc/swifttest +YES + + + Deleted: branches/release-0.93.1/tests/sites.old/tp-fork-gram4.xml =================================================================== --- branches/release-0.93/tests/sites.old/tp-fork-gram4.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tp-fork-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /home/benc/swifttest - - - Copied: branches/release-0.93.1/tests/sites.old/tp-fork-gram4.xml (from rev 5504, branches/release-0.93/tests/sites.old/tp-fork-gram4.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tp-fork-gram4.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tp-fork-gram4.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /home/benc/swifttest + + + Deleted: branches/release-0.93.1/tests/sites.old/tp-pbs-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/tp-pbs-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/tp-pbs-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,10 +0,0 @@ - - - - - - test - /home/benc/swifttest - - - Copied: branches/release-0.93.1/tests/sites.old/tp-pbs-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/tp-pbs-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/tp-pbs-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/tp-pbs-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,10 @@ + + + + + + test + /home/benc/swifttest + + + Deleted: branches/release-0.93.1/tests/sites.old/uj-fork-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/uj-fork-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/uj-fork-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /nfs/home/benc/swifttest - - - Copied: branches/release-0.93.1/tests/sites.old/uj-fork-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/uj-fork-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/uj-fork-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/uj-fork-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /nfs/home/benc/swifttest + + + Deleted: branches/release-0.93.1/tests/sites.old/uj-pbs-gram2.xml =================================================================== --- branches/release-0.93/tests/sites.old/uj-pbs-gram2.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/uj-pbs-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,9 +0,0 @@ - - - - - - /nfs/home/benc/swifttest - - - Copied: branches/release-0.93.1/tests/sites.old/uj-pbs-gram2.xml (from rev 5504, branches/release-0.93/tests/sites.old/uj-pbs-gram2.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/uj-pbs-gram2.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/uj-pbs-gram2.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,9 @@ + + + + + + /nfs/home/benc/swifttest + + + Deleted: branches/release-0.93.1/tests/sites.old/wonky/relative-absolute-wrapper.xml =================================================================== --- branches/release-0.93/tests/sites.old/wonky/relative-absolute-wrapper.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/wonky/relative-absolute-wrapper.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,19 +0,0 @@ - - - - - - /var/tmp/swift-test/A - 0 - - - - - - - /var/tmp/swift-test/B - 0 - absolute - - - Copied: branches/release-0.93.1/tests/sites.old/wonky/relative-absolute-wrapper.xml (from rev 5504, branches/release-0.93/tests/sites.old/wonky/relative-absolute-wrapper.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/wonky/relative-absolute-wrapper.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/wonky/relative-absolute-wrapper.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,19 @@ + + + + + + /var/tmp/swift-test/A + 0 + + + + + + + /var/tmp/swift-test/B + 0 + absolute + + + Deleted: branches/release-0.93.1/tests/sites.old/wonky/slow-queue-fast-queue.xml =================================================================== --- branches/release-0.93/tests/sites.old/wonky/slow-queue-fast-queue.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/wonky/slow-queue-fast-queue.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,18 +0,0 @@ - - - - - - /var/tmp - 4 - - - - - - /var/tmp - 4 - - - - Copied: branches/release-0.93.1/tests/sites.old/wonky/slow-queue-fast-queue.xml (from rev 5504, branches/release-0.93/tests/sites.old/wonky/slow-queue-fast-queue.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/wonky/slow-queue-fast-queue.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/wonky/slow-queue-fast-queue.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,18 @@ + + + + + + /var/tmp + 4 + + + + + + /var/tmp + 4 + + + + Deleted: branches/release-0.93.1/tests/sites.old/wonky/wonky-80percent.xml =================================================================== --- branches/release-0.93/tests/sites.old/wonky/wonky-80percent.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/wonky/wonky-80percent.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,11 +0,0 @@ - - - - - - /var/tmp - 0 - 0 - - - Copied: branches/release-0.93.1/tests/sites.old/wonky/wonky-80percent.xml (from rev 5504, branches/release-0.93/tests/sites.old/wonky/wonky-80percent.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/wonky/wonky-80percent.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/wonky/wonky-80percent.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,11 @@ + + + + + + /var/tmp + 0 + 0 + + + Deleted: branches/release-0.93.1/tests/sites.old/wonky/wonky-90percent.xml =================================================================== --- branches/release-0.93/tests/sites.old/wonky/wonky-90percent.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/wonky/wonky-90percent.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,10 +0,0 @@ - - - - - - /var/tmp - 0 - - - Copied: branches/release-0.93.1/tests/sites.old/wonky/wonky-90percent.xml (from rev 5504, branches/release-0.93/tests/sites.old/wonky/wonky-90percent.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/wonky/wonky-90percent.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/wonky/wonky-90percent.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,10 @@ + + + + + + /var/tmp + 0 + + + Deleted: branches/release-0.93.1/tests/sites.old/wonky/wonky-failfirst.xml =================================================================== --- branches/release-0.93/tests/sites.old/wonky/wonky-failfirst.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/wonky/wonky-failfirst.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,11 +0,0 @@ - - - - - - /var/tmp - 0 - 0 - - - Copied: branches/release-0.93.1/tests/sites.old/wonky/wonky-failfirst.xml (from rev 5504, branches/release-0.93/tests/sites.old/wonky/wonky-failfirst.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/wonky/wonky-failfirst.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/wonky/wonky-failfirst.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,11 @@ + + + + + + /var/tmp + 0 + 0 + + + Deleted: branches/release-0.93.1/tests/sites.old/wonky/wonky-good.xml =================================================================== --- branches/release-0.93/tests/sites.old/wonky/wonky-good.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/wonky/wonky-good.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,10 +0,0 @@ - - - - - - /var/tmp - 0 - - - Copied: branches/release-0.93.1/tests/sites.old/wonky/wonky-good.xml (from rev 5504, branches/release-0.93/tests/sites.old/wonky/wonky-good.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/wonky/wonky-good.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/wonky/wonky-good.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,10 @@ + + + + + + /var/tmp + 0 + + + Deleted: branches/release-0.93.1/tests/sites.old/wonky/wonky-runawayjob.xml =================================================================== --- branches/release-0.93/tests/sites.old/wonky/wonky-runawayjob.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/wonky/wonky-runawayjob.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,11 +0,0 @@ - - - - - - /var/tmp - 0 - 0 - - - Copied: branches/release-0.93.1/tests/sites.old/wonky/wonky-runawayjob.xml (from rev 5504, branches/release-0.93/tests/sites.old/wonky/wonky-runawayjob.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/wonky/wonky-runawayjob.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/wonky/wonky-runawayjob.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,11 @@ + + + + + + /var/tmp + 0 + 0 + + + Deleted: branches/release-0.93.1/tests/sites.old/wonky/wrongdir.xml =================================================================== --- branches/release-0.93/tests/sites.old/wonky/wrongdir.xml 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/sites.old/wonky/wrongdir.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -1,11 +0,0 @@ - - - - - - /var/tmp - 0 - 0 - - - Copied: branches/release-0.93.1/tests/sites.old/wonky/wrongdir.xml (from rev 5504, branches/release-0.93/tests/sites.old/wonky/wrongdir.xml) =================================================================== --- branches/release-0.93.1/tests/sites.old/wonky/wrongdir.xml (rev 0) +++ branches/release-0.93.1/tests/sites.old/wonky/wrongdir.xml 2012-01-22 03:23:13 UTC (rev 5505) @@ -0,0 +1,11 @@ + + + + + + /var/tmp + 0 + 0 + + + Modified: branches/release-0.93.1/tests/suite.sh =================================================================== --- branches/release-0.93.1/tests/suite.sh 2012-01-20 22:57:44 UTC (rev 5504) +++ branches/release-0.93.1/tests/suite.sh 2012-01-22 03:23:13 UTC (rev 5505) @@ -34,9 +34,11 @@ TOTAL_TIME=0 INDIVIDUAL_TEST_TIME=0 COLORIZE=0 +# The directory in which is suite.sh (this script) +SUITE_DIR=$( dirname $0 ) # The directory in which to start: -TOPDIR=`readlink -f $PWD/../../../..` -CRTDIR=`pwd` +TOPDIR=$( readlink -f $SUITE_DIR/../../../.. ) +CRTDIR=$( /bin/pwd ) # Disable usage stats in test suite export SWIFT_USAGE_STATS=0 @@ -357,7 +359,7 @@ LABEL="$2" # Text on link to output CMD=$3 # Command issued (td title) RESULT=$4 # Passed or Failed - + if [ $TEXTREPORT == 1 ]; then if [ "$TYPE" == "test" ]; then if [ "$RESULT" == "Passed" ]; then @@ -697,7 +699,7 @@ process_exec $SCRIPT RESULT=$( result ) - + output_report test "$SYMBOL" "$LASTCMD" $RESULT check_bailout @@ -707,7 +709,7 @@ GROUP=$1 NAME=$2 RESULT="None" - + if [ -f "$GROUP/$NAME.in" ]; then echo "Copying input: $NAME.in" cp -v $GROUP/$NAME.in . 2>&1 >> $OUTPUT @@ -818,7 +820,7 @@ TEST_SHOULD_FAIL=0 OUTPUT=$NAME.check.stdout if [ -x $GROUP/$CHECKSCRIPT ]; then - cp "$GROUP/$CHECKSCRIPT" . + cp "$GROUP/$CHECKSCRIPT" . export TEST_LOG=$NAME.stdout script_exec ./$CHECKSCRIPT "√" else @@ -848,7 +850,7 @@ TIMEOUTFILE=$NAME.timeout TEST_SHOULD_FAIL=0 - + OUTPUT=$NAME.setup.stdout if [ -x $GROUP/$SETUPSCRIPT ]; then script_exec $GROUP/$SETUPSCRIPT "S" @@ -960,9 +962,9 @@ elif [ -f "$GROUP/gensites.template" ]; then TEMPLATE=`$GROUP/gensites.template` else - TEMPLATE="$TESTDIR/sites/localhost.xml" + TEMPLATE="$TESTDIR/sites/local/sites.template.xml" fi - + # Give default to _WORK_ if undefined in swift.properties if [ -z "$WORK" ] then @@ -1072,7 +1074,7 @@ checkfail "Could not list: $GROUP" for TEST in $SWIFTS; do - + (( SKIP_COUNTER++ < SKIP_TESTS )) && continue @@ -1089,7 +1091,7 @@ ITERS_LOCAL=`cat $GROUP/$SCRIPT_BASENAME.repeat` else ITERS_LOCAL=1 - fi + fi for (( i=0; $i<$ITERS_LOCAL; i=$i+1 )); do @@ -1100,7 +1102,7 @@ mkdir -p $TESTNAMEDIR pushd $TESTNAMEDIR > /dev/null 2>&1 - cp $TEST . + cp $TEST . group_swift_properties group_sites_xml group_tc_data From swift at ci.uchicago.edu Sat Jan 28 20:50:18 2012 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Sun, 29 Jan 2012 02:50:18 -0000 Subject: [Swift-commit] Cog update Message-ID: <20120129025014.EF5A98D00081@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3355 | hategan | 2012-01-28 20:48:37 -0600 (Sat, 28 Jan 2012) | 1 line merged 0.93 to trunk ------------------------------------------------------------------------ Index: lib/log4j.LICENSE =================================================================== --- lib/log4j.LICENSE (revision 0) +++ lib/log4j.LICENSE (revision 3355) @@ -0,0 +1,49 @@ +/* + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "log4j" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * apache at apache.org. + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation. For more information on the + * Apache Software Foundation, please see . + * + */ + Index: lib/log4j-1.2.8.LICENSE =================================================================== --- lib/log4j-1.2.8.LICENSE (revision 3354) +++ lib/log4j-1.2.8.LICENSE (working copy) @@ -1,49 +0,0 @@ -/* - * ============================================================================ - * The Apache Software License, Version 1.1 - * ============================================================================ - * - * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The end-user documentation included with the redistribution, if any, must - * include the following acknowledgment: "This product includes software - * developed by the Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, if - * and wherever such third-party acknowledgments normally appear. - * - * 4. The names "log4j" and "Apache Software Foundation" must not be used to - * endorse or promote products derived from this software without prior - * written permission. For written permission, please contact - * apache at apache.org. - * - * 5. Products derived from this software may not be called "Apache", nor may - * "Apache" appear in their name, without prior written permission of the - * Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * This software consists of voluntary contributions made by many individuals - * on behalf of the Apache Software Foundation. For more information on the - * Apache Software Foundation, please see . - * - */ - Index: lib/backport-util-concurrent.jar =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lib/log4j-1.2.8.jar =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: modules/provider-localscheduler/.classpath =================================================================== --- modules/provider-localscheduler/.classpath (revision 3354) +++ modules/provider-localscheduler/.classpath (working copy) @@ -10,6 +10,7 @@ - + + Index: modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/pbs/PBSExecutor.java =================================================================== --- modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/pbs/PBSExecutor.java (revision 3354) +++ modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/pbs/PBSExecutor.java (working copy) @@ -31,6 +31,7 @@ public class PBSExecutor extends AbstractExecutor { public static final Logger logger = Logger.getLogger(PBSExecutor.class); + /** Number of program invocations */ @@ -60,7 +61,6 @@ /** The job name is limited to 15 characters: http://doesciencegrid.org/public/pbs/qsub.html - This limit is enforced on Cray machines */ protected void validate(Task task) { String name = task.getName(); @@ -76,10 +76,7 @@ } } else if (name.length() > 15) { - String shorter = name.substring(0, 15); - logger.debug("PBS name: for: " + name + - " is: " + shorter); - task.setName(shorter); + task.setName(name.substring(0, 15)); } } @@ -327,6 +324,7 @@ writer.write("#CoG on date: " + new Date() + "\n\n"); } + private String makeList(Collection names) { StringBuilder sb = new StringBuilder(); Iterator i = names.iterator(); Index: modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/SGEExecutor.java =================================================================== --- modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/SGEExecutor.java (revision 3354) +++ modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/SGEExecutor.java (working copy) @@ -185,7 +185,8 @@ /** * @see AbstractExecutor#start() */ - public void start() throws AuthorizationException, IOException, ProcessException { + public void start() throws AuthorizationException, + IOException, ProcessException { try { Thread.sleep(Integer.valueOf(getSGEProperties().getSubmissionDelay())); } Index: modules/provider-localscheduler/etc/provider-sge.properties =================================================================== --- modules/provider-localscheduler/etc/provider-sge.properties (revision 3354) +++ modules/provider-localscheduler/etc/provider-sge.properties (working copy) @@ -13,14 +13,13 @@ # # The path to qstat. The default assumes that qstat is in PATH # -qstat=qstat +qstat=qstat -xml # # The path to qdel. The default assumes that qdel is in PATH # qdel=qdel - # # If the jobType attribute is specified, then the SGE provider # will look for a property named "wrapper." and prepend @@ -36,6 +35,10 @@ # a default parallel environment. It can be overriden using # the "pe" job attribute # - parallel.environment=1way +# Some systems (notably Ranger) may not adequately handle +# a rapid submission of jobs. Use this setting to introduce +# a delay. The value is in milliseconds (1000ms = 1s) +# +submission.delay=1000 Index: modules/provider-local/.classpath =================================================================== --- modules/provider-local/.classpath (revision 3354) +++ modules/provider-local/.classpath (working copy) @@ -10,7 +10,6 @@ - - + Index: modules/provider-local/.project =================================================================== --- modules/provider-local/.project (revision 3354) +++ modules/provider-local/.project (working copy) @@ -7,6 +7,11 @@ jglobus + + org.eclipse.jdt.core.javabuilder + + + org.eclipse.jdt.core.javanature Index: modules/provider-local/src/org/globus/cog/abstraction/impl/file/local/FileResourceImpl.java =================================================================== --- modules/provider-local/src/org/globus/cog/abstraction/impl/file/local/FileResourceImpl.java (revision 3354) +++ modules/provider-local/src/org/globus/cog/abstraction/impl/file/local/FileResourceImpl.java (working copy) @@ -230,6 +230,9 @@ if (dst.getCanonicalPath().equals(src.getCanonicalPath())) { return; } + + checkParameters(remote, local, src, dst); + FileInputStream remoteStream = null; FileOutputStream localStream = null; try { @@ -239,9 +242,16 @@ long crt = 0; long total = Math.min(src.length(), remote.getLength()); + if (logger.isDebugEnabled()) { + logger.debug(src + ": srclen = " + src.length() + + ", len = " + remote.getLength() + ", total = " + total); + } byte[] buf = new byte[16384]; do { - int read = remoteStream.read(buf, 0, Math.min(buf.length, (int) (total - crt))); + if (logger.isDebugEnabled()) { + logger.debug(src + ": crt = " + crt + ", total - crt = " + (total - crt)); + } + int read = remoteStream.read(buf, 0, (int) Math.min(buf.length, total - crt)); localStream.write(buf, 0, read); crt += read; if (progressMonitor != null) { @@ -263,6 +273,14 @@ } } + private void checkParameters(FileFragment srcf, FileFragment dstf, File src, File dst) throws FileResourceException { + long srcLen = src.length(); + if (srcf.getOffset() > srcLen) { + throw new FileResourceException("Requested file offset (" + + srcf.getOffset() + ") is larger than the file size (" + srcLen + ")"); + } + } + public void putFile(FileFragment local, FileFragment remote, ProgressMonitor progressMonitor) throws FileResourceException { getFile(local, remote, progressMonitor); @@ -439,12 +457,10 @@ return true; } - @Override public boolean supportsPartialTransfers() { return true; } - @Override public boolean supportsThirdPartyTransfers() { return false; } Index: modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java =================================================================== --- modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java (revision 3354) +++ modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java (working copy) @@ -219,7 +219,7 @@ int exitCode = p.waitFor(); if (logger.isDebugEnabled()) { - logger.debug("Exit code was " + exitCode); + logger.debug("Application " + spec.getExecutable() + " failed with an exit code of " + exitCode); } /* @@ -343,6 +343,7 @@ String srcScheme = defaultToLocal(suri.getScheme()); String dstScheme = defaultToLocal(duri.getScheme()); + Service ss = new ServiceImpl(srcScheme, getServiceContact(suri), null); Service ds = new ServiceImpl(dstScheme, getServiceContact(duri), null); @@ -607,7 +608,7 @@ int avail = sp.is.available(); if (avail > 0) { any = true; - int len = sp.is.read(buf); + int len = sp.is.read(buf, 0, Math.min(avail, BUFFER_SIZE)); sp.os.write(buf, 0, len); } } Index: modules/provider-gt2/.classpath =================================================================== --- modules/provider-gt2/.classpath (revision 3354) +++ modules/provider-gt2/.classpath (working copy) @@ -11,7 +11,6 @@ - - + Index: modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/old/FileResourceImpl.java =================================================================== --- modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/old/FileResourceImpl.java (revision 3354) +++ modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/old/FileResourceImpl.java (working copy) @@ -755,12 +755,10 @@ return true; } - @Override public boolean supportsPartialTransfers() { return true; } - @Override public boolean supportsThirdPartyTransfers() { return true; } @@ -849,4 +847,4 @@ } return NF.format(dv) + " " + U[index]; } -} \ No newline at end of file +} Index: modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/ftp/FileResourceImpl.java =================================================================== --- modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/ftp/FileResourceImpl.java (revision 3354) +++ modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/ftp/FileResourceImpl.java (working copy) @@ -563,12 +563,10 @@ return true; } - @Override public boolean supportsPartialTransfers() { return false; } - @Override public boolean supportsThirdPartyTransfers() { return false; } Index: modules/provider-gt4_0_0/.classpath =================================================================== --- modules/provider-gt4_0_0/.classpath (revision 3354) +++ modules/provider-gt4_0_0/.classpath (working copy) @@ -46,6 +46,6 @@ - + Index: modules/provider-ssh/.classpath =================================================================== --- modules/provider-ssh/.classpath (revision 3354) +++ modules/provider-ssh/.classpath (working copy) @@ -11,8 +11,7 @@ - - + Index: modules/provider-ssh/src/org/globus/cog/abstraction/impl/ssh/file/FileResourceImpl.java =================================================================== --- modules/provider-ssh/src/org/globus/cog/abstraction/impl/ssh/file/FileResourceImpl.java (revision 3354) +++ modules/provider-ssh/src/org/globus/cog/abstraction/impl/ssh/file/FileResourceImpl.java (working copy) @@ -386,12 +386,10 @@ throw new TaskSubmissionException("Not implemented"); } - @Override public boolean supportsPartialTransfers() { return false; } - @Override public boolean supportsThirdPartyTransfers() { return false; } Index: modules/provider-coaster/.classpath =================================================================== --- modules/provider-coaster/.classpath (revision 3354) +++ modules/provider-coaster/.classpath (working copy) @@ -11,9 +11,8 @@ - - + Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/CoasterPersistentService.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/CoasterPersistentService.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/CoasterPersistentService.java (working copy) @@ -69,7 +69,7 @@ ap.addFlag("local", "Binds the service to the loopback interface"); ap.addFlag("passive", "Initialize the passive worker service and " + - "set the passive worker manager to be the default"); + "set the passive worker manager to be the default (otherwise the block allocator will be used)"); ap.addFlag("help", "Displays usage information"); ap.addAlias("help", "h"); try { @@ -145,7 +145,12 @@ writePorts(s, portFile, localPortFile); s.setIgnoreIdleTime(true); - s.setDefaultQP("passive"); + if (ap.isPresent("passive")) { + s.setDefaultQP("passive"); + } + else { + s.setDefaultQP("block"); + } s.start(); System.out.println("Started coaster service: " + s); s.waitFor(); Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/local/LocalService.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/local/LocalService.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/local/LocalService.java (working copy) @@ -19,6 +19,7 @@ import org.apache.log4j.Logger; import org.globus.cog.abstraction.coaster.service.Registering; import org.globus.cog.abstraction.impl.common.AbstractionFactory; +import org.globus.cog.abstraction.impl.common.execution.JobException; import org.globus.cog.abstraction.impl.common.task.TaskSubmissionException; import org.globus.cog.abstraction.interfaces.Service; import org.globus.cog.abstraction.interfaces.Status; @@ -117,7 +118,7 @@ throw new TaskSubmissionException("Task ended before registration was received" + (s.getMessage() == null ? ". " : ": " + s.getMessage()) + out("STDOUT", t.getStdOutput()) + out("STDERR", t.getStdError()), - s.getException()); + s.getException() instanceof JobException ? null : s.getException()); } } return services.get(id); @@ -126,7 +127,7 @@ private String out(String name, String value) { if (value != null) { - return "\n" + name + ": " + value; + return "\n" + value; } else { return ""; @@ -146,7 +147,7 @@ } public String registrationReceived(String id, String url, KarajanChannel channel, - Map options) { + Map options) { if (logger.isDebugEnabled()) { logger.debug("Received registration from service " + id + ": " + url); } Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/TCPBufferManager.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/TCPBufferManager.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/TCPBufferManager.java (working copy) @@ -79,7 +79,9 @@ int crt = crtSocketBuffSz / BUFFER_SIZE_GRANULARITY; int old = crt; - logger.debug("crt: " + crt + ", #sockets: " + sockets.size() + ", min: " + min + ", max: " + max); + if (logger.isDebugEnabled()) { + logger.debug("crt: " + crt + ", #sockets: " + sockets.size() + ", min: " + min + ", max: " + max); + } if (sockets.size() == 0) { logger.debug("No sockets"); return; @@ -91,7 +93,9 @@ if (crtSocketBuffSz < MIN_BUFFER_SIZE) { crtSocketBuffSz = MIN_BUFFER_SIZE; } - logger.debug("Adjusting buffer size to " + crtSocketBuffSz); + if (logger.isInfoEnabled()) { + logger.info("Adjusting buffer size to " + crtSocketBuffSz); + } updateBufferSizes(); } } Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/LocalTCPService.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/LocalTCPService.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/LocalTCPService.java (working copy) @@ -51,7 +51,7 @@ } public String registrationReceived(String blockid, String url, - KarajanChannel channel, Map options) throws ChannelException { + KarajanChannel channel) throws ChannelException { if (logger.isInfoEnabled()) { logger.info("Received registration: blockid = " + blockid + ", url = " + url); @@ -61,7 +61,7 @@ String wid = registrationManager.nextId(blockid); cc.getChannelID().setRemoteID(wid); ChannelManager.getManager().registerChannel(cc.getChannelID(), channel); - registrationManager.registrationReceived(blockid, wid, url, cc, options); + registrationManager.registrationReceived(blockid, wid, url, cc); return wid; } Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/Registering.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/Registering.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/Registering.java (working copy) @@ -15,8 +15,7 @@ import org.globus.cog.karajan.workflow.service.channels.KarajanChannel; public interface Registering { - String registrationReceived(String id, String url, KarajanChannel channel, - Map options) throws ChannelException; + String registrationReceived(String id, String url, KarajanChannel channel, Map options) throws ChannelException; void unregister(String id); } Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/ServiceConfigurationHandler.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/ServiceConfigurationHandler.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/ServiceConfigurationHandler.java (working copy) @@ -26,8 +26,6 @@ Settings settings = ((CoasterService) getChannel().getChannelContext().getService()).getJobQueue().getSettings(); - logger.debug(settings); - try { List l = getInDataChunks(); if (l != null) { @@ -37,6 +35,7 @@ settings.set(p[0], p[1]); } } + logger.debug(settings); sendReply("OK"); } catch (Exception e) { Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/TimeInterval.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/TimeInterval.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/TimeInterval.java (working copy) @@ -72,7 +72,7 @@ return ms; } - public static TimeInterval fromSeconds(int seconds) { + public static TimeInterval fromSeconds(long seconds) { return new TimeInterval(seconds * 1000); } Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockTask.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockTask.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockTask.java (working copy) @@ -41,7 +41,11 @@ setSpecification(spec); setName("B" + block.getId()); setAttribute(spec, "maxwalltime", WallTime.format((int) block.getWalltime().getSeconds())); + setAttribute(spec, "jobsPerNode", settings.getJobsPerNode()); + setAttribute(spec, "coresPerNode", settings.getCoresPerNode()); + int count = block.getWorkerCount() / settings.getJobsPerNode(); + if (count > 1) { setAttribute(spec, "jobType", "multiple"); } @@ -51,8 +55,7 @@ for (String name : settings.getAttributeNames()) { setAttribute(spec, name, settings.getAttribute(name)); } - setAttribute(spec, "providerAttributes", settings.getProviderAttributes()); - // logger.trace("providerAttributes: " + settings.getProviderAttributes()); + String libraryPath = settings.getLdLibraryPath(); if (libraryPath != null) spec.addEnvironmentVariable("LD_LIBRARY_PATH", @@ -91,6 +94,7 @@ js.setExecutable("/usr/bin/perl"); js.addArgument(script); } + // Cobalt on Intrepid, if no directory is specified, assumes $CWD for the // job directory. // If $CWD happens to be /scratch/something it has a filter in place Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/JobSet.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/JobSet.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/JobSet.java (working copy) @@ -10,9 +10,10 @@ package org.globus.cog.abstraction.coaster.service.job.manager; import java.util.HashSet; +import java.util.Iterator; import java.util.Set; -public class JobSet { +public class JobSet implements Iterable { private Set jobs; private Metric metric; @@ -56,4 +57,8 @@ return sum; } + + public Iterator iterator() { + return jobs.iterator(); + } } Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java (working copy) @@ -21,6 +21,7 @@ import org.globus.cog.abstraction.coaster.service.CoasterService; import org.globus.cog.abstraction.coaster.service.RegistrationManager; import org.globus.cog.abstraction.impl.common.AbstractionFactory; +import org.globus.cog.abstraction.impl.common.execution.WallTime; import org.globus.cog.abstraction.interfaces.ExecutionService; import org.globus.cog.abstraction.interfaces.Task; import org.globus.cog.karajan.workflow.service.channels.ChannelContext; @@ -160,18 +161,32 @@ public void enqueue1(Task t) { synchronized (incoming) { Job j = new Job(t); - if (logger.isDebugEnabled()) { - logger.debug("Got job with walltime = " + j.getMaxWallTime()); + if (checkJob(j)) { + if (logger.isDebugEnabled()) { + logger.debug("Got job with walltime = " + j.getMaxWallTime()); + } + if (planning) { + incoming.add(j); + } + else { + queue(j); + } } - if (planning) { - incoming.add(j); - } - else { - queue(j); - } } } + private boolean checkJob(Job job) { + if (job.getMaxWallTime().getSeconds() > settings.getMaxtime() - settings.getReserve().getSeconds()) { + job.fail("Job walltime > maxTime - reserve (" + + WallTime.format("hms", job.getMaxWallTime().getSeconds()) + " > " + + WallTime.format("hms", settings.getMaxtime() - settings.getReserve().getSeconds()) + ")", null); + return false; + } + else { + return true; + } + } + public void enqueue(List jobs) { synchronized (incoming) { incoming.addAll(jobs); @@ -179,8 +194,8 @@ } private void queue(Job job) { - synchronized (queued) { - queued.add(job); + synchronized (queued) { + queued.add(job); queued.notify(); } } @@ -245,7 +260,7 @@ } private Set queueToExistingBlocks() { - double runningSize = running.getSizeLeft(); + double runningSize = getRunningSizeLeft(); Set remove = new HashSet(); for (Job j : holding) { if (allocsize - queued.getJSize() - runningSize > metric.getSize(j) && fits(j)) { @@ -261,7 +276,7 @@ private void requeueNonFitting() { int count = 0; - double runningSize = running.getSizeLeft(); + double runningSize = getRunningSizeLeft(); logger.debug("allocsize = " + allocsize + ", queuedsize = " + queued.getJSize() + ", running = " + runningSize + @@ -270,8 +285,13 @@ Job j = queued.removeOne(TimeInterval.FOREVER, Integer.MAX_VALUE); if (j == null) { - CoasterService.error(19, "queued size > 0 but no job dequeued. Queued: " + queued, - new Throwable()); + if (queued.getJSize() > 0) { + CoasterService.error(19, "queuedsize > 0 but no job dequeued. Queued: " + queued, + new Throwable()); + } + else if (allocsize - getRunningSizeLeft() < 0) { + warnAboutWalltimes(running); + } } holding.add(j); count++; @@ -280,7 +300,28 @@ logger.info("Requeued " + count + " non-fitting jobs"); } } + + private void warnAboutWalltimes(Iterable set) { + synchronized(set) { + for (Job r : set) { + if (r.getMaxWallTime().isLessThan(Time.now().subtract(r.getStartTime()))) { + Task t = r.getTask(); + if (t.getAttribute("#warnedAboutWalltime") == null) { + logger.warn("The following job exceeded its walltime: " + + t.getSpecification()); + t.setAttribute("#warnedAboutWalltime", Boolean.TRUE); + } + } + } + } + } + private double getRunningSizeLeft() { + synchronized(running) { + return running.getSizeLeft(); + } + } + private void computeSums() { sums = new ArrayList(holding.size()); sums.add(0); @@ -614,13 +655,17 @@ public Job request(TimeInterval ti, int cpus) { Job job = queued.removeOne(ti, cpus); if (job != null) { - running.add(job); + synchronized(running) { + running.add(job); + } } return job; } public void jobTerminated(Job job) { - running.remove(job); + synchronized(running) { + running.remove(job); + } } /** Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Settings.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Settings.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Settings.java (working copy) @@ -50,13 +50,19 @@ "workerLoggingDirectory", "ldLibraryPath", "workerCopies", "directory", "useHashBang", - "providerAttributes", "parallelism" }; + "parallelism", + "coresPerNode"}; /** * The maximum number of blocks that can be active at one time */ private int slots = 20; private int jobsPerNode = 1; + + /** + * TODO: clarify what this does + */ + private String coresPerNode = "1"; /** * How many nodes to allocate at once @@ -113,7 +119,7 @@ private SecurityContext securityContext; private boolean remoteMonitorEnabled; - + /** * Adjusts the metric used for block sizes. * @@ -155,10 +161,13 @@ private String useHashBang = null; - private String providerAttributes = null; - private final Map attributes; + /** + * A pass-through setting for SGE, parallel environment + */ + private String pe; + public Settings() { hook = new Hook(); callbackURIs = new TreeSet(); @@ -304,14 +313,6 @@ return workerLoggingDirectory; } - public String getProviderAttributes() { - return providerAttributes; - } - - public void setProviderAttributes(String options) { - providerAttributes = options; - } - /** * The following values are considered valid: *
@@ -466,6 +467,13 @@ this.parallelism = parallelism; } + public String getCoresPerNode() { + return coresPerNode; + } + + public void setCoresPerNode(String coresPerNode) { + this.coresPerNode=coresPerNode; + } public String getHookClass() { return hookClass; } @@ -519,7 +527,7 @@ public void setUseHashBang(String uhb) { this.useHashBang = uhb; } - + public void setAttribute(String name, String value) { attributes.put(name, value); } Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Cpu.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Cpu.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Cpu.java (working copy) @@ -20,9 +20,12 @@ import org.globus.cog.abstraction.interfaces.Status; import org.globus.cog.abstraction.interfaces.StatusListener; import org.globus.cog.abstraction.interfaces.Task; +import org.globus.cog.karajan.workflow.service.channels.ChannelListener; +import org.globus.cog.karajan.workflow.service.channels.ChannelManager; import org.globus.cog.karajan.workflow.service.channels.KarajanChannel; import org.globus.cog.karajan.workflow.service.commands.Command; import org.globus.cog.karajan.workflow.service.commands.Command.Callback; +import org.globus.cog.karajan.workflow.service.commands.HeartBeatCommand; public class Cpu implements Comparable, Callback, StatusListener { public static final Logger logger = Logger.getLogger(Cpu.class); @@ -264,10 +267,12 @@ } public void shutdown() { - if (shutdown) { - return; - } - shutdown = true; + synchronized(this) { + if (shutdown) { + return; + } + shutdown = true; + } Block block = node.getBlock(); done.clear(); if (running != null) { Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Block.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Block.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Block.java (working copy) @@ -194,7 +194,7 @@ public void shutdownIfEmpty(Cpu cpu) { synchronized (scpus) { if (scpus.isEmpty()) { - if (logger.isInfoEnabled()) { + if (logger.isInfoEnabled() && !shutdown) { logger.info(this + ": all cpus are clear"); } shutdown(false); @@ -269,9 +269,16 @@ } if (!failed) { if (count < workers || now) { + if (logger.isInfoEnabled()) { + logger.info("Adding short shutdown watchdog: count = " + + count + ", workers = " + workers + ", now = " + now); + } addForcedShutdownWatchdog(100); } else { + if (logger.isInfoEnabled()) { + logger.info("Adding normal shutdown watchdog"); + } addForcedShutdownWatchdog(SHUTDOWN_WATCHDOG_DELAY); } } @@ -304,18 +311,16 @@ } public void forceShutdown() { - if (task != null) { - try { - getSubmitter().cancel(this); - } - catch (Exception e) { - if (failed) - logger.debug("Failed to shut down block: " + - this + " " + e.getMessage()); - else + synchronized(cpus) { + if (task != null) { + try { + getSubmitter().cancel(this); + } + catch (Exception e) { logger.warn("Failed to shut down block: " + this, e); + } + bqp.blockTaskFinished(this); } - bqp.blockTaskFinished(this); } } @@ -375,7 +380,7 @@ } } } - + private int seq; public String nextId() { @@ -414,9 +419,8 @@ } bqp.blockTaskFinished(this); running = false; + task = null; } - logger.info(id + " stdout: " + prettifyOut(task.getStdOutput())); - logger.info(id + " stderr: " + prettifyOut(task.getStdError())); } else if (s.getStatusCode() == Status.ACTIVE) { starttime = Time.now(); Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/PutFileHandler.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/PutFileHandler.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/PutFileHandler.java (working copy) @@ -10,22 +10,30 @@ package org.globus.cog.abstraction.impl.file.coaster.handlers; import java.io.IOException; +import java.util.Arrays; import org.apache.log4j.Logger; +import org.globus.cog.abstraction.impl.file.coaster.buffers.Buffers.Direction; +import org.globus.cog.abstraction.impl.file.coaster.buffers.ThrottleManager; import org.globus.cog.abstraction.impl.file.coaster.handlers.providers.IOHandle; import org.globus.cog.abstraction.impl.file.coaster.handlers.providers.IOProvider; import org.globus.cog.abstraction.impl.file.coaster.handlers.providers.IOProviderFactory; import org.globus.cog.abstraction.impl.file.coaster.handlers.providers.IOWriter; import org.globus.cog.abstraction.impl.file.coaster.handlers.providers.WriteIOCallback; import org.globus.cog.karajan.workflow.service.ProtocolException; +import org.globus.cog.karajan.workflow.service.channels.KarajanChannel; public class PutFileHandler extends CoasterFileRequestHandler implements WriteIOCallback { public static final Logger logger = Logger.getLogger(PutFileHandler.class); + + public static final byte[] STOP = "STOP".getBytes(); + public static final byte[] CONTINUE = "CONTINUE".getBytes(); private long len = -1; private String src, dst; private IOProvider provider; private IOWriter writer; + private boolean done, suspended; public void requestComplete() throws ProtocolException { if (writer != null && provider.isDirect()) { @@ -39,6 +47,10 @@ } protected void addInData(boolean fin, boolean err, byte[] data) { + if (logger.isDebugEnabled()) { + logger.debug(this + " got data, fin = " + fin + + ", err = " + err + ", sz = " + data.length); + } try { if (err) { super.addInData(fin, err, data); @@ -46,22 +58,25 @@ else if (len == -1) { len = unpackLong(data); if (logger.isDebugEnabled()) { - logger.debug(dst + " Size: " + len); + logger.debug(this + " " + dst + " Size: " + len); } } else if (src == null) { src = new String(data); if (logger.isInfoEnabled()) { - logger.info("Source: " + src); + logger.info(this + " source: " + src); } } else if (dst == null) { dst = new String(data); if (logger.isInfoEnabled()) { - logger.info("Destination: " + dst); + logger.info(this + " destination: " + dst); } provider = IOProviderFactory.getDefault().instance(getProtocol(dst)); writer = provider.push(src, dst, this); + if (!provider.isDirect()) { + writer.setUpThrottling(); + } writer.setLength(len); } else { @@ -89,9 +104,49 @@ } } } + + public void suspend() { + synchronized(this) { + if (done) { + return; + } + } + int tag = getId(); + if (logger.isDebugEnabled()) { + logger.debug(this + " suspending"); + } + suspended = true; + getChannel().sendTaggedReply(tag, STOP, KarajanChannel.SIGNAL_FLAG); + writer.suspend(); + } + + public void resume() { + synchronized(this) { + if (done) { + return; + } + setLastTime(System.currentTimeMillis()); + suspended = false; + } + int tag = getId(); + if (logger.isDebugEnabled()) { + logger.debug(this + " resuming"); + } + getChannel().sendTaggedReply(tag, CONTINUE, KarajanChannel.SIGNAL_FLAG); + writer.resume(); + } public void done(IOHandle op) { + synchronized(this) { + done = true; + } + if (!provider.isDirect()) { + writer.cancelThrottling(); + } try { + if (logger.isInfoEnabled()) { + logger.info(this + " Transfer done"); + } sendReply("OK"); } catch (ProtocolException e) { @@ -101,12 +156,19 @@ public void error(IOHandle op, Exception e) { try { + logger.warn("Failed to write file data", e); sendError("Failed to write file data: " + e.getMessage()); } catch (ProtocolException ee) { logger.warn("Failed to send reply", ee); } } + + public void info(String s) { + if (logger.isInfoEnabled()) { + logger.info(this + " -> " + s); + } + } public void sendError(String error, Throwable e) throws ProtocolException { if (provider != null && writer != null) { @@ -130,6 +192,33 @@ logger.info("Failed to close output stream", e); } } + ThrottleManager.getDefault(Direction.OUT).unregister(this); super.errorReceived(msg, t); } + + @Override + public void handleSignal(byte[] data) { + if (Arrays.equals(data, STOP)) { + suspended = true; + } + else if (Arrays.equals(data, CONTINUE)) { + synchronized(this) { + setLastTime(System.currentTimeMillis()); + suspended = false; + } + } + else { + logger.warn("Unhandled signal: " + String.valueOf(data)); + } + } + + @Override + public synchronized long getLastTime() { + if (suspended) { + return Long.MAX_VALUE; + } + else { + return super.getLastTime(); + } + } } Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/GetFileHandler.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/GetFileHandler.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/GetFileHandler.java (working copy) @@ -24,6 +24,8 @@ public class GetFileHandler extends CoasterFileRequestHandler implements SendCallback, ReadIOCallback { public static final Logger logger = Logger.getLogger(GetFileHandler.class); + + public static final String QUEUED = "QUEUED"; // private long size; // private Exception ex; @@ -34,6 +36,9 @@ public void requestComplete() throws ProtocolException { String src = getInDataAsString(0); try { + if (logger.isInfoEnabled()) { + logger.info(this + " request complete"); + } provider = IOProviderFactory.getDefault().instance(getProtocol(src)); sendReply(); } @@ -64,6 +69,10 @@ } public void dataSent() { + if (logger.isDebugEnabled()) { + logger.debug(this + " data sent"); + } + setLastTime(System.currentTimeMillis()); reader.dataSent(); } @@ -71,22 +80,48 @@ if (!lengthSent) { throw new RuntimeException("No length provided"); } + if (logger.isDebugEnabled()) { + logger.debug(this + " sending " + data.limit()); + } getChannel().sendTaggedReply(getId(), data, last, false, this); } + public void queued() { + if (logger.isInfoEnabled()) { + logger.info(this + " sending queued signal"); + } + getChannel().sendTaggedReply(getId(), QUEUED.getBytes(), KarajanChannel.SIGNAL_FLAG, null); + } + + public void info(String msg) { + if (logger.isInfoEnabled()) { + logger.info(this + " -> " + msg); + } + } + public void done(IOHandle op) { + if (logger.isInfoEnabled()) { + logger.info(this + " read done"); + } if (!provider.isDirect()) { - getChannel().sendTaggedReply(getId(), "OK".getBytes(), true, false, null); + getChannel().sendTaggedReply(getId(), "OK".getBytes(), true, false); reader.close(); } } public void error(IOHandle op, Exception e) { - getChannel().sendTaggedReply(getId(), e.getMessage().getBytes(), true, true); + getChannel().sendTaggedReply(getId(), e.getMessage() != null ? e.getMessage().getBytes() : e.toString().getBytes(), + KarajanChannel.FINAL_FLAG + KarajanChannel.ERROR_FLAG); } public void length(long len) { if (provider.isDirect()) { + if (lengthSent) { + logger.warn("length() called twice", new Throwable("xz0001")); + } + if (logger.isInfoEnabled()) { + logger.info(this + " sending length: " + len + ", " + System.identityHashCode(this)); + } lengthSent = true; getChannel().sendTaggedReply(getId(), pack(len), len == 0, false); } Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/WriteIOCallback.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/WriteIOCallback.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/WriteIOCallback.java (working copy) @@ -11,4 +11,10 @@ public interface WriteIOCallback extends IOCallback { + void info(String valueOf); + + void suspend(); + + void resume(); + } Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/ReadIOCallback.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/ReadIOCallback.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/ReadIOCallback.java (working copy) @@ -15,4 +15,8 @@ void length(long len); void data(IOHandle handle, ByteBuffer data, boolean last); + + void info(String msg); + + void queued(); } Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/CoGResourceIOProvider.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/CoGResourceIOProvider.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/CoGResourceIOProvider.java (working copy) @@ -18,8 +18,10 @@ import org.apache.log4j.Logger; import org.globus.cog.abstraction.impl.file.coaster.buffers.Buffers; +import org.globus.cog.abstraction.impl.file.coaster.buffers.Buffers.Direction; import org.globus.cog.abstraction.impl.file.coaster.buffers.ReadBuffer; import org.globus.cog.abstraction.impl.file.coaster.buffers.ReadBufferCallback; +import org.globus.cog.abstraction.impl.file.coaster.buffers.ThrottleManager; import org.globus.cog.abstraction.impl.file.coaster.buffers.WriteBuffer; import org.globus.cog.abstraction.impl.file.coaster.buffers.WriteBufferCallback; import org.globus.cog.abstraction.impl.file.coaster.handlers.CoasterFileRequestHandler; @@ -44,6 +46,8 @@ } private static class Writer implements IOWriter, WriteBufferCallback, Abortable { + private static final Direction BUFDIR = Direction.OUT; + private File f; private long len, crt; private WriteIOCallback cb; @@ -71,7 +75,7 @@ cb.done(this); } else { - buf = Buffers.newWriteBuffer(new FileOutputStream(f).getChannel(), this); + buf = Buffers.newWriteBuffer(Buffers.getBuffers(BUFDIR), new FileOutputStream(f).getChannel(), this); } } @@ -103,6 +107,28 @@ buf.close(); f.delete(); } + + /** + * Used to notify upstream handler that the transfer + * has been suspended and that what otherwise would be + * timeouts are benign + */ + public void suspend() { + } + + /** + * The opposite of suspend() + */ + public void resume() { + } + + public void setUpThrottling() { + Buffers.getBuffers(BUFDIR).getThrottleManager().register(cb); + } + + public void cancelThrottling() { + ThrottleManager.getDefault(BUFDIR).unregister(cb); + } } private static class Reader implements IOReader, ReadBufferCallback { @@ -125,7 +151,7 @@ cb.length(f.length()); try { synchronized (this) { - rbuf = Buffers.newReadBuffer(fc, f.length(), this); + rbuf = Buffers.newReadBuffer(Buffers.getBuffers(Direction.IN), fc, f.length(), this); } } catch (InterruptedException e) { @@ -144,6 +170,10 @@ } } + public void queued() { + cb.queued(); + } + private synchronized void closeBuffer() { try { rbuf.close(); Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/IOWriter.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/IOWriter.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/IOWriter.java (working copy) @@ -17,4 +17,12 @@ void close() throws IOException; void write(boolean last, byte[] data) throws IOException; + + void suspend(); + + void resume(); + + void setUpThrottling(); + + void cancelThrottling(); } Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/ProxyIOProvider.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/ProxyIOProvider.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/ProxyIOProvider.java (working copy) @@ -14,15 +14,22 @@ import java.net.URI; import java.net.URISyntaxException; import java.nio.ByteBuffer; +import java.util.Arrays; import java.util.LinkedList; +import java.util.List; import org.apache.log4j.Logger; import org.globus.cog.abstraction.impl.file.coaster.buffers.Buffers; +import org.globus.cog.abstraction.impl.file.coaster.buffers.Buffers.Allocation; +import org.globus.cog.abstraction.impl.file.coaster.buffers.Buffers.Direction; import org.globus.cog.abstraction.impl.file.coaster.buffers.ReadBuffer; import org.globus.cog.abstraction.impl.file.coaster.buffers.ReadBufferCallback; +import org.globus.cog.abstraction.impl.file.coaster.buffers.ThrottleManager; import org.globus.cog.abstraction.impl.file.coaster.buffers.WriteBuffer; import org.globus.cog.abstraction.impl.file.coaster.commands.GetFileCommand; import org.globus.cog.abstraction.impl.file.coaster.commands.PutFileCommand; +import org.globus.cog.abstraction.impl.file.coaster.handlers.GetFileHandler; +import org.globus.cog.abstraction.impl.file.coaster.handlers.PutFileHandler; import org.globus.cog.karajan.workflow.service.ProtocolException; import org.globus.cog.karajan.workflow.service.channels.ChannelException; import org.globus.cog.karajan.workflow.service.channels.ChannelManager; @@ -53,10 +60,20 @@ } private static class Writer implements IOWriter, Callback { + /** + * Reverse the buffer direction compared to the local IO provider. + * The actual label on the set of buffers is not relevant as long as + * they are different on one JVM instance. But when using proxy mode + * in local:local (i.e. both service and client in the same JVM) this + * avoids a deadlock. + */ + private static Direction BUFDIR = Direction.IN; + private CustomPutFileCmd cmd; private WriteIOCallback cb; private KarajanChannel channel; private String src, dst; + private boolean done, suspended; public Writer(String src, String dst, WriteIOCallback cb) throws IOException { this.cb = cb; @@ -80,6 +97,16 @@ cmd = new CustomPutFileCmd(src, "file://localhost/" + uri.getPath().substring(1), len, this); channel = ChannelManager.getManager().reserveChannel("id://" + uri.getHost(), null); cmd.executeAsync(channel, this); + cb.info(String.valueOf(cmd.getId())); + synchronized(this) { + if (!suspended) { + return; + } + } + if (logger.isInfoEnabled()) { + logger.info(cmd.getId() + " suspended before. Sending signal."); + } + cmd.suspend(); } catch (Exception e) { throw new IOException(e.getMessage()); @@ -88,6 +115,7 @@ public void write(boolean last, byte[] data) throws IOException { try { + done = last; cmd.getBuffer().queue(last, ByteBuffer.wrap(data)); } catch (InterruptedException e) { @@ -106,11 +134,44 @@ public void abort() throws IOException { close(); } + + public void suspend() { + if (!done) { + synchronized(this) { + if (cmd == null) { + suspended = true; + return; + } + } + cmd.suspend(); + } + } + + public void resume() { + if (!done) { + synchronized(this) { + if (cmd == null) { + suspended = false; + return; + } + } + cmd.resume(); + } + } + + public void setUpThrottling() { + Buffers.getBuffers(BUFDIR).getThrottleManager().register(cb); + } + + public void cancelThrottling() { + ThrottleManager.getDefault(BUFDIR).unregister(cb); + } } private static class CustomPutFileCmd extends PutFileCommand { private CReadBuffer buffer; private Writer handle; + private boolean suspended; public CustomPutFileCmd(String local, String remote, long length, Writer handle) throws IOException, InterruptedException { @@ -118,8 +179,31 @@ this.handle = handle; } + public void resume() { + synchronized(this) { + setLastTime(System.currentTimeMillis()); + suspended = false; + } + getChannel().sendTaggedData(getId(), KarajanChannel.SIGNAL_FLAG, PutFileHandler.CONTINUE); + } + + public void suspend() { + suspended = true; + getChannel().sendTaggedData(getId(), KarajanChannel.SIGNAL_FLAG, PutFileHandler.STOP); + } + + @Override + public synchronized long getLastTime() { + if (suspended) { + return Long.MAX_VALUE; + } + else { + return super.getLastTime(); + } + } + protected ReadBuffer createBuffer() throws FileNotFoundException, InterruptedException { - return buffer = new CReadBuffer(Buffers.getDefault(), this); + return buffer = new CReadBuffer(Buffers.getBuffers(Direction.IN), this); } public CReadBuffer getBuffer() { @@ -137,6 +221,7 @@ } private static class CReadBuffer extends ReadBuffer { + // private Exception error; // private BlockingQueue queue; // private boolean seenLast; @@ -153,17 +238,20 @@ getCallback().error(true, e); } - public synchronized void queue(boolean last, ByteBuffer buf) throws InterruptedException { - while (crt >= Buffers.ENTRIES_PER_STREAM) { - wait(); + public void queue(boolean last, ByteBuffer buf) throws InterruptedException { + if (logger.isDebugEnabled()) { + logger.debug(getCallback() + " got data"); } - crt++; - alloc.add(buffers.request(1)); - /* if (last) { - seenLast = true; - } */ + Buffers.Allocation a = buffers.request(1); + synchronized(this) { + crt++; + alloc.add(a); + /* if (last) { + seenLast = true; + } */ + } getCallback().dataRead(last, buf); - } + } public synchronized void freeFirst() { buffers.free(alloc.removeFirst()); @@ -174,7 +262,7 @@ protected void deallocateBuffers() { } - public void doStuff(boolean last, ByteBuffer b) { + public void doStuff(boolean last, ByteBuffer b, Buffers.Allocation alloc) { // not used } } @@ -223,6 +311,7 @@ logger.debug("Sending proxy get"); cmd.executeAsync(channel, this); logger.debug("Proxy get sent"); + cb.info(String.valueOf(cmd.getId())); } catch (ProtocolException e) { logger.warn("Error requesting file from " + channel, e); @@ -249,6 +338,7 @@ } public void dataSent() { + cmd.cwb.releaseOne(); } public void errorReceived(Command cmd, String msg, Exception t) { @@ -273,6 +363,7 @@ private static class CustomGetFileCmd extends GetFileCommand { private final ReadIOCallback cb; private final Reader handle; + public CWriteBuffer cwb; public CustomGetFileCmd(String src, String dst, Reader handle) throws IOException { super(src, dst, null); @@ -284,24 +375,42 @@ } protected WriteBuffer createWriteBuffer() throws IOException { - return new CWriteBuffer(Buffers.getDefault(), this); + return cwb = new CWriteBuffer(Buffers.getBuffers(Direction.OUT), this); } protected void setLen(long len) { super.setLen(len); cb.length(len); } + + @Override + public void handleSignal(byte[] data) { + if (Arrays.equals(GetFileHandler.QUEUED.getBytes(), data)) { + setQueued(true); + cb.queued(); + } + } } private static class CWriteBuffer extends WriteBuffer { private final CustomGetFileCmd cmd; + public List alloc; protected CWriteBuffer(Buffers buffers, CustomGetFileCmd cmd) { super(buffers); this.cmd = cmd; + alloc = new LinkedList(); } - public void doStuff(boolean last, ByteBuffer b) { + public void releaseOne() { + Allocation a; + synchronized(alloc) { + a = alloc.remove(0); + } + buffers.free(a); + } + + public void doStuff(boolean last, ByteBuffer b, Buffers.Allocation alloc) { try { cmd.cb.data(cmd.handle, b, last); } @@ -309,6 +418,14 @@ e.printStackTrace(); } } + + public void write(boolean last, byte[] data) throws InterruptedException { + Allocation a = buffers.request(1); + synchronized(alloc) { + alloc.add(a); + } + buffers.queueRequest(last, ByteBuffer.wrap(data), this); + } private byte[] getByteArray(ByteBuffer b) { if (b.hasArray()) { Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/LocalCopyIOProvider.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/LocalCopyIOProvider.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/LocalCopyIOProvider.java (working copy) @@ -110,5 +110,21 @@ super(src, getPath(dest), cb); start(); } + + public void suspend() { + // not used + } + + public void resume() { + // not used + } + + public void setUpThrottling() { + // not used + } + + public void cancelThrottling() { + // not used + } } } Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/LocalIOProvider.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/LocalIOProvider.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/LocalIOProvider.java (working copy) @@ -22,8 +22,10 @@ import org.globus.cog.abstraction.impl.file.coaster.buffers.Buffers; import org.globus.cog.abstraction.impl.file.coaster.buffers.ReadBuffer; import org.globus.cog.abstraction.impl.file.coaster.buffers.ReadBufferCallback; +import org.globus.cog.abstraction.impl.file.coaster.buffers.ThrottleManager; import org.globus.cog.abstraction.impl.file.coaster.buffers.WriteBuffer; import org.globus.cog.abstraction.impl.file.coaster.buffers.WriteBufferCallback; +import org.globus.cog.abstraction.impl.file.coaster.buffers.Buffers.Direction; import org.globus.cog.abstraction.impl.file.coaster.handlers.CoasterFileRequestHandler; public class LocalIOProvider implements IOProvider { @@ -55,6 +57,8 @@ } private static class Writer implements IOWriter, WriteBufferCallback, Abortable { + private static Direction BUFDIR = Direction.OUT; + private File f; private long len, crt; private WriteIOCallback cb; @@ -86,7 +90,7 @@ throw new IOException("Failed to create directory " + p.getAbsolutePath()); } } - buf = Buffers.newWriteBuffer(new FileOutputStream(f).getChannel(), this); + buf = Buffers.newWriteBuffer(Buffers.getBuffers(Direction.OUT), new FileOutputStream(f).getChannel(), this); } } @@ -118,6 +122,22 @@ buf.close(); f.delete(); } + + public void suspend() { + // not used + } + + public void resume() { + // not used + } + + public void setUpThrottling() { + Buffers.getBuffers(BUFDIR).getThrottleManager().register(cb); + } + + public void cancelThrottling() { + ThrottleManager.getDefault(BUFDIR).unregister(cb); + } } private static class Reader implements IOReader, ReadBufferCallback { @@ -142,7 +162,7 @@ cb.length(f.length()); try { synchronized(this) { - rbuf = Buffers.newReadBuffer(fc, f.length(), this); + rbuf = Buffers.newReadBuffer(Buffers.getBuffers(Direction.IN), fc, f.length(), this); } } catch (InterruptedException e) { @@ -151,6 +171,7 @@ } public synchronized void dataSent() { + logger.debug("Data sent"); rbuf.freeFirst(); } @@ -161,6 +182,10 @@ } } + public void queued() { + cb.queued(); + } + private synchronized void closeBuffer() { try { rbuf.close(); Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/commands/PutFileCommand.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/commands/PutFileCommand.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/commands/PutFileCommand.java (working copy) @@ -19,6 +19,7 @@ import org.globus.cog.abstraction.impl.file.coaster.buffers.Buffers; import org.globus.cog.abstraction.impl.file.coaster.buffers.ReadBuffer; import org.globus.cog.abstraction.impl.file.coaster.buffers.ReadBufferCallback; +import org.globus.cog.abstraction.impl.file.coaster.buffers.Buffers.Direction; import org.globus.cog.karajan.workflow.service.ProtocolException; import org.globus.cog.karajan.workflow.service.channels.KarajanChannel; import org.globus.cog.karajan.workflow.service.commands.Command; @@ -27,6 +28,7 @@ public static final Logger logger = Logger.getLogger(PutFileCommand.class); public static final String NAME = "PUT"; + public static final String QUEUED = "QUEUED"; private String dest; private long size; @@ -34,6 +36,7 @@ private ReadBuffer rbuf; // private Exception ex; private String src; + private boolean done; public PutFileCommand(String src, String dest) throws IOException, InterruptedException { this(src, dest, new File(src).length()); @@ -50,7 +53,7 @@ } protected ReadBuffer createBuffer() throws FileNotFoundException, InterruptedException { - return Buffers.newReadBuffer(new FileInputStream(src).getChannel(), size, this); + return Buffers.newReadBuffer(Buffers.getBuffers(Direction.OUT), new FileInputStream(src).getChannel(), size, this); } public void send() throws ProtocolException { @@ -61,27 +64,46 @@ if (channel == null) { throw new ProtocolException("Unregistered command"); } + + long now = System.currentTimeMillis(); + setSendReqTime(now); + setLastTime(now); + if (logger.isDebugEnabled()) { + logger.debug(this + ", src: " + src + ", dest: " + dest + ", size: " + size); + } channel.sendTaggedData(getId(), false, getOutCmd().getBytes()); channel.sendTaggedData(getId(), false, pack(size)); channel.sendTaggedData(getId(), false, src.getBytes()); channel.sendTaggedData(getId(), size == 0, dest.getBytes()); if (logger.isInfoEnabled()) { - logger.info("Sending data"); + logger.info(this + " sending data"); } } public void dataSent() { + super.dataSent(); + if (logger.isDebugEnabled()) { + logger.debug(this + " data sent"); + } rbuf.freeFirst(); } public void dataRead(boolean last, ByteBuffer buf) { + if (logger.isDebugEnabled()) { + logger.debug(this + " data read, last = " + last); + } getChannel().sendTaggedData(getId(), last ? KarajanChannel.FINAL_FLAG : 0, buf, this); if (last) { + done = true; closeBuffer(); } } + public void queued() { + getChannel().sendTaggedData(getId(), KarajanChannel.SIGNAL_FLAG, QUEUED.getBytes()); + } + private void closeBuffer() { try { rbuf.close(); @@ -95,4 +117,8 @@ getChannel().sendTaggedReply(getId(), e.getMessage().getBytes(), true, true, null); closeBuffer(); } + + public String toString() { + return super.toString() + (done ? " (d)" : " (t)"); + } } Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/commands/GetFileCommand.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/commands/GetFileCommand.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/commands/GetFileCommand.java (working copy) @@ -11,11 +11,14 @@ import java.io.FileOutputStream; import java.io.IOException; +import java.util.Arrays; import org.apache.log4j.Logger; import org.globus.cog.abstraction.impl.file.coaster.buffers.Buffers; +import org.globus.cog.abstraction.impl.file.coaster.buffers.Buffers.Direction; +import org.globus.cog.abstraction.impl.file.coaster.buffers.WriteBuffer; import org.globus.cog.abstraction.impl.file.coaster.buffers.WriteBufferCallback; -import org.globus.cog.abstraction.impl.file.coaster.buffers.WriteBuffer; +import org.globus.cog.abstraction.impl.file.coaster.handlers.GetFileHandler; import org.globus.cog.abstraction.interfaces.ProgressMonitor; import org.globus.cog.karajan.workflow.service.commands.Command; @@ -25,6 +28,7 @@ private long len = -1; private WriteBuffer wt; private String dst; + private boolean queued; // private ProgressMonitor pm; public GetFileCommand(String src, String dst, ProgressMonitor pm) @@ -41,10 +45,11 @@ } protected WriteBuffer createWriteBuffer() throws IOException { - return Buffers.newWriteBuffer(new FileOutputStream(dst).getChannel(), this); + return Buffers.newWriteBuffer(Buffers.getBuffers(Direction.IN), new FileOutputStream(dst).getChannel(), this); } protected void addInData(boolean fin, boolean err, byte[] data) { + queued = false; if (err) { super.addInData(fin, err, data); } @@ -84,6 +89,30 @@ } } + @Override + public void handleSignal(byte[] data) { + if (Arrays.equals(GetFileHandler.QUEUED.getBytes(), data)) { + setQueued(true); + } + } + + protected void setQueued(boolean queued) { + if (logger.isInfoEnabled()) { + logger.info(this + " queued"); + } + this.queued = queued; + } + + @Override + public long getLastTime() { + if (queued) { + return Long.MAX_VALUE; + } + else { + return super.getLastTime(); + } + } + public void error(boolean last, Exception e) { this.errorReceived("Failed to write file data", e); } Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/ThrottleManager.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/ThrottleManager.java (revision 0) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/ThrottleManager.java (revision 3355) @@ -0,0 +1,140 @@ +//---------------------------------------------------------------------- +//This code is developed as part of the Java CoG Kit project +//The terms of the license can be found at http://www.cogkit.org/license +//This message may not be removed or altered. +//---------------------------------------------------------------------- + +/* + * Created on Oct 14, 2011 + */ +package org.globus.cog.abstraction.impl.file.coaster.buffers; + +import java.util.Stack; + +import org.apache.log4j.Logger; +import org.globus.cog.abstraction.impl.file.coaster.buffers.Buffers.Direction; +import org.globus.cog.abstraction.impl.file.coaster.handlers.PutFileHandler; +import org.globus.cog.abstraction.impl.file.coaster.handlers.providers.WriteIOCallback; +import org.globus.cog.karajan.workflow.service.channels.PerformanceDiagnosticInputStream; + +public class ThrottleManager { + public static final Logger logger = Logger.getLogger(ThrottleManager.class); + + private static final ThrottleManager IN = new ThrottleManager(Direction.IN); + private static final ThrottleManager OUT = new ThrottleManager(Direction.OUT); + + public static final int MAX_CONCURRENT_TRANSFERS = 256; + public static final double LAMBDA = 3; + + public static final long MIN_UPDATE_INTERVAL = 500; //ms + + /* + * lambda = 0.2 gives a nice curve like this: + * http://www.wolframalpha.com/input/?i=plot+256*exp%28-0.2*%28x%2F%28512-x%2B0.0001%29%29%29%2C+x+%3D+0+to+512 + */ + + public static ThrottleManager getDefault(Direction dir) { + switch (dir) { + case IN: return IN; + case OUT: return OUT; + default: return null; + } + } + + private Stack active, suspended; + private long lastTime; + private int lastMaxTransfers; + private Direction dir; + + public ThrottleManager(Direction dir) { + this.dir = dir; + active = new Stack(); + suspended = new Stack(); + lastTime = System.currentTimeMillis(); + lastMaxTransfers = MAX_CONCURRENT_TRANSFERS; + } + + public void register(WriteIOCallback cb) { + synchronized(this) { + if (active.size() > lastMaxTransfers) { + cb.suspend(); + // put this at the bottom of the stack, so earlier transfers + // get priority + suspended.insertElementAt(cb, 0); + } + else { + active.push(cb); + } + } + } + + public void unregister(WriteIOCallback cb) { + synchronized(this) { + if (!active.remove(cb)) { + suspended.remove(cb); + } + } + } + + public void update(int maxBuffers, int crtBuffers) { + long now = System.currentTimeMillis(); + if (now - lastTime < MIN_UPDATE_INTERVAL) { + return; + } + lastTime = now; + int allowed = allowedTransfers(maxBuffers, crtBuffers); + log(allowed, maxBuffers, crtBuffers); + // Use stacks because of the assumption that it's better to have + // some transfers prioritized + synchronized(this) { + while (active.size() > allowed) { + suspendOne(); + } + while (active.size() < allowed && !suspended.isEmpty()) { + resumeOne(); + } + } + } + + private void log(int allowed, int maxBuffers, int crtBuffers) { + if (logger.isInfoEnabled()) { + logger.info(dir + " maxBuffers=" + maxBuffers + ", crtBuffers=" + crtBuffers + + ", allowedTransfers=" + allowed + ", active=" + active.size() + + ", suspended=" + suspended.size()); + Runtime r = Runtime.getRuntime(); + if (dir == Direction.OUT) { + logger.info("mem=" + PerformanceDiagnosticInputStream.units(r.totalMemory() - r.freeMemory()) + + "B, heap=" + PerformanceDiagnosticInputStream.units(r.totalMemory()) + + "B, maxHeap=" + PerformanceDiagnosticInputStream.units(r.maxMemory()) + "B"); + } + } + } + + private void suspendOne() { + WriteIOCallback h = active.pop(); + h.suspend(); + suspended.push(h); + } + + private void resumeOne() { + WriteIOCallback h = suspended.pop(); + h.resume(); + active.push(h); + } + + private int allowedTransfers(int maxBuffers, int crtBuffers) { + // 0 when crtBuffers = maxBuffers + // MAX_CONCURRENT_TRANSFERS when crtBuffers = 0 + // some smooth function in between + // the 0.0001 is there to approximate +inf when maxBuffers = crtBuffers. + if (maxBuffers < crtBuffers) { + return 0; + } + int allowed = (int) Math.round(MAX_CONCURRENT_TRANSFERS * + Math.exp(-LAMBDA * (crtBuffers/(maxBuffers - crtBuffers + 0.0001)))); + if (allowed < 0) { + allowed = 0; + } + return allowed; + } +} Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/InputStreamReadBuffer.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/InputStreamReadBuffer.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/InputStreamReadBuffer.java (working copy) @@ -25,14 +25,14 @@ init(); } - public void doStuff(boolean last, ByteBuffer b) { + public void doStuff(boolean last, ByteBuffer b, Buffers.Allocation alloc) { if (read >= size) { return; } + if (alloc != null) { + bufferCreated(alloc); + } try { - if (b == null) { - b = allocateOneBuffer(); - } if (b.hasArray()) { int len = is.read(b.array()); b.limit(len); Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/OutputStreamWriteBuffer.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/OutputStreamWriteBuffer.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/OutputStreamWriteBuffer.java (working copy) @@ -24,7 +24,7 @@ this.cb = cb; } - public void doStuff(boolean last, ByteBuffer b) { + public void doStuff(boolean last, ByteBuffer b, Buffers.Allocation alloc) { try { os.write(toByteArray(b)); b.rewind(); Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/ReadBufferCallback.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/ReadBufferCallback.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/ReadBufferCallback.java (working copy) @@ -15,4 +15,6 @@ void dataRead(boolean last, ByteBuffer buf); void error(boolean last, Exception e); + + void queued(); } Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/NIOChannelWriteBuffer.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/NIOChannelWriteBuffer.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/NIOChannelWriteBuffer.java (working copy) @@ -24,14 +24,14 @@ this.cb = cb; } - public void doStuff(boolean last, ByteBuffer b) { + public void doStuff(boolean last, ByteBuffer b, Buffers.Allocation alloc) { try { channel.write(b); b.rewind(); - cb.done(last); if (last) { channel.close(); } + cb.done(last); } catch (IOException e) { cb.error(last, e); Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/NIOChannelReadBuffer.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/NIOChannelReadBuffer.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/NIOChannelReadBuffer.java (working copy) @@ -13,7 +13,11 @@ import java.nio.ByteBuffer; import java.nio.channels.ScatteringByteChannel; +import org.apache.log4j.Logger; + public class NIOChannelReadBuffer extends ReadBuffer { + public static final Logger logger = Logger.getLogger(NIOChannelReadBuffer.class); + private ScatteringByteChannel channel; private long crt; private Exception ex; @@ -25,14 +29,20 @@ init(); } - public void doStuff(boolean last, ByteBuffer b) { + public void doStuff(boolean last, ByteBuffer b, Buffers.Allocation alloc) { if (read >= size) { + if (logger.isDebugEnabled()) { + logger.debug("Transfer done. De-allocating one unused buffer"); + } + if (alloc != null) { + buffers.free(alloc); + } return; } + if (alloc != null) { + bufferCreated(alloc); + } try { - if (b == null) { - b = allocateOneBuffer(); - } channel.read(b); b.limit(b.position()); b.rewind(); Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/ReadBuffer.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/ReadBuffer.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/ReadBuffer.java (working copy) @@ -11,17 +11,23 @@ import java.io.IOException; import java.nio.ByteBuffer; +import java.util.ArrayList; import java.util.LinkedList; +import java.util.List; +import org.apache.log4j.Logger; + public abstract class ReadBuffer extends Buffer { + public static final Logger logger = Logger.getLogger(ReadBuffer.class); + private final ReadBufferCallback cb; protected LinkedList full; protected LinkedList empty; protected long read; protected long size; - protected Buffers.Allocation alloc; + protected List allocs; protected ReadBuffer(Buffers buffers, ReadBufferCallback cb, long size) { super(buffers); @@ -36,21 +42,25 @@ protected void init() throws InterruptedException { full = new LinkedList(); empty = new LinkedList(); - for (int i = 0; i < Buffers.ENTRIES_PER_STREAM; i++) { + allocs = new ArrayList(); + + int nbuf = Math.min((int) (size / Buffers.ENTRY_SIZE) + 1, Buffers.ENTRIES_PER_STREAM); + + if (logger.isInfoEnabled()) { + logger.info("Will ask for " + nbuf + " buffers for a size of " + size); + } + + for (int i = 0; i < nbuf; i++) { // these will be allocated when the first read happens, // which also happens to happen in the I/O thread empty.add(null); } - requestFill(); + if (requestFill() == nbuf) { + // all buffers are queued + cb.queued(); + } } - protected ByteBuffer allocateOneBuffer() throws InterruptedException { - if (alloc == null) { - alloc = buffers.request(Buffers.ENTRIES_PER_STREAM); - } - return ByteBuffer.allocate(Buffers.ENTRY_SIZE); - } - public void freeFirst() { ByteBuffer b; synchronized (this) { @@ -61,16 +71,20 @@ requestFill(); } - protected void requestFill() { + protected int requestFill() { + int queued = 0; synchronized (empty) { while (!empty.isEmpty() && read < size) { ByteBuffer buf = empty.removeFirst(); if (buf != null) { buf.clear(); } - buffers.queueRequest(false, buf, this); + if (buffers.queueRequest(false, buf, this)) { + queued++; + } } } + return queued; } public void error(ByteBuffer buf, Exception e) { @@ -88,8 +102,20 @@ getCallback().dataRead(read == size, buf); } + protected void bufferCreated(Buffers.Allocation a) { + if (logger.isDebugEnabled()) { + logger.debug("buffer created"); + } + allocs.add(a); + } + protected void deallocateBuffers() { - buffers.free(alloc); + if (logger.isInfoEnabled()) { + logger.info("De-allocating " + allocs.size() + " buffers"); + } + for (Buffers.Allocation a : allocs) { + buffers.free(a); + } } public void close() throws IOException { Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/Buffer.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/Buffer.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/Buffer.java (working copy) @@ -18,7 +18,7 @@ this.buffers = buffers; } - public abstract void doStuff(boolean last, ByteBuffer b); + public abstract void doStuff(boolean last, ByteBuffer b, Buffers.Allocation alloc); public void close() throws IOException { } Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/Buffers.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/Buffers.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/buffers/Buffers.java (working copy) @@ -23,24 +23,51 @@ public static final int ENTRY_SIZE = 32768; public static final int ENTRIES_PER_STREAM = 16; - public static final int MAX_ENTRIES = 256; + public static final int MAX_ENTRIES = 512; // 16 MB public static final int PERFORMANCE_LOGGING_INTERVAL = 10000; + + public static enum Direction { + IN("I"), OUT("O"); + + private String name; + + Direction(String name) { + this.name = name; + } - private static final Buffers INSTANCE = new Buffers(); + @Override + public String toString() { + return name; + } + } + private static final Buffers OUTB = new Buffers(Direction.OUT); + private static final Buffers INB = new Buffers(Direction.IN); + private LinkedList queue; + private LinkedList waiting; + private Object sizeLock = new Object(); private int crt; private long lastTime, bufTime; private double avgBuffersUsed; private int maxBuffersUsed, minBuffersUsed; + private Direction dir; + private ThrottleManager throttleManager; - public Buffers() { + public Buffers(Direction dir) { + this.dir = dir; + this.throttleManager = ThrottleManager.getDefault(dir); queue = new LinkedList(); + waiting = new LinkedList(); setName("I/O Queue"); setDaemon(true); start(); } + + public ThrottleManager getThrottleManager() { + return throttleManager; + } public synchronized void start() { super.start(); @@ -55,42 +82,41 @@ maxBuffersUsed = 0; } - public static ReadBuffer newReadBuffer(ScatteringByteChannel channel, long size, + public static ReadBuffer newReadBuffer(Buffers buffers, ScatteringByteChannel channel, long size, ReadBufferCallback cb) throws InterruptedException { - return new NIOChannelReadBuffer(INSTANCE, channel, size, cb); + return new NIOChannelReadBuffer(buffers, channel, size, cb); } - public static ReadBuffer newReadBuffer(InputStream is, long size, ReadBufferCallback cb) + public static ReadBuffer newReadBuffer(Buffers buffers, InputStream is, long size, ReadBufferCallback cb) throws InterruptedException { - return new InputStreamReadBuffer(INSTANCE, is, size, cb); + return new InputStreamReadBuffer(buffers, is, size, cb); } - public static WriteBuffer newWriteBuffer(GatheringByteChannel channel, WriteBufferCallback cb) { - return new NIOChannelWriteBuffer(INSTANCE, channel, cb); + public static WriteBuffer newWriteBuffer(Buffers buffers, GatheringByteChannel channel, WriteBufferCallback cb) { + return new NIOChannelWriteBuffer(buffers, channel, cb); } - public static WriteBuffer newWriteBuffer(OutputStream os, WriteBufferCallback cb) { - return new OutputStreamWriteBuffer(INSTANCE, os, cb); + public static WriteBuffer newWriteBuffer(Buffers buffers, OutputStream os, WriteBufferCallback cb) { + return new OutputStreamWriteBuffer(buffers, os, cb); } - public synchronized void queueRequest(boolean last, ByteBuffer buf, Buffer buffer) { - queue.add(new Entry(last, buf, buffer)); - notify(); - } - - public Allocation request(int count) throws InterruptedException { - synchronized (sizeLock) { - while (crt + count > MAX_ENTRIES) { - sizeLock.wait(1000); + public synchronized boolean queueRequest(boolean last, ByteBuffer buf, Buffer buffer) { + Entry e = new Entry(last, buf, buffer); + if (buf == null && crt > MAX_ENTRIES) { + waiting.add(e); + return true; + } + else { + queue.add(e); + if (buf == null) { + // not a pre-allocated buffer + crt++; } - updateBuffersUsed(); - crt += count; - Allocation a = new Allocation(count); - assert(!a.free); - return a; + notify(); + return false; } } - + private void updateBuffersUsed() { long time = System.currentTimeMillis(); avgBuffersUsed += (time - bufTime) * crt; @@ -102,41 +128,71 @@ } bufTime = time; } - - public void free(Allocation alloc) { - synchronized (sizeLock) { - if (alloc == null) { - throw new IllegalArgumentException("Null alloc"); + + public synchronized Allocation request(int count) throws InterruptedException { + if (logger.isDebugEnabled()) { + logger.debug(dir + " request " + count + ", crt = " + crt + ", max = " + MAX_ENTRIES); + } + while (crt >= MAX_ENTRIES) { + if (logger.isDebugEnabled()) { + logger.debug(dir + " max buffers reached. Waiting..."); } - if (alloc.free) { - logger.warn("Trying to release buffer allocation twice", new Exception()); - return; - } - updateBuffersUsed(); - crt -= alloc.count; - alloc.free(); - sizeLock.notify(); + wait(); } + updateBuffersUsed(); + crt += count; + return new Allocation(count); } + + public synchronized void free(Allocation alloc) { + if (alloc == null) { + throw new IllegalArgumentException("Null alloc"); + } + if (alloc.free) { + logger.warn(dir + " trying to release buffer allocation twice", new Exception()); + return; + } + if (logger.isDebugEnabled()) { + logger.debug(dir + " free " + alloc.count + ", crt = " + crt + ", max = " + MAX_ENTRIES); + } + updateBuffersUsed(); + crt -= alloc.count; + alloc.free(); + queueWaiting(); + notify(); + } + private void queueWaiting() { + while (!waiting.isEmpty() && crt < MAX_ENTRIES) { + queue.add(waiting.removeFirst()); + crt++; + } + } + public void run() { try { while (true) { Entry e; synchronized (this) { while (queue.isEmpty()) { - this.wait(); + this.wait(ThrottleManager.MIN_UPDATE_INTERVAL); + throttleManager.update(MAX_ENTRIES, crt); } e = queue.removeFirst(); } try { - e.buffer.doStuff(e.last, e.buf); + if (e.buf == null) { + e.buffer.doStuff(e.last, ByteBuffer.allocate(ENTRY_SIZE), new Allocation(1)); + } + else { + e.buffer.doStuff(e.last, e.buf, null); + } if (logger.isInfoEnabled()) { long time = System.currentTimeMillis(); long dif = time - lastTime; if (dif > PERFORMANCE_LOGGING_INTERVAL) { int avgbuf = (int) (avgBuffersUsed / dif); - logger.info("elapsedTime=" + dif + ", buffersUsed[min,avg,max]=" + logger.info(dir + " elapsedTime=" + dif + ", buffersUsed[min,avg,max]=" + minBuffersUsed + ", " + avgbuf + ", " + maxBuffersUsed); resetCounters(); } @@ -176,7 +232,11 @@ } } - public static Buffers getDefault() { - return INSTANCE; + public static Buffers getBuffers(Direction dir) { + switch(dir) { + case IN: return INB; + case OUT: return OUTB; + default: return null; + } } } Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/JobSubmissionTaskHandler.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/JobSubmissionTaskHandler.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/JobSubmissionTaskHandler.java (working copy) @@ -7,7 +7,9 @@ package org.globus.cog.abstraction.impl.execution.coaster; import java.io.IOException; +import java.util.HashMap; import java.util.HashSet; +import java.util.Map; import java.util.Random; import java.util.Set; @@ -45,6 +47,9 @@ private static Logger logger = Logger.getLogger(JobSubmissionTaskHandler.class); private static Set configured, configuring; + + private static Map checkedServices = + new HashMap(); static { configured = new HashSet(); @@ -94,6 +99,7 @@ public void submit(Task task) throws IllegalSpecException, InvalidSecurityContextException, InvalidServiceContactException, TaskSubmissionException { checkAndSetTask(task); + validateTaskSettings(); task.setStatus(Status.SUBMITTING); try { KarajanChannel channel = getChannel(task); @@ -257,7 +263,118 @@ public void setAutostart(boolean autostart) { this.autostart = autostart; } + + private void validateTaskSettings() throws TaskSubmissionException { + synchronized (JobSubmissionTaskHandler.class) { + Task task = getTask(); + Service s = task.getService(0); + TaskSubmissionException e = checkedServices.get(s); + if (e != null) { + throw e; + } + else if (!checkedServices.containsKey(s)) { + try { + validateTask(); + } + catch (IllegalArgumentException ee) { + e = new TaskSubmissionException(ee.getMessage()); + checkedServices.put(task.getService(0), e); + throw e; + } + } + } + } + + private void validateTask() { + checkPositiveInt("slots", 0); + checkPositiveInt("maxNodes", 0); + checkPositiveInt("maxTime", 0); + Integer nodeGranularity = getInt("nodeGranularity"); + Integer maxNodes = getInt("maxNodes"); + if (nodeGranularity != null && maxNodes != null) { + if (nodeGranularity > maxNodes) { + throw new IllegalArgumentException("nodeGranularity > maxNodes (" + + nodeGranularity + " > " + maxNodes + ")"); + } + } + + checkGreaterOrEqualThan("lowOverallocation", 1); + checkGreaterThan("highOverallocation", 1); + + checkGreaterThan("allocationStepSize", 0); + checkLessOrEqualThan("allocationStepSize", 1); + + checkGreaterOrEqualThan("spread", 0); + checkLessOrEqualThan("spread", 1); + + checkGreaterOrEqualThan("parallelism", 0); + checkLessOrEqualThan("parallelism", 1); + } + private void checkPositiveInt(String name, int i) { + Integer v = getInt(name); + if (v != null && v <= 0) { + throw new IllegalArgumentException(name + " must be > 0 (currently " + v + ")"); + } + } + + private void checkGreaterOrEqualThan(String name, double d) { + Double v = getDouble(name); + if (v != null && v < d) { + throw new IllegalArgumentException(name + " must be >= " + d + " (currently " + v + ")"); + } + } + + private void checkLessOrEqualThan(String name, double d) { + Double v = getDouble(name); + if (v != null && v > d) { + throw new IllegalArgumentException(name + " must be <= " + d + " (currently " + v + ")"); + } + } + + private void checkLessThan(String name, double d) { + Double v = getDouble(name); + if (v != null && v >= d) { + throw new IllegalArgumentException(name + " must be < " + d + " (currently " + v + ")"); + } + } + + private void checkGreaterThan(String name, double d) { + Double v = getDouble(name); + if (v != null && v <= d) { + throw new IllegalArgumentException(name + " must be > " + d + " (currently " + v + ")"); + } + } + + private Double getDouble(String name) { + Object v = ((JobSpecification) getTask().getSpecification()).getAttribute(name.toLowerCase()); + if (v == null) { + return null; + } + else if (v instanceof String) { + return Double.parseDouble((String) v); + } + else if (v instanceof Number) { + return ((Number) v).doubleValue(); + } + else { + throw new IllegalArgumentException("Invalid valid for " + name + ": " + v + "; must be a floating point number."); + } + } + + private Integer getInt(String name) { + Object v = ((JobSpecification) getTask().getSpecification()).getAttribute(name.toLowerCase()); + if (v == null) { + return null; + } + else if (v instanceof String) { + return Integer.parseInt((String) v); + } + else { + throw new IllegalArgumentException("Invalid valid for " + name + ": " + v + "; must be an integer."); + } + } + private static Task submitTask() throws Exception { Task t = new TaskImpl(); t.setType(Task.JOB_SUBMISSION); Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/PackageList.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/PackageList.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/PackageList.java (working copy) @@ -26,7 +26,6 @@ if (!dir.exists()) { throw new RuntimeException(dir + " does not exist"); } - add("backport-util-concurrent.jar"); add("cog-abstraction-common-*.jar"); add("cog-jglobus-*.jar"); add("cog-karajan-*.jar"); Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java (working copy) @@ -226,6 +226,9 @@ String msg = "Coaster service ended. Reason: " + s.getMessage() + "\n\tstdout: " + t.getStdOutput() + "\n\tstderr: " + t.getStdError(); + if (logger.isInfoEnabled()) { + logger.info(msg); + } NotificationManager.getDefault().serviceTaskEnded(contact, msg); try { if (url != null) { @@ -431,7 +434,7 @@ ChannelManager.getManager().reserveChannel(url, (GSSCredential) cred); logger.debug("Got channel " + channel); ServiceShutdownCommand ssc = new ServiceShutdownCommand(); - ssc.setReplyTimeout(10000); + ssc.setTimeout(10000); ssc.setMaxRetries(0); ssc.executeAsync(channel, this); ChannelManager.getManager().releaseChannel(channel); Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/bootstrap/Bootstrap.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/bootstrap/Bootstrap.java (revision 3354) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/bootstrap/Bootstrap.java (working copy) @@ -17,7 +17,6 @@ import java.lang.reflect.Method; import java.net.URL; import java.net.URLClassLoader; -import java.security.MessageDigest; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -25,10 +24,7 @@ import java.util.Iterator; import java.util.List; -import org.globus.cog.abstraction.impl.execution.coaster.BootstrapService; -import org.globus.cog.abstraction.impl.execution.coaster.ServiceManager; - public class Bootstrap { public static final boolean fork = true; @@ -53,14 +49,14 @@ private String serviceURL; private String registrationURL; private String serviceId; - private List list; + private List list; public Bootstrap(String serviceURL, String registrationURL, String serviceId) { this.serviceURL = serviceURL; this.registrationURL = registrationURL; this.serviceId = serviceId; - list = new ArrayList(); + list = new ArrayList(); logger = new Logger(serviceId); } @@ -105,9 +101,9 @@ if (!CACHE_DIR.mkdirs() && !CACHE_DIR.exists()) { error("Could not create jar cache directory"); } - Iterator i = list.iterator(); + Iterator i = list.iterator(); while (i.hasNext()) { - String[] jar = (String[]) i.next(); + String[] jar = i.next(); File f = new File(CACHE_DIR, buildName(jar)); if (!f.exists()) { download(CACHE_DIR, jar[0], jar[1]); @@ -155,9 +151,9 @@ private void arrangeJars() { String[] coasterJar = null; - Iterator i = list.iterator(); + Iterator i = list.iterator(); while (i.hasNext()) { - coasterJar = (String[]) i.next(); + coasterJar = i.next(); if (coasterJar[0].indexOf("provider-coaster") != -1) { i.remove(); break; @@ -173,23 +169,24 @@ logger.log("Forking service"); StringBuffer sb = new StringBuffer(); arrangeJars(); - Iterator i = list.iterator(); + Iterator i = list.iterator(); while (i.hasNext()) { sb.append(CACHE_DIR.getAbsolutePath()); sb.append('/'); - sb.append(buildName((String[]) i.next())); + sb.append(buildName(i.next())); if (i.hasNext()) { sb.append(':'); } } String java = System.getProperty("java"); - List args = new ArrayList(); + List args = new ArrayList(); args.add("nice"); args.add("-n"); args.add("2"); args.add(java); addDebuggingOptions(args); args.add("-Xmx256M"); + args.add("-Dtcp.channel.log.io.performance=true"); //args.add("-agentlib:hprof=file=c.hprof"); addProperties(args); args.add("-cp"); @@ -198,8 +195,7 @@ args.add(registrationURL); args.add(serviceId); logger.log("Args: " + args); - Process p = Runtime.getRuntime().exec( - (String[]) args.toArray(new String[0])); + Process p = Runtime.getRuntime().exec(args.toArray(new String[0])); StringBuffer out = new StringBuffer(), err = new StringBuffer(); logger.log("Starting stdout consumer"); consumeOutput(p.getInputStream(), out); @@ -223,13 +219,13 @@ } } - private void addDebuggingOptions(List args) { + private void addDebuggingOptions(List args) { //args.add("-Xdebug"); //args.add("-Xrunjdwp:transport=dt_socket,address=8788,server=y,suspend=y"); //args.add("-Xrunjdwp:transport=dt_socket,address=8788,server=y,suspend=n"); } - private void addProperties(List args) { + private void addProperties(List args) { addProperty(args, "X509_USER_PROXY"); addProperty(args, "GLOBUS_HOSTNAME"); addProperty(args, "GLOBUS_TCP_PORT_RANGE"); @@ -237,7 +233,7 @@ args.add("-Djava.security.egd=file:///dev/urandom"); } - private void addProperty(List args, String name) { + private void addProperty(List args, String name) { String value = System.getProperty(name); if (value != null && !value.equals("")) { args.add("-D" + name + "=" + value); @@ -266,14 +262,14 @@ URL[] urls = new URL[list.size()]; for (int i = 0; i < list.size(); i++) { urls[i] = new URL("file://" + CACHE_DIR.getAbsolutePath() + "/" - + buildName((String[]) list.get(i))); + + buildName(list.get(i))); System.err.println(urls[i]); } ClassLoader cl = new URLClassLoader(urls, Bootstrap.class .getClassLoader()); - Class cls = cl.loadClass(SERVICE_CLASS); + Class cls = cl.loadClass(SERVICE_CLASS); - Method m = cls.getMethod("main", new Class[] { String[].class }); + Method m = cls.getMethod("main", new Class[] { String[].class }); m.invoke(null, new Object[] { new String[] { registrationURL, serviceId } }); } Index: modules/provider-coaster/resources/worker.pl =================================================================== --- modules/provider-coaster/resources/worker.pl (revision 3354) +++ modules/provider-coaster/resources/worker.pl (working copy) @@ -15,6 +15,7 @@ use File::Path; use File::Copy; use Getopt::Std; +use FileHandle; use Cwd; use POSIX ":sys_wait_h"; use strict; @@ -63,6 +64,14 @@ YIELD => 1, }; +use constant { + PUT_START => 0, + PUT_CMD_SENT => 1, + PUT_SIZE_SENT => 2, + PUT_LNAME_SENT => 3, + PUT_SENDING_DATA => 4, +}; + my $LOGLEVEL = NONE; my @LEVELS = ("TRACE", "DEBUG", "INFO ", "WARN ", "ERROR"); @@ -80,7 +89,8 @@ REPLY_FLAG => 0x00000001, FINAL_FLAG => 0x00000002, ERROR_FLAG => 0x00000004, - PROGRESSIVE_FLAG => 0x00000008 + PROGRESSIVE_FLAG => 0x00000008, + SIGNAL_FLAG => 0x00000010, }; use constant { @@ -91,12 +101,13 @@ STAGEOUT => 0x11, }; -my $TAG = 0; +my $TAG = int(rand(10000)); use constant RETRIES => 3; use constant REPLYTIMEOUT => 180; use constant MAXFRAGS => 16; # TODO: Make this configurable (#537) use constant MAX_RECONNECT_ATTEMPTS => 3; +use constant NEVER => 9999999999; use constant JOB_CHECK_SKIP => 32; @@ -165,6 +176,55 @@ # REPLIES stores the state of (outgoing) commands for which replies are expected my %REPLIES = (); +my %SUSPENDED_TRANSFERS = (); + +# the structure of the above maps is (fields marked with "*" are optional): +# tag: [state, time] +# +# state: {} - valid keys: +# tag: the current command/request tag +# dataIn: proc(state, tag, timeout, err, fin, msg) - invoked when data is received +# nextData: proc(state) - invoked to get the next data chunk +# returns: (flags, data, yieldFlag), where +# flags: the protocol flags to send (e.g. err, fin) +# data: the actual data +# yieldFlag: if CONTINUE then it instructs the sending procedure +# to loop sending data until YIELD is returned +# +# dataSent: proc(state, tag) - invoked when all data was sent +# PUT file specific state: +# state: a numeric state number: +# 0 - new request +# 1 - command sent +# 2 - file size sent +# 3 - local name sent (i.e. sending data) +# size: file size +# lname: local file name +# rname: remote file name +# sent: total bytes sent from this file +# bindex: block index - multiple I/O buffer size worth of data are sent +# before yielding to other commands/requests (up to IOBLOCKSZ). +# This number counts how many buffer sizes in the current block have +# been sent so far. +# handle: file handle +# +# GET file specific state: +# state: +# 0 - new request +# 1 - size received +# handle: file handle +# size: file size +# lname: local file name +# +# state when sending array data: +# index: the current index in the data array +# data: an array containing the data chunks +# +# +# +# time: last communication time (used to determine timeouts) +# + my $LOG = logfilename($LOGDIR, $BLOCKID); my %HANDLERS = ( @@ -246,11 +306,10 @@ } sub timestring() { - # TODO: Make this choice configurable (#541) - my $t = sprintf("%.3f", time()); - # my @d = localtime(time()); - # my $t = sprintf("%i/%02i/%02i %02i:%02i", - # $d[5]+1900, $d[4]+1, $d[3], $d[2], $d[1]); + #my $t = sprintf("%.3f", time()); + my $now = time(); + my @d = localtime($now); + my $t = sprintf("%i/%02i/%02i %02i:%02i:%02i.%03i", $d[5]+1900, $d[4]+1, $d[3], $d[2], $d[1], $d[0], ($now*1000) % 1000); return $t; } @@ -333,9 +392,7 @@ print "LOG: $LOG\n"; } open(LOG, ">>$LOG") or die "Failed to open log file ($LOG): $!"; - my $b = select(LOG); - $| = 1; - select($b); + LOG->autoflush(1); my $date = localtime; wlog INFO, "$BLOCKID Logging started: $date\n"; } @@ -383,7 +440,7 @@ sub sendm { my ($tag, $flags, $msg) = @_; my $len = length($msg); - my $buf = pack("VVV", $tag, $flags, $len); + my $buf = pack("VVVVV", $tag, $flags, $len, ($tag ^ $flags ^ $len), 0); $buf = $buf.$msg; wlog(DEBUG, "OUT: len=$len, tag=$tag, flags=$flags\n"); @@ -401,24 +458,28 @@ my $flg2; my $msg; my $yield; - if (defined($$data{"tag"})) { - $tag = $$data{"tag"}; - } + do { ($flg2, $msg, $yield) = $$data{"nextData"}($data); - sendm($tag, $flg | $flg2, $msg); + if (defined($msg)) { + sendm($tag, $flg | $flg2, $msg); + } } while (($flg2 & FINAL_FLAG) == 0 && !$yield); if (($flg2 & FINAL_FLAG) == 0) { # final flag not set; put it back in the queue - wlog DEBUG, "$tag yielding\n"; - $$data{"tag"} = $tag; + wlog TRACE, "$tag yielding\n"; + + # update last time + my $record = $REPLIES{$tag}; + $$record[1] = time(); + queueCmdCustomDataHandling($REPLIES{$tag}, $data); } else { if (exists($REPLIES{$tag})) { my $record = $REPLIES{$tag}; - my ($cont, $start) = ($$record[0], $$record[1]); + my ($cont, $lastTime) = ($$record[0], $$record[1]); if (defined($$cont{"dataSent"})) { $$cont{"dataSent"}($cont, $tag); } @@ -451,38 +512,48 @@ my ($state) = @_; my $s = $$state{"state"}; - if ($s == 0) { + + my $tag = $$state{"tag"}; + + wlog TRACE, "$tag nextFileData state=$s\n"; + + if ($s == PUT_START) { $$state{"state"} = $s + 1; return (0, $$state{"cmd"}, CONTINUE); } - elsif ($s == 1) { + elsif ($s == PUT_CMD_SENT) { $$state{"state"} = $s + 1; return (0, pack("VV", $$state{"size"}, 0), CONTINUE); } - elsif ($s == 2) { + elsif ($s == PUT_SIZE_SENT) { $$state{"state"} = $s + 1; return (0, $$state{"lname"}, CONTINUE); } - elsif ($s == 3) { + elsif ($s == PUT_LNAME_SENT) { $$state{"state"} = $s + 1; $$state{"sent"} = 0; $$state{"bindex"} = 0; return ($$state{"size"} == 0 ? FINAL_FLAG : 0, $$state{"rname"}, CONTINUE); } - else { + elsif ($s == PUT_SENDING_DATA) { + if (defined $SUSPENDED_TRANSFERS{"$tag"}) { + wlog TRACE, "$tag Transfer suspendend; yielding\n"; + return (0, undef, YIELD); + } + my $handle = $$state{"handle"}; my $buffer; my $sz = read($handle, $buffer, IOBUFSZ); if (!defined $sz) { - wlog INFO, "Failed to read data from file: $!\n"; + wlog INFO, "$tag Failed to read data from file: $!\n"; return (FINAL_FLAG + ERROR_FLAG, "$!", CONTINUE); } elsif ($sz == 0 && $$state{"sent"} < $$state{"size"}) { - wlog INFO, "File size mismatch. $$state{'size'} vs. $$state{'sent'}\n"; + wlog INFO, "$tag File size mismatch. $$state{'size'} vs. $$state{'sent'}\n"; return (FINAL_FLAG + ERROR_FLAG, "File size mismatch. Expected $$state{'size'}, got $$state{'sent'}", CONTINUE); } $$state{"sent"} += $sz; - wlog DEBUG, "size: $$state{'size'}, sent: $$state{'sent'}\n"; + wlog DEBUG, "$tag size: $$state{'size'}, sent: $$state{'sent'}\n"; if ($$state{"sent"} == $$state{"size"}) { close $handle; } @@ -523,6 +594,8 @@ if (!defined $ctag) { $ctag = $TAG++; registerCmd($ctag, $cont); + # make the tag accessible to the data generator + $$state{"tag"} = $ctag; } sendFrags($ctag, 0, $state); return $ctag; @@ -537,6 +610,7 @@ sub queueCmd { my @cmd = @_; my $cont = shift(@cmd); + # $cont is the continuation (what gets called when a reply is received) push @CMDQ, [$cont, arrayData(@cmd)]; } @@ -559,13 +633,23 @@ my ($data) = @_; my $lendata = length($data); - if ($lendata < 12) { - wlog WARN, "Received faulty message (length < 12: $lendata)\n"; - die "Received faulty message (length < 12: $lendata)"; + if ($lendata < 20) { + wlog WARN, "Received faulty message (length < 20: $lendata)\n"; + die "Received faulty message (length < 20: $lendata)"; } my $tag = unpack("V", substr($data, 0, 4)); my $flg = unpack("V", substr($data, 4, 4)); my $len = unpack("V", substr($data, 8, 4)); + my $hcsum = unpack("V", substr($data, 12, 4)); + my $csum = unpack("V", substr($data, 16, 4)); + + my $chcsum = ($tag ^ $flg ^ $len); + + if ($chcsum != $hcsum) { + wlog WARN, "Header checksum failed. Computed checksum: $chcsum, checksum: $hcsum\n"; + return; + } + my $msg; my $frag; my $alen = 0; @@ -574,7 +658,7 @@ $alen = $alen + length($frag); $msg = $msg.$frag; } - + my $actuallen = length($msg); wlog(TRACE, " IN: len=$len, actuallen=$actuallen, tag=$tag, flags=$flg, $msg\n"); if ($len != $actuallen) { @@ -584,7 +668,7 @@ } sub processRequest { - my ($state, $tag, $timeout, $err, $fin, $msg) = @_; + my ($state, $tag, $timeout, $flags, $msg) = @_; my $request = $$state{"request"}; if (!defined($request)) { @@ -596,7 +680,7 @@ if ($timeout) { sendError($tag, ("Timed out waiting for all fragments")); } - elsif (!$fin) { + elsif (!($flags & FINAL_FLAG)) { return; } else { @@ -617,15 +701,17 @@ my $reply = $flg & REPLY_FLAG; - my ($record, $cont, $start); + my ($record, $cont, $lastTime); if ($reply) { if (exists($REPLIES{$tag})) { $record = $REPLIES{$tag}; - ($cont, $start) = ($$record[0], $$record[1]); + ($cont, $lastTime) = ($$record[0], $$record[1]); + # update last time + $$record[1] = time(); } else { - wlog(WARN, "received reply to unregistered command (tag=$tag). Discarding.\n"); + wlog(WARN, "received reply to unregistered command (tag=$tag, msg=$msg). Discarding.\n"); return; } } @@ -635,7 +721,7 @@ wlog DEBUG, "New request ($tag)\n"; } $record = $REQUESTS{$tag}; - ($cont, $start) = ($$record[0], $$record[1]); + ($cont, $lastTime) = ($$record[0], $$record[1]); } my $fin = $flg & FINAL_FLAG; @@ -658,7 +744,7 @@ wlog DEBUG, "Fin flag set\n"; } - $$cont{"dataIn"}($cont, $tag, 0, $err, $fin, $msg); + $$cont{"dataIn"}($cont, $tag, 0, $flg, $msg); return 1; } @@ -702,10 +788,10 @@ sub recvOne { my $buf; $SOCK->blocking(0); - $SOCK->recv($buf, 12 - length($DATA)); + $SOCK->recv($buf, 20 - length($DATA)); if (length($buf) > 0) { $DATA = $DATA . $buf; - if (length($DATA) == 12) { + if (length($DATA) == 20) { # wlog DEBUG, "Received " . unpackData($DATA) . "\n"; eval { process(unpackData($DATA)); } || (wlog ERROR, "Failed to process data: $@\n" && die "Failed to process data: $@"); $DATA = ""; @@ -744,7 +830,7 @@ # things may be added to it while stuff is being sent my $sz = scalar(@CMDQ); for (my $i = 0; $i < $sz; $i++) { - $cmd = pop(@CMDQ); + $cmd = shift(@CMDQ); sendCmdInt(@$cmd); } checkJobs(); @@ -774,12 +860,12 @@ } sub registerCBDataIn { - my ($state, $tag, $timeout, $err, $fin, $reply) = @_; + my ($state, $tag, $timeout, $flags, $reply) = @_; if ($timeout) { die "Failed to register (timeout)\n"; } - elsif ($err) { + elsif ($flags & ERROR_FLAG) { die "Failed to register (service returned error: ".join("\n", $reply).")"; } else { @@ -795,7 +881,7 @@ } sub heartbeatCBDataIn { - my ($state, $tag, $timeout, $err, $fin, $reply) = @_; + my ($state, $tag, $timeout, $flags, $reply) = @_; if ($timeout) { if (time() - $LAST_HEARTBEAT > 2 * HEARTBEAT_INTERVAL) { @@ -803,7 +889,7 @@ die "Lost heartbeat\n"; } } - elsif ($err) { + elsif ($flags & ERROR_FLAG) { wlog WARN, "Heartbeat failed: $reply\n"; die "Heartbeat failed: $reply\n"; } @@ -851,7 +937,8 @@ sub heartbeat { my ($tag, $timeout, $msgs) = @_; $LAST_HEARTBEAT = time(); - sendReply($tag, ("OK")); + my $msg = int(time() * 1000); + sendReply($tag, ("$msg")); } sub workershellcmd { @@ -928,8 +1015,8 @@ mkfdir($jobid, $dst); # don't try open(DESC, ...) (as I did). It will use the same reference # and concurrent operations will fail. - my $desc; - if (!open($desc, ">", "$dst")) { + my $handle; + if (!open($handle, ">", "$dst")) { die "Failed to open $dst: $!"; } else { @@ -939,7 +1026,7 @@ "dataIn" => \&getFileCBDataIn, "state" => 0, "lfile" => $dst, - "desc" => $desc + "handle" => $handle }; } } @@ -953,11 +1040,12 @@ } sub getFileCBDataInIndirect { - my ($state, $tag, $timeout, $err, $fin, $reply) = @_; + my ($state, $tag, $timeout, $flags, $reply) = @_; my $jobid = $$state{"jobid"}; - wlog DEBUG, "$jobid getFileCBDataInIndirect jobid: $jobid, tag: $tag, err: $err, fin: $fin\n"; - if ($err) { + wlog DEBUG, "$jobid getFileCBDataInIndirect jobid: $jobid, tag: $tag, flags: $flags\n"; + if ($flags & ERROR_FLAG) { + wlog DEBUG, "$jobid getFileCBDataInIndirect error: $reply\n"; queueCmd((nullCB(), "JOBSTATUS", $jobid, FAILED, "520", "Error staging in file: $reply")); delete($JOBDATA{$jobid}); return; @@ -967,19 +1055,28 @@ delete($JOBDATA{$jobid}); return; } - if ($fin) { + if ($flags & FINAL_FLAG) { stagein($jobid); } } sub getFileCBDataIn { - my ($state, $tag, $timeout, $err, $fin, $reply) = @_; + my ($state, $tag, $timeout, $flags, $reply) = @_; my $s = $$state{"state"}; my $jobid = $$state{"jobid"}; - wlog DEBUG, "$jobid getFileCBDataIn jobid: $jobid, state: $s, tag: $tag, err: $err, fin: $fin\n"; - if ($err) { + my $len = length($reply); + wlog DEBUG, "$jobid getFileCBDataIn jobid: $jobid, state: $s, tag: $tag, flags: $flags, len: $len\n"; + + if ($flags & SIGNAL_FLAG) { + if ($reply eq "QUEUED") { + $REPLIES{$tag}[1] = NEVER; + wlog DEBUG, "$jobid transfer queued\n"; + } + return; + } + elsif ($flags & ERROR_FLAG) { wlog DEBUG, "$jobid getFileCBDataIn FAILED 520 Error staging in file: $reply\n"; queueCmd((nullCB(), "JOBSTATUS", $jobid, FAILED, "520", "Error staging in file: $reply")); delete($JOBDATA{$jobid}); @@ -993,21 +1090,22 @@ elsif ($s == 0) { $$state{"state"} = 1; $$state{"size"} = unpack("V", $reply); + wlog DEBUG, "$tag $jobid got file size: $$state{'size'}\n"; my $lfile = $$state{"lfile"}; } else { - my $desc = $$state{"desc"}; - if (!(print {$desc} $reply)) { - close $desc; - wlog DEBUG, "$jobid Could not write to file: $!. Descriptor was $desc; lfile: $$state{'lfile'}\n"; + my $handle = $$state{"handle"}; + if (!(print {$handle} $reply)) { + close $handle; + wlog DEBUG, "$jobid Could not write to file: $!. Descriptor was $handle; lfile: $$state{'lfile'}\n"; queueCmd((nullCB(), "JOBSTATUS", $jobid, FAILED, "522", "Could not write to file: $!")); delete($JOBDATA{$jobid}); return; } } - if ($fin) { - my $desc = $$state{"desc"}; - close $desc; + if ($flags & FINAL_FLAG) { + my $handle = $$state{"handle"}; + close $handle; wlog DEBUG, "$jobid Closed $$state{'lfile'}\n"; if ($PINNED_READY) { completePinnedFile($jobid); @@ -1220,6 +1318,13 @@ wlog DEBUG, "$jobid Staging out $lfile (mode = $mode).\n"; my ($protocol, $host, $path) = urisplit($rfile); if ($protocol eq "file" || $protocol eq "proxy") { + # make sure we keep track of the total number of actual stageouts + if (!defined $JOBDATA{$jobid}{"stageoutCount"}) { + $JOBDATA{$jobid}{"stageoutCount"} = 0; + } + $JOBDATA{$jobid}{"stageoutCount"} += 1; + wlog DEBUG, "$jobid Stagecount is $JOBDATA{$jobid}{stageoutCount}\n"; + queueCmdCustomDataHandling(putFileCB($jobid), fileData("PUT", $lfile, $rfile)); } elsif ($protocol eq "sfs") { @@ -1254,16 +1359,34 @@ } } +sub sendStatus { + my ($jobid) = @_; + + my $ec = $JOBDATA{$jobid}{"exitcode"}; + + if ($ec == 0) { + queueCmd((nullCB(), "JOBSTATUS", $jobid, COMPLETED, "0", "")); + } + else { + queueCmd((nullCB(), "JOBSTATUS", $jobid, FAILED, "$ec", "Job failed with an exit code of $ec")); + } +} + sub cleanup { my ($jobid) = @_; my $ec = $JOBDATA{$jobid}{"exitcode"}; if (ASYNC) { - if ($ec == 0) { - queueCmd((nullCB(), "JOBSTATUS", $jobid, COMPLETED, "0", "")); + if (!defined($JOBDATA{$jobid}{"stageoutCount"}) || ($JOBDATA{$jobid}{"stageoutCount"} == 0)) { + # there were no stageouts. Notification can be sent now + wlog DEBUG, "$jobid There were no stageouts. Sending notification immediately\n"; + sendStatus($jobid); } else { - queueCmd((nullCB(), "JOBSTATUS", $jobid, FAILED, "$ec", "Job failed with an exit code of $ec")); + # there were stageouts. Wait until all are acknowledged + # as done by the client. And we keep track of the + # count of stageouts that weren't acknowledged in + # $JOBDATA{$jobid}{"stageoutCount"} } } @@ -1282,7 +1405,7 @@ chop $c; } wlog DEBUG, "$jobid Removing $c\n"; - rmtree($c, {safe => 1, verbose => 0}); + rmtree($c, 0, 0); wlog DEBUG, "$jobid Removed $c\n"; } } @@ -1311,35 +1434,52 @@ my ($state, $tag) = @_; if (ASYNC) { - wlog DEBUG, "putFileCBDataSent\n"; + wlog DEBUG, "$tag putFileCBDataSent\n"; my $jobid = $$state{"jobid"}; - if ($jobid != -1) { - wlog DEBUG, "Data sent, async is on. Staging out next file\n"; + if ($jobid != -1) { + wlog DEBUG, "$tag Data sent, async is on. Staging out next file\n"; stageout($jobid); } } } sub putFileCBDataIn { - my ($state, $tag, $timeout, $err, $fin, $reply) = @_; + my ($state, $tag, $timeout, $flags, $reply) = @_; - wlog DEBUG, "putFileCBDataIn: $reply\n"; + wlog DEBUG, "$tag putFileCBDataIn msg=$reply\n"; my $jobid = $$state{"jobid"}; - if ($err || $timeout) { + if (($flags & ERROR_FLAG) || $timeout) { if ($JOBDATA{$jobid}) { - wlog DEBUG, "Stage out failed ($reply)\n"; + wlog DEBUG, "$tag Stage out failed ($reply)\n"; queueCmd((nullCB(), "JOBSTATUS", $jobid, FAILED, "515", "Stage out failed ($reply)")); delete($JOBDATA{$jobid}); } return; } + elsif ($reply eq "STOP") { + $SUSPENDED_TRANSFERS{"$tag"} = 1; + wlog DEBUG, "$tag Got stop request. Suspending transfer.\n"; + } + elsif ($reply eq "CONTINUE") { + delete $SUSPENDED_TRANSFERS{"$tag"}; + wlog DEBUG, "$tag Got continue request. Resuming transfer.\n"; + } elsif ($jobid != -1) { + # OK reply from client if (!ASYNC) { - wlog DEBUG, "Stageout done; staging out next file\n"; + wlog DEBUG, "$tag Stageout done; staging out next file\n"; stageout($jobid); } + else { + wlog DEBUG, "$jobid Stageout done; stagecount is $JOBDATA{$jobid}{stageoutCount}\n"; + $JOBDATA{$jobid}{"stageoutCount"} -= 1; + if ($JOBDATA{$jobid}{"stageoutCount"} == 0) { + wlog DEBUG, "$jobid All stageouts acknowledged. Sending notification\n"; + sendStatus($jobid); + } + } } } @@ -1492,21 +1632,24 @@ } $JOBDATA{$JOBID}{"jobslot"} = $JOBSLOT; - pipe(PARENT_R, CHILD_W); + my ($PARENT_R, $CHILD_W); + pipe($PARENT_R, $CHILD_W); + $pid = fork(); + if (defined($pid)) { if ($pid == 0) { - close PARENT_R; - runjob(\*CHILD_W, $JOB, $JOBARGS, $JOBENV, $JOBSLOT, $WORKERPID); - close CHILD_W; + close $PARENT_R; + runjob($CHILD_W, $JOB, $JOBARGS, $JOBENV, $JOBSLOT, $WORKERPID); + close $CHILD_W; } else { wlog DEBUG, "$JOBID Forked process $pid. Waiting for its completion\n"; - close CHILD_W; + close $CHILD_W; $JOBS_RUNNING++; $JOBWAITDATA{$JOBID} = { pid => $pid, - pipe => \*PARENT_R + pipe => $PARENT_R }; if ($PROFILE) { push(@PROFILE_EVENTS, "FORK", $pid, time()); Index: modules/provider-coaster/resources/log4j.properties =================================================================== --- modules/provider-coaster/resources/log4j.properties (revision 3354) +++ modules/provider-coaster/resources/log4j.properties (working copy) @@ -27,3 +27,5 @@ #log4j.logger.org.globus.cog.karajan.workflow.service.channels.AbstractKarajanChannel=WARN log4j.logger.org.globus.cog.abstraction.coaster=INFO log4j.logger.org.globus.cog.abstraction.impl.common.task.TaskImpl=DEBUG +log4j.logger.org.globus.cog.karajan.workflow.service.channels.PerformanceDiagnosticInputStream=INFO +log4j.logger.org.globus.cog.karajan.workflow.service.channels.PerformanceDiagnosticOutputStream=INFO Index: modules/abstraction-common/.classpath =================================================================== --- modules/abstraction-common/.classpath (revision 3354) +++ modules/abstraction-common/.classpath (working copy) @@ -6,7 +6,6 @@ - - + Index: modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/FileFragmentImpl.java =================================================================== --- modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/FileFragmentImpl.java (revision 3354) +++ modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/FileFragmentImpl.java (working copy) @@ -17,10 +17,17 @@ public FileFragmentImpl(String file, long offset, long length) { this.file = file; - this.offset = offset; - this.length = length; + this.offset = checkPositive(offset, "offset"); + this.length = checkPositive(length, "length"); } + private long checkPositive(long n, String param) { + if (n < 0) { + throw new IllegalArgumentException(param + " < 0 (" + n + ")"); + } + return n; + } + /** * Creates a new FileFragment object for the entire specified file */ Index: modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/AbstractFileResource.java =================================================================== --- modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/AbstractFileResource.java (revision 3354) +++ modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/AbstractFileResource.java (working copy) @@ -135,37 +135,31 @@ return this.attributes.get(name); } - @Override public void getFile(String remoteFileName, String localFileName) throws FileResourceException { getFile(new FileFragmentImpl(remoteFileName), new FileFragmentImpl(localFileName)); } - @Override public void getFile(String remoteFileName, String localFileName, ProgressMonitor progressMonitor) throws FileResourceException { getFile(new FileFragmentImpl(remoteFileName), new FileFragmentImpl(localFileName), progressMonitor); } - @Override public void getFile(FileFragment remote, FileFragment local) throws FileResourceException { getFile(remote, local, null); } - @Override public void putFile(String localFileName, String remoteFileName) throws FileResourceException { putFile(new FileFragmentImpl(localFileName), new FileFragmentImpl(remoteFileName)); } - @Override public void putFile(String localFileName, String remoteFileName, ProgressMonitor progressMonitor) throws FileResourceException { putFile(new FileFragmentImpl(localFileName), new FileFragmentImpl(remoteFileName), progressMonitor); } - @Override public void putFile(FileFragment local, FileFragment remote) throws FileResourceException { putFile(local, remote, null); @@ -386,7 +380,6 @@ return "FileResource: " + name; } - @Override public void thirdPartyTransfer(FileResource sourceResource, FileFragment source, FileFragment destination) throws FileResourceException { Index: modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/TaskImpl.java =================================================================== --- modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/TaskImpl.java (revision 3354) +++ modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/TaskImpl.java (working copy) @@ -183,7 +183,7 @@ } } finally { - outputListeners.release(); + outputListeners.release(i); } } @@ -241,7 +241,7 @@ } } finally { - statusListeners.release(); + statusListeners.release(i); } synchronized (this) { if (anythingWaiting) { Index: modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/JobSpecificationImpl.java =================================================================== --- modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/JobSpecificationImpl.java (revision 3354) +++ modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/JobSpecificationImpl.java (working copy) @@ -166,7 +166,6 @@ } - @Override public void addEnvironmentVariable(String name, int i) { addEnvironmentVariable(name, Integer.toString(i)); } @@ -469,7 +468,6 @@ return result; } - @Override public void unpackProviderAttributes() { String attrs = (String) getAttribute("providerAttributes"); Index: modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/execution/WallTime.java =================================================================== --- modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/execution/WallTime.java (revision 3354) +++ modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/execution/WallTime.java (working copy) @@ -12,15 +12,16 @@ import java.util.HashMap; import java.util.Map; -public class WallTime implements Comparable { - private static final Map FORMATTERS; +public class WallTime implements Comparable { + private static final Map FORMATTERS; private static final Formatter DEFAULT_FORMATTER = new DefaultFormatter(); static { - FORMATTERS = new HashMap(); + FORMATTERS = new HashMap(); FORMATTERS.put(null, DEFAULT_FORMATTER); FORMATTERS.put("default", DEFAULT_FORMATTER); FORMATTERS.put("pbs", new PBSFormatter()); + FORMATTERS.put("hms", new HHMMSSFormatter()); FORMATTERS.put("globus-jobmanager-pbs", new PBSFormatter()); FORMATTERS.put("pbs-native", new NativePBSFormatter()); FORMATTERS.put("sge-native", new NativeSGEFormatter()); @@ -30,7 +31,7 @@ if (type != null) { type = type.toLowerCase(); } - Formatter f = (Formatter) FORMATTERS.get(type); + Formatter f = FORMATTERS.get(type); return f == null ? DEFAULT_FORMATTER : f; } @@ -74,11 +75,11 @@ return seconds; } - public static String format(String type, int seconds) { + public static String format(String type, long seconds) { return getFormatter(type).format(seconds); } - public static String format(int seconds) { + public static String format(long seconds) { return format(null, seconds); } @@ -86,7 +87,7 @@ return format(target, timeToSeconds(spec)); } - private static void pad(StringBuffer sb, int value) { + private static void pad(StringBuffer sb, long value) { if (value < 10) { sb.append('0'); } @@ -128,30 +129,30 @@ } public static interface Formatter { - String format(int seconds); + String format(long seconds); } private static class DefaultFormatter implements Formatter { - public String format(int seconds) { - return String.valueOf((int) Math.ceil((double) seconds / 60)); + public String format(long seconds) { + return String.valueOf((long) Math.ceil((double) seconds / 60)); } } private static class HHMMSSFormatter implements Formatter { - private static int seconds(int secondsInterval) { + private static long seconds(long secondsInterval) { return secondsInterval % 60; } - private static int minutes(int secondsInterval) { + private static long minutes(long secondsInterval) { return (secondsInterval / 60) % 60; } - private static int hours(int secondsInterval) { + private static long hours(long secondsInterval) { return secondsInterval / 3600; } - public String format(int seconds) { + public String format(long seconds) { StringBuffer sb = new StringBuffer(); pad(sb, hours(seconds)); sb.append(':'); @@ -177,12 +178,7 @@ private static class NativeSGEFormatter extends HHMMSSFormatter { } - public int compareTo(Object o) { - if (o instanceof WallTime) { - return seconds - ((WallTime) o).seconds; - } - else { - throw new ClassCastException(o.getClass().getName()); - } + public int compareTo(WallTime o) { + return seconds - o.seconds; } } Index: modules/provider-dcache/.classpath =================================================================== --- modules/provider-dcache/.classpath (revision 3354) +++ modules/provider-dcache/.classpath (working copy) @@ -4,6 +4,6 @@ - - + + Index: modules/provider-webdav/.classpath =================================================================== --- modules/provider-webdav/.classpath (revision 3354) +++ modules/provider-webdav/.classpath (working copy) @@ -11,6 +11,6 @@ - + Index: modules/provider-webdav/src/org/globus/cog/abstraction/impl/file/http/FileResourceImpl.java =================================================================== --- modules/provider-webdav/src/org/globus/cog/abstraction/impl/file/http/FileResourceImpl.java (revision 3354) +++ modules/provider-webdav/src/org/globus/cog/abstraction/impl/file/http/FileResourceImpl.java (working copy) @@ -229,12 +229,10 @@ throw new UnsupportedOperationException("submit"); } - @Override public boolean supportsPartialTransfers() { return false; } - @Override public boolean supportsThirdPartyTransfers() { return false; } Index: modules/provider-webdav/src/org/globus/cog/abstraction/impl/file/webdav/FileResourceImpl.java =================================================================== --- modules/provider-webdav/src/org/globus/cog/abstraction/impl/file/webdav/FileResourceImpl.java (revision 3354) +++ modules/provider-webdav/src/org/globus/cog/abstraction/impl/file/webdav/FileResourceImpl.java (working copy) @@ -330,12 +330,10 @@ tempFile.delete(); } - @Override public boolean supportsPartialTransfers() { return false; } - @Override public boolean supportsThirdPartyTransfers() { return false; } Index: modules/karajan/src/org/globus/cog/karajan/arguments/NamedArgumentsImpl.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/arguments/NamedArgumentsImpl.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/arguments/NamedArgumentsImpl.java (working copy) @@ -70,7 +70,7 @@ } } - public void addInitial(String name, Object value) { + public synchronized void addInitial(String name, Object value) { named.put(name, value); } @@ -105,7 +105,7 @@ return named.keySet().iterator(); } - public Object getArgument(String name) { + public synchronized Object getArgument(String name) { if (named != null) { return named.get(name); } Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/TimeoutException.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/TimeoutException.java (revision 0) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/TimeoutException.java (revision 3355) @@ -0,0 +1,30 @@ +//---------------------------------------------------------------------- +//This code is developed as part of the Java CoG Kit project +//The terms of the license can be found at http://www.cogkit.org/license +//This message may not be removed or altered. +//---------------------------------------------------------------------- + +/* + * Created on Aug 2, 2005 + */ +package org.globus.cog.karajan.workflow.service; + +public class TimeoutException extends ProtocolException { + private static final long serialVersionUID = -6781619140427115780L; + + public TimeoutException() { + super(); + } + + public TimeoutException(String message) { + super(message); + } + + public TimeoutException(String message, Throwable cause) { + super(message, cause); + } + + public TimeoutException(Throwable cause) { + super(cause); + } +} Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/RequestReply.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/RequestReply.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/RequestReply.java (working copy) @@ -15,6 +15,8 @@ import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.PrintStream; +import java.text.DateFormat; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; @@ -25,11 +27,16 @@ import java.util.zip.Inflater; import java.util.zip.InflaterInputStream; +import org.apache.log4j.Logger; import org.globus.cog.karajan.util.serialization.XMLConverter; import org.globus.cog.karajan.workflow.service.channels.AbstractKarajanChannel; import org.globus.cog.karajan.workflow.service.channels.KarajanChannel; public abstract class RequestReply { + public static final Logger logger = Logger.getLogger(RequestReply.class); + + public static final int DEFAULT_TIMEOUT = 120 * 1000; + private int timeout = DEFAULT_TIMEOUT; public static final int NOID = -1; private int id; @@ -39,6 +46,9 @@ private List inData; private boolean inDataReceived; private KarajanChannel channel; + private long lastTime = Long.MAX_VALUE; + + public static final DateFormat DF = new SimpleDateFormat("yyMMdd-HHmmss.SSS"); // private static final byte[] NO_EXCEPTION = new byte[0]; @@ -57,8 +67,7 @@ protected void setOutCmd(String outCmd) { this.outCmd = outCmd; } - - @SuppressWarnings("hiding") + public void register(KarajanChannel channel) { this.channel = channel; } @@ -132,12 +141,11 @@ } public abstract void send(boolean err) throws ProtocolException; - - @SuppressWarnings("unused") + protected void dataReceived(boolean fin, boolean error, byte[] data) throws ProtocolException { + setLastTime(System.currentTimeMillis()); } - - @SuppressWarnings("unused") + protected synchronized void addInData(boolean fin, boolean err, byte[] data) { if (inData == null) { inData = new ArrayList(4); @@ -145,7 +153,6 @@ inData.add(data); } - @SuppressWarnings("unused") protected final void addInData(byte[] data) { throw new RuntimeException("Should not be used"); } @@ -345,4 +352,29 @@ protected Object getInObject(int index) { return deserialize(getInData(index)); } + + public long getLastTime() { + return lastTime; + } + + public void setLastTime(long lastTime) { + this.lastTime = lastTime; + } + + public int getTimeout() { + return timeout; + } + + public void setTimeout(int timeout) { + this.timeout = timeout; + } + + public void handleTimeout() { + logger.warn("Unhandled timeout", new Throwable()); + setLastTime(Long.MAX_VALUE); + } + + public void handleSignal(byte[] data) { + + } } Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/PerformanceDiagnosticOutputStream.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/PerformanceDiagnosticOutputStream.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/PerformanceDiagnosticOutputStream.java (working copy) @@ -27,13 +27,12 @@ public void run() { count++; String s; - logger.info(s = "Total transferred: " + logger.info(s = "[OUT] Total transferred: " + PerformanceDiagnosticInputStream.units(bytes) + "B, current rate: " + PerformanceDiagnosticInputStream.units(bytes - last) + "B/s, average rate: " + PerformanceDiagnosticInputStream.units(bytes / count) + "B/s"); - System.out.println("[OUT] " + s); last = bytes; } }); Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/ChannelContext.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/ChannelContext.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/ChannelContext.java (working copy) @@ -9,6 +9,8 @@ */ package org.globus.cog.karajan.workflow.service.channels; +import java.util.ArrayList; +import java.util.Collection; import java.util.HashMap; import java.util.LinkedList; import java.util.List; @@ -38,8 +40,8 @@ private String remoteContact; private UserContext userContext; private int cmdseq; - private TagTable activeSenders; - private TagTable activeReceivers; + private TagTable activeSenders; + private TagTable activeReceivers; // private Map reexecutionSet; private static Timer timer; private ServiceContext serviceContext; @@ -55,9 +57,9 @@ public ChannelContext(ServiceContext sc) { attributes = new HashMap(); - activeSenders = new TagTable(); - activeReceivers = new TagTable(); - // reexecutionSet = new Hashtable(); + activeSenders = new TagTable(); + activeReceivers = new TagTable(); + channelID = new ChannelID(); this.serviceContext = sc; } @@ -74,7 +76,7 @@ public synchronized void setUserContext(UserContext userContext) { this.userContext = userContext; } - + public synchronized UserContext newUserContext(String name) throws ChannelException { if (userContext != null && userContext.getName() != null) { try { @@ -140,7 +142,7 @@ return channelID; } - public int nextCmdSeq() { + public synchronized int nextCmdSeq() { cmdseq = cmdseq + 1; while (activeSenders.containsKey(cmdseq) || activeReceivers.containsKey(cmdseq)) { cmdseq = cmdseq + 1; @@ -148,19 +150,39 @@ return cmdseq; } - public synchronized void registerCommand(Command cmd) throws ProtocolException { + public void registerCommand(Command cmd) throws ProtocolException { if (cmd.getId() == RequestReply.NOID) { cmd.setId(nextCmdSeq()); - activeSenders.put(cmd.getId(), cmd); + synchronized(activeSenders) { + activeSenders.put(cmd.getId(), cmd); + } } else { throw new ProtocolException("Command already registered with id " + cmd.getId()); } } + + public Collection getActiveCommands() { + List l = new ArrayList(); + synchronized(activeSenders) { + l.addAll(activeSenders.values()); + } + return l; + } + + public Collection getActiveHandlers() { + List l = new ArrayList(); + synchronized(activeReceivers) { + l.addAll(activeReceivers.values()); + } + return l; + } public void unregisterCommand(Command cmd) { Object removed; - removed = activeSenders.remove(cmd.getId()); + synchronized(activeSenders) { + removed = activeSenders.remove(cmd.getId()); + } if (removed == null) { logger.warn("Attempted to unregister unregistered command with id " + cmd.getId()); } @@ -170,23 +192,31 @@ } public void registerHandler(RequestHandler handler, int tag) { - activeReceivers.put(tag, handler); + synchronized(activeReceivers) { + activeReceivers.put(tag, handler); + } } public void unregisterHandler(int tag) { Object removed; - removed = activeReceivers.remove(tag); + synchronized(activeReceivers) { + removed = activeReceivers.remove(tag); + } if (removed == null) { logger.warn("Attempted to unregister unregistered handler with id " + tag); } } public Command getRegisteredCommand(int id) { - return (Command) activeSenders.get(id); + synchronized(activeSenders) { + return activeSenders.get(id); + } } public RequestHandler getRegisteredHandler(int id) { - return (RequestHandler) activeReceivers.get(id); + synchronized(activeReceivers) { + return activeReceivers.get(id); + } } public void notifyRegisteredListeners(Exception e) { @@ -195,8 +225,10 @@ } private void notifyListeners(TagTable map, Exception t) { - for (Object o : map.values()) - ((RequestReply) o).errorReceived(null, t); + synchronized(map) { + for (Object o : map.values()) + ((RequestReply) o).errorReceived(null, t); + } } public Timer getTimer() { @@ -235,6 +267,12 @@ attributes.put(name, o); } } + + public Object getAttribute(String name) { + synchronized(attributes) { + return attributes.get(name); + } + } public int getReconnectionAttempts() { return reconnectionAttempts; Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/AbstractPipedChannel.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/AbstractPipedChannel.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/AbstractPipedChannel.java (working copy) @@ -9,14 +9,14 @@ */ package org.globus.cog.karajan.workflow.service.channels; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.LinkedBlockingQueue; + import org.apache.log4j.Logger; +import org.globus.cog.karajan.workflow.service.RemoteConfiguration.Entry; import org.globus.cog.karajan.workflow.service.RequestManager; import org.globus.cog.karajan.workflow.service.UserContext; -import org.globus.cog.karajan.workflow.service.RemoteConfiguration.Entry; -import edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue; -import edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue; - /** * A channel implementation for which the other endpoint lives in the * same JVM. @@ -75,10 +75,10 @@ byte[] copy = new byte[bytes.length]; System.arraycopy(bytes, 0, copy, 0, bytes.length); if (reply) { - s.handleReply(tag, fin, error, copy.length, copy); + s.handleReply(tag, flags, copy.length, copy); } else { - s.handleRequest(tag, fin, error, copy.length, copy); + s.handleRequest(tag, flags, copy.length, copy); } if (cb != null) { cb.dataSent(); Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/TagTable.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/TagTable.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/TagTable.java (working copy) @@ -13,14 +13,14 @@ import java.util.HashMap; import java.util.Map; -public class TagTable { +public class TagTable { private static final long serialVersionUID = 1659255187618780167L; - private Map map; + private Map map; private MutableInteger mkey; public TagTable() { - map = new HashMap(); + map = new HashMap(); mkey = new MutableInteger(); } @@ -29,21 +29,21 @@ return map.containsKey(mkey); } - public synchronized void put(int key, Object value) { + public synchronized void put(int key, T value) { map.put(new MutableInteger(key), value); } - public synchronized Object remove(int key) { + public synchronized T remove(int key) { mkey.setValue(key); return map.remove(mkey); } - public synchronized Object get(int key) { + public synchronized T get(int key) { mkey.setValue(key); return map.get(mkey); } - public Collection values() { + public Collection values() { return map.values(); } Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/GSSChannel.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/GSSChannel.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/GSSChannel.java (working copy) @@ -82,12 +82,14 @@ gssContext.requestAnonymity(false); gssContext.requestCredDeleg(false); + //gssContext.requestConf(false); gssContext.setOption(GSSConstants.GSS_MODE, GSIConstants.MODE_SSL); gssContext.setOption(GSSConstants.DELEGATION_TYPE, GSIConstants.DELEGATION_TYPE_LIMITED); URI contact = getContact(); socket = (GssSocket) GssSocketFactory.getDefault().createSocket(contact.getHost(), contact.getPort(), gssContext); + socket.setKeepAlive(true); socket.setSoTimeout(0); socket.setWrapMode(GSIConstants.MODE_SSL.intValue()); Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/KarajanChannel.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/KarajanChannel.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/KarajanChannel.java (working copy) @@ -24,6 +24,7 @@ public static final int FINAL_FLAG = 0x00000002; public static final int ERROR_FLAG = 0x00000004; public static final int COMPRESSED_FLAG = 0x00000008; + public static final int SIGNAL_FLAG = 0x00000010; void sendTaggedData(int i, boolean fin, byte[] bytes); @@ -41,11 +42,17 @@ void unregisterHandler(int tag); - void sendTaggedReply(int i, byte[] buf, boolean fin, boolean errorFlag); + void sendTaggedReply(int i, byte[] buf, boolean fin, boolean err); - void sendTaggedReply(int i, byte[] buf, boolean fin, boolean errorFlag, SendCallback cb); + void sendTaggedReply(int i, byte[] buf, boolean fin, boolean err, SendCallback cb); - void sendTaggedReply(int id, ByteBuffer buf, boolean fin, boolean errorFlag, SendCallback cb); + void sendTaggedReply(int i, byte[] buf, int flags); + + void sendTaggedReply(int i, byte[] buf, int flags, SendCallback cb); + + void sendTaggedReply(int id, ByteBuffer buf, boolean fin, boolean err, SendCallback cb); + + void sendTaggedReply(int id, ByteBuffer buf, int flags, SendCallback cb); void registerHandler(RequestHandler handler, int tag); Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/AbstractStreamKarajanChannel.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/AbstractStreamKarajanChannel.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/AbstractStreamKarajanChannel.java (working copy) @@ -14,21 +14,22 @@ import java.io.OutputStream; import java.net.URI; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; -import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.zip.Adler32; import org.apache.log4j.Logger; import org.globus.cog.karajan.workflow.service.RemoteConfiguration; import org.globus.cog.karajan.workflow.service.RequestManager; import org.globus.cog.karajan.workflow.service.commands.ChannelConfigurationCommand; -import edu.emory.mathcs.backport.java.util.Collections; - public abstract class AbstractStreamKarajanChannel extends AbstractKarajanChannel implements Purgeable { public static final Logger logger = Logger.getLogger(AbstractStreamKarajanChannel.class); @@ -36,7 +37,7 @@ public static final int STATE_IDLE = 0; public static final int STATE_RECEIVING_DATA = 1; - public static final int HEADER_LEN = 12; + public static final int HEADER_LEN = 20; private InputStream inputStream; private OutputStream outputStream; @@ -44,7 +45,7 @@ private final byte[] rhdr; private byte[] data; private int dataPointer; - private int state, tag, flags, len; + private int state, tag, flags, len, hcsum, csum; protected AbstractStreamKarajanChannel(RequestManager requestManager, ChannelContext channelContext, boolean client) { @@ -78,10 +79,15 @@ protected abstract void reconnect() throws ChannelException; - protected synchronized void handleChannelException(Exception e) { + protected synchronized boolean handleChannelException(Exception e) { logger.info("Channel config: " + getChannelContext().getConfiguration()); - ChannelManager.getManager().handleChannelException(this, e); - close(); + if (!ChannelManager.getManager().handleChannelException(this, e)) { + close(); + return false; + } + else { + return true; + } } protected void configure() throws Exception { @@ -121,11 +127,20 @@ tag = unpack(rhdr, 0); flags = unpack(rhdr, 4); len = unpack(rhdr, 8); + hcsum = unpack(rhdr, 12); + if ((tag ^ flags ^ len) != hcsum) { + logger.warn("Header checksum failed. Computed checksum: " + + Integer.toHexString(tag ^ flags ^ len) + + ", checksum: " + Integer.toHexString(hcsum)); + return true; + } + csum = unpack(rhdr, 16); if (len > 1048576) { logger.warn("Big len: " + len + " (tag: " + tag + ", flags: " + flags + ")"); data = new byte[1024]; inputStream.read(data); logger.warn("data: " + ppByteBuf(data)); + return true; } data = new byte[len]; dataPointer = 0; @@ -143,18 +158,26 @@ if (dataPointer == len) { dataPointer = 0; state = STATE_IDLE; - boolean fin = (flags & FINAL_FLAG) != 0; - boolean error = (flags & ERROR_FLAG) != 0; + + if (csum != 0) { + Adler32 c = new Adler32(); + c.update(data); + + if (((int) c.getValue()) != csum) { + logger.warn("Data checksum failed. Compute checksum: " + + Integer.toHexString((int) c.getValue()) + ", checksum: " + Integer.toHexString(csum)); + } + } byte[] tdata = data; // don't hold reference from the channel to the data data = null; - if ((flags & REPLY_FLAG) != 0) { + if (flagIsSet(flags, REPLY_FLAG)) { // reply - handleReply(tag, fin, error, len, tdata); + handleReply(tag, flags, len, tdata); } else { // request - handleRequest(tag, fin, error, len, tdata); + handleRequest(tag, flags, len, tdata); } data = null; } @@ -188,7 +211,7 @@ Sender s = sender.get(channel.getClass()); if (s == null) { - sender.put(channel.getClass(), s = new Sender()); + sender.put(channel.getClass(), s = new Sender(channel.getClass().getSimpleName())); s.start(); } return s; @@ -210,20 +233,26 @@ } private static class Sender extends Thread { - private final LinkedList queue; + private final BlockingQueue queue; private final byte[] shdr; + private final String name; - public Sender() { - super("Sender"); - queue = new LinkedList(); + public Sender(String name) { + super("Sender " + name); + this.name = name; + queue = new LinkedBlockingQueue(); setDaemon(true); shdr = new byte[HEADER_LEN]; } - public synchronized void enqueue(int tag, int flags, byte[] data, + public void enqueue(int tag, int flags, byte[] data, AbstractStreamKarajanChannel channel, SendCallback cb) { - queue.addLast(new SendEntry(tag, flags, data, channel, cb)); - notifyAll(); + try { + queue.put(new SendEntry(tag, flags, data, channel, cb)); + } + catch (InterruptedException e) { + logger.warn("Interrupted", e); + } } public void run() { @@ -232,17 +261,14 @@ SendEntry e; while (true) { long now = System.currentTimeMillis(); - synchronized (this) { - while (queue.isEmpty()) { - wait(); - } - e = queue.removeFirst(); - if (now - last > 10000) { - logger.info("Sender " + System.identityHashCode(this) + " queue size: " - + queue.size()); - last = now; - } + + e = queue.take(); + if (now - last > 10000) { + logger.info("Sender " + name + " queue size: " + + queue.size()); + last = now; } + try { send(e.tag, e.flags, e.data, e.channel.getOutputStream()); if (e.cb != null) { @@ -252,23 +278,22 @@ catch (IOException ex) { logger.info("Channel IOException", ex); try { - synchronized (this) { - queue.addFirst(e); + if (e.channel.handleChannelException(ex)) { + queue.put(e); } - e.channel.handleChannelException(ex); } catch (Exception exx) { logger.warn("Channel threw exception while handling channel exception", exx); } } catch (Exception ex) { - ex.printStackTrace(); + logger.warn("Caught exception while sending data", ex); try { e.channel.getChannelContext().getRegisteredCommand(e.tag).errorReceived( null, ex); } catch (Exception exx) { - logger.warn(exx); + logger.warn("Exception", exx); } } } @@ -291,11 +316,16 @@ } } } + private void send(int tag, int flags, byte[] data, OutputStream os) throws IOException { pack(shdr, 0, tag); pack(shdr, 4, flags); pack(shdr, 8, data.length); + pack(shdr, 12, tag ^ flags ^ data.length); + Adler32 csum = new Adler32(); + csum.update(data); + pack(shdr, 16, (int) csum.getValue()); synchronized (os) { os.write(shdr); os.write(data); @@ -330,7 +360,6 @@ private boolean terminated; private int id; - @SuppressWarnings("unchecked") public Multiplexer(int id) { super("Channel multiplexer " + id); this.id = id; Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/PerformanceDiagnosticInputStream.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/PerformanceDiagnosticInputStream.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/PerformanceDiagnosticInputStream.java (working copy) @@ -28,15 +28,14 @@ public void run() { count++; String s; - logger.info(s = "Total transferred: " + units(bytes) + "B, current rate: " + logger.info(s = "[IN] Total transferred: " + units(bytes) + "B, current rate: " + units(bytes - last) + "B/s, average rate: " + units(bytes / count) + "B/s"); - System.out.println("[IN]: " + s); - System.out.println("[MEM] Heap total: " + logger.info(s = "[MEM] Heap total: " + units(Runtime.getRuntime().totalMemory()) - + "MB, Heap used: " + + "B, Heap used: " + units(Runtime.getRuntime().totalMemory() - - Runtime.getRuntime().freeMemory()) + "MB"); + - Runtime.getRuntime().freeMemory()) + "B"); last = bytes; } }); Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/ChannelManager.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/ChannelManager.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/ChannelManager.java (working copy) @@ -259,31 +259,40 @@ return meta; } - public void handleChannelException(KarajanChannel channel, Exception e) { + /** + * Returns true if this channel can still transmit after this + * exception + */ + public boolean handleChannelException(KarajanChannel channel, Exception e) { logger.info("Handling channel exception", e == null ? new Throwable() : e); if (channel.isOffline()) { logger.info("Channel already shut down"); - return; + return false; } channel.setLocalShutdown(); ChannelContext ctx = channel.getChannelContext(); RemoteConfiguration.Entry config = ctx.getConfiguration(); + boolean canContinue; try { if (config != null && config.hasOption(RemoteConfiguration.RECONNECT)) { buffer(channel); channel.close(); asyncReconnect(channel, e); + canContinue = true; } else { channel.close(); shutdownChannel(channel); + canContinue = false; } } catch (Exception e2) { logger.info("Failed to shut down channel", e2); + canContinue = false; } ctx.channelShutDown(e); logger.info("Channel exception handled"); + return canContinue; } private void asyncReconnect(final KarajanChannel channel, final Exception e) { @@ -372,7 +381,7 @@ unregisterChannel(getMetaChannel(ctx)); } synchronized (channels) { - channels.remove(new HostCredentialPair("id://" + ctx.getChannelID(), ctx.getUserContext().getCredential())); + channels.remove(new HostCredentialPair("id://" + ctx.getChannelID(), (GSSCredential) null)); } } Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/NullChannel.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/NullChannel.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/NullChannel.java (working copy) @@ -26,6 +26,10 @@ protected void configureHeartBeat() { // override to do nothing } + + public void configureTimeoutChecks() { + // do nothing + } public void sendTaggedData(int i, int flags, byte[] bytes, SendCallback cb) { if (!sink) { Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/UDPChannel.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/UDPChannel.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/UDPChannel.java (working copy) @@ -156,16 +156,14 @@ if (checksum != actual) { throw new ChannelException("Checksum failed. Expected " + checksum + " got " + actual); } - boolean fin = (flags & FINAL_FLAG) != 0; - boolean error = (flags & ERROR_FLAG) != 0; byte[] data = new byte[len - HDRLEN]; System.arraycopy(recvbuf, HDRLEN, data, 0, len - HDRLEN); if ((flags & REPLY_FLAG) != 0) { // reply - handleReply(tag, fin, error, len - HDRLEN, data); + handleReply(tag, flags, len - HDRLEN, data); } else { - handleRequest(tag, fin, error, len - HDRLEN, data); + handleRequest(tag, flags, len - HDRLEN, data); } } Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/AbstractKarajanChannel.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/AbstractKarajanChannel.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/channels/AbstractKarajanChannel.java (working copy) @@ -14,6 +14,7 @@ import java.io.InputStream; import java.net.URI; import java.nio.ByteBuffer; +import java.util.Collection; import java.util.TimerTask; import org.apache.log4j.Logger; @@ -22,6 +23,7 @@ import org.globus.cog.karajan.workflow.service.RemoteConfiguration; import org.globus.cog.karajan.workflow.service.RemoteConfiguration.Entry; import org.globus.cog.karajan.workflow.service.RequestManager; +import org.globus.cog.karajan.workflow.service.RequestReply; import org.globus.cog.karajan.workflow.service.Service; import org.globus.cog.karajan.workflow.service.UserContext; import org.globus.cog.karajan.workflow.service.commands.Command; @@ -33,6 +35,8 @@ // some random spread to avoid sending all heartbeats at once public static final int DEFAULT_HBI_INITIAL_SPREAD = 10; public static final int DEFAULT_HBI_SPREAD = 10; + + public static final int TIMEOUT_CHECK_INTERVAL = 1; private ChannelContext context; private volatile int usageCount, longTermUsageCount; @@ -52,6 +56,7 @@ // registeredMaps = new LinkedList(); this.client = client; configureHeartBeat(); + configureTimeoutChecks(); } protected void configureHeartBeat() { @@ -63,9 +68,9 @@ } } heartBeatInterval *= 1000; - + boolean controlHeartbeats = isClient() == clientControlsHeartbeats(); - + if (!isOffline() && controlHeartbeats) { scheduleHeartbeats(heartBeatInterval); } @@ -89,15 +94,15 @@ scheduleHeartbeatCheck(heartBeatInterval); } } - + public void scheduleHeartbeats(int heartBeatInterval) { TimerTask heartBeatTask; heartBeatTask = new HeartBeatTask(this); - context.getTimer().schedule(heartBeatTask, - heartBeatInterval + (int) (Math.random() * DEFAULT_HBI_INITIAL_SPREAD * 1000), + context.getTimer().schedule(heartBeatTask, + heartBeatInterval + (int) (Math.random() * DEFAULT_HBI_INITIAL_SPREAD * 1000), heartBeatInterval + (int) (Math.random() * DEFAULT_HBI_SPREAD * 1000)); } - + public void scheduleHeartbeatCheck(int heartBeatInterval) { TimerTask heartBeatTask; int mult = 2; @@ -105,6 +110,33 @@ context.getTimer().schedule(heartBeatTask, mult * heartBeatInterval, mult * heartBeatInterval); } + + public void configureTimeoutChecks() { + context.getTimer().schedule(new TimerTask() { + public void run() { + checkTimeouts(); + }}, + TIMEOUT_CHECK_INTERVAL * 1000, TIMEOUT_CHECK_INTERVAL * 1000); + } + + protected void checkTimeouts() { + checkTimeouts(context.getActiveCommands()); + checkTimeouts(context.getActiveHandlers()); + } + + private void checkTimeouts(Collection l) { + long now = System.currentTimeMillis(); + for (RequestReply r : l) { + if (now - r.getLastTime() > r.getTimeout()) { + try { + r.handleTimeout(); + } + catch (Exception e) { + logger.warn("Error handling timeout", e); + } + } + } + } protected boolean clientControlsHeartbeats() { return true; @@ -131,6 +163,16 @@ context.unregisterHandler(tag); } + @Override + public void sendTaggedReply(int tag, byte[] data, boolean fin, boolean err) { + sendTaggedReply(tag, data, (fin ? FINAL_FLAG : 0) + (err ? ERROR_FLAG : 0)); + } + + @Override + public void sendTaggedReply(int tag, byte[] data, boolean fin, boolean err, SendCallback cb) { + sendTaggedReply(tag, data, (fin ? FINAL_FLAG : 0) + (err ? ERROR_FLAG : 0), cb); + } + public void sendTaggedReply(int tag, byte[] data, boolean fin) { sendTaggedReply(tag, data, fin, false); } @@ -151,36 +193,33 @@ sendTaggedData(i, flags, bytes, null); } - public void sendTaggedReply(int tag, byte[] data, boolean fin, boolean err) { - sendTaggedReply(tag, data, fin, err, null); + public void sendTaggedReply(int tag, byte[] data, int flags) { + sendTaggedReply(tag, data, flags, null); } - public void sendTaggedReply(int tag, byte[] data, boolean fin, boolean err, SendCallback cb) { + public void sendTaggedReply(int tag, byte[] data, int flags, SendCallback cb) { if (logger.isDebugEnabled()) { - logger.debug(this + " REPL>: tag = " + tag + ", fin = " + fin + ", datalen = " + logger.debug(this + " REPL>: tag = " + tag + ", fin = " + flagIsSet(flags, FINAL_FLAG) + ", datalen = " + data.length + ", data = " + ppByteBuf(data)); } - int flags = REPLY_FLAG; - if (fin) { - flags |= FINAL_FLAG; - } - if (err) { - flags |= ERROR_FLAG; - } - sendTaggedData(tag, flags, data, cb); + + sendTaggedData(tag, flags | REPLY_FLAG, data, cb); } + + public void sendTaggedReply(int id, ByteBuffer buf, boolean fin, boolean err, SendCallback cb) { + sendTaggedReply(id, buf, (fin ? FINAL_FLAG : 0) + (err ? ERROR_FLAG : 0), cb); + } - public void sendTaggedReply(int id, ByteBuffer buf, boolean fin, boolean errorFlag, - SendCallback cb) { + public void sendTaggedReply(int id, ByteBuffer buf, int flags, SendCallback cb) { // TODO this should probably be changed to use buffers more efficiently if (buf.hasArray() && (buf.limit() == buf.capacity())) { - sendTaggedReply(id, buf.array(), fin, errorFlag, cb); + sendTaggedReply(id, buf.array(), flags, cb); } else { byte[] bbuf = new byte[buf.limit()]; buf.get(bbuf); buf.rewind(); - sendTaggedReply(id, bbuf, fin, errorFlag, cb); + sendTaggedReply(id, bbuf, flags, cb); } } @@ -199,7 +238,7 @@ public ChannelContext getChannelContext() { return context; } - + public final UserContext getUserContext() { return context.getUserContext(); } @@ -237,7 +276,7 @@ i += (buf[offset + 3] & 0xff) << 24; return i; } - + /** Pretty-print byte buffer */ @@ -342,20 +381,28 @@ } - protected void handleReply(int tag, boolean fin, boolean error, int len, byte[] data) { + protected void handleReply(int tag, int flags, int len, byte[] data) { if (logger.isDebugEnabled()) { - logger.debug(this + " REPL<: tag = " + tag + ", fin = " + fin + ", err = " + error + logger.debug(this + " REPL<: tag = " + tag + ", fin = " + + flagIsSet(flags, FINAL_FLAG) + ", err = " + flagIsSet(flags, ERROR_FLAG) + ", datalen = " + len + ", data = " + ppByteBuf(data)); } Command cmd = getChannelContext().getRegisteredCommand(tag); if (cmd != null) { try { - cmd.replyReceived(fin, error, data); + boolean fin = finalFlagIsSet(flags); + boolean err = errorFlagIsSet(flags); + if (flagIsSet(flags, SIGNAL_FLAG)) { + cmd.handleSignal(data); + } + else { + cmd.replyReceived(fin, err, data); + } if (fin) { if (logger.isDebugEnabled()) { logger.debug(this + " REPL: " + cmd); } - if (error) { + if (err) { cmd.errorReceived(); } else { @@ -378,22 +425,45 @@ } } + protected boolean flagIsSet(int flags, int mask) { + return (flags & mask) != 0; + } + + protected boolean finalFlagIsSet(int flags) { + return (flags & FINAL_FLAG) != 0; + } + + protected boolean errorFlagIsSet(int flags) { + return (flags & ERROR_FLAG) != 0; + } + protected void unregisteredSender(int tag) { logger.warn(getName() + " Recieved reply to unregistered sender. Tag: " + tag); } - protected void handleRequest(int tag, boolean fin, boolean error, int len, byte[] data) { + protected void handleRequest(int tag, int flags, int len, byte[] data) { if (logger.isDebugEnabled()) { - logger.debug(this + " REQ<: tag = " + tag + ", fin = " + fin + ", err = " + error + logger.debug(this + " REQ<: tag = " + tag + ", fin = " + + flagIsSet(flags, FINAL_FLAG) + ", err = " + flagIsSet(flags, ERROR_FLAG) + ", datalen = " + len + ", data = " + ppByteBuf(data)); } RequestHandler handler = getChannelContext().getRegisteredHandler(tag); + boolean fin = finalFlagIsSet(flags); + boolean err = errorFlagIsSet(flags); try { if (handler != null) { - handler.register(this); - handler.dataReceived(fin, error, data); + if (flagIsSet(flags, SIGNAL_FLAG)) { + handler.handleSignal(data); + } + else { + handler.dataReceived(fin, err, data); + } } else { + if (flagIsSet(flags, SIGNAL_FLAG)) { + logger.warn("Got signal for unregistered tag (" + tag + "): " + new String(data)); + return; + } try { handler = getRequestManager().handleInitialRequest(data); handler.setId(tag); @@ -409,7 +479,7 @@ if (logger.isDebugEnabled()) { logger.debug(this + " REQ: " + handler); } - if (error) { + if (err) { handler.errorReceived(); } else { Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/handlers/RequestHandler.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/handlers/RequestHandler.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/handlers/RequestHandler.java (working copy) @@ -10,11 +10,13 @@ package org.globus.cog.karajan.workflow.service.handlers; import java.util.Collection; +import java.util.Date; import java.util.Iterator; import org.apache.log4j.Logger; import org.globus.cog.karajan.workflow.service.ProtocolException; import org.globus.cog.karajan.workflow.service.RequestReply; +import org.globus.cog.karajan.workflow.service.TimeoutException; import org.globus.cog.karajan.workflow.service.channels.KarajanChannel; public abstract class RequestHandler extends RequestReply { @@ -34,6 +36,7 @@ } protected void sendReply() throws ProtocolException { + setLastTime(System.currentTimeMillis()); send(); replySent = true; } @@ -102,10 +105,22 @@ } protected String ppInData(String prefix) { - return ppData(prefix+"< ", getInCmd(), getInDataChunks()); + return ppData(prefix + "< ", getInCmd(), getInDataChunks()); } - + public String toString() { - return "Handler(" + getInCmd() + ")"; + return "Handler(" + getId() + ", " + getInCmd() + ")"; } + + public void handleTimeout() { + if (isInDataReceived()) { + return; + } + setLastTime(Long.MAX_VALUE); + getChannel().unregisterHandler(getId()); + String msg = this + ": timed out receiving request. Last time " + + DF.format(new Date(getLastTime())) + ", now: " + DF.format(new Date()); + logger.info(msg); + errorReceived("Timeout", new TimeoutException(msg)); + } } Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/ReplyTimeoutException.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/ReplyTimeoutException.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/ReplyTimeoutException.java (working copy) @@ -1,30 +0,0 @@ -//---------------------------------------------------------------------- -//This code is developed as part of the Java CoG Kit project -//The terms of the license can be found at http://www.cogkit.org/license -//This message may not be removed or altered. -//---------------------------------------------------------------------- - -/* - * Created on Aug 2, 2005 - */ -package org.globus.cog.karajan.workflow.service; - -public class ReplyTimeoutException extends ProtocolException { - private static final long serialVersionUID = -6781619140427115780L; - - public ReplyTimeoutException() { - super(); - } - - public ReplyTimeoutException(String message) { - super(message); - } - - public ReplyTimeoutException(String message, Throwable cause) { - super(message, cause); - } - - public ReplyTimeoutException(Throwable cause) { - super(cause); - } -} Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/commands/Command.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/commands/Command.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/commands/Command.java (working copy) @@ -10,18 +10,15 @@ package org.globus.cog.karajan.workflow.service.commands; import java.io.IOException; -import java.text.DateFormat; -import java.text.SimpleDateFormat; import java.util.Collection; import java.util.Date; import java.util.Iterator; import java.util.Timer; -import java.util.TimerTask; import org.apache.log4j.Logger; import org.globus.cog.karajan.workflow.service.ProtocolException; -import org.globus.cog.karajan.workflow.service.ReplyTimeoutException; import org.globus.cog.karajan.workflow.service.RequestReply; +import org.globus.cog.karajan.workflow.service.TimeoutException; import org.globus.cog.karajan.workflow.service.channels.ChannelIOException; import org.globus.cog.karajan.workflow.service.channels.ChannelManager; import org.globus.cog.karajan.workflow.service.channels.KarajanChannel; @@ -36,17 +33,12 @@ timer = new Timer(true); } - public static final DateFormat DF = new SimpleDateFormat("yyMMdd-HHmmss.SSS"); - - public static final int DEFAULT_REPLY_TIMEOUT = 120 * 1000; public static final int DEFAULT_MAX_RETRIES = 2; - private int replyTimeout = DEFAULT_REPLY_TIMEOUT; private int maxRetries = DEFAULT_MAX_RETRIES; private Callback cb; private String errorMsg; private Exception exception; - private Timeout timeout; private int retries; private long sendTime; private long sendReqTime; @@ -64,13 +56,13 @@ this.cb = cb; } - public void waitForReply() throws ReplyTimeoutException { + public void waitForReply() throws TimeoutException { synchronized (this) { if (!this.isInDataReceived()) { - long left = replyTimeout; + long left = getTimeout(); while (!this.isInDataReceived()) { if (left <= 0) { - throw new ReplyTimeoutException(); + throw new TimeoutException(); } try { wait(left); @@ -78,7 +70,7 @@ catch (InterruptedException e) { e.printStackTrace(); } - left = sendTime == 0 ? 1000 : replyTimeout + left = sendTime == 0 ? 1000 : getTimeout() - (System.currentTimeMillis() - sendTime); } } @@ -106,8 +98,7 @@ } public void send(boolean err) throws ProtocolException { - sendReqTime = System.currentTimeMillis(); - cancelTimeout(); + KarajanChannel channel = getChannel(); if (logger.isDebugEnabled()) { logger.debug("Sending " + this + " on " + channel); @@ -137,6 +128,8 @@ channel.sendTaggedData(id, !i.hasNext(), buf, !i.hasNext() ? this : null); } } + sendReqTime = System.currentTimeMillis(); + setLastTime(sendReqTime); } catch (ChannelIOException e) { reexecute(e.getMessage(), e); @@ -146,21 +139,11 @@ public void dataSent() { sendTime = System.currentTimeMillis(); //when using the piped channels the reply will arrive before this method is called - setupReplyTimeoutChecker(); + setLastTime(sendTime); } + + private static boolean shutdownMsg; - protected synchronized void setupReplyTimeoutChecker() { - if (!isInDataReceived()) { - timeout = new Timeout(); - try { - timer.schedule(timeout, replyTimeout); - } - catch (IllegalStateException e) { - logger.info("Timer cancelled due to JVM shutting down. Going without timeouts."); - } - } - } - public byte[] execute(KarajanChannel channel) throws ProtocolException, IOException { send(channel); waitForReply(); @@ -187,14 +170,6 @@ send(); } - public int getReplyTimeout() { - return replyTimeout; - } - - public void setReplyTimeout(int replyTimeout) { - this.replyTimeout = replyTimeout; - } - public int getMaxRetries() { return maxRetries; } @@ -203,15 +178,7 @@ this.maxRetries = maxRetries; } - private synchronized void cancelTimeout() { - if (timeout != null) { - timeout.cancel(); - timeout = null; - } - } - public void receiveCompleted() { - cancelTimeout(); if (logger.isDebugEnabled()) { logger.debug(ppInData("CMD")); } @@ -222,7 +189,6 @@ } public void errorReceived(String msg, Exception t) { - cancelTimeout(); if (logger.isDebugEnabled()) { logger.debug(ppInData("CMDERR")); } @@ -275,30 +241,25 @@ } } } - - protected void handleReplyTimeout() { - timeout = null; + + public void handleTimeout() { if (isInDataReceived()) { return; } logger.warn(this + ": handling reply timeout; sendReqTime=" + DF.format(new Date(sendReqTime)) + ", sendTime=" + DF.format(new Date(sendTime)) - + ", now=" + DF.format(new Date())); - reexecute("Reply timeout", new ReplyTimeoutException()); + + ", now=" + DF.format(new Date()) + ", channel=" + getChannel()); + getChannel().unregisterCommand(this); + //reexecute("Reply timeout", new TimeoutException()); } - private class Timeout extends TimerTask { - public void run() { - handleReplyTimeout(); - } + protected long getSendReqTime() { + return sendReqTime; + } - public boolean cancel() { - if (logger.isDebugEnabled()) { - logger.debug("SRC " + System.identityHashCode(timeout), new Exception()); - } - return super.cancel(); - } + protected void setSendReqTime(long sendReqTime) { + this.sendReqTime = sendReqTime; } public String toString() { Index: modules/karajan/src/org/globus/cog/karajan/workflow/service/commands/HeartBeatCommand.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/service/commands/HeartBeatCommand.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/service/commands/HeartBeatCommand.java (working copy) @@ -9,11 +9,14 @@ */ package org.globus.cog.karajan.workflow.service.commands; +import org.apache.log4j.Logger; import org.globus.cog.karajan.workflow.service.ProtocolException; import org.globus.cog.karajan.workflow.service.handlers.HeartBeatHandler; public class HeartBeatCommand extends Command { + public static final Logger logger = Logger.getLogger(HeartBeatCommand.class); + private long start; private static int sid; private int id; @@ -31,5 +34,10 @@ public void replyReceived(boolean fin, boolean err, byte[] data) throws ProtocolException { super.replyReceived(fin, err, data); + if (logger.isInfoEnabled()) { + long rst = Long.parseLong(getInDataAsString(0)); + long now = System.currentTimeMillis(); + logger.info(getChannel() + " up latency: " + (now - rst) + "ms, rtt: " + (now - start) + "ms"); + } } } Index: modules/karajan/src/org/globus/cog/karajan/workflow/futures/ChannelSplitter.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/futures/ChannelSplitter.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/futures/ChannelSplitter.java (working copy) @@ -38,7 +38,6 @@ - @Override public void futureModified(Future f, VariableStack stack) { FutureVariableArguments in = (FutureVariableArguments) f; while(in.available() > 0) { Index: modules/karajan/src/org/globus/cog/karajan/workflow/futures/ForwardArgumentFuture.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/futures/ForwardArgumentFuture.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/workflow/futures/ForwardArgumentFuture.java (working copy) @@ -114,7 +114,6 @@ } } - @Override public void futureModified(Future f, VariableStack stack) { synchronized (vargs) { try { @@ -136,4 +135,4 @@ this.exception = e; actions(); } -} \ No newline at end of file +} Index: modules/karajan/src/org/globus/cog/karajan/util/ElementProperty.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/util/ElementProperty.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/util/ElementProperty.java (working copy) @@ -130,7 +130,7 @@ this.name = ident.getName(); } - public Object getValue(VariableStack stack) throws VariableNotFoundException { + public synchronized Object getValue(VariableStack stack) throws VariableNotFoundException { switch (frame) { case UNINITIALIZED: case VariableStack.NO_FRAME: Index: modules/karajan/src/org/globus/cog/karajan/scheduler/AbstractScheduler.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/scheduler/AbstractScheduler.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/scheduler/AbstractScheduler.java (working copy) @@ -169,7 +169,7 @@ } } finally { - jobListeners.release(); + jobListeners.release(i); } } } Index: modules/karajan/src/org/globus/cog/karajan/scheduler/submitQueue/AbstractSubmitQueue.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/scheduler/submitQueue/AbstractSubmitQueue.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/scheduler/submitQueue/AbstractSubmitQueue.java (working copy) @@ -9,9 +9,10 @@ */ package org.globus.cog.karajan.scheduler.submitQueue; -import edu.emory.mathcs.backport.java.util.Queue; -import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentLinkedQueue; +import java.util.Queue; +import java.util.concurrent.ConcurrentLinkedQueue; + /** * Base class for submit queues. It uses a generic throttle value. * Progress through the queues is triggered using the {@link step()} method Index: modules/karajan/src/org/globus/cog/karajan/scheduler/WeightedHostScoreScheduler.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/scheduler/WeightedHostScoreScheduler.java (revision 3354) +++ modules/karajan/src/org/globus/cog/karajan/scheduler/WeightedHostScoreScheduler.java (working copy) @@ -251,6 +251,10 @@ } return selected.getHost(); } + + public synchronized boolean allOverloaded() { + return sorted.allOverloaded(); + } public void releaseContact(Contact contact) { if (logger.isDebugEnabled()) { Index: modules/karajan/.classpath =================================================================== --- modules/karajan/.classpath (revision 3354) +++ modules/karajan/.classpath (working copy) @@ -1,18 +1,16 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Index: modules/all/dependencies.xml =================================================================== --- modules/all/dependencies.xml (revision 3354) +++ modules/all/dependencies.xml (working copy) @@ -26,9 +26,6 @@ - - - Index: modules/abstraction/.classpath =================================================================== --- modules/abstraction/.classpath (revision 3354) +++ modules/abstraction/.classpath (working copy) @@ -10,7 +10,6 @@ - Index: modules/provider-condor/.classpath =================================================================== --- modules/provider-condor/.classpath (revision 3354) +++ modules/provider-condor/.classpath (working copy) @@ -9,6 +9,6 @@ - + Index: modules/util/.classpath =================================================================== --- modules/util/.classpath (revision 3354) +++ modules/util/.classpath (working copy) @@ -4,8 +4,6 @@ - - - + Index: modules/util/lib/backport-util-concurrent.jar =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: modules/util/lib/log4j-1.2.16.jar =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: modules/util/lib/log4j-1.2.8.jar =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: modules/util/src/org/globus/cog/util/CopyOnWriteHashSet.java =================================================================== --- modules/util/src/org/globus/cog/util/CopyOnWriteHashSet.java (revision 3354) +++ modules/util/src/org/globus/cog/util/CopyOnWriteHashSet.java (working copy) @@ -41,7 +41,7 @@ public class CopyOnWriteHashSet implements Set, Cloneable { private Set set = Collections.emptySet(); - private int lock; + private int lock; public int size() { return set.size(); @@ -55,22 +55,24 @@ return set.contains(o); } - public synchronized void release() { - if (lock > 0) { - lock--; - } + public synchronized void release(Iterator it) { + if (((LIterator) it).set == set) { + if (lock > 0) { + lock--; + } + } } public synchronized Iterator iterator() { lock++; - return set.iterator(); + return new LIterator(set); } public Object[] toArray() { return set.toArray(); } - public T[] toArray(T[] a) { + public S[] toArray(S[] a) { return set.toArray(a); } @@ -194,11 +196,33 @@ T o = it.next(); tmp.add(o); } - release(); + release(it); CopyOnWriteHashSet result = new CopyOnWriteHashSet(); result.lock = 0; result.set = tmp; return result; } + + private class LIterator implements Iterator { + private Iterator it; + public Set set; + + public LIterator(Set set) { + this.set = set; + this.it = set.iterator(); + } + + public boolean hasNext() { + return it.hasNext(); + } + + public T next() { + return it.next(); + } + + public void remove() { + it.remove(); + } + } } Index: modules/util/src/org/globus/cog/util/CopyOnWriteArrayList.java =================================================================== --- modules/util/src/org/globus/cog/util/CopyOnWriteArrayList.java (revision 3354) +++ modules/util/src/org/globus/cog/util/CopyOnWriteArrayList.java (working copy) @@ -26,7 +26,7 @@ public class CopyOnWriteArrayList implements List { private List list = Collections.emptyList(); - private int lock; + private int lock; public int size() { return list.size(); @@ -40,22 +40,24 @@ return list.contains(o); } - public synchronized void release() { - if (lock > 0) { - lock--; - } + public synchronized void release(Iterator it) { + if (((LIterator) it).list == list) { + if (lock > 0) { + lock--; + } + } } public synchronized Iterator iterator() { lock++; - return list.iterator(); + return new LIterator(list); } public Object[] toArray() { return list.toArray(); } - public T[] toArray(T[] a) { + public S[] toArray(S[] a) { return list.toArray(a); } @@ -68,7 +70,6 @@ } } - @Override public synchronized void add(int index, T o) { if (lock > 0 || list.isEmpty()) { copyAndAdd(index, o); @@ -102,7 +103,6 @@ } } - @Override public synchronized T remove(int index) { if (lock > 0) { return copyAndRemove(index); @@ -141,7 +141,6 @@ } } - @Override public boolean addAll(int index, Collection c) { if (lock > 0 || list.isEmpty()) { return copyAndAddAll(index, c); @@ -224,40 +223,53 @@ return list.toString(); } - @Override public T get(int index) { return list.get(index); } - @Override public int indexOf(Object o) { return list.indexOf(o); } - @Override public int lastIndexOf(Object o) { return list.lastIndexOf(o); } - @Override public ListIterator listIterator() { throw new UnsupportedOperationException(); } - @Override public ListIterator listIterator(int index) { throw new UnsupportedOperationException(); } - @Override public T set(int index, T o) { return list.set(index, o); } - @Override public List subList(int fromIndex, int toIndex) { throw new UnsupportedOperationException(); }; - + private class LIterator implements Iterator { + public List list; + private Iterator it; + + public LIterator(List list){ + this.list = list; + this.it = list.iterator(); + } + + public boolean hasNext() { + return it.hasNext(); + } + + public T next() { + return it.next(); + } + + public void remove() { + it.remove(); + } + } } Property changes on: . ___________________________________________________________________ Modified: svn:mergeinfo Merged /branches/4.1.9/src/cog:r3174-3353 From wilde at ci.uchicago.edu Fri Jan 20 15:26:26 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Fri, 20 Jan 2012 21:26:26 -0000 Subject: [Swift-commit] r5502 - SwiftApps Message-ID: <20120120212624.EBA079CD00@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-20 15:26:24 -0600 (Fri, 20 Jan 2012) New Revision: 5502 Added: SwiftApps/Makefile SwiftApps/README SwiftApps/annealing.swift SwiftApps/basiclocal.xml SwiftApps/beagle.xml SwiftApps/cf SwiftApps/evolve.sh SwiftApps/local.xml SwiftApps/math.swift SwiftApps/mathtest.swift SwiftApps/movie_graph.txt SwiftApps/optimizer.cpp SwiftApps/optimizer.orig.cpp SwiftApps/optimizer.sh SwiftApps/optimizer.snap01.cpp SwiftApps/optirun.swift SwiftApps/script-smaller-a.py SwiftApps/sumloss.sh SwiftApps/t1.py SwiftApps/t2.cpp SwiftApps/t2.py SwiftApps/t3.py SwiftApps/tc SwiftApps/testO.sh Log: Initial version. Added: SwiftApps/Makefile =================================================================== --- SwiftApps/Makefile (rev 0) +++ SwiftApps/Makefile 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,10 @@ +all: toptimizer optimizer Optimizer + +optimizer: optimizer.snap01.cpp + g++ -static -fopenmp -I boost_1_47_0 -o optimizer optimizer.snap01.cpp + +Optimizer: optimizer.snap01.cpp + g++ -static -O3 -fopenmp -I boost_1_47_0 -o Optimizer optimizer.snap01.cpp + +toptimizer: optimizer.cpp + g++ -static -fopenmp -I boost_1_47_0 -o toptimizer optimizer.cpp Added: SwiftApps/README =================================================================== --- SwiftApps/README (rev 0) +++ SwiftApps/README 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,42 @@ +=== Files + +optirun.swift: replaces top-level py script for the outermost loops + +=== How to build + +=== How to Run + + + +=== C++ app flow logic === + +for target in range(58, 1009 (used 209), 50): // 20 values + for i in range(15): + # P0: P1: D: P2: P3: + optimizer |0 0 4 50 -1 target | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0 + + multi_annealing( un[NW], T_start, T_end, Target_rejection, Annealing_repeats, + starting_jump, Results, Counters, params0, Annealing_repeats); + + Res = multi_loss(un, Results, Counters, x); // Initial + curr_x = Res.first; + curr_err = Res.second; + + for i = 0 to annealing_cycles - 1 (100 from .py script) + for j = 0 to 4 // 5X: 0..4 is fixed constant + setParameters (for a round of parallel Annealing_repeats + Res = multi_loss(un, Results, Counters, Annealing_repeats); + In parallel: for 1 to AnnealingRepeats (1,000; 10,000 desired) + group repeats among NWorkers + evolve() + setParameters again here, conditionally? (check) + +20 targets - py + 15 repeats - py + 1 initial multi_loss: 1000 to 10000 annealing_repeats + 100 Annealing_cycles (groups of 10? : cycle=10 ) (fast:50) + 5 repeats (fast: 1) + multi_loss: 1000 to 10000 annealing_repeats + evolve() => 2 mins to 10 mins + +=== END Added: SwiftApps/annealing.swift =================================================================== --- SwiftApps/annealing.swift (rev 0) +++ SwiftApps/annealing.swift 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,278 @@ +import "math"; + +type file; + +type Res { + float loss; + float sdev; +} + +global boolean FIX_VARIABLES = true; +global int var_fixed[] = [1,1,0,0,0]; +global int Nworkers = 1; + +(float nx) newx(float x, float dx) +{ + float r = (random()) / (pow(2.0,31.0)-1.0); + if (r > 0.5){ + nx = x + (random())*dx/(pow(2.0,31.0)-1.0); + } else { + nx = x - (random())*dx/(pow(2.0,31.0)-1.0); + } +} + +app (file outfile, file loss) evolve (string args[], file graph) +{ + evolve @loss args stdout=@outfile ; // graph is passed implicitly +} + +app (file x) sumloss(file loss[]) +{ + sumloss @filenames(loss) stdout=@x; +} + +/* + +Program structure: + + main + optimizer_sweep() - formerly, python script + multi_annealing() + multi_loss() + evolve() + sumloass() +*/ + +(file bestfile, file maxfile) multi_annealing ( + float T_start, + float T_end, + float Target_rejection, + int evolve_reruns, + float starting_jump, + float params0[], + float target_innov, + int annealing_cycles) +{ + int cycle=10; # const + int NEVOPARAMS=5; # const - 5 params, alpha 1,m through delta, does not include target_innovation + + float rejection[][]; // [i][j] where i is cycle and j is evolve-parameter (alpha_i, alpha_m, beta, gamma, delta) + + float x[][], dx[][], curr_loss[], curr_sdev[]; + + Res mlres[][]; + mlres[0][0] = multi_loss( params0, target_innov, evolve_reruns ); // Only done once, not 5x; serves for all evolve-params ??? + + foreach j in [0:NEVOPARAMS-1] { + x[0][j]=params0[j]; + dx[0][j] = starting_jump; + rejection[0][j] = 0.0; + curr_loss[j] = mlres[0][0].loss; + curr_sdev[j] = mlres[0][0].sdev; + } + + foreach i in [1:annealing_cycles] { + // set new temperature, rejection threshold, and dx values for this cycle + float temperature = T_start*exp( @tofloat(i)*(jlog(T_end)-jlog(T_start))/@tofloat(annealing_cycles)); + tracef("....T =%f\n", temperature); + // On each new "major" cycle within the annealing_cycles (other than the first) set new rejection and dx values + if ( i %% cycle == 1 && i > 1 ){ + foreach k in [0:NEVOPARAMS-1] { + float newrejection = rejection[i-1][k] / @tofloat(cycle); + if (newrejection > 0.0){ + dx[i][k] = dx[i-1][k] / (newrejection / Target_rejection); + rejection[i][k]=0.0; + } + else{ + dx[i][k] = dx[i-1][k] * 2.0; + rejection[i][k]=rejection[i-1][k]; + } + trace ("Recomputed rejection: i=%d k=%d dx[i][k]=%f\n", i, k, dx[i][k]); + } + } + foreach j in [0:NEVOPARAMS-1] { // Try a new value for each non-fixed param; then write results and accept or reject + float try_x[]; + int curr = (i * NEVOPARAMS) + j; + int prev = curr-1; + if ( FIX_VARIABLES || var_fixed[j]==0) { + foreach k in [0:NEVOPARAMS] { // Select the evolve params to try + if ( k < j ) { + try_x[k] = x[i][k]; // already set x[i][k] + } + else { + if ( k == j ) { + try_x[k] = newx(x[i][j],dx[i][j]); // permute x[i][j] + } + else { + try_x[k] = x[i-1][k]; // use x[i-1][k] (from prior cycle) + } + } + } + + mlres[i][j] = multi_loss(try_x, target_innov, evolve_reruns); + + float ratio = min(1.0, exp( -(mlres[i][j].loss-curr_loss[prev]) /temperature)); + float r = (random()) / (pow(2.0,31.0)-1.0); // why all the 2^31's ??? + + float ALOT=100000000000.0; // 100,000,000,000. = 10^11 + if (mlres[i][j].loss < ALOT) { // does this ever occur? if so did we want to still do the ratio computation above??? + trace("filestr.open (best_opt_some.txt, ofstream::app);"); + # un[0]->get_target() Res.loss un[0]->get_parameter[0:4] Res.error + # filestr.open ("max_dist.txt", ofstream::app); + } + else { tracef("Loss %f > ALOT at [i][j] = [%d][%d]\n", mlres[i][j].loss, i ,j); } + if (r > ratio) { // Reject + x[i][j] = x[i-1][j]; + rejection[i][j] = rejection[i][j] + 1.0; // Is this correct? incr rejection? + curr_loss[curr] = curr_loss[prev]; + curr_sdev[curr] = curr_sdev[prev]; + } + else { // Accept +trace("Accepting try_x[j],j=",j); + x[i][j] = try_x[j]; # FIXME: is this right? Just assign the j'th try_x, or the whole try_x param set? +trace("Accepting try_x[j],x[i][j]=",x[i][j]); + curr_loss[curr] = mlres[i][j].loss; + curr_sdev[curr] = mlres[i][j].sdev; + } + } + else { + x[i][j] = x[i-1][j]; + curr_loss[curr] = curr_loss[prev]; + curr_sdev[curr] = curr_sdev[prev]; + } + } + } +} + +(Res r) multi_loss( float x[], float target_innov, int evolve_reruns ) +{ + file rfile[]; + foreach i in [1:evolve_reruns] { // repeats of the evolove() - same as n_reruns + file outfile; // FIXME: map and save in future + string args[] = [ // FIXME: move this to a setargs() function + // alpha_i alpha_m beta gamma delta target_innov + @strcat(x[0]), @strcat(x[1]), @strcat(x[2]), @strcat(x[3]), @strcat(x[4]), @strcat(target_innov), + + // n_epochs n_steps evolve_reruns range + // "40000", "20", @strcat(evolve_reruns), "2", + "40000", "20", "1", " 2", # Set reruns to 1 for the cpp code; we do the re-runs in Swift for now. + + // verbose_level + "1", + + // T_start T_end Annealing_steps Target_rejection Starting_jump + "2.", "0.01", "2", "0.3", "2.3", + + // FREEZE: alpha_i alpha_m beta gamma delta + "1", "1", "0", "0", "0", + + // operation-code:(m,a) Nworkers + "m", @strcat(Nworkers) ]; + + file graph <"movie_graph.txt">; + (outfile, rfile[i]) = evolve(args,graph); + } + file sumfile = sumloss(rfile); + r = readData(sumfile); + +} + +optimizer_sweep() // Implements logic of python driver script +{ + int minrange=58; + int maxrange=59; + //int maxrange=1009; + //int maxrange=209; + int rangeinc=50; + + // fixme: add provision for random priming and random param values when x[i] == -100 (see optimizer.cpp main()) + + int nreps=1; # 15 + +// file bestfile ; +// file maxfile ; + + foreach target_innov in [minrange:maxrange:rangeinc] { + foreach rep in [1:nreps] { + file outfile; // ; + file lossfile; // ; +/* + (outfile,lossfile) = multi_annealing( + T_start = 2.0, + T_end = 0.01, + Target_rejection = 0.3, + evolve_reruns = 2, + starting_jump = 2.3, + params0[] = [0.0, 0.0, 4.0, 50.0, -1.0], + @tofloat(@strcat(target_innov)), // fixme: would @tofloat(int) work? + annealing_cycles = 1); // fixme: clarify: annealing repeats, steps, and cycles +*/ + (outfile,lossfile) = multi_annealing( + 2.0, + 0.01, + 0.3, + 2, + 2.3, + [0.0, 0.0, 4.0, 50.0, -1.0], + @tofloat(@strcat(target_innov)), // fixme: would @tofloat(int) work? + 1); // fixme: clarify: annealing repeats, steps, and cycles + } + } +} + +main() +{ + optimizer_sweep(); +} + +main(); + +/* + +Program structure: + + main + optimizer_sweep() + multi_annealing() + multi_loss() + evolve() + sumloass() + +Example parameter sets: + +for target in range(58,59,50): + for i in range(1): + args="./toptimizer 0 0 4 50 -1 "+target+" 40000 20 75 2 1 2. 0.01 2 0.3 2.3 1 1 1 0 0 m # > out.T"+str(target)+".i"+str(i) + os.system(args); + + string fastargs1[] = [ + "0", "0", "4", "50", "-1", @strcat(target), + "40000", "20", "1000", "2", + "1", + "2.", "0.01", "100", "0.3", "2.3", + "1", "1", "0", "0", "0"]; + string fastargs2[] = [ + "0", "0", "4", "50", "-1", @strcat(target), + "40000", "20", "1000", "2", + "1", + "2.", "0.01", "5", "0.3", "2.3", + "1", "1", "0", "0", "0", "m"]; + string fastargs3[] = [ + "0", "0", "4", "50", "-1", @strcat(target), + "40000", "20", @strcat(repeats), "2", + "1", + "2.", "0.01", "2", "0.3", "2.3", + "1", "1", "0", "0", "0", "m"]; +*/ + +(string args[]) setargs() +{ + // string longargs[] = @strcat("0 0 4 50 -1 ",target," 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 m"); + + // [alpha_i alpha_m beta gamma delta target_innov + // [n_epochs n_steps n_reruns] [range] + // [verbose_level] + // [T_start T_end Annealing_steps Target_rejection Starting_jump] + // [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta] [operation-code:(m,a) Nworkers] +} + Added: SwiftApps/basiclocal.xml =================================================================== --- SwiftApps/basiclocal.xml (rev 0) +++ SwiftApps/basiclocal.xml 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,10 @@ + + + + + + /home/wilde/swift/lab/swiftwork + 0 + + + Added: SwiftApps/beagle.xml =================================================================== --- SwiftApps/beagle.xml (rev 0) +++ SwiftApps/beagle.xml 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,60 @@ + + + + + + + + pbs.aprun;pbs.mpp;depth=24 + 1 + + 24 + 02:00:00 + 14400 + 20 + 1 + 1 + 100 + 100 + .15 + 10000 + + CI-MCB000119 + route + + + /lustre/beagle/wilde/swiftwork + + + + + Added: SwiftApps/cf =================================================================== --- SwiftApps/cf (rev 0) +++ SwiftApps/cf 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,7 @@ +wrapperlog.always.transfer=true +sitedir.keep=true +execution.retries=3 +lazy.errors=true +status.mode=provider +use.provider.staging=false +provider.staging.pin.swiftfiles=false Added: SwiftApps/evolve.sh =================================================================== --- SwiftApps/evolve.sh (rev 0) +++ SwiftApps/evolve.sh 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,6 @@ +#1 /bin/sh +datafile=$1 +touch multi_loss.data +shift 1 +$(dirname $0)/toptimizer $* 2>&1 +mv multi_loss.data $datafile Property changes on: SwiftApps/evolve.sh ___________________________________________________________________ Added: svn:executable + Added: SwiftApps/local.xml =================================================================== --- SwiftApps/local.xml (rev 0) +++ SwiftApps/local.xml 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,9 @@ + + + + 0.23 + 10000 + + /tmp/wilde/swiftwork + + Added: SwiftApps/math.swift =================================================================== --- SwiftApps/math.swift (rev 0) +++ SwiftApps/math.swift 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,53 @@ + +(float result) sin(float x) +{ + result = @java("java.lang.Math", "sin", x); +} + +(float result) exp(float x) +{ + result = @java("java.lang.Math", "exp", x); +} + +(float result) jlog(float x) +{ + result = @java("java.lang.Math", "log", x); +} + +(float result) log10(float x) +{ + result = @java("java.lang.Math", "log10", x); +} + +(float result) ceil(float x) +{ + result = @java("java.lang.Math", "ceil", x); +} + +(float result) floor (float x) +{ + result = @java("java.lang.Math", "floor", x); +} + +(float result) min (float a, float b) +{ + //result = @java("java.lang.Math", "min", a, b); + if ( a < b ) { + result = a; + } + else { + result = b; + } + tracef("min: result=%f\n",result); +} + +(float result) pow (float x, float y) +{ + result = @java("java.lang.Math", "pow", x, y); +} + +(float result) random () +{ + result = @java("java.lang.Math","random"); +} + Added: SwiftApps/mathtest.swift =================================================================== --- SwiftApps/mathtest.swift (rev 0) +++ SwiftApps/mathtest.swift 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,18 @@ +import "math"; + +float a = 0.5; +tracef("random(): %f\n", random()); +tracef("sin(%f): %f\n", a, sin(a)); +tracef("jlog(%f): %f\n", a, jlog(a)); +tracef("log10(%f): %f\n", a, log10(a)); +tracef("exp(%f): %f\n", a, exp(a)); +tracef("ceil(%f): %f\n", 1.23, ceil(1.23)); +tracef("floor(%f): %f\n", 1.23, floor(1.23)); +tracef("pow(%f,%f): %f\n", 2.0, 4.0, pow(2.0,4.0)); +tracef("min(%f,%f): %f\n", 2.0, 4.0, min(2.0,4.0)); +tracef("min(%f,%f): %f\n", 2.0, 1.5, min(2.0,1.5)); + + + + + Added: SwiftApps/movie_graph.txt =================================================================== --- SwiftApps/movie_graph.txt (rev 0) +++ SwiftApps/movie_graph.txt 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,1010 @@ +500 1008 +0 56 +0 436 +0 446 +1 256 +1 476 +1 260 +1 262 +1 9 +1 266 +1 13 +1 142 +1 273 +1 388 +1 30 +1 36 +1 37 +1 423 +1 168 +1 425 +1 255 +1 175 +1 307 +1 58 +1 316 +1 319 +1 323 +1 68 +1 455 +1 216 +1 82 +1 88 +1 346 +1 348 +1 225 +1 228 +1 236 +1 365 +1 111 +1 424 +1 370 +1 246 +1 376 +1 122 +1 191 +1 252 +1 382 +1 127 +2 3 +3 262 +3 263 +3 392 +3 172 +3 138 +3 395 +3 13 +3 18 +3 150 +3 408 +3 154 +3 156 +3 30 +3 291 +3 37 +3 168 +3 300 +3 52 +3 158 +3 310 +3 265 +3 187 +3 61 +3 319 +3 65 +3 322 +3 54 +3 130 +3 71 +3 332 +3 461 +3 397 +3 419 +3 473 +3 346 +3 95 +3 352 +3 98 +3 103 +3 107 +3 414 +3 368 +3 498 +3 499 +4 224 +4 449 +4 419 +4 356 +4 72 +4 330 +4 173 +4 80 +4 242 +4 180 +4 24 +4 138 +5 33 +5 459 +5 484 +5 106 +5 299 +5 430 +5 16 +5 336 +5 50 +5 147 +5 406 +5 87 +5 91 +5 190 +6 7 +6 264 +6 137 +6 276 +6 149 +6 279 +6 153 +6 29 +6 415 +6 293 +6 166 +6 296 +6 42 +6 44 +6 48 +6 49 +6 438 +6 55 +6 314 +6 69 +6 454 +6 463 +6 84 +6 85 +6 470 +6 349 +6 94 +6 229 +6 233 +6 364 +6 117 +6 248 +6 380 +6 426 +7 129 +7 131 +7 470 +7 136 +7 471 +7 271 +7 402 +7 19 +7 404 +7 282 +7 286 +7 491 +7 35 +7 421 +7 166 +7 295 +7 427 +7 428 +7 301 +7 349 +7 436 +7 439 +7 56 +7 445 +7 446 +7 320 +7 123 +7 451 +7 69 +7 454 +7 78 +7 463 +7 212 +7 213 +7 342 +7 343 +7 474 +7 93 +7 483 +7 357 +7 102 +7 235 +7 237 +7 239 +7 371 +7 379 +8 112 +8 164 +8 10 +8 12 +8 398 +8 176 +8 120 +8 178 +8 373 +8 24 +8 124 +9 262 +10 11 +10 12 +10 47 +10 335 +10 124 +11 96 +11 289 +11 66 +11 283 +11 97 +11 361 +11 47 +11 432 +11 335 +11 215 +11 27 +11 124 +11 189 +12 112 +12 434 +12 47 +13 32 +13 130 +13 260 +13 37 +13 39 +13 202 +13 305 +13 461 +13 145 +13 275 +13 448 +13 54 +13 183 +13 344 +13 36 +14 387 +14 267 +14 155 +14 36 +14 165 +14 51 +14 308 +14 440 +14 441 +14 59 +14 444 +14 199 +14 328 +14 462 +14 81 +14 210 +14 214 +14 91 +14 99 +14 60 +14 106 +14 109 +14 110 +14 244 +15 193 +15 73 +15 400 +15 341 +15 27 +15 31 +16 33 +16 258 +16 353 +16 329 +16 204 +16 207 +16 336 +16 108 +16 50 +16 22 +16 119 +16 169 +16 381 +16 223 +17 321 +17 482 +17 197 +17 276 +17 149 +17 315 +17 94 +18 32 +18 461 +18 305 +18 498 +18 86 +18 25 +19 320 +19 421 +19 334 +19 314 +19 349 +19 446 +20 48 +20 28 +20 83 +20 44 +20 45 +21 288 +21 176 +21 347 +21 325 +21 392 +21 490 +21 366 +21 272 +21 209 +21 115 +21 182 +21 247 +21 184 +21 25 +21 217 +21 27 +21 86 +21 478 +22 353 +23 257 +23 100 +23 25 +24 134 +24 146 +24 302 +24 151 +24 290 +24 291 +24 43 +24 173 +24 46 +24 176 +24 180 +24 245 +24 453 +24 457 +24 208 +24 338 +24 363 +24 116 +24 373 +24 126 +25 32 +25 128 +25 257 +25 86 +26 161 +26 357 +26 193 +26 78 +26 341 +26 69 +27 361 +27 490 +27 333 +27 272 +27 312 +27 468 +27 41 +27 184 +27 429 +27 124 +27 341 +28 64 +28 354 +28 67 +28 135 +28 200 +28 42 +28 75 +28 45 +28 206 +28 48 +28 359 +28 53 +28 238 +29 229 +29 199 +29 296 +29 233 +29 42 +29 274 +29 117 +29 152 +29 155 +29 62 +30 386 +30 225 +30 76 +30 322 +30 367 +30 318 +31 200 +31 73 +31 333 +31 494 +31 45 +31 312 +32 257 +32 305 +32 101 +32 486 +32 39 +32 231 +32 79 +32 145 +32 275 +33 459 +33 336 +33 372 +33 119 +33 409 +34 283 +35 491 +35 243 +35 237 +35 326 +36 260 +36 266 +36 285 +36 292 +36 39 +36 424 +36 171 +36 181 +36 183 +36 440 +36 58 +36 323 +36 328 +36 81 +36 82 +36 87 +36 99 +36 228 +36 101 +36 111 +37 168 +37 202 +38 92 +39 448 +39 101 +39 486 +39 231 +39 145 +39 344 +40 345 +40 355 +40 179 +40 59 +40 125 +41 160 +41 226 +41 230 +41 104 +41 361 +41 492 +41 341 +41 215 +41 121 +41 189 +42 64 +42 67 +42 199 +42 359 +42 109 +42 206 +42 143 +42 48 +42 274 +42 117 +44 193 +44 69 +44 161 +44 73 +44 48 +44 83 +44 279 +45 200 +45 73 +45 83 +46 242 +46 485 +46 126 +46 173 +48 64 +48 206 +50 259 +50 261 +50 329 +50 299 +50 204 +50 430 +50 207 +50 405 +50 59 +50 159 +51 67 +51 101 +51 135 +51 210 +51 244 +51 214 +51 441 +51 249 +52 368 +52 217 +52 347 +52 86 +53 101 +53 327 +53 75 +53 238 +53 79 +53 249 +54 130 +55 84 +57 162 +57 331 +58 266 +58 82 +59 384 +59 259 +59 132 +59 267 +59 496 +59 355 +59 152 +59 91 +59 221 +59 159 +60 91 +60 165 +62 152 +62 155 +62 221 +63 456 +63 334 +63 303 +63 472 +63 314 +63 380 +65 154 +65 499 +65 374 +65 103 +66 96 +66 160 +66 215 +67 359 +67 135 +67 109 +67 143 +67 214 +69 161 +69 166 +69 239 +69 404 +69 85 +69 279 +69 153 +70 410 +70 467 +71 130 +72 138 +73 193 +74 241 +74 82 +74 188 +74 133 +74 469 +75 140 +75 79 +75 90 +75 350 +76 386 +77 120 +77 306 +77 452 +77 254 +77 311 +78 239 +78 357 +79 257 +79 100 +79 101 +80 138 +81 99 +81 171 +82 256 +82 133 +82 348 +82 205 +82 372 +82 181 +82 119 +82 409 +82 255 +82 316 +82 122 +82 469 +84 277 +84 264 +84 149 +84 380 +84 415 +85 153 +85 166 +86 247 +86 217 +87 181 +87 147 +87 285 +89 192 +89 200 +89 333 +89 468 +89 443 +89 222 +90 272 +90 100 +90 350 +91 165 +91 106 +91 430 +91 406 +91 159 +92 258 +93 136 +93 464 +93 493 +93 326 +94 482 +94 233 +94 114 +94 276 +95 107 +95 265 +95 186 +95 332 +96 289 +96 324 +96 102 +96 401 +97 283 +97 220 +97 434 +97 164 +99 101 +99 171 +99 244 +99 251 +100 272 +101 231 +101 466 +101 244 +101 249 +101 251 +102 141 +102 237 +102 369 +102 243 +102 212 +102 121 +102 340 +102 411 +104 121 +104 230 +105 396 +105 309 +106 147 +106 308 +106 406 +106 444 +106 190 +109 199 +109 143 +109 387 +109 214 +110 267 +112 164 +113 195 +114 233 +114 482 +114 315 +114 412 +116 465 +117 296 +118 163 +119 188 +119 409 +120 297 +120 363 +120 398 +120 254 +121 160 +121 230 +121 492 +121 369 +121 212 +122 256 +122 316 +124 176 +125 394 +125 497 +125 179 +125 351 +125 479 +126 465 +126 290 +126 339 +129 491 +130 397 +131 464 +131 136 +132 383 +133 273 +133 232 +133 205 +133 241 +133 316 +134 203 +135 249 +135 354 +136 464 +136 474 +137 276 +138 419 +138 414 +138 158 +139 169 +140 200 +140 222 +140 350 +144 334 +146 363 +147 308 +147 285 +148 175 +149 456 +149 407 +151 422 +152 488 +152 233 +152 221 +152 351 +154 187 +154 358 +154 158 +155 199 +155 267 +155 221 +155 437 +156 332 +156 318 +156 310 +157 436 +157 301 +158 396 +158 187 +158 414 +159 430 +160 215 +161 193 +163 220 +164 297 +164 398 +164 220 +166 427 +167 201 +167 442 +167 170 +167 383 +168 319 +169 280 +169 270 +169 198 +170 353 +170 403 +170 269 +170 207 +170 211 +173 242 +174 194 +174 195 +174 362 +174 177 +174 250 +174 219 +174 412 +175 460 +175 246 +175 447 +176 291 +176 294 +176 366 +176 178 +176 182 +177 219 +179 345 +179 394 +181 372 +182 184 +182 429 +182 294 +184 429 +185 358 +188 280 +188 469 +189 215 +192 272 +192 443 +192 468 +192 287 +193 400 +195 488 +195 233 +196 389 +196 317 +197 321 +198 280 +199 387 +200 333 +200 222 +201 284 +203 311 +207 353 +207 329 +207 269 +207 240 +212 230 +212 341 +212 439 +213 349 +214 462 +215 226 +216 388 +216 236 +217 347 +218 465 +219 450 +219 394 +219 250 +219 298 +219 479 +220 297 +220 283 +221 267 +221 437 +222 443 +222 350 +225 236 +227 472 +227 321 +227 315 +227 412 +227 390 +228 424 +228 260 +230 341 +232 280 +232 241 +233 480 +233 412 +234 243 +234 340 +238 249 +238 354 +240 353 +241 280 +242 356 +243 385 +243 326 +244 251 +246 382 +249 354 +249 327 +249 466 +250 488 +250 479 +250 351 +252 376 +253 384 +253 269 +254 363 +254 302 +254 311 +258 353 +258 317 +258 477 +259 384 +259 405 +259 269 +260 424 +262 352 +262 346 +263 392 +263 300 +263 325 +264 438 +267 437 +268 413 +269 384 +269 383 +270 381 +270 431 +272 443 +272 350 +272 287 +273 316 +276 377 +278 390 +280 417 +281 376 +282 391 +283 289 +283 432 +285 308 +285 292 +288 325 +288 478 +289 401 +289 413 +291 325 +291 478 +292 328 +292 308 +297 398 +297 495 +302 453 +302 311 +304 493 +307 388 +308 328 +309 396 +311 453 +312 333 +312 494 +313 375 +314 487 +314 364 +314 380 +315 482 +315 412 +319 346 +321 456 +326 491 +326 435 +327 466 +328 440 +331 472 +332 408 +332 489 +333 468 +334 446 +337 380 +338 465 +341 400 +343 436 +345 394 +345 399 +347 392 +347 368 +349 364 +349 470 +351 496 +351 479 +353 393 +358 360 +358 396 +365 375 +366 478 +368 392 +372 409 +374 467 +378 411 +379 436 +380 456 +380 415 +382 433 +383 384 +394 481 +394 479 +396 449 +416 420 +416 422 +417 447 +418 446 +450 481 +456 475 +458 471 +463 470 +472 475 +496 497 + Added: SwiftApps/optimizer.cpp =================================================================== --- SwiftApps/optimizer.cpp (rev 0) +++ SwiftApps/optimizer.cpp 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,1814 @@ +// +// main.cpp +// optimizer +// +// Created by Andrey Rzhetsky on 4/11/11. +// Copyright 2011 University of Chicago. All rights reserved. +// + +#define MAXNworkers 24 +int Nworkers=MAXNworkers; +char operation = 'n'; // n: normal; m: multi_loss; a: analyze and generate next annealing parameter set. + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +// #include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define INT_INFINITY 2147483647 +#define NEVOPARAMS 5 + +#define FIX_VARIABLES 1 + +using namespace boost; +using namespace std; +using namespace boost::numeric::ublas; + +static int max_dist=0; + +typedef boost::adjacency_matrix Graph; +typedef std::pair Edge; +typedef boost::graph_traits GraphTraits; +typedef boost::numeric::ublas::triangular_matrix prob; +typedef boost::numeric::ublas::triangular_matrix pathlength; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + +namespace std { + using ::time; +} + +static int var_fixed[NEVOPARAMS] = {1, 0, 1, 1, 0}; + +typedef boost::minstd_rand base_generator_type; +typedef adjacency_list < listS, vecS, directedS, +no_property, property < edge_weight_t, int > > graph_t; +typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; +typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; + + +//================================================ +string strDouble(double number) +{ + stringstream ss;//create a stringstream + ss << number;//add number to the stream + return ss.str();//return a string with the contents of the stream +} + +//================================================ + +double gaussian(double sigma) +{ + double GaussNum = 0.0; + int NumInSum = 10; + for(int i = 0; i < NumInSum; i++) + { + GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); + } + GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); + + + return GaussNum; + +} + + + +//================================================= +double diffclock(clock_t clock1,clock_t clock2) +{ + double diffticks=clock1-clock2; + double diffms=(diffticks)/CLOCKS_PER_SEC; + return diffms; +} + +//================================================ +//================================================================ +double get_new_x(double x, double dx){ + + double new_x; + // boost::variate_generator > uni(generator, uni_dist); + double r = rand()/(double)(pow(2.,31)-1.); + + if (r > 0.5){ + new_x = x + rand()*dx/(double)(pow(2.,31)-1.); + } else { + new_x = x - rand()*dx/(double)(pow(2.,31)-1.); + } + + return new_x; + +} + + +//=============================================== +string string_wrap(string ins, int mode){ + + std::ostringstream s; + + switch(mode){ + case 0: + s << "\033[1;29m" << ins << "\033[0m"; + break; + case 1: + s << "\033[1;34m" << ins << "\033[0m"; + break; + case 2: + s << "\033[1;44m" << ins << "\033[0m"; + break; + case 3: + s << "\033[1;35m" << ins << "\033[0m"; + break; + case 4: + s << "\033[1;33;44m" << ins << "\033[0m"; + break; + case 5: + s << "\033[1;47;34m" << ins << "\033[0m"; + break; + case 6: + s << "\033[1;1;31m" << ins << "\033[0m"; + break; + case 7: + s << "\033[1;1;33m" << ins << "\033[0m"; + break; + case 8: + s << "\033[1;1;43;34m" << ins << "\033[0m"; + break; + case 9: + s << "\033[1;1;37m" << ins << "\033[0m"; + break; + case 10: + s << "\033[1;30;47m" << ins << "\033[0m"; + break; + default: + s << ins; + } + + return s.str(); +} + + +//=============================================== +string wrap_double(double val, int mode){ + + std::ostringstream s; + s << string_wrap(strDouble(val),mode); + + return s.str(); +} + + + +//=============================================== +const +string i2string(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + return s.str(); + +} + +//=============================================== +char* i2char(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + char* a=new char[s.str().size()+1]; + memcpy(a,s.str().c_str(), s.str().size()); + + return a; +} + + +template +bool from_string(T& t, + const std::string& s, + std::ios_base& (*f)(std::ios_base&)) +{ + std::istringstream iss(s); + return !(iss >> f >> t).fail(); +} + +//================================================ +class Universe { + +private: + + double alpha_i; + double alpha_m; + double beta; + double gamma; + double delta; + + double TargetNovelty; + double CumulativeRelativeLoss; + double CRLsquare; + string id; + + + int N_nodes; + int M_edges; + + int N_epochs; + int N_steps; + int N_repeats; + + int current_epoch; + double current_loss; + int current_repeat; + double current_novelty; + + int mode_identify_failed; + int verbose_level; // 0 is silent, higher is more + + double k_max; + + graph_t Full_g; + + double **Prob; + double **Tried; + double **Dist; + double **Final; + double **EdgeIndex; + double *Rank; + + base_generator_type generator; + boost::uniform_real<> uni_dist; + boost::geometric_distribution geo; + +public: + + + + //====== Constructor ====== + Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) + { + //typedef array_type2::index index2; + + + std::ifstream inFile; + //string line; + + //------------------------------- + + base_generator_type gene(42u); + generator = gene; + generator.seed(static_cast(std::time(0))); + boost::uniform_real<> uni_d(0,1); + uni_dist = uni_d; + + //-------------------------------- + + int i, k; + int x, y; + Edge* edge_array_mine; + int num_arcs_mine, num_nodes_mine; + int* weights_mine; + + TargetNovelty = target; + CumulativeRelativeLoss = 0.; + CRLsquare = 0.; + + + N_epochs = Epochs; + N_steps = Steps; + N_repeats = Repeats; + + current_epoch = 0; + current_loss = 0.; + current_repeat = 0; + + id = idd; + + verbose_level = 1; + + mode_identify_failed = identify_failed; + + + //------------------------------- + // The first pass though file with the graph + inFile.open(FileToOpen.c_str()); + if (inFile.fail()) { + cout << "Unable to open file"; + exit(1); // terminate with error + }else { + + if (verbose_level > 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x; + inFile >> y; + + if (verbose_level > 2){ + std::cout << " x: " << x; + std::cout << " y: " << y << std::endl; + } + + if (i==0){ + N_nodes=x; + M_edges=y; + break; + } + i++; + + + } + inFile.close(); + + if (verbose_level == 2){ + std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { + if (i > 0) { + Final[x][y]=1.; + Final[y][x]=1.; + + + if (verbose_level == 2){ + std::cout << "."; + } + } + i++; + + } + if (verbose_level == 2){ + std::cout << std::endl; + } + inFile.close(); + + k=0; + for (int i=0; i 0.){ + EdgeIndex[i][j]=k; + k++; + } + } + } + + + + //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // create graph -- hopefully, we can keep it, just modifying edge weights + + + edge_array_mine = new Edge[2*M_edges]; + num_arcs_mine = 2*M_edges; + num_nodes_mine = N_nodes; + weights_mine = new int[2*M_edges]; + for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} + + k=0; + for(int i=0; i0.){ + edge_array_mine[2*k] =Edge(i,j); + edge_array_mine[2*k+1]=Edge(j,i); + k++; + } + } + } + graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); + + Full_g = g; + delete edge_array_mine; + delete weights_mine; + + //=========================================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + for (int i=0; i 0.){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + + } + + + //===================================================================== + int sample_failed_number(double pfail){ + + //boost::geometric_distribution geo(pfail); + //boost::variate_generator > geom(generator, geo); + + double r, u, g; + + r=0.; + for(int i=0; i=3){ + std::cout << id << " failed " << r << std::endl; + } + return r; + + } + + //============================================= + double get_target(void){ + return TargetNovelty; + } + + //============================================= + void set_target(double target){ + TargetNovelty=target; + } + + //============================================= + int sample(){ + + //boost::variate_generator > uni(generator, uni_dist); + // double r = uni(), Summa = 0.; + + + + double r = rand(), Summa = 0.; + r /= (double)(pow(2.,31)-1.); + int result = 0; + int finished = 0; + + if (verbose_level==4){ + std::cout << id << " sampled " << r << std::endl; + } + + for(int i=0; i r){ + + Tried[i][j]+=1.; + + if (Final[i][j] > 0.){ + result = 1; + } + finished = 1; + } + } + } + + return result; + + } + + //=============================== + void update_current_graph(void){ + + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + //property_map::type weightmap = get(edge_weight, Full_g); + for (int i=0; i 0. && Tried[i][j]>0){ + //s = edge(i, j, Full_g); + boost::graph_traits::edge_descriptor e1,e2; + bool found1, found2; + u = vertex(i, Full_g); + v = vertex(j, Full_g); + tie(e1, found1) = edge(u, v, Full_g); + tie(e2, found2) = edge(v, u, Full_g); + if (!found1 && !found2){ + add_edge(u,v,1,Full_g); + add_edge(v,u,1,Full_g); + } + + } + } + + } + } + + //=============================== + void update_distances(void){ + // put shortest paths to the *Dist[][] + std::vector p(num_vertices(Full_g)); + std::vector d(num_vertices(Full_g)); + vertex_descriptor s; + + + // put shortest paths to the *Dist[][] + for (int j=0; j 0.){ + s = vertex(j, Full_g); + dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); + + //std::cout <<" Vertex "<< j << std::endl; + graph_traits < graph_t >::vertex_iterator vi, vend; + + for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { + + if (p[*vi]!=*vi){ + Dist[*vi][j]=d[*vi]; + Dist[j][*vi]=d[*vi]; + + if (Dist[*vi][j]>max_dist){ + max_dist=Dist[*vi][j]; + } + + + } else { + Dist[*vi][j]=-1.; + Dist[j][*vi]=-1.; + } + } + } + + } + + + } + + //====================================================== + void update_ranks(void){ + + for(int i=0; i0. && Final[i][j] >0.){ + Rank[i]++; + Rank[j]++; + } + } + } + + } + + //==================================================================== + void set_world(double a_i, double a_m, double b, double g, double d){ + + alpha_i=a_i; + alpha_m=a_m; + gamma=g; + beta=b; + delta=d; + + } + + //==================================================================== + void reset_world(){ + + //==================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + + for (int i=0; i 0. && Tried[i][j] > 0){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + //================================================== + + current_loss=0; + current_epoch=0; + current_repeat++; + current_novelty=0; + + for(int i = 0; i < N_nodes; ++i) { + Rank[i]=0.; + for(int j = 0; j < N_nodes; ++j) { + Prob[i][j]=0.; + Dist[i][j]=-1.; + Tried[i][j]=0.; + } + } + } + + + //============================================== + void show_parameters(void){ + + std::cout << "Parameters: " + << alpha_i << " " + << alpha_m << " | " + << beta << " " + << gamma << " | " + << delta << std::endl; + + } + + + + //=============================================== + string file_name(){ + + std::ostringstream s; + s << "world_" + << lexical_cast(alpha_i) << "_" + << lexical_cast(alpha_m) << "_" + << lexical_cast(beta) << "_" + << lexical_cast(gamma) << "_" + << lexical_cast(delta) << "_" + << lexical_cast(N_epochs) << "_" + << lexical_cast(N_steps) << "_" + << lexical_cast(N_repeats) << ".txt"; + + return s.str(); + + } + + + + + //================================================= + void set_verbose(int verbose){ + + verbose_level = verbose; + } + + + //============================================================= + void update_probabilities(void){ + + + //========================= + // Compute sampling probabilities + // first pass: \xi_i,j + for(int i=0; i 0.){ + + double k = Dist[i][j]; + if (k >= k_max){ + k = k_max-1; + } + + bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); + + } else { + bg = delta; + } + + Prob[i][j] = exp(Prob[i][j] + bg); + } + } + + + // second pass: sum + double Summa = 0.; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + + } + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + else { + + double pfail=0.; + int n_failed; + //, n_check = 0; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + } + + current_novelty = novel; + + + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + if (verbose_level == 2){ + std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) + + << " cost=" << cost + << " novel=" << novel + << " rel_loss=" << cost/novel + << std::endl; + } + + current_epoch++; + } + + + //====== Destructor ====== + ~Universe(){ + + delete_2Dmatrix(Final, N_nodes); + delete_2Dmatrix(Dist, N_nodes); + delete_2Dmatrix(Tried, N_nodes); + delete_2Dmatrix(Prob, N_nodes); + delete_2Dmatrix(EdgeIndex, N_nodes); + delete_1Dmatrix(Rank); + } + + //================================================ + // Allocate memory + double** allocate_2Dmatrix(int N, int M) + { + double **pointer; + + if (verbose_level == 2){ + std::cout<< "["< 0){ + + pointer = new double[N]; + + }else { + + pointer = NULL; + } + + return pointer; + + } + + //============================================== + // De-Allocate memory to prevent memory leak + void delete_2Dmatrix(double **pointer, int N){ + + if (pointer != NULL){ + + for (int i = 0; i < N; ++i){ + delete [] pointer[i]; + } + delete [] pointer; + } + } + //==================== + void delete_1Dmatrix(double *pointer){ + + delete [] pointer; + } + + //=========================================== + double get_rel_loss(){ + + return CumulativeRelativeLoss ; + } + + //=========================================== + double get_rel_loss_err(){ + + return CRLsquare ; + } + + + + //================================================================================== + void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ + + double ALOT=100000000000.; + + // std::cout<<" evolve_to_target_and_save: istart=" << istart << "iend=" << iend << "\n"; + + reset_world(); + + for (int k = istart; k < iend; k++){ + + // std::cout<<" evolve: k=" << k << "\n"; + + + + for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ + // std::cout<<" evolve: k=" << k << " i=" << i << " cur=" << current_novelty << " Target=" << TargetNovelty << "\n"; + update_world(); + } + + storage[k]=current_loss/current_novelty; + counters[k]=1; + + + reset_world(); + } + + } + //============================================== + int get_reruns(void){ + return N_repeats; + } + + //============================================== + double get_parameter(int i){ + + switch(i){ + case 0: + return alpha_i; + case 1: + return alpha_m; + case 2: + return beta; + case 3: + return gamma; + case 4: + return delta; + default: + + std::cout << "Erroneous parameter id!!!!\n\n\n"; + return 0.; + } + } + + + //============================================== + void evolve_to_target(){ + + reset_world(); + if (beta < -1. || gamma < -1.){ + CumulativeRelativeLoss = 100000000000.; + CRLsquare = 0.; + return; + } + + + for (int k=0; k< N_repeats; k++){ + + + for(int i=0; i 4) {return 0;} + + else { + + switch(position){ + case 0: + alpha_i=value; + return 1; + case 1: + alpha_m=value; + return 1; + case 2: + beta=value; + return 1; + case 3: + gamma=value; + return 1; + case 4: + delta=value; + return 1; + } + + } + + return 0; + } + +#ifdef notdef + //================================================================= + void try_annealing(double starting_jump, int iterations, + double temp_start, double temp_end, double target_rejection){ + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=alpha_i; + x[1]=alpha_m; + x[2]=beta; + x[3]=gamma; + x[4]=delta; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + + //.......................................... + evolve_to_target(); + std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + //........................................... + + // optimization cycle + for(int i=0; i ratio){ + + std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << alpha_i << " "<< alpha_m << " " + << beta << " " << gamma << " " + << delta << " " << std::endl; + set_parameter(x[j], j); + CumulativeRelativeLoss = 0; + CRLsquare = 0; + + rejection[j]+=1.; + } + + else { + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + x[j] = x_tmp; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) + << " "<< wrap_double(rejection[1], 7) << " " + << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(alpha_i,2) + << " "<< wrap_double(alpha_m, 7) << " " + << wrap_double(beta,5) << " " + << wrap_double(gamma,9) << " " + << wrap_double(delta,6) << " " + << std::endl << std::endl; + + } + //........................................................ + + } + + } + + } + +#endif // notdef + + +}; + + +//============================================================ + +std::pair multi_loss( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double* Results, + int* Counters, + double* params){ + + int N = un[0]->get_reruns(); + int step = (int)(double)N/(double)(Nworkers); + int istart=0; + int iend = istart+step; + + double Loss=0., LossSquare=0.; + + timeval startTime, endTime; + double elapsedTime; + // start timer + gettimeofday(&startTime, NULL); + + //err: for(int i=0; iget_parameter(j) << "," << params[j] << "] "; + un[i]->set_parameter(params[j],j); + } + } + std::cout << "\n"; + int i; + #pragma omp parallel for private (i) + for(i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); + un[i]->evolve_to_target_and_save(i*step, min((i+1)*step,N), Results, Counters); + //}); + + // std::cout<<"multi_loss: Returned from evolve_to_target_and_save " << i << "\n"; + + + //istart += step; + //iend = min(istart+step,N); + + } + // err } + // dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + //dispatch_release(group); + + + for (int i=0; i Res; + Res.first=Loss; + Res.second=two_std; + + gettimeofday(&endTime, NULL); + elapsedTime = (endTime.tv_sec - startTime.tv_sec) * 1000.0; // sec to ms + elapsedTime += (endTime.tv_usec - startTime.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << "multi_loss(N=" << N << ") elapsed time: " << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; + + return Res; +} +//============================================================ + + +//============================================================ +void multi_annealing( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double T_start, double T_end, + double Target_rejection, + int Annealing_repeats, + double starting_jump, + double* Results, + int* Counters, + double* params0, + double annealing_cycles){ + //................................. + // re-implement annealing + + double dx[NEVOPARAMS]={0.,0.,0.,0.,0}; + double x[NEVOPARAMS]={0.,0.,0.,0.,0}; + double rejection[NEVOPARAMS]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + //boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + for(int i=0;iset_parameter(x[i], i); + } + } + + // establish the current value + std::pairRes; + + if ( operation == 'm' ) { + // Nworkers = 1; + } + else if (operation == 'g') { + // generate params + } + else if (operation == 'a') { + // analyze multi_loss() results + + string line; + ifstream mlossdata ("multi_loss.data"); + double d, Loss, LossSquare, two_std; + bool b; + int n=0; + if (mlossdata.is_open()) { + while ( getline (mlossdata,line) ) { + b = from_string(d, std::string(line), std::dec); + cout << line << " d=" << d << endl; + Loss += d; + LossSquare += (d*d); + n++; + } + Loss /= double(n); + LossSquare /= double(n); + two_std = ((LossSquare - Loss*Loss)/(double)n); + two_std = 2.*sqrt(two_std); + std::cout<<"n="<get_reruns(); + + f = fopen("multi_loss.data","w"); + for(int i=0; iset_parameter(x_tmp, j); + } + + + // WRITE OUT PARAMS HERE; then exit. + + std::cout << "Calling multi_loss: i=" << i << " j=" << j << "\n"; + Res = multi_loss(/* group, */ un, /* CustomQueues, */ Results, Counters, x); + std::cout << "Ret from multi_loss: i=" << i << " j=" << j << "\n"; + std::cout << Res.first << " +- " << Res.second << std::endl; + + ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " vs " << ratio << std::endl; + + double ALOT=100000000000.; + + if (Res.first < ALOT) + { + ofstream filestr; + + filestr.open ("best_opt_some.txt", ofstream::app); + + // >> i/o operations here << + filestr << un[0]->get_target() << "," + << Res.first + << "," << un[0]->get_parameter(0) + << "," << un[0]->get_parameter(1) + << "," << un[0]->get_parameter(2) + << "," << un[0]->get_parameter(3) + << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; + + filestr.close(); + + + filestr.open ("max_dist.txt", ofstream::app); + + // >> i/o operations here << + filestr << max_dist << ",\n"; + + filestr.close(); + + } + + + if (r > ratio){ + + std::cout << " "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << un[0]->get_parameter(0) + << " " << un[0]->get_parameter(1) + << " " << un[0]->get_parameter(2) + << " " << un[0]->get_parameter(3) + << " " << un[0]->get_parameter(4) << " " << std::endl; + + x[j]=x_hold; + for(int w=0; wset_parameter(x[j], j); + } + + + //set_parameter(x[j], j); + rejection[j]+=1.; + } + + else { + + curr_x = Res.first; + curr_err = Res.second; + x[j] = x_tmp; + + for(int w=0; wset_parameter(x[j], j); + } + + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) << " " + << wrap_double(rejection[1],7) << " " + << wrap_double(rejection[2],5) << " " + << wrap_double(rejection[3],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << " "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(un[0]->get_parameter(0),2) << " " + << wrap_double(un[0]->get_parameter(1),7) << " " + << wrap_double(un[0]->get_parameter(2),5) << " " + << wrap_double(un[0]->get_parameter(3),9) << " " + << wrap_double(un[0]->get_parameter(4),6) << " " + << std::endl << std::endl; + + + + } + //........................................................ + + } + } + + } + +} + + +//================================================ +int +main(int argc, char* argv[]) +{ + + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; + string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + string par_names4[2] = {"Operation", "Nworkers"}; + int params1[4] = {300, 50, 1000, 10}; + int params3[5] = { 0, 0, 0, 0, 0}; + + // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + int verbose_level = 2; + const std::string one="one", two="two"; + static Universe* un[MAXNworkers]; + // static dispatch_queue_t CustomQueues[MAXNworkers]; + + static double* Results; + static int* Counters; + + timeval t1, t2; + double elapsedTime; + // start timer + gettimeofday(&t1, NULL); + + + if (argc < 8) { + std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; + std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; + std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; + + system("pwd"); + + + return(1); + } + else { + std::cout << "argc=" << argc << std::endl; + + for (int nArg=0; nArg < argc; nArg++){ + //std::cout << nArg << " " << argv[nArg] << std::endl; + if (nArg > 0 && nArg < 7){ + params0[nArg-1]= atof(argv[nArg]); + std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; + } + if (nArg > 6 && nArg < 11){ + params1[nArg-7]= atoi(argv[nArg]); + std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; + } + if (nArg == 11){ + verbose_level = atoi(argv[nArg]); + std::cout << "verbose level: " << verbose_level << std::endl; + } + if (nArg > 11 && nArg < 17){ + params2[nArg-12]= atof(argv[nArg]); + std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; + } + if (nArg > 16 && nArg < 22){ + params3[nArg-17]= atof(argv[nArg]); + var_fixed[nArg-17]= atof(argv[nArg]); + std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; + } + if (nArg == 22 ){ + operation = *argv[nArg]; + std::cout << par_names4[0] << ": " << operation << std::endl; + } + if (nArg == 23 ){ + Nworkers = atoi(argv[nArg]); + std::cout << par_names4[1] << ": " << Nworkers << std::endl; + } + } + } + + /* + for target in range(58,1009,50): + s = ("%d" % target) + print s + + for i in range(15): + # Param groups separated by "|" below for documentation. NOTE that | is not used on command line! + os.system("./supe_duper_optimizer |0 0 4 50 -1 "+s+" | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0") + */ + + /* Parameters, re-iterated: + + "alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + + {"n_epochs", "n_steps", "n_reruns", "range"}; + int params1[4] = {300, 50, 1000, 10}; + + {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params3[5] = { 0, 0, 0, 0, 0}; + + + */ + + for (int j=0; j 0){ + + Results = new double[n_rep]; + Counters = new int[n_rep]; + + }else { + + Results = NULL; + Counters = NULL; + std::cout << " Number of reruns should be positive! " << std::endl; + return 0; + + } + //............................... + + //srand(time(0)); + //srandomdev(); + { + timeval t; + gettimeofday(&t, NULL); + srand(t.tv_usec); + } + + { + double r=0; + for (int j=0; j<100; j++){ + + + + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " "; + } + std::cout << "\n "; + } + //random initiation of starting parameters + + if (range > 0.){ + + for (int i=0; i < 5; i++){ + + if (params0[i]==-100.){ + + double r1 = (rand()/(double)(pow(2.,31)-1.)); + double r2 = (rand()/(double)(pow(2.,31)-1.)); + double sign = 1.; + + if(r1 > 0.5){ + sign=-1.; + } + + params0[i] = sign*r2*range; + + std::cout << par_names0[i] << ": " << params0[i] << std::endl; + } + } + + } + + + double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; + int Annealing_repeats = (int) params2[2]; + + + // dispatch_group_t group = dispatch_group_create(); + + //............................. + multi_annealing( /* group, */ un, /* CustomQueues, */ T_start, T_end, Target_rejection, Annealing_repeats, + starting_jump, Results, Counters, params0, Annealing_repeats); + + //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + // dispatch_release(group); + //............................. + + + // stop timer + gettimeofday(&t2, NULL); + + // compute and print the elapsed time in millisec + elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms + elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; + + //..................... + + for(int i=0; i 0){ + + delete [] Results; + delete [] Counters; + + } + + return 0; + + + +} + Property changes on: SwiftApps/optimizer.cpp ___________________________________________________________________ Added: svn:executable + Added: SwiftApps/optimizer.orig.cpp =================================================================== --- SwiftApps/optimizer.orig.cpp (rev 0) +++ SwiftApps/optimizer.orig.cpp 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,1710 @@ +// +// main.cpp +// optimizer +// +// Created by Andrey Rzhetsky on 4/11/11. +// Copyright 2011 University of Chicago. All rights reserved. +// + +#define Nworkers 1 // 24 + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +// #include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define INT_INFINITY 2147483647 + +#define FIX_VARIABLES 1 + +using namespace boost; +using namespace std; +using namespace boost::numeric::ublas; + +static int max_dist=0; + +typedef boost::adjacency_matrix Graph; +typedef std::pair Edge; +typedef boost::graph_traits GraphTraits; +typedef boost::numeric::ublas::triangular_matrix prob; +typedef boost::numeric::ublas::triangular_matrix pathlength; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + +namespace std { + using ::time; +} + +static int var_fixed[5] = {1, 0, 1, 1, 0}; + +typedef boost::minstd_rand base_generator_type; +typedef adjacency_list < listS, vecS, directedS, +no_property, property < edge_weight_t, int > > graph_t; +typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; +typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; + + +//================================================ +string strDouble(double number) +{ + stringstream ss;//create a stringstream + ss << number;//add number to the stream + return ss.str();//return a string with the contents of the stream +} + +//================================================ + +double gaussian(double sigma) +{ + double GaussNum = 0.0; + int NumInSum = 10; + for(int i = 0; i < NumInSum; i++) + { + GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); + } + GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); + + + return GaussNum; + +} + + + +//================================================= +double diffclock(clock_t clock1,clock_t clock2) +{ + double diffticks=clock1-clock2; + double diffms=(diffticks)/CLOCKS_PER_SEC; + return diffms; +} + +//================================================ +//================================================================ +double get_new_x(double x, double dx){ + + double new_x; + // boost::variate_generator > uni(generator, uni_dist); + double r = rand()/(double)(pow(2.,31)-1.); + + if (r > 0.5){ + new_x = x + rand()*dx/(double)(pow(2.,31)-1.); + } else { + new_x = x - rand()*dx/(double)(pow(2.,31)-1.); + } + + return new_x; + +} + + +//=============================================== +string string_wrap(string ins, int mode){ + + std::ostringstream s; + + switch(mode){ + case 0: + s << "\033[1;29m" << ins << "\033[0m"; + break; + case 1: + s << "\033[1;34m" << ins << "\033[0m"; + break; + case 2: + s << "\033[1;44m" << ins << "\033[0m"; + break; + case 3: + s << "\033[1;35m" << ins << "\033[0m"; + break; + case 4: + s << "\033[1;33;44m" << ins << "\033[0m"; + break; + case 5: + s << "\033[1;47;34m" << ins << "\033[0m"; + break; + case 6: + s << "\033[1;1;31m" << ins << "\033[0m"; + break; + case 7: + s << "\033[1;1;33m" << ins << "\033[0m"; + break; + case 8: + s << "\033[1;1;43;34m" << ins << "\033[0m"; + break; + case 9: + s << "\033[1;1;37m" << ins << "\033[0m"; + break; + case 10: + s << "\033[1;30;47m" << ins << "\033[0m"; + break; + default: + s << ins; + } + + return s.str(); +} + + +//=============================================== +string wrap_double(double val, int mode){ + + std::ostringstream s; + s << string_wrap(strDouble(val),mode); + + return s.str(); +} + + + +//=============================================== +const +string i2string(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + return s.str(); + +} + +//=============================================== +char* i2char(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + char* a=new char[s.str().size()+1]; + memcpy(a,s.str().c_str(), s.str().size()); + + return a; +} + +//================================================ +class Universe { + +private: + + double alpha_i; + double alpha_m; + double beta; + double gamma; + double delta; + + double TargetNovelty; + double CumulativeRelativeLoss; + double CRLsquare; + string id; + + + int N_nodes; + int M_edges; + + int N_epochs; + int N_steps; + int N_repeats; + + int current_epoch; + double current_loss; + int current_repeat; + double current_novelty; + + int mode_identify_failed; + int verbose_level; // 0 is silent, higher is more + + double k_max; + + graph_t Full_g; + + double **Prob; + double **Tried; + double **Dist; + double **Final; + double **EdgeIndex; + double *Rank; + + base_generator_type generator; + boost::uniform_real<> uni_dist; + boost::geometric_distribution geo; + +public: + + + + //====== Constructor ====== + Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) + { + //typedef array_type2::index index2; + + + std::ifstream inFile; + //string line; + + //------------------------------- + + base_generator_type gene(42u); + generator = gene; + generator.seed(static_cast(std::time(0))); + boost::uniform_real<> uni_d(0,1); + uni_dist = uni_d; + + //-------------------------------- + + int i, k; + int x, y; + Edge* edge_array_mine; + int num_arcs_mine, num_nodes_mine; + int* weights_mine; + + TargetNovelty = target; + CumulativeRelativeLoss = 0.; + CRLsquare = 0.; + + + N_epochs = Epochs; + N_steps = Steps; + N_repeats = Repeats; + + current_epoch = 0; + current_loss = 0.; + current_repeat = 0; + + id = idd; + + verbose_level = 1; + + mode_identify_failed = identify_failed; + + + //------------------------------- + // The first pass though file with the graph + inFile.open(FileToOpen.c_str()); + if (inFile.fail()) { + cout << "Unable to open file"; + exit(1); // terminate with error + }else { + + if (verbose_level > 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x; + inFile >> y; + + if (verbose_level > 2){ + std::cout << " x: " << x; + std::cout << " y: " << y << std::endl; + } + + if (i==0){ + N_nodes=x; + M_edges=y; + break; + } + i++; + + + } + inFile.close(); + + if (verbose_level == 2){ + std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { + if (i > 0) { + Final[x][y]=1.; + Final[y][x]=1.; + + + if (verbose_level == 2){ + std::cout << "."; + } + } + i++; + + } + if (verbose_level == 2){ + std::cout << std::endl; + } + inFile.close(); + + k=0; + for (int i=0; i 0.){ + EdgeIndex[i][j]=k; + k++; + } + } + } + + + + //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // create graph -- hopefully, we can keep it, just modifying edge weights + + + edge_array_mine = new Edge[2*M_edges]; + num_arcs_mine = 2*M_edges; + num_nodes_mine = N_nodes; + weights_mine = new int[2*M_edges]; + for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} + + k=0; + for(int i=0; i0.){ + edge_array_mine[2*k] =Edge(i,j); + edge_array_mine[2*k+1]=Edge(j,i); + k++; + } + } + } + graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); + + Full_g = g; + delete edge_array_mine; + delete weights_mine; + + //=========================================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + for (int i=0; i 0.){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + + } + + + //===================================================================== + int sample_failed_number(double pfail){ + + //boost::geometric_distribution geo(pfail); + //boost::variate_generator > geom(generator, geo); + + double r, u, g; + + r=0.; + for(int i=0; i=3){ + std::cout << id << " failed " << r << std::endl; + } + return r; + + } + + //============================================= + double get_target(void){ + return TargetNovelty; + } + + //============================================= + void set_target(double target){ + TargetNovelty=target; + } + + //============================================= + int sample(){ + + //boost::variate_generator > uni(generator, uni_dist); + // double r = uni(), Summa = 0.; + + + + double r = rand(), Summa = 0.; + r /= (double)(pow(2.,31)-1.); + int result = 0; + int finished = 0; + + if (verbose_level==4){ + std::cout << id << " sampled " << r << std::endl; + } + + for(int i=0; i r){ + + Tried[i][j]+=1.; + + if (Final[i][j] > 0.){ + result = 1; + } + finished = 1; + } + } + } + + return result; + + } + + //=============================== + void update_current_graph(void){ + + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + //property_map::type weightmap = get(edge_weight, Full_g); + for (int i=0; i 0. && Tried[i][j]>0){ + //s = edge(i, j, Full_g); + boost::graph_traits::edge_descriptor e1,e2; + bool found1, found2; + u = vertex(i, Full_g); + v = vertex(j, Full_g); + tie(e1, found1) = edge(u, v, Full_g); + tie(e2, found2) = edge(v, u, Full_g); + if (!found1 && !found2){ + add_edge(u,v,1,Full_g); + add_edge(v,u,1,Full_g); + } + + } + } + + } + } + + //=============================== + void update_distances(void){ + // put shortest paths to the *Dist[][] + std::vector p(num_vertices(Full_g)); + std::vector d(num_vertices(Full_g)); + vertex_descriptor s; + + + // put shortest paths to the *Dist[][] + for (int j=0; j 0.){ + s = vertex(j, Full_g); + dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); + + //std::cout <<" Vertex "<< j << std::endl; + graph_traits < graph_t >::vertex_iterator vi, vend; + + for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { + + if (p[*vi]!=*vi){ + Dist[*vi][j]=d[*vi]; + Dist[j][*vi]=d[*vi]; + + if (Dist[*vi][j]>max_dist){ + max_dist=Dist[*vi][j]; + } + + + } else { + Dist[*vi][j]=-1.; + Dist[j][*vi]=-1.; + } + } + } + + } + + + } + + //====================================================== + void update_ranks(void){ + + for(int i=0; i0. && Final[i][j] >0.){ + Rank[i]++; + Rank[j]++; + } + } + } + + } + + //==================================================================== + void set_world(double a_i, double a_m, double b, double g, double d){ + + alpha_i=a_i; + alpha_m=a_m; + gamma=g; + beta=b; + delta=d; + + } + + //==================================================================== + void reset_world(){ + + //==================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + + for (int i=0; i 0. && Tried[i][j] > 0){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + //================================================== + + current_loss=0; + current_epoch=0; + current_repeat++; + current_novelty=0; + + for(int i = 0; i < N_nodes; ++i) { + Rank[i]=0.; + for(int j = 0; j < N_nodes; ++j) { + Prob[i][j]=0.; + Dist[i][j]=-1.; + Tried[i][j]=0.; + } + } + } + + + //============================================== + void show_parameters(void){ + + std::cout << "Parameters: " + << alpha_i << " " + << alpha_m << " | " + << beta << " " + << gamma << " | " + << delta << std::endl; + + } + + + + //=============================================== + string file_name(){ + + std::ostringstream s; + s << "world_" + << lexical_cast(alpha_i) << "_" + << lexical_cast(alpha_m) << "_" + << lexical_cast(beta) << "_" + << lexical_cast(gamma) << "_" + << lexical_cast(delta) << "_" + << lexical_cast(N_epochs) << "_" + << lexical_cast(N_steps) << "_" + << lexical_cast(N_repeats) << ".txt"; + + return s.str(); + + } + + + + + //================================================= + void set_verbose(int verbose){ + + verbose_level = verbose; + } + + + //============================================================= + void update_probabilities(void){ + + + //========================= + // Compute sampling probabilities + // first pass: \xi_i,j + for(int i=0; i 0.){ + + double k = Dist[i][j]; + if (k >= k_max){ + k = k_max-1; + } + + bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); + + } else { + bg = delta; + } + + Prob[i][j] = exp(Prob[i][j] + bg); + } + } + + + // second pass: sum + double Summa = 0.; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + + } + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + else { + + double pfail=0.; + int n_failed; + //, n_check = 0; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + } + + current_novelty = novel; + + + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + if (verbose_level == 2){ + std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) + + << " cost=" << cost + << " novel=" << novel + << " rel_loss=" << cost/novel + << std::endl; + } + + current_epoch++; + } + + + //====== Destructor ====== + ~Universe(){ + + delete_2Dmatrix(Final, N_nodes); + delete_2Dmatrix(Dist, N_nodes); + delete_2Dmatrix(Tried, N_nodes); + delete_2Dmatrix(Prob, N_nodes); + delete_2Dmatrix(EdgeIndex, N_nodes); + delete_1Dmatrix(Rank); + } + + //================================================ + // Allocate memory + double** allocate_2Dmatrix(int N, int M) + { + double **pointer; + + if (verbose_level == 2){ + std::cout<< "["< 0){ + + pointer = new double[N]; + + }else { + + pointer = NULL; + } + + return pointer; + + } + + //============================================== + // De-Allocate memory to prevent memory leak + void delete_2Dmatrix(double **pointer, int N){ + + if (pointer != NULL){ + + for (int i = 0; i < N; ++i){ + delete [] pointer[i]; + } + delete [] pointer; + } + } + //==================== + void delete_1Dmatrix(double *pointer){ + + delete [] pointer; + } + + //=========================================== + double get_rel_loss(){ + + return CumulativeRelativeLoss ; + } + + //=========================================== + double get_rel_loss_err(){ + + return CRLsquare ; + } + + + + //================================================================================== + void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ + + double ALOT=100000000000.; + + std::cout<<" evolve_to_target_and_save: istart=" << istart << "iend=" << iend << "\n"; + + reset_world(); + + for (int k = istart; k < iend; k++){ + + std::cout<<" evolve: k=" << k << "\n"; + + + + for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ + std::cout<<" evolve: k=" << k << " i=" << i << " cur=" << current_novelty << " Target=" << TargetNovelty << "\n"; + update_world(); + } + + storage[k]=current_loss/current_novelty; + counters[k]=1; + + + reset_world(); + } + + } + //============================================== + int get_reruns(void){ + return N_repeats; + } + + //============================================== + double get_parameter(int i){ + + switch(i){ + case 0: + return alpha_i; + case 1: + return alpha_m; + case 2: + return beta; + case 3: + return gamma; + case 4: + return delta; + default: + + std::cout << "Erroneous parameter id!!!!\n\n\n"; + return 0.; + } + } + + + //============================================== + void evolve_to_target(){ + + reset_world(); + if (beta < -1. || gamma < -1.){ + CumulativeRelativeLoss = 100000000000.; + CRLsquare = 0.; + return; + } + + + for (int k=0; k< N_repeats; k++){ + + + for(int i=0; i 4) {return 0;} + + else { + + switch(position){ + case 0: + alpha_i=value; + return 1; + case 1: + alpha_m=value; + return 1; + case 2: + beta=value; + return 1; + case 3: + gamma=value; + return 1; + case 4: + delta=value; + return 1; + } + + } + + return 0; + } + + + //================================================================= + void try_annealing(double starting_jump, int iterations, + double temp_start, double temp_end, double target_rejection){ + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=alpha_i; + x[1]=alpha_m; + x[2]=beta; + x[3]=gamma; + x[4]=delta; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + + //.......................................... + evolve_to_target(); + std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + //........................................... + + // optimization cycle + for(int i=0; i ratio){ + + std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << alpha_i << " "<< alpha_m << " " + << beta << " " << gamma << " " + << delta << " " << std::endl; + set_parameter(x[j], j); + CumulativeRelativeLoss = 0; + CRLsquare = 0; + + rejection[j]+=1.; + } + + else { + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + x[j] = x_tmp; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) + << " "<< wrap_double(rejection[1], 7) << " " + << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(alpha_i,2) + << " "<< wrap_double(alpha_m, 7) << " " + << wrap_double(beta,5) << " " + << wrap_double(gamma,9) << " " + << wrap_double(delta,6) << " " + << std::endl << std::endl; + + } + //........................................................ + + } + + } + + } + + +}; + +//============================================================ + +std::pair multi_loss( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double* Results, + int* Counters, + double* params){ + + int N = un[0]->get_reruns(); + int step = (int)(double)N/(double)(Nworkers); + int istart=0; + int iend = istart+step; + + double Loss=0., LossSquare=0.; + + for(int i=0; iset_parameter(params[j],j); + } + + + for(int i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); + //}); + + std::cout<<" Returned from evolve_to_target_and_save\n"; + istart += step; + iend = min(istart+step,N); + + } + } + // dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + //dispatch_release(group); + + for (int i=0; i Res; + Res.first=Loss; + Res.second=two_std; + + return Res; + + +} +//============================================================ + + +//============================================================ +void multi_annealing( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double T_start, double T_end, + double Target_rejection, + int Annealing_repeats, + double starting_jump, + double* Results, + int* Counters, + double* params0, + double annealing_cycles){ + //................................. + // re-implement annealing + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + //boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=params0[0]; + x[1]=params0[1]; + x[2]=params0[2]; + x[3]=params0[3]; + x[4]=params0[4]; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + std::pairRes; + + Res = multi_loss( /* group,*/ un, /* CustomQueues,*/ Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + curr_x = Res.first; + curr_err = Res.second; + + // optimization cycle + + for(int i=0; iset_parameter(x_tmp, j); + } + + + Res = multi_loss(/* group, */ un, /* CustomQueues, */ Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " vs " << ratio << std::endl; + + double ALOT=100000000000.; + + if (Res.first < ALOT) + { + ofstream filestr; + + filestr.open ("best_opt_some.txt", ofstream::app); + + // >> i/o operations here << + filestr << un[0]->get_target() << "," + << Res.first + << "," << un[0]->get_parameter(0) + << "," << un[0]->get_parameter(1) + << "," << un[0]->get_parameter(2) + << "," << un[0]->get_parameter(3) + << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; + + filestr.close(); + + + filestr.open ("max_dist.txt", ofstream::app); + + // >> i/o operations here << + filestr << max_dist << ",\n"; + + filestr.close(); + + } + + + if (r > ratio){ + + std::cout << " "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << un[0]->get_parameter(0) + << " " << un[0]->get_parameter(1) + << " " << un[0]->get_parameter(2) + << " " << un[0]->get_parameter(3) + << " " << un[0]->get_parameter(4) << " " << std::endl; + + x[j]=x_hold; + for(int w=0; wset_parameter(x[j], j); + } + + + //set_parameter(x[j], j); + rejection[j]+=1.; + } + + else { + + curr_x = Res.first; + curr_err = Res.second; + x[j] = x_tmp; + + for(int w=0; wset_parameter(x[j], j); + } + + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) << " " + << wrap_double(rejection[1],7) << " " + << wrap_double(rejection[2],5) << " " + << wrap_double(rejection[3],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << " "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(un[0]->get_parameter(0),2) << " " + << wrap_double(un[0]->get_parameter(1),7) << " " + << wrap_double(un[0]->get_parameter(2),5) << " " + << wrap_double(un[0]->get_parameter(3),9) << " " + << wrap_double(un[0]->get_parameter(4),6) << " " + << std::endl << std::endl; + + + + } + //........................................................ + + } + } + + } + +} + + + +//================================================ +int +main(int argc, char* argv[]) +{ + + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; + string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params1[4] = {300, 50, 1000, 10}; + int params3[5] = { 0, 0, 0, 0, 0}; + + // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + int verbose_level = 2; + const std::string one="one", two="two"; + static Universe* un[Nworkers]; + // static dispatch_queue_t CustomQueues[Nworkers]; + + static double* Results; + static int* Counters; + + timeval t1, t2; + double elapsedTime; + // start timer + gettimeofday(&t1, NULL); + + + if (argc < 8) { + std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; + std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; + std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; + + system("pwd"); + + + return(1); + } + else { + for (int nArg=0; nArg < argc; nArg++){ + //std::cout << nArg << " " << argv[nArg] << std::endl; + if (nArg > 0 && nArg < 7){ + params0[nArg-1]= atof(argv[nArg]); + std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; + } + if (nArg > 6 && nArg < 11){ + params1[nArg-7]= atoi(argv[nArg]); + std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; + } + if (nArg == 11){ + verbose_level = atoi(argv[nArg]); + std::cout << "verbose level: " << verbose_level << std::endl; + } + if (nArg > 11 && nArg < 17){ + params2[nArg-12]= atof(argv[nArg]); + std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; + } + if (nArg > 16 && nArg < 22){ + params3[nArg-17]= atof(argv[nArg]); + var_fixed[nArg-17]= atof(argv[nArg]); + std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; + } + + + } + + } + + /* + for target in range(58,1009,50): + s = ("%d" % target) + print s + + for i in range(15): + # Param groups separated by "|" below for documentation. NOTE that | is not used on command line! + os.system("./supe_duper_optimizer |0 0 4 50 -1 "+s+" | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0") + */ + + /* Parameters, re-iterated: + + "alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + + {"n_epochs", "n_steps", "n_reruns", "range"}; + int params1[4] = {300, 50, 1000, 10}; + + {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params3[5] = { 0, 0, 0, 0, 0}; + + + */ + + for (int j=0; j<5; j++){ + + cout << j << " | " << var_fixed[j] << " (fixed) \n"; + } + + target=params0[5]; + range = (double)params1[3]; + int identify_failed = 0; + char* filename= (char *)"movie_graph.txt"; + int n_ep=params1[0], n_st=params1[1], n_rep=params1[2]; + + //............................... + + for(int i=0; i 0){ + + Results = new double[n_rep]; + Counters = new int[n_rep]; + + }else { + + Results = NULL; + Counters = NULL; + std::cout << " Number of reruns should be positive! " << std::endl; + return 0; + + } + //............................... + srand(time(0)); + //srandomdev(); + + { + double r=0; + for (int j=0; j<100; j++){ + + + + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " "; + } + std::cout << "\n "; + } + //random initiation of starting parameters + + if (range > 0.){ + + for (int i=0; i < 5; i++){ + + if (params0[i]==-100.){ + + double r1 = (rand()/(double)(pow(2.,31)-1.)); + double r2 = (rand()/(double)(pow(2.,31)-1.)); + double sign = 1.; + + if(r1 > 0.5){ + sign=-1.; + } + + params0[i] = sign*r2*range; + + std::cout << par_names0[i] << ": " << params0[i] << std::endl; + } + } + + } + + + double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; + int Annealing_repeats = (int) params2[2]; + + + // dispatch_group_t group = dispatch_group_create(); + + //............................. + multi_annealing( /* group, */ un, /* CustomQueues, */ T_start, T_end, Target_rejection, Annealing_repeats, + starting_jump, Results, Counters, params0, Annealing_repeats); + + //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + // dispatch_release(group); + //............................. + + + // stop timer + gettimeofday(&t2, NULL); + + // compute and print the elapsed time in millisec + elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms + elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << elapsedTime << " seconds \n .....(" << elapsedTime/60. << " minutes)\n\n"; + + //..................... + + for(int i=0; i 0){ + + delete [] Results; + delete [] Counters; + + } + + return 0; + + + +} + Property changes on: SwiftApps/optimizer.orig.cpp ___________________________________________________________________ Added: svn:executable + Added: SwiftApps/optimizer.sh =================================================================== --- SwiftApps/optimizer.sh (rev 0) +++ SwiftApps/optimizer.sh 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,10 @@ +#1 /bin/sh +bestfile=$1 +maxfile=$2 +datafile=$3 +touch best_opt_some.txt max_dist.txt multi_loss.data +shift 3 +$(dirname $0)/Optimizer $* 2>&1 +mv best_opt_some.txt $bestfile +mv max_dist.txt $maxfile +mv multi_loss.data $datafile Property changes on: SwiftApps/optimizer.sh ___________________________________________________________________ Added: svn:executable + Added: SwiftApps/optimizer.snap01.cpp =================================================================== --- SwiftApps/optimizer.snap01.cpp (rev 0) +++ SwiftApps/optimizer.snap01.cpp 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,1722 @@ +// +// main.cpp +// optimizer +// +// Created by Andrey Rzhetsky on 4/11/11. +// Copyright 2011 University of Chicago. All rights reserved. +// + +#define Nworkers 24 + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +// #include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define INT_INFINITY 2147483647 + +#define FIX_VARIABLES 1 + +using namespace boost; +using namespace std; +using namespace boost::numeric::ublas; + +static int max_dist=0; + +typedef boost::adjacency_matrix Graph; +typedef std::pair Edge; +typedef boost::graph_traits GraphTraits; +typedef boost::numeric::ublas::triangular_matrix prob; +typedef boost::numeric::ublas::triangular_matrix pathlength; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + +namespace std { + using ::time; +} + +static int var_fixed[5] = {1, 0, 1, 1, 0}; + +typedef boost::minstd_rand base_generator_type; +typedef adjacency_list < listS, vecS, directedS, +no_property, property < edge_weight_t, int > > graph_t; +typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; +typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; + + +//================================================ +string strDouble(double number) +{ + stringstream ss;//create a stringstream + ss << number;//add number to the stream + return ss.str();//return a string with the contents of the stream +} + +//================================================ + +double gaussian(double sigma) +{ + double GaussNum = 0.0; + int NumInSum = 10; + for(int i = 0; i < NumInSum; i++) + { + GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); + } + GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); + + + return GaussNum; + +} + + + +//================================================= +double diffclock(clock_t clock1,clock_t clock2) +{ + double diffticks=clock1-clock2; + double diffms=(diffticks)/CLOCKS_PER_SEC; + return diffms; +} + +//================================================ +//================================================================ +double get_new_x(double x, double dx){ + + double new_x; + // boost::variate_generator > uni(generator, uni_dist); + double r = rand()/(double)(pow(2.,31)-1.); + + if (r > 0.5){ + new_x = x + rand()*dx/(double)(pow(2.,31)-1.); + } else { + new_x = x - rand()*dx/(double)(pow(2.,31)-1.); + } + + return new_x; + +} + + +//=============================================== +string string_wrap(string ins, int mode){ + + std::ostringstream s; + + switch(mode){ + case 0: + s << "\033[1;29m" << ins << "\033[0m"; + break; + case 1: + s << "\033[1;34m" << ins << "\033[0m"; + break; + case 2: + s << "\033[1;44m" << ins << "\033[0m"; + break; + case 3: + s << "\033[1;35m" << ins << "\033[0m"; + break; + case 4: + s << "\033[1;33;44m" << ins << "\033[0m"; + break; + case 5: + s << "\033[1;47;34m" << ins << "\033[0m"; + break; + case 6: + s << "\033[1;1;31m" << ins << "\033[0m"; + break; + case 7: + s << "\033[1;1;33m" << ins << "\033[0m"; + break; + case 8: + s << "\033[1;1;43;34m" << ins << "\033[0m"; + break; + case 9: + s << "\033[1;1;37m" << ins << "\033[0m"; + break; + case 10: + s << "\033[1;30;47m" << ins << "\033[0m"; + break; + default: + s << ins; + } + + return s.str(); +} + + +//=============================================== +string wrap_double(double val, int mode){ + + std::ostringstream s; + s << string_wrap(strDouble(val),mode); + + return s.str(); +} + + + +//=============================================== +const +string i2string(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + return s.str(); + +} + +//=============================================== +char* i2char(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + char* a=new char[s.str().size()+1]; + memcpy(a,s.str().c_str(), s.str().size()); + + return a; +} + +//================================================ +class Universe { + +private: + + double alpha_i; + double alpha_m; + double beta; + double gamma; + double delta; + + double TargetNovelty; + double CumulativeRelativeLoss; + double CRLsquare; + string id; + + + int N_nodes; + int M_edges; + + int N_epochs; + int N_steps; + int N_repeats; + + int current_epoch; + double current_loss; + int current_repeat; + double current_novelty; + + int mode_identify_failed; + int verbose_level; // 0 is silent, higher is more + + double k_max; + + graph_t Full_g; + + double **Prob; + double **Tried; + double **Dist; + double **Final; + double **EdgeIndex; + double *Rank; + + base_generator_type generator; + boost::uniform_real<> uni_dist; + boost::geometric_distribution geo; + +public: + + + + //====== Constructor ====== + Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) + { + //typedef array_type2::index index2; + + + std::ifstream inFile; + //string line; + + //------------------------------- + + base_generator_type gene(42u); + generator = gene; + generator.seed(static_cast(std::time(0))); + boost::uniform_real<> uni_d(0,1); + uni_dist = uni_d; + + //-------------------------------- + + int i, k; + int x, y; + Edge* edge_array_mine; + int num_arcs_mine, num_nodes_mine; + int* weights_mine; + + TargetNovelty = target; + CumulativeRelativeLoss = 0.; + CRLsquare = 0.; + + + N_epochs = Epochs; + N_steps = Steps; + N_repeats = Repeats; + + current_epoch = 0; + current_loss = 0.; + current_repeat = 0; + + id = idd; + + verbose_level = 1; + + mode_identify_failed = identify_failed; + + + //------------------------------- + // The first pass though file with the graph + inFile.open(FileToOpen.c_str()); + if (inFile.fail()) { + cout << "Unable to open file"; + exit(1); // terminate with error + }else { + + if (verbose_level > 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x; + inFile >> y; + + if (verbose_level > 2){ + std::cout << " x: " << x; + std::cout << " y: " << y << std::endl; + } + + if (i==0){ + N_nodes=x; + M_edges=y; + break; + } + i++; + + + } + inFile.close(); + + if (verbose_level == 2){ + std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { + if (i > 0) { + Final[x][y]=1.; + Final[y][x]=1.; + + + if (verbose_level == 2){ + std::cout << "."; + } + } + i++; + + } + if (verbose_level == 2){ + std::cout << std::endl; + } + inFile.close(); + + k=0; + for (int i=0; i 0.){ + EdgeIndex[i][j]=k; + k++; + } + } + } + + + + //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // create graph -- hopefully, we can keep it, just modifying edge weights + + + edge_array_mine = new Edge[2*M_edges]; + num_arcs_mine = 2*M_edges; + num_nodes_mine = N_nodes; + weights_mine = new int[2*M_edges]; + for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} + + k=0; + for(int i=0; i0.){ + edge_array_mine[2*k] =Edge(i,j); + edge_array_mine[2*k+1]=Edge(j,i); + k++; + } + } + } + graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); + + Full_g = g; + delete edge_array_mine; + delete weights_mine; + + //=========================================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + for (int i=0; i 0.){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + + } + + + //===================================================================== + int sample_failed_number(double pfail){ + + //boost::geometric_distribution geo(pfail); + //boost::variate_generator > geom(generator, geo); + + double r, u, g; + + r=0.; + for(int i=0; i=3){ + std::cout << id << " failed " << r << std::endl; + } + return r; + + } + + //============================================= + double get_target(void){ + return TargetNovelty; + } + + //============================================= + void set_target(double target){ + TargetNovelty=target; + } + + //============================================= + int sample(){ + + //boost::variate_generator > uni(generator, uni_dist); + // double r = uni(), Summa = 0.; + + + + double r = rand(), Summa = 0.; + r /= (double)(pow(2.,31)-1.); + int result = 0; + int finished = 0; + + if (verbose_level==4){ + std::cout << id << " sampled " << r << std::endl; + } + + for(int i=0; i r){ + + Tried[i][j]+=1.; + + if (Final[i][j] > 0.){ + result = 1; + } + finished = 1; + } + } + } + + return result; + + } + + //=============================== + void update_current_graph(void){ + + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + //property_map::type weightmap = get(edge_weight, Full_g); + for (int i=0; i 0. && Tried[i][j]>0){ + //s = edge(i, j, Full_g); + boost::graph_traits::edge_descriptor e1,e2; + bool found1, found2; + u = vertex(i, Full_g); + v = vertex(j, Full_g); + tie(e1, found1) = edge(u, v, Full_g); + tie(e2, found2) = edge(v, u, Full_g); + if (!found1 && !found2){ + add_edge(u,v,1,Full_g); + add_edge(v,u,1,Full_g); + } + + } + } + + } + } + + //=============================== + void update_distances(void){ + // put shortest paths to the *Dist[][] + std::vector p(num_vertices(Full_g)); + std::vector d(num_vertices(Full_g)); + vertex_descriptor s; + + + // put shortest paths to the *Dist[][] + for (int j=0; j 0.){ + s = vertex(j, Full_g); + dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); + + //std::cout <<" Vertex "<< j << std::endl; + graph_traits < graph_t >::vertex_iterator vi, vend; + + for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { + + if (p[*vi]!=*vi){ + Dist[*vi][j]=d[*vi]; + Dist[j][*vi]=d[*vi]; + + if (Dist[*vi][j]>max_dist){ + max_dist=Dist[*vi][j]; + } + + + } else { + Dist[*vi][j]=-1.; + Dist[j][*vi]=-1.; + } + } + } + + } + + + } + + //====================================================== + void update_ranks(void){ + + for(int i=0; i0. && Final[i][j] >0.){ + Rank[i]++; + Rank[j]++; + } + } + } + + } + + //==================================================================== + void set_world(double a_i, double a_m, double b, double g, double d){ + + alpha_i=a_i; + alpha_m=a_m; + gamma=g; + beta=b; + delta=d; + + } + + //==================================================================== + void reset_world(){ + + //==================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + + for (int i=0; i 0. && Tried[i][j] > 0){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + //================================================== + + current_loss=0; + current_epoch=0; + current_repeat++; + current_novelty=0; + + for(int i = 0; i < N_nodes; ++i) { + Rank[i]=0.; + for(int j = 0; j < N_nodes; ++j) { + Prob[i][j]=0.; + Dist[i][j]=-1.; + Tried[i][j]=0.; + } + } + } + + + //============================================== + void show_parameters(void){ + + std::cout << "Parameters: " + << alpha_i << " " + << alpha_m << " | " + << beta << " " + << gamma << " | " + << delta << std::endl; + + } + + + + //=============================================== + string file_name(){ + + std::ostringstream s; + s << "world_" + << lexical_cast(alpha_i) << "_" + << lexical_cast(alpha_m) << "_" + << lexical_cast(beta) << "_" + << lexical_cast(gamma) << "_" + << lexical_cast(delta) << "_" + << lexical_cast(N_epochs) << "_" + << lexical_cast(N_steps) << "_" + << lexical_cast(N_repeats) << ".txt"; + + return s.str(); + + } + + + + + //================================================= + void set_verbose(int verbose){ + + verbose_level = verbose; + } + + + //============================================================= + void update_probabilities(void){ + + + //========================= + // Compute sampling probabilities + // first pass: \xi_i,j + for(int i=0; i 0.){ + + double k = Dist[i][j]; + if (k >= k_max){ + k = k_max-1; + } + + bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); + + } else { + bg = delta; + } + + Prob[i][j] = exp(Prob[i][j] + bg); + } + } + + + // second pass: sum + double Summa = 0.; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + + } + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + else { + + double pfail=0.; + int n_failed; + //, n_check = 0; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + } + + current_novelty = novel; + + + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + if (verbose_level == 2){ + std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) + + << " cost=" << cost + << " novel=" << novel + << " rel_loss=" << cost/novel + << std::endl; + } + + current_epoch++; + } + + + //====== Destructor ====== + ~Universe(){ + + delete_2Dmatrix(Final, N_nodes); + delete_2Dmatrix(Dist, N_nodes); + delete_2Dmatrix(Tried, N_nodes); + delete_2Dmatrix(Prob, N_nodes); + delete_2Dmatrix(EdgeIndex, N_nodes); + delete_1Dmatrix(Rank); + } + + //================================================ + // Allocate memory + double** allocate_2Dmatrix(int N, int M) + { + double **pointer; + + if (verbose_level == 2){ + std::cout<< "["< 0){ + + pointer = new double[N]; + + }else { + + pointer = NULL; + } + + return pointer; + + } + + //============================================== + // De-Allocate memory to prevent memory leak + void delete_2Dmatrix(double **pointer, int N){ + + if (pointer != NULL){ + + for (int i = 0; i < N; ++i){ + delete [] pointer[i]; + } + delete [] pointer; + } + } + //==================== + void delete_1Dmatrix(double *pointer){ + + delete [] pointer; + } + + //=========================================== + double get_rel_loss(){ + + return CumulativeRelativeLoss ; + } + + //=========================================== + double get_rel_loss_err(){ + + return CRLsquare ; + } + + + + //================================================================================== + void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ + + double ALOT=100000000000.; + + // std::cout<<" evolve_to_target_and_save: istart=" << istart << "iend=" << iend << "\n"; + + reset_world(); + + for (int k = istart; k < iend; k++){ + + // std::cout<<" evolve: k=" << k << "\n"; + + + + for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ + // std::cout<<" evolve: k=" << k << " i=" << i << " cur=" << current_novelty << " Target=" << TargetNovelty << "\n"; + update_world(); + } + + storage[k]=current_loss/current_novelty; + counters[k]=1; + + + reset_world(); + } + + } + //============================================== + int get_reruns(void){ + return N_repeats; + } + + //============================================== + double get_parameter(int i){ + + switch(i){ + case 0: + return alpha_i; + case 1: + return alpha_m; + case 2: + return beta; + case 3: + return gamma; + case 4: + return delta; + default: + + std::cout << "Erroneous parameter id!!!!\n\n\n"; + return 0.; + } + } + + + //============================================== + void evolve_to_target(){ + + reset_world(); + if (beta < -1. || gamma < -1.){ + CumulativeRelativeLoss = 100000000000.; + CRLsquare = 0.; + return; + } + + + for (int k=0; k< N_repeats; k++){ + + + for(int i=0; i 4) {return 0;} + + else { + + switch(position){ + case 0: + alpha_i=value; + return 1; + case 1: + alpha_m=value; + return 1; + case 2: + beta=value; + return 1; + case 3: + gamma=value; + return 1; + case 4: + delta=value; + return 1; + } + + } + + return 0; + } + + + //================================================================= + void try_annealing(double starting_jump, int iterations, + double temp_start, double temp_end, double target_rejection){ + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=alpha_i; + x[1]=alpha_m; + x[2]=beta; + x[3]=gamma; + x[4]=delta; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + + //.......................................... + evolve_to_target(); + std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + //........................................... + + // optimization cycle + for(int i=0; i ratio){ + + std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << alpha_i << " "<< alpha_m << " " + << beta << " " << gamma << " " + << delta << " " << std::endl; + set_parameter(x[j], j); + CumulativeRelativeLoss = 0; + CRLsquare = 0; + + rejection[j]+=1.; + } + + else { + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + x[j] = x_tmp; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) + << " "<< wrap_double(rejection[1], 7) << " " + << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(alpha_i,2) + << " "<< wrap_double(alpha_m, 7) << " " + << wrap_double(beta,5) << " " + << wrap_double(gamma,9) << " " + << wrap_double(delta,6) << " " + << std::endl << std::endl; + + } + //........................................................ + + } + + } + + } + + +}; + +//============================================================ + +std::pair multi_loss( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double* Results, + int* Counters, + double* params){ + + int N = un[0]->get_reruns(); + int step = (int)(double)N/(double)(Nworkers); + int istart=0; + int iend = istart+step; + + double Loss=0., LossSquare=0.; + + timeval startTime, endTime; + double elapsedTime; + // start timer + gettimeofday(&startTime, NULL); + + //err: for(int i=0; iset_parameter(params[j],j); + } + } + int i; + #pragma omp parallel for private (i) + for(i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); + un[i]->evolve_to_target_and_save(i*step, min((i+1)*step,N), Results, Counters); + //}); + + // std::cout<<"multi_loss: Returned from evolve_to_target_and_save " << i << "\n"; + + + //istart += step; + //iend = min(istart+step,N); + + } + // err } + // dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + //dispatch_release(group); + + for (int i=0; i Res; + Res.first=Loss; + Res.second=two_std; + + gettimeofday(&endTime, NULL); + elapsedTime = (endTime.tv_sec - startTime.tv_sec) * 1000.0; // sec to ms + elapsedTime += (endTime.tv_usec - startTime.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << "multi_loss(N=" << N << ") elapsed time: " << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; + + return Res; +} +//============================================================ + + +//============================================================ +void multi_annealing( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double T_start, double T_end, + double Target_rejection, + int Annealing_repeats, + double starting_jump, + double* Results, + int* Counters, + double* params0, + double annealing_cycles){ + //................................. + // re-implement annealing + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + //boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=params0[0]; + x[1]=params0[1]; + x[2]=params0[2]; + x[3]=params0[3]; + x[4]=params0[4]; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + std::pairRes; + + Res = multi_loss( /* group,*/ un, /* CustomQueues,*/ Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + curr_x = Res.first; + curr_err = Res.second; + + // optimization cycle + + for(int i=0; iset_parameter(x_tmp, j); + } + + + Res = multi_loss(/* group, */ un, /* CustomQueues, */ Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " vs " << ratio << std::endl; + + double ALOT=100000000000.; + + if (Res.first < ALOT) + { + ofstream filestr; + + filestr.open ("best_opt_some.txt", ofstream::app); + + // >> i/o operations here << + filestr << un[0]->get_target() << "," + << Res.first + << "," << un[0]->get_parameter(0) + << "," << un[0]->get_parameter(1) + << "," << un[0]->get_parameter(2) + << "," << un[0]->get_parameter(3) + << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; + + filestr.close(); + + + filestr.open ("max_dist.txt", ofstream::app); + + // >> i/o operations here << + filestr << max_dist << ",\n"; + + filestr.close(); + + } + + + if (r > ratio){ + + std::cout << " "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << un[0]->get_parameter(0) + << " " << un[0]->get_parameter(1) + << " " << un[0]->get_parameter(2) + << " " << un[0]->get_parameter(3) + << " " << un[0]->get_parameter(4) << " " << std::endl; + + x[j]=x_hold; + for(int w=0; wset_parameter(x[j], j); + } + + + //set_parameter(x[j], j); + rejection[j]+=1.; + } + + else { + + curr_x = Res.first; + curr_err = Res.second; + x[j] = x_tmp; + + for(int w=0; wset_parameter(x[j], j); + } + + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) << " " + << wrap_double(rejection[1],7) << " " + << wrap_double(rejection[2],5) << " " + << wrap_double(rejection[3],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << " "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(un[0]->get_parameter(0),2) << " " + << wrap_double(un[0]->get_parameter(1),7) << " " + << wrap_double(un[0]->get_parameter(2),5) << " " + << wrap_double(un[0]->get_parameter(3),9) << " " + << wrap_double(un[0]->get_parameter(4),6) << " " + << std::endl << std::endl; + + + + } + //........................................................ + + } + } + + } + +} + + + +//================================================ +int +main(int argc, char* argv[]) +{ + + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; + string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params1[4] = {300, 50, 1000, 10}; + int params3[5] = { 0, 0, 0, 0, 0}; + + // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + int verbose_level = 2; + const std::string one="one", two="two"; + static Universe* un[Nworkers]; + // static dispatch_queue_t CustomQueues[Nworkers]; + + static double* Results; + static int* Counters; + + timeval t1, t2; + double elapsedTime; + // start timer + gettimeofday(&t1, NULL); + + + if (argc < 8) { + std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; + std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; + std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; + + system("pwd"); + + + return(1); + } + else { + for (int nArg=0; nArg < argc; nArg++){ + //std::cout << nArg << " " << argv[nArg] << std::endl; + if (nArg > 0 && nArg < 7){ + params0[nArg-1]= atof(argv[nArg]); + std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; + } + if (nArg > 6 && nArg < 11){ + params1[nArg-7]= atoi(argv[nArg]); + std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; + } + if (nArg == 11){ + verbose_level = atoi(argv[nArg]); + std::cout << "verbose level: " << verbose_level << std::endl; + } + if (nArg > 11 && nArg < 17){ + params2[nArg-12]= atof(argv[nArg]); + std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; + } + if (nArg > 16 && nArg < 22){ + params3[nArg-17]= atof(argv[nArg]); + var_fixed[nArg-17]= atof(argv[nArg]); + std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; + } + + + } + + } + + /* + for target in range(58,1009,50): + s = ("%d" % target) + print s + + for i in range(15): + # Param groups separated by "|" below for documentation. NOTE that | is not used on command line! + os.system("./supe_duper_optimizer |0 0 4 50 -1 "+s+" | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0") + */ + + /* Parameters, re-iterated: + + "alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + + {"n_epochs", "n_steps", "n_reruns", "range"}; + int params1[4] = {300, 50, 1000, 10}; + + {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params3[5] = { 0, 0, 0, 0, 0}; + + + */ + + for (int j=0; j<5; j++){ + + cout << j << " | " << var_fixed[j] << " (fixed) \n"; + } + + target=params0[5]; + range = (double)params1[3]; + int identify_failed = 0; + char* filename= (char *)"movie_graph.txt"; + int n_ep=params1[0], n_st=params1[1], n_rep=params1[2]; + + //............................... + + for(int i=0; i 0){ + + Results = new double[n_rep]; + Counters = new int[n_rep]; + + }else { + + Results = NULL; + Counters = NULL; + std::cout << " Number of reruns should be positive! " << std::endl; + return 0; + + } + //............................... + srand(time(0)); + //srandomdev(); + + { + double r=0; + for (int j=0; j<100; j++){ + + + + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " "; + } + std::cout << "\n "; + } + //random initiation of starting parameters + + if (range > 0.){ + + for (int i=0; i < 5; i++){ + + if (params0[i]==-100.){ + + double r1 = (rand()/(double)(pow(2.,31)-1.)); + double r2 = (rand()/(double)(pow(2.,31)-1.)); + double sign = 1.; + + if(r1 > 0.5){ + sign=-1.; + } + + params0[i] = sign*r2*range; + + std::cout << par_names0[i] << ": " << params0[i] << std::endl; + } + } + + } + + + double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; + int Annealing_repeats = (int) params2[2]; + + + // dispatch_group_t group = dispatch_group_create(); + + //............................. + multi_annealing( /* group, */ un, /* CustomQueues, */ T_start, T_end, Target_rejection, Annealing_repeats, + starting_jump, Results, Counters, params0, Annealing_repeats); + + //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + // dispatch_release(group); + //............................. + + + // stop timer + gettimeofday(&t2, NULL); + + // compute and print the elapsed time in millisec + elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms + elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; + + //..................... + + for(int i=0; i 0){ + + delete [] Results; + delete [] Counters; + + } + + return 0; + + + +} + Property changes on: SwiftApps/optimizer.snap01.cpp ___________________________________________________________________ Added: svn:executable + Added: SwiftApps/optirun.swift =================================================================== --- SwiftApps/optirun.swift (rev 0) +++ SwiftApps/optirun.swift 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,41 @@ +type file; + +app (file outfile, file best, file max) optimize ( string args[], file graph ) +{ + optimizersh @best @max args stdout=@outfile ; +} + +int minrange=58; +int maxrange=1009; +//int maxrange=209; +int rangeinc=50; + +int nreps=2; # 15 + +// [alpha_i alpha_m beta gamma delta target_innov +// [n_epochs n_steps n_reruns] [range] +// [verbose_level] +// [T_start T_end Annealing_steps Target_rejection Starting_jump] +// [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta] + +file graph <"movie_graph.txt">; + +foreach target in [minrange:maxrange:rangeinc] { + foreach rep in [1:nreps] { + file outfile ; + // file errfile ; + file bestfile ; + file maxfile ; + + // string longargs[] = @strcat("0 0 4 50 -1 ",target," 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0"); + + string fastargs1[] = ["0", "0", "4", "50", "-1", @strcat(target), "40000", "20", "1000", "2", "1", "2.", "0.01", "100", "0.3", "2.3", "1", "1", "0", "0", "0"]; + string fastargs2[] = [ + "0", "0", "4", "50", "-1", @strcat(target), + "40000", "20", "1000", "2", + "1", + "2.", "0.01", "5", "0.3", "2.3", + "1", "1", "0", "0", "0"]; + (outfile, bestfile, maxfile) = optimize(fastargs2,graph); + } +} Added: SwiftApps/script-smaller-a.py =================================================================== --- SwiftApps/script-smaller-a.py (rev 0) +++ SwiftApps/script-smaller-a.py 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,19 @@ +#! /usr/bin/env python +import os + +# FULL for target in range(58,1009,50): +# FAST for target in range(58,209,50): +for target in range(58,209,50): + s = ("%d" % target) + print s + + for i in range(15): +# FAST for i in range(2): + args="./optimizer 0 0 4 50 -1 "+s+" 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) + print("\n\n **** CALLING APP: "+args+"\n\n\n") + os.system(args); +# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") +# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") + + +print "Done!" Property changes on: SwiftApps/script-smaller-a.py ___________________________________________________________________ Added: svn:executable + Added: SwiftApps/sumloss.sh =================================================================== --- SwiftApps/sumloss.sh (rev 0) +++ SwiftApps/sumloss.sh 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,31 @@ +#! /bin/awk -f + +BEGIN { n = ARGC-1 } +{ + loss += $1/n + loss_sq += ($1*$1)/n +} +END { + x = (loss_sq - (loss*loss))/n + sdev = 2.0 * sqrt(x) + printf "loss sdev\n" + printf "%f %f\n", loss, sdev +} + +# the awk script above implements this c++ logic from optimizer.cpp: +# +# for (int i=0; i Res; +# Res.first=Loss; +# Res.second=two_std; Property changes on: SwiftApps/sumloss.sh ___________________________________________________________________ Added: svn:executable + Added: SwiftApps/t1.py =================================================================== --- SwiftApps/t1.py (rev 0) +++ SwiftApps/t1.py 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,22 @@ +#! /usr/bin/env python +import os + +# FULL for target in range(58,1009,50): +# FAST for target in range(58,209,50): +for target in range(58,59,50): + s = ("%d" % target) + print s + +# FULL for i in range(15): +# FAST for i in range(2): + for i in range(1): + args="./toptimizer 0 0 4 50 -1 "+s+" 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) + args="OMP_NUM_THREADS=24 ./toptimizer 0 0 4 50 -1 "+s+" 40000 20 100 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) + args="OMP_NUM_THREADS=24 ./toptimizer 0 0 4 50 -1 "+s+" 40000 20 100 2 1 2. 0.01 2 0.3 2.3 1 1 1 0 0 # > out.T"+str(target)+".i"+str(i) + print("\n\n **** CALLING APP: "+args+"\n\n\n") + os.system(args); +# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") +# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") + + +print "Done!" Property changes on: SwiftApps/t1.py ___________________________________________________________________ Added: svn:executable + Added: SwiftApps/t2.cpp =================================================================== --- SwiftApps/t2.cpp (rev 0) +++ SwiftApps/t2.cpp 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,44 @@ +#include +#include +#include + +template +bool from_string(T& t, + const std::string& s, + std::ios_base& (*f)(std::ios_base&)) +{ + std::istringstream iss(s); + return !(iss >> f >> t).fail(); +} + +int main() +{ + int i; + float f; + + // the third parameter of from_string() should be + // one of std::hex, std::dec or std::oct + if(from_string(i, std::string("ff"), std::hex)) + { + std::cout << i << std::endl; + } + else + { + std::cout << "from_string failed" << std::endl; + } + + if(from_string(f, std::string("123.456"), std::dec)) + { + std::cout << f << std::endl; + } + else + { + std::cout << "from_string failed" << std::endl; + } + return 0; +} + +/* output: +255 +123.456 +*/ Added: SwiftApps/t2.py =================================================================== --- SwiftApps/t2.py (rev 0) +++ SwiftApps/t2.py 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,23 @@ +#! /usr/bin/env python +import os + +# FULL for target in range(58,1009,50): +# FAST for target in range(58,209,50): +for target in range(58,59,50): + s = ("%d" % target) + print s + +# FULL for i in range(15): +# FAST for i in range(2): + for i in range(1): + args="./toptimizer 0 0 4 50 -1 "+s+" 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) + args="OMP_NUM_THREADS=24 ./toptimizer 0 0 4 50 -1 "+s+" 40000 20 100 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) + args="./toptimizer 0 0 4 50 -1 "+s+" 40000 20 75 2 1 2. 0.01 2 0.3 2.3 1 1 1 0 0 m # > out.T"+str(target)+".i"+str(i) + args="OMP_NUM_THREADS=24 ./toptimizer 0 0 4 50 -1 "+s+" 40000 20 96 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0 m 24 # > out.T"+str(target)+".i"+str(i) + print("\n\n **** CALLING APP: "+args+"\n\n\n") + os.system(args); +# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") +# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") + + +print "Done!" Property changes on: SwiftApps/t2.py ___________________________________________________________________ Added: svn:executable + Added: SwiftApps/t3.py =================================================================== --- SwiftApps/t3.py (rev 0) +++ SwiftApps/t3.py 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,22 @@ +#! /usr/bin/env python +import os + +# FULL for target in range(58,1009,50): +# FAST for target in range(58,209,50): +for target in range(58,59,50): + s = ("%d" % target) + print s + +# FULL for i in range(15): +# FAST for i in range(2): + for i in range(1): + args="./toptimizer 0 0 4 50 -1 "+s+" 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) + args="OMP_NUM_THREADS=24 ./toptimizer 0 0 4 50 -1 "+s+" 40000 20 100 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) + args="./toptimizer 0 0 4 50 -1 "+s+" 40000 20 75 2 1 2. 0.01 2 0.3 2.3 1 1 1 0 0 a # > out.T"+str(target)+".i"+str(i) + print("\n\n **** CALLING APP: "+args+"\n\n\n") + os.system(args); +# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") +# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") + + +print "Done!" Property changes on: SwiftApps/t3.py ___________________________________________________________________ Added: svn:executable + Added: SwiftApps/tc =================================================================== --- SwiftApps/tc (rev 0) +++ SwiftApps/tc 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,13 @@ +localhost sh /bin/sh null null null +localhost cat /bin/cat null null null +pbs cat /bin/cat null null null +mcs cat /bin/cat null null null +localhost catnap /home/wilde/swift/lab/catnap.sh null null GLOBUS::maxwalltime="00:01:00" +beagle optimizer /home/wilde/AndreysOptimizer/Optimizer null null GLOBUS::maxwalltime="01:00:00" +beagle optimizersh /home/wilde/AndreysOptimizer/optimizer.sh null null GLOBUS::maxwalltime="02:00:00" + +beagle evolve /home/wilde/AndreysOptimizer/evolve.sh null null GLOBUS::maxwalltime="02:00:00" +localhost evolve /home/wilde/AndreysOptimizer/evolve.sh null null GLOBUS::maxwalltime="02:00:00" + +beagle sumloss /home/wilde/AndreysOptimizer/evolve.sh null null GLOBUS::maxwalltime="02:00:00" +localhost sumloss /home/wilde/AndreysOptimizer/sumloss.sh null null GLOBUS::maxwalltime="02:00:00" Added: SwiftApps/testO.sh =================================================================== --- SwiftApps/testO.sh (rev 0) +++ SwiftApps/testO.sh 2012-01-20 21:26:24 UTC (rev 5502) @@ -0,0 +1,21 @@ +#! /bin/bash + +python <out.o.T"+s); +os.system("./Optimizer "+args+" >out.O.T"+s); + +# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") +# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") + +print "Done!" +END + Property changes on: SwiftApps/testO.sh ___________________________________________________________________ Added: svn:executable + From wilde at ci.uchicago.edu Fri Jan 20 16:57:51 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Fri, 20 Jan 2012 22:57:51 -0000 Subject: [Swift-commit] r5504 - in SwiftApps: . SciColSim Message-ID: <20120120225744.3C3519CD00@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-20 16:57:44 -0600 (Fri, 20 Jan 2012) New Revision: 5504 Added: SwiftApps/SciColSim/Makefile SwiftApps/SciColSim/README SwiftApps/SciColSim/annealing.swift SwiftApps/SciColSim/basiclocal.xml SwiftApps/SciColSim/beagle.xml SwiftApps/SciColSim/cf SwiftApps/SciColSim/evolve.sh SwiftApps/SciColSim/local.xml SwiftApps/SciColSim/math.swift SwiftApps/SciColSim/mathtest.swift SwiftApps/SciColSim/movie_graph.txt SwiftApps/SciColSim/optimizer.cpp SwiftApps/SciColSim/optimizer.orig.cpp SwiftApps/SciColSim/optimizer.sh SwiftApps/SciColSim/optimizer.snap01.cpp SwiftApps/SciColSim/optirun.swift SwiftApps/SciColSim/script-smaller-a.py SwiftApps/SciColSim/sumloss.sh SwiftApps/SciColSim/t1.py SwiftApps/SciColSim/t2.cpp SwiftApps/SciColSim/t2.py SwiftApps/SciColSim/t3.py SwiftApps/SciColSim/tc SwiftApps/SciColSim/testO.sh Removed: SwiftApps/Makefile SwiftApps/README SwiftApps/annealing.swift SwiftApps/basiclocal.xml SwiftApps/beagle.xml SwiftApps/cf SwiftApps/evolve.sh SwiftApps/local.xml SwiftApps/math.swift SwiftApps/mathtest.swift SwiftApps/movie_graph.txt SwiftApps/optimizer.cpp SwiftApps/optimizer.orig.cpp SwiftApps/optimizer.sh SwiftApps/optimizer.snap01.cpp SwiftApps/optirun.swift SwiftApps/script-smaller-a.py SwiftApps/sumloss.sh SwiftApps/t1.py SwiftApps/t2.cpp SwiftApps/t2.py SwiftApps/t3.py SwiftApps/tc SwiftApps/testO.sh Log: Move files to correct dir. Deleted: SwiftApps/Makefile =================================================================== --- SwiftApps/Makefile 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/Makefile 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,10 +0,0 @@ -all: toptimizer optimizer Optimizer - -optimizer: optimizer.snap01.cpp - g++ -static -fopenmp -I boost_1_47_0 -o optimizer optimizer.snap01.cpp - -Optimizer: optimizer.snap01.cpp - g++ -static -O3 -fopenmp -I boost_1_47_0 -o Optimizer optimizer.snap01.cpp - -toptimizer: optimizer.cpp - g++ -static -fopenmp -I boost_1_47_0 -o toptimizer optimizer.cpp Deleted: SwiftApps/README =================================================================== --- SwiftApps/README 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/README 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,42 +0,0 @@ -=== Files - -optirun.swift: replaces top-level py script for the outermost loops - -=== How to build - -=== How to Run - - - -=== C++ app flow logic === - -for target in range(58, 1009 (used 209), 50): // 20 values - for i in range(15): - # P0: P1: D: P2: P3: - optimizer |0 0 4 50 -1 target | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0 - - multi_annealing( un[NW], T_start, T_end, Target_rejection, Annealing_repeats, - starting_jump, Results, Counters, params0, Annealing_repeats); - - Res = multi_loss(un, Results, Counters, x); // Initial - curr_x = Res.first; - curr_err = Res.second; - - for i = 0 to annealing_cycles - 1 (100 from .py script) - for j = 0 to 4 // 5X: 0..4 is fixed constant - setParameters (for a round of parallel Annealing_repeats - Res = multi_loss(un, Results, Counters, Annealing_repeats); - In parallel: for 1 to AnnealingRepeats (1,000; 10,000 desired) - group repeats among NWorkers - evolve() - setParameters again here, conditionally? (check) - -20 targets - py - 15 repeats - py - 1 initial multi_loss: 1000 to 10000 annealing_repeats - 100 Annealing_cycles (groups of 10? : cycle=10 ) (fast:50) - 5 repeats (fast: 1) - multi_loss: 1000 to 10000 annealing_repeats - evolve() => 2 mins to 10 mins - -=== END Copied: SwiftApps/SciColSim/Makefile (from rev 5503, SwiftApps/Makefile) =================================================================== --- SwiftApps/SciColSim/Makefile (rev 0) +++ SwiftApps/SciColSim/Makefile 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,10 @@ +all: toptimizer optimizer Optimizer + +optimizer: optimizer.snap01.cpp + g++ -static -fopenmp -I boost_1_47_0 -o optimizer optimizer.snap01.cpp + +Optimizer: optimizer.snap01.cpp + g++ -static -O3 -fopenmp -I boost_1_47_0 -o Optimizer optimizer.snap01.cpp + +toptimizer: optimizer.cpp + g++ -static -fopenmp -I boost_1_47_0 -o toptimizer optimizer.cpp Copied: SwiftApps/SciColSim/README (from rev 5503, SwiftApps/README) =================================================================== --- SwiftApps/SciColSim/README (rev 0) +++ SwiftApps/SciColSim/README 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,42 @@ +=== Files + +optirun.swift: replaces top-level py script for the outermost loops + +=== How to build + +=== How to Run + + + +=== C++ app flow logic === + +for target in range(58, 1009 (used 209), 50): // 20 values + for i in range(15): + # P0: P1: D: P2: P3: + optimizer |0 0 4 50 -1 target | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0 + + multi_annealing( un[NW], T_start, T_end, Target_rejection, Annealing_repeats, + starting_jump, Results, Counters, params0, Annealing_repeats); + + Res = multi_loss(un, Results, Counters, x); // Initial + curr_x = Res.first; + curr_err = Res.second; + + for i = 0 to annealing_cycles - 1 (100 from .py script) + for j = 0 to 4 // 5X: 0..4 is fixed constant + setParameters (for a round of parallel Annealing_repeats + Res = multi_loss(un, Results, Counters, Annealing_repeats); + In parallel: for 1 to AnnealingRepeats (1,000; 10,000 desired) + group repeats among NWorkers + evolve() + setParameters again here, conditionally? (check) + +20 targets - py + 15 repeats - py + 1 initial multi_loss: 1000 to 10000 annealing_repeats + 100 Annealing_cycles (groups of 10? : cycle=10 ) (fast:50) + 5 repeats (fast: 1) + multi_loss: 1000 to 10000 annealing_repeats + evolve() => 2 mins to 10 mins + +=== END Copied: SwiftApps/SciColSim/annealing.swift (from rev 5503, SwiftApps/annealing.swift) =================================================================== --- SwiftApps/SciColSim/annealing.swift (rev 0) +++ SwiftApps/SciColSim/annealing.swift 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,278 @@ +import "math"; + +type file; + +type Res { + float loss; + float sdev; +} + +global boolean FIX_VARIABLES = true; +global int var_fixed[] = [1,1,0,0,0]; +global int Nworkers = 1; + +(float nx) newx(float x, float dx) +{ + float r = (random()) / (pow(2.0,31.0)-1.0); + if (r > 0.5){ + nx = x + (random())*dx/(pow(2.0,31.0)-1.0); + } else { + nx = x - (random())*dx/(pow(2.0,31.0)-1.0); + } +} + +app (file outfile, file loss) evolve (string args[], file graph) +{ + evolve @loss args stdout=@outfile ; // graph is passed implicitly +} + +app (file x) sumloss(file loss[]) +{ + sumloss @filenames(loss) stdout=@x; +} + +/* + +Program structure: + + main + optimizer_sweep() - formerly, python script + multi_annealing() + multi_loss() + evolve() + sumloass() +*/ + +(file bestfile, file maxfile) multi_annealing ( + float T_start, + float T_end, + float Target_rejection, + int evolve_reruns, + float starting_jump, + float params0[], + float target_innov, + int annealing_cycles) +{ + int cycle=10; # const + int NEVOPARAMS=5; # const - 5 params, alpha 1,m through delta, does not include target_innovation + + float rejection[][]; // [i][j] where i is cycle and j is evolve-parameter (alpha_i, alpha_m, beta, gamma, delta) + + float x[][], dx[][], curr_loss[], curr_sdev[]; + + Res mlres[][]; + mlres[0][0] = multi_loss( params0, target_innov, evolve_reruns ); // Only done once, not 5x; serves for all evolve-params ??? + + foreach j in [0:NEVOPARAMS-1] { + x[0][j]=params0[j]; + dx[0][j] = starting_jump; + rejection[0][j] = 0.0; + curr_loss[j] = mlres[0][0].loss; + curr_sdev[j] = mlres[0][0].sdev; + } + + foreach i in [1:annealing_cycles] { + // set new temperature, rejection threshold, and dx values for this cycle + float temperature = T_start*exp( @tofloat(i)*(jlog(T_end)-jlog(T_start))/@tofloat(annealing_cycles)); + tracef("....T =%f\n", temperature); + // On each new "major" cycle within the annealing_cycles (other than the first) set new rejection and dx values + if ( i %% cycle == 1 && i > 1 ){ + foreach k in [0:NEVOPARAMS-1] { + float newrejection = rejection[i-1][k] / @tofloat(cycle); + if (newrejection > 0.0){ + dx[i][k] = dx[i-1][k] / (newrejection / Target_rejection); + rejection[i][k]=0.0; + } + else{ + dx[i][k] = dx[i-1][k] * 2.0; + rejection[i][k]=rejection[i-1][k]; + } + trace ("Recomputed rejection: i=%d k=%d dx[i][k]=%f\n", i, k, dx[i][k]); + } + } + foreach j in [0:NEVOPARAMS-1] { // Try a new value for each non-fixed param; then write results and accept or reject + float try_x[]; + int curr = (i * NEVOPARAMS) + j; + int prev = curr-1; + if ( FIX_VARIABLES || var_fixed[j]==0) { + foreach k in [0:NEVOPARAMS] { // Select the evolve params to try + if ( k < j ) { + try_x[k] = x[i][k]; // already set x[i][k] + } + else { + if ( k == j ) { + try_x[k] = newx(x[i][j],dx[i][j]); // permute x[i][j] + } + else { + try_x[k] = x[i-1][k]; // use x[i-1][k] (from prior cycle) + } + } + } + + mlres[i][j] = multi_loss(try_x, target_innov, evolve_reruns); + + float ratio = min(1.0, exp( -(mlres[i][j].loss-curr_loss[prev]) /temperature)); + float r = (random()) / (pow(2.0,31.0)-1.0); // why all the 2^31's ??? + + float ALOT=100000000000.0; // 100,000,000,000. = 10^11 + if (mlres[i][j].loss < ALOT) { // does this ever occur? if so did we want to still do the ratio computation above??? + trace("filestr.open (best_opt_some.txt, ofstream::app);"); + # un[0]->get_target() Res.loss un[0]->get_parameter[0:4] Res.error + # filestr.open ("max_dist.txt", ofstream::app); + } + else { tracef("Loss %f > ALOT at [i][j] = [%d][%d]\n", mlres[i][j].loss, i ,j); } + if (r > ratio) { // Reject + x[i][j] = x[i-1][j]; + rejection[i][j] = rejection[i][j] + 1.0; // Is this correct? incr rejection? + curr_loss[curr] = curr_loss[prev]; + curr_sdev[curr] = curr_sdev[prev]; + } + else { // Accept +trace("Accepting try_x[j],j=",j); + x[i][j] = try_x[j]; # FIXME: is this right? Just assign the j'th try_x, or the whole try_x param set? +trace("Accepting try_x[j],x[i][j]=",x[i][j]); + curr_loss[curr] = mlres[i][j].loss; + curr_sdev[curr] = mlres[i][j].sdev; + } + } + else { + x[i][j] = x[i-1][j]; + curr_loss[curr] = curr_loss[prev]; + curr_sdev[curr] = curr_sdev[prev]; + } + } + } +} + +(Res r) multi_loss( float x[], float target_innov, int evolve_reruns ) +{ + file rfile[]; + foreach i in [1:evolve_reruns] { // repeats of the evolove() - same as n_reruns + file outfile; // FIXME: map and save in future + string args[] = [ // FIXME: move this to a setargs() function + // alpha_i alpha_m beta gamma delta target_innov + @strcat(x[0]), @strcat(x[1]), @strcat(x[2]), @strcat(x[3]), @strcat(x[4]), @strcat(target_innov), + + // n_epochs n_steps evolve_reruns range + // "40000", "20", @strcat(evolve_reruns), "2", + "40000", "20", "1", " 2", # Set reruns to 1 for the cpp code; we do the re-runs in Swift for now. + + // verbose_level + "1", + + // T_start T_end Annealing_steps Target_rejection Starting_jump + "2.", "0.01", "2", "0.3", "2.3", + + // FREEZE: alpha_i alpha_m beta gamma delta + "1", "1", "0", "0", "0", + + // operation-code:(m,a) Nworkers + "m", @strcat(Nworkers) ]; + + file graph <"movie_graph.txt">; + (outfile, rfile[i]) = evolve(args,graph); + } + file sumfile = sumloss(rfile); + r = readData(sumfile); + +} + +optimizer_sweep() // Implements logic of python driver script +{ + int minrange=58; + int maxrange=59; + //int maxrange=1009; + //int maxrange=209; + int rangeinc=50; + + // fixme: add provision for random priming and random param values when x[i] == -100 (see optimizer.cpp main()) + + int nreps=1; # 15 + +// file bestfile ; +// file maxfile ; + + foreach target_innov in [minrange:maxrange:rangeinc] { + foreach rep in [1:nreps] { + file outfile; // ; + file lossfile; // ; +/* + (outfile,lossfile) = multi_annealing( + T_start = 2.0, + T_end = 0.01, + Target_rejection = 0.3, + evolve_reruns = 2, + starting_jump = 2.3, + params0[] = [0.0, 0.0, 4.0, 50.0, -1.0], + @tofloat(@strcat(target_innov)), // fixme: would @tofloat(int) work? + annealing_cycles = 1); // fixme: clarify: annealing repeats, steps, and cycles +*/ + (outfile,lossfile) = multi_annealing( + 2.0, + 0.01, + 0.3, + 2, + 2.3, + [0.0, 0.0, 4.0, 50.0, -1.0], + @tofloat(@strcat(target_innov)), // fixme: would @tofloat(int) work? + 1); // fixme: clarify: annealing repeats, steps, and cycles + } + } +} + +main() +{ + optimizer_sweep(); +} + +main(); + +/* + +Program structure: + + main + optimizer_sweep() + multi_annealing() + multi_loss() + evolve() + sumloass() + +Example parameter sets: + +for target in range(58,59,50): + for i in range(1): + args="./toptimizer 0 0 4 50 -1 "+target+" 40000 20 75 2 1 2. 0.01 2 0.3 2.3 1 1 1 0 0 m # > out.T"+str(target)+".i"+str(i) + os.system(args); + + string fastargs1[] = [ + "0", "0", "4", "50", "-1", @strcat(target), + "40000", "20", "1000", "2", + "1", + "2.", "0.01", "100", "0.3", "2.3", + "1", "1", "0", "0", "0"]; + string fastargs2[] = [ + "0", "0", "4", "50", "-1", @strcat(target), + "40000", "20", "1000", "2", + "1", + "2.", "0.01", "5", "0.3", "2.3", + "1", "1", "0", "0", "0", "m"]; + string fastargs3[] = [ + "0", "0", "4", "50", "-1", @strcat(target), + "40000", "20", @strcat(repeats), "2", + "1", + "2.", "0.01", "2", "0.3", "2.3", + "1", "1", "0", "0", "0", "m"]; +*/ + +(string args[]) setargs() +{ + // string longargs[] = @strcat("0 0 4 50 -1 ",target," 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 m"); + + // [alpha_i alpha_m beta gamma delta target_innov + // [n_epochs n_steps n_reruns] [range] + // [verbose_level] + // [T_start T_end Annealing_steps Target_rejection Starting_jump] + // [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta] [operation-code:(m,a) Nworkers] +} + Copied: SwiftApps/SciColSim/basiclocal.xml (from rev 5503, SwiftApps/basiclocal.xml) =================================================================== --- SwiftApps/SciColSim/basiclocal.xml (rev 0) +++ SwiftApps/SciColSim/basiclocal.xml 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,10 @@ + + + + + + /home/wilde/swift/lab/swiftwork + 0 + + + Copied: SwiftApps/SciColSim/beagle.xml (from rev 5503, SwiftApps/beagle.xml) =================================================================== --- SwiftApps/SciColSim/beagle.xml (rev 0) +++ SwiftApps/SciColSim/beagle.xml 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,60 @@ + + + + + + + + pbs.aprun;pbs.mpp;depth=24 + 1 + + 24 + 02:00:00 + 14400 + 20 + 1 + 1 + 100 + 100 + .15 + 10000 + + CI-MCB000119 + route + + + /lustre/beagle/wilde/swiftwork + + + + + Copied: SwiftApps/SciColSim/cf (from rev 5503, SwiftApps/cf) =================================================================== --- SwiftApps/SciColSim/cf (rev 0) +++ SwiftApps/SciColSim/cf 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,7 @@ +wrapperlog.always.transfer=true +sitedir.keep=true +execution.retries=3 +lazy.errors=true +status.mode=provider +use.provider.staging=false +provider.staging.pin.swiftfiles=false Copied: SwiftApps/SciColSim/evolve.sh (from rev 5503, SwiftApps/evolve.sh) =================================================================== --- SwiftApps/SciColSim/evolve.sh (rev 0) +++ SwiftApps/SciColSim/evolve.sh 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,6 @@ +#1 /bin/sh +datafile=$1 +touch multi_loss.data +shift 1 +$(dirname $0)/toptimizer $* 2>&1 +mv multi_loss.data $datafile Copied: SwiftApps/SciColSim/local.xml (from rev 5503, SwiftApps/local.xml) =================================================================== --- SwiftApps/SciColSim/local.xml (rev 0) +++ SwiftApps/SciColSim/local.xml 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,9 @@ + + + + 0.23 + 10000 + + /tmp/wilde/swiftwork + + Copied: SwiftApps/SciColSim/math.swift (from rev 5503, SwiftApps/math.swift) =================================================================== --- SwiftApps/SciColSim/math.swift (rev 0) +++ SwiftApps/SciColSim/math.swift 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,53 @@ + +(float result) sin(float x) +{ + result = @java("java.lang.Math", "sin", x); +} + +(float result) exp(float x) +{ + result = @java("java.lang.Math", "exp", x); +} + +(float result) jlog(float x) +{ + result = @java("java.lang.Math", "log", x); +} + +(float result) log10(float x) +{ + result = @java("java.lang.Math", "log10", x); +} + +(float result) ceil(float x) +{ + result = @java("java.lang.Math", "ceil", x); +} + +(float result) floor (float x) +{ + result = @java("java.lang.Math", "floor", x); +} + +(float result) min (float a, float b) +{ + //result = @java("java.lang.Math", "min", a, b); + if ( a < b ) { + result = a; + } + else { + result = b; + } + tracef("min: result=%f\n",result); +} + +(float result) pow (float x, float y) +{ + result = @java("java.lang.Math", "pow", x, y); +} + +(float result) random () +{ + result = @java("java.lang.Math","random"); +} + Copied: SwiftApps/SciColSim/mathtest.swift (from rev 5503, SwiftApps/mathtest.swift) =================================================================== --- SwiftApps/SciColSim/mathtest.swift (rev 0) +++ SwiftApps/SciColSim/mathtest.swift 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,18 @@ +import "math"; + +float a = 0.5; +tracef("random(): %f\n", random()); +tracef("sin(%f): %f\n", a, sin(a)); +tracef("jlog(%f): %f\n", a, jlog(a)); +tracef("log10(%f): %f\n", a, log10(a)); +tracef("exp(%f): %f\n", a, exp(a)); +tracef("ceil(%f): %f\n", 1.23, ceil(1.23)); +tracef("floor(%f): %f\n", 1.23, floor(1.23)); +tracef("pow(%f,%f): %f\n", 2.0, 4.0, pow(2.0,4.0)); +tracef("min(%f,%f): %f\n", 2.0, 4.0, min(2.0,4.0)); +tracef("min(%f,%f): %f\n", 2.0, 1.5, min(2.0,1.5)); + + + + + Copied: SwiftApps/SciColSim/movie_graph.txt (from rev 5503, SwiftApps/movie_graph.txt) =================================================================== --- SwiftApps/SciColSim/movie_graph.txt (rev 0) +++ SwiftApps/SciColSim/movie_graph.txt 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,1010 @@ +500 1008 +0 56 +0 436 +0 446 +1 256 +1 476 +1 260 +1 262 +1 9 +1 266 +1 13 +1 142 +1 273 +1 388 +1 30 +1 36 +1 37 +1 423 +1 168 +1 425 +1 255 +1 175 +1 307 +1 58 +1 316 +1 319 +1 323 +1 68 +1 455 +1 216 +1 82 +1 88 +1 346 +1 348 +1 225 +1 228 +1 236 +1 365 +1 111 +1 424 +1 370 +1 246 +1 376 +1 122 +1 191 +1 252 +1 382 +1 127 +2 3 +3 262 +3 263 +3 392 +3 172 +3 138 +3 395 +3 13 +3 18 +3 150 +3 408 +3 154 +3 156 +3 30 +3 291 +3 37 +3 168 +3 300 +3 52 +3 158 +3 310 +3 265 +3 187 +3 61 +3 319 +3 65 +3 322 +3 54 +3 130 +3 71 +3 332 +3 461 +3 397 +3 419 +3 473 +3 346 +3 95 +3 352 +3 98 +3 103 +3 107 +3 414 +3 368 +3 498 +3 499 +4 224 +4 449 +4 419 +4 356 +4 72 +4 330 +4 173 +4 80 +4 242 +4 180 +4 24 +4 138 +5 33 +5 459 +5 484 +5 106 +5 299 +5 430 +5 16 +5 336 +5 50 +5 147 +5 406 +5 87 +5 91 +5 190 +6 7 +6 264 +6 137 +6 276 +6 149 +6 279 +6 153 +6 29 +6 415 +6 293 +6 166 +6 296 +6 42 +6 44 +6 48 +6 49 +6 438 +6 55 +6 314 +6 69 +6 454 +6 463 +6 84 +6 85 +6 470 +6 349 +6 94 +6 229 +6 233 +6 364 +6 117 +6 248 +6 380 +6 426 +7 129 +7 131 +7 470 +7 136 +7 471 +7 271 +7 402 +7 19 +7 404 +7 282 +7 286 +7 491 +7 35 +7 421 +7 166 +7 295 +7 427 +7 428 +7 301 +7 349 +7 436 +7 439 +7 56 +7 445 +7 446 +7 320 +7 123 +7 451 +7 69 +7 454 +7 78 +7 463 +7 212 +7 213 +7 342 +7 343 +7 474 +7 93 +7 483 +7 357 +7 102 +7 235 +7 237 +7 239 +7 371 +7 379 +8 112 +8 164 +8 10 +8 12 +8 398 +8 176 +8 120 +8 178 +8 373 +8 24 +8 124 +9 262 +10 11 +10 12 +10 47 +10 335 +10 124 +11 96 +11 289 +11 66 +11 283 +11 97 +11 361 +11 47 +11 432 +11 335 +11 215 +11 27 +11 124 +11 189 +12 112 +12 434 +12 47 +13 32 +13 130 +13 260 +13 37 +13 39 +13 202 +13 305 +13 461 +13 145 +13 275 +13 448 +13 54 +13 183 +13 344 +13 36 +14 387 +14 267 +14 155 +14 36 +14 165 +14 51 +14 308 +14 440 +14 441 +14 59 +14 444 +14 199 +14 328 +14 462 +14 81 +14 210 +14 214 +14 91 +14 99 +14 60 +14 106 +14 109 +14 110 +14 244 +15 193 +15 73 +15 400 +15 341 +15 27 +15 31 +16 33 +16 258 +16 353 +16 329 +16 204 +16 207 +16 336 +16 108 +16 50 +16 22 +16 119 +16 169 +16 381 +16 223 +17 321 +17 482 +17 197 +17 276 +17 149 +17 315 +17 94 +18 32 +18 461 +18 305 +18 498 +18 86 +18 25 +19 320 +19 421 +19 334 +19 314 +19 349 +19 446 +20 48 +20 28 +20 83 +20 44 +20 45 +21 288 +21 176 +21 347 +21 325 +21 392 +21 490 +21 366 +21 272 +21 209 +21 115 +21 182 +21 247 +21 184 +21 25 +21 217 +21 27 +21 86 +21 478 +22 353 +23 257 +23 100 +23 25 +24 134 +24 146 +24 302 +24 151 +24 290 +24 291 +24 43 +24 173 +24 46 +24 176 +24 180 +24 245 +24 453 +24 457 +24 208 +24 338 +24 363 +24 116 +24 373 +24 126 +25 32 +25 128 +25 257 +25 86 +26 161 +26 357 +26 193 +26 78 +26 341 +26 69 +27 361 +27 490 +27 333 +27 272 +27 312 +27 468 +27 41 +27 184 +27 429 +27 124 +27 341 +28 64 +28 354 +28 67 +28 135 +28 200 +28 42 +28 75 +28 45 +28 206 +28 48 +28 359 +28 53 +28 238 +29 229 +29 199 +29 296 +29 233 +29 42 +29 274 +29 117 +29 152 +29 155 +29 62 +30 386 +30 225 +30 76 +30 322 +30 367 +30 318 +31 200 +31 73 +31 333 +31 494 +31 45 +31 312 +32 257 +32 305 +32 101 +32 486 +32 39 +32 231 +32 79 +32 145 +32 275 +33 459 +33 336 +33 372 +33 119 +33 409 +34 283 +35 491 +35 243 +35 237 +35 326 +36 260 +36 266 +36 285 +36 292 +36 39 +36 424 +36 171 +36 181 +36 183 +36 440 +36 58 +36 323 +36 328 +36 81 +36 82 +36 87 +36 99 +36 228 +36 101 +36 111 +37 168 +37 202 +38 92 +39 448 +39 101 +39 486 +39 231 +39 145 +39 344 +40 345 +40 355 +40 179 +40 59 +40 125 +41 160 +41 226 +41 230 +41 104 +41 361 +41 492 +41 341 +41 215 +41 121 +41 189 +42 64 +42 67 +42 199 +42 359 +42 109 +42 206 +42 143 +42 48 +42 274 +42 117 +44 193 +44 69 +44 161 +44 73 +44 48 +44 83 +44 279 +45 200 +45 73 +45 83 +46 242 +46 485 +46 126 +46 173 +48 64 +48 206 +50 259 +50 261 +50 329 +50 299 +50 204 +50 430 +50 207 +50 405 +50 59 +50 159 +51 67 +51 101 +51 135 +51 210 +51 244 +51 214 +51 441 +51 249 +52 368 +52 217 +52 347 +52 86 +53 101 +53 327 +53 75 +53 238 +53 79 +53 249 +54 130 +55 84 +57 162 +57 331 +58 266 +58 82 +59 384 +59 259 +59 132 +59 267 +59 496 +59 355 +59 152 +59 91 +59 221 +59 159 +60 91 +60 165 +62 152 +62 155 +62 221 +63 456 +63 334 +63 303 +63 472 +63 314 +63 380 +65 154 +65 499 +65 374 +65 103 +66 96 +66 160 +66 215 +67 359 +67 135 +67 109 +67 143 +67 214 +69 161 +69 166 +69 239 +69 404 +69 85 +69 279 +69 153 +70 410 +70 467 +71 130 +72 138 +73 193 +74 241 +74 82 +74 188 +74 133 +74 469 +75 140 +75 79 +75 90 +75 350 +76 386 +77 120 +77 306 +77 452 +77 254 +77 311 +78 239 +78 357 +79 257 +79 100 +79 101 +80 138 +81 99 +81 171 +82 256 +82 133 +82 348 +82 205 +82 372 +82 181 +82 119 +82 409 +82 255 +82 316 +82 122 +82 469 +84 277 +84 264 +84 149 +84 380 +84 415 +85 153 +85 166 +86 247 +86 217 +87 181 +87 147 +87 285 +89 192 +89 200 +89 333 +89 468 +89 443 +89 222 +90 272 +90 100 +90 350 +91 165 +91 106 +91 430 +91 406 +91 159 +92 258 +93 136 +93 464 +93 493 +93 326 +94 482 +94 233 +94 114 +94 276 +95 107 +95 265 +95 186 +95 332 +96 289 +96 324 +96 102 +96 401 +97 283 +97 220 +97 434 +97 164 +99 101 +99 171 +99 244 +99 251 +100 272 +101 231 +101 466 +101 244 +101 249 +101 251 +102 141 +102 237 +102 369 +102 243 +102 212 +102 121 +102 340 +102 411 +104 121 +104 230 +105 396 +105 309 +106 147 +106 308 +106 406 +106 444 +106 190 +109 199 +109 143 +109 387 +109 214 +110 267 +112 164 +113 195 +114 233 +114 482 +114 315 +114 412 +116 465 +117 296 +118 163 +119 188 +119 409 +120 297 +120 363 +120 398 +120 254 +121 160 +121 230 +121 492 +121 369 +121 212 +122 256 +122 316 +124 176 +125 394 +125 497 +125 179 +125 351 +125 479 +126 465 +126 290 +126 339 +129 491 +130 397 +131 464 +131 136 +132 383 +133 273 +133 232 +133 205 +133 241 +133 316 +134 203 +135 249 +135 354 +136 464 +136 474 +137 276 +138 419 +138 414 +138 158 +139 169 +140 200 +140 222 +140 350 +144 334 +146 363 +147 308 +147 285 +148 175 +149 456 +149 407 +151 422 +152 488 +152 233 +152 221 +152 351 +154 187 +154 358 +154 158 +155 199 +155 267 +155 221 +155 437 +156 332 +156 318 +156 310 +157 436 +157 301 +158 396 +158 187 +158 414 +159 430 +160 215 +161 193 +163 220 +164 297 +164 398 +164 220 +166 427 +167 201 +167 442 +167 170 +167 383 +168 319 +169 280 +169 270 +169 198 +170 353 +170 403 +170 269 +170 207 +170 211 +173 242 +174 194 +174 195 +174 362 +174 177 +174 250 +174 219 +174 412 +175 460 +175 246 +175 447 +176 291 +176 294 +176 366 +176 178 +176 182 +177 219 +179 345 +179 394 +181 372 +182 184 +182 429 +182 294 +184 429 +185 358 +188 280 +188 469 +189 215 +192 272 +192 443 +192 468 +192 287 +193 400 +195 488 +195 233 +196 389 +196 317 +197 321 +198 280 +199 387 +200 333 +200 222 +201 284 +203 311 +207 353 +207 329 +207 269 +207 240 +212 230 +212 341 +212 439 +213 349 +214 462 +215 226 +216 388 +216 236 +217 347 +218 465 +219 450 +219 394 +219 250 +219 298 +219 479 +220 297 +220 283 +221 267 +221 437 +222 443 +222 350 +225 236 +227 472 +227 321 +227 315 +227 412 +227 390 +228 424 +228 260 +230 341 +232 280 +232 241 +233 480 +233 412 +234 243 +234 340 +238 249 +238 354 +240 353 +241 280 +242 356 +243 385 +243 326 +244 251 +246 382 +249 354 +249 327 +249 466 +250 488 +250 479 +250 351 +252 376 +253 384 +253 269 +254 363 +254 302 +254 311 +258 353 +258 317 +258 477 +259 384 +259 405 +259 269 +260 424 +262 352 +262 346 +263 392 +263 300 +263 325 +264 438 +267 437 +268 413 +269 384 +269 383 +270 381 +270 431 +272 443 +272 350 +272 287 +273 316 +276 377 +278 390 +280 417 +281 376 +282 391 +283 289 +283 432 +285 308 +285 292 +288 325 +288 478 +289 401 +289 413 +291 325 +291 478 +292 328 +292 308 +297 398 +297 495 +302 453 +302 311 +304 493 +307 388 +308 328 +309 396 +311 453 +312 333 +312 494 +313 375 +314 487 +314 364 +314 380 +315 482 +315 412 +319 346 +321 456 +326 491 +326 435 +327 466 +328 440 +331 472 +332 408 +332 489 +333 468 +334 446 +337 380 +338 465 +341 400 +343 436 +345 394 +345 399 +347 392 +347 368 +349 364 +349 470 +351 496 +351 479 +353 393 +358 360 +358 396 +365 375 +366 478 +368 392 +372 409 +374 467 +378 411 +379 436 +380 456 +380 415 +382 433 +383 384 +394 481 +394 479 +396 449 +416 420 +416 422 +417 447 +418 446 +450 481 +456 475 +458 471 +463 470 +472 475 +496 497 + Copied: SwiftApps/SciColSim/optimizer.cpp (from rev 5503, SwiftApps/optimizer.cpp) =================================================================== --- SwiftApps/SciColSim/optimizer.cpp (rev 0) +++ SwiftApps/SciColSim/optimizer.cpp 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,1814 @@ +// +// main.cpp +// optimizer +// +// Created by Andrey Rzhetsky on 4/11/11. +// Copyright 2011 University of Chicago. All rights reserved. +// + +#define MAXNworkers 24 +int Nworkers=MAXNworkers; +char operation = 'n'; // n: normal; m: multi_loss; a: analyze and generate next annealing parameter set. + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +// #include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define INT_INFINITY 2147483647 +#define NEVOPARAMS 5 + +#define FIX_VARIABLES 1 + +using namespace boost; +using namespace std; +using namespace boost::numeric::ublas; + +static int max_dist=0; + +typedef boost::adjacency_matrix Graph; +typedef std::pair Edge; +typedef boost::graph_traits GraphTraits; +typedef boost::numeric::ublas::triangular_matrix prob; +typedef boost::numeric::ublas::triangular_matrix pathlength; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + +namespace std { + using ::time; +} + +static int var_fixed[NEVOPARAMS] = {1, 0, 1, 1, 0}; + +typedef boost::minstd_rand base_generator_type; +typedef adjacency_list < listS, vecS, directedS, +no_property, property < edge_weight_t, int > > graph_t; +typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; +typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; + + +//================================================ +string strDouble(double number) +{ + stringstream ss;//create a stringstream + ss << number;//add number to the stream + return ss.str();//return a string with the contents of the stream +} + +//================================================ + +double gaussian(double sigma) +{ + double GaussNum = 0.0; + int NumInSum = 10; + for(int i = 0; i < NumInSum; i++) + { + GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); + } + GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); + + + return GaussNum; + +} + + + +//================================================= +double diffclock(clock_t clock1,clock_t clock2) +{ + double diffticks=clock1-clock2; + double diffms=(diffticks)/CLOCKS_PER_SEC; + return diffms; +} + +//================================================ +//================================================================ +double get_new_x(double x, double dx){ + + double new_x; + // boost::variate_generator > uni(generator, uni_dist); + double r = rand()/(double)(pow(2.,31)-1.); + + if (r > 0.5){ + new_x = x + rand()*dx/(double)(pow(2.,31)-1.); + } else { + new_x = x - rand()*dx/(double)(pow(2.,31)-1.); + } + + return new_x; + +} + + +//=============================================== +string string_wrap(string ins, int mode){ + + std::ostringstream s; + + switch(mode){ + case 0: + s << "\033[1;29m" << ins << "\033[0m"; + break; + case 1: + s << "\033[1;34m" << ins << "\033[0m"; + break; + case 2: + s << "\033[1;44m" << ins << "\033[0m"; + break; + case 3: + s << "\033[1;35m" << ins << "\033[0m"; + break; + case 4: + s << "\033[1;33;44m" << ins << "\033[0m"; + break; + case 5: + s << "\033[1;47;34m" << ins << "\033[0m"; + break; + case 6: + s << "\033[1;1;31m" << ins << "\033[0m"; + break; + case 7: + s << "\033[1;1;33m" << ins << "\033[0m"; + break; + case 8: + s << "\033[1;1;43;34m" << ins << "\033[0m"; + break; + case 9: + s << "\033[1;1;37m" << ins << "\033[0m"; + break; + case 10: + s << "\033[1;30;47m" << ins << "\033[0m"; + break; + default: + s << ins; + } + + return s.str(); +} + + +//=============================================== +string wrap_double(double val, int mode){ + + std::ostringstream s; + s << string_wrap(strDouble(val),mode); + + return s.str(); +} + + + +//=============================================== +const +string i2string(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + return s.str(); + +} + +//=============================================== +char* i2char(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + char* a=new char[s.str().size()+1]; + memcpy(a,s.str().c_str(), s.str().size()); + + return a; +} + + +template +bool from_string(T& t, + const std::string& s, + std::ios_base& (*f)(std::ios_base&)) +{ + std::istringstream iss(s); + return !(iss >> f >> t).fail(); +} + +//================================================ +class Universe { + +private: + + double alpha_i; + double alpha_m; + double beta; + double gamma; + double delta; + + double TargetNovelty; + double CumulativeRelativeLoss; + double CRLsquare; + string id; + + + int N_nodes; + int M_edges; + + int N_epochs; + int N_steps; + int N_repeats; + + int current_epoch; + double current_loss; + int current_repeat; + double current_novelty; + + int mode_identify_failed; + int verbose_level; // 0 is silent, higher is more + + double k_max; + + graph_t Full_g; + + double **Prob; + double **Tried; + double **Dist; + double **Final; + double **EdgeIndex; + double *Rank; + + base_generator_type generator; + boost::uniform_real<> uni_dist; + boost::geometric_distribution geo; + +public: + + + + //====== Constructor ====== + Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) + { + //typedef array_type2::index index2; + + + std::ifstream inFile; + //string line; + + //------------------------------- + + base_generator_type gene(42u); + generator = gene; + generator.seed(static_cast(std::time(0))); + boost::uniform_real<> uni_d(0,1); + uni_dist = uni_d; + + //-------------------------------- + + int i, k; + int x, y; + Edge* edge_array_mine; + int num_arcs_mine, num_nodes_mine; + int* weights_mine; + + TargetNovelty = target; + CumulativeRelativeLoss = 0.; + CRLsquare = 0.; + + + N_epochs = Epochs; + N_steps = Steps; + N_repeats = Repeats; + + current_epoch = 0; + current_loss = 0.; + current_repeat = 0; + + id = idd; + + verbose_level = 1; + + mode_identify_failed = identify_failed; + + + //------------------------------- + // The first pass though file with the graph + inFile.open(FileToOpen.c_str()); + if (inFile.fail()) { + cout << "Unable to open file"; + exit(1); // terminate with error + }else { + + if (verbose_level > 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x; + inFile >> y; + + if (verbose_level > 2){ + std::cout << " x: " << x; + std::cout << " y: " << y << std::endl; + } + + if (i==0){ + N_nodes=x; + M_edges=y; + break; + } + i++; + + + } + inFile.close(); + + if (verbose_level == 2){ + std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { + if (i > 0) { + Final[x][y]=1.; + Final[y][x]=1.; + + + if (verbose_level == 2){ + std::cout << "."; + } + } + i++; + + } + if (verbose_level == 2){ + std::cout << std::endl; + } + inFile.close(); + + k=0; + for (int i=0; i 0.){ + EdgeIndex[i][j]=k; + k++; + } + } + } + + + + //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // create graph -- hopefully, we can keep it, just modifying edge weights + + + edge_array_mine = new Edge[2*M_edges]; + num_arcs_mine = 2*M_edges; + num_nodes_mine = N_nodes; + weights_mine = new int[2*M_edges]; + for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} + + k=0; + for(int i=0; i0.){ + edge_array_mine[2*k] =Edge(i,j); + edge_array_mine[2*k+1]=Edge(j,i); + k++; + } + } + } + graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); + + Full_g = g; + delete edge_array_mine; + delete weights_mine; + + //=========================================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + for (int i=0; i 0.){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + + } + + + //===================================================================== + int sample_failed_number(double pfail){ + + //boost::geometric_distribution geo(pfail); + //boost::variate_generator > geom(generator, geo); + + double r, u, g; + + r=0.; + for(int i=0; i=3){ + std::cout << id << " failed " << r << std::endl; + } + return r; + + } + + //============================================= + double get_target(void){ + return TargetNovelty; + } + + //============================================= + void set_target(double target){ + TargetNovelty=target; + } + + //============================================= + int sample(){ + + //boost::variate_generator > uni(generator, uni_dist); + // double r = uni(), Summa = 0.; + + + + double r = rand(), Summa = 0.; + r /= (double)(pow(2.,31)-1.); + int result = 0; + int finished = 0; + + if (verbose_level==4){ + std::cout << id << " sampled " << r << std::endl; + } + + for(int i=0; i r){ + + Tried[i][j]+=1.; + + if (Final[i][j] > 0.){ + result = 1; + } + finished = 1; + } + } + } + + return result; + + } + + //=============================== + void update_current_graph(void){ + + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + //property_map::type weightmap = get(edge_weight, Full_g); + for (int i=0; i 0. && Tried[i][j]>0){ + //s = edge(i, j, Full_g); + boost::graph_traits::edge_descriptor e1,e2; + bool found1, found2; + u = vertex(i, Full_g); + v = vertex(j, Full_g); + tie(e1, found1) = edge(u, v, Full_g); + tie(e2, found2) = edge(v, u, Full_g); + if (!found1 && !found2){ + add_edge(u,v,1,Full_g); + add_edge(v,u,1,Full_g); + } + + } + } + + } + } + + //=============================== + void update_distances(void){ + // put shortest paths to the *Dist[][] + std::vector p(num_vertices(Full_g)); + std::vector d(num_vertices(Full_g)); + vertex_descriptor s; + + + // put shortest paths to the *Dist[][] + for (int j=0; j 0.){ + s = vertex(j, Full_g); + dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); + + //std::cout <<" Vertex "<< j << std::endl; + graph_traits < graph_t >::vertex_iterator vi, vend; + + for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { + + if (p[*vi]!=*vi){ + Dist[*vi][j]=d[*vi]; + Dist[j][*vi]=d[*vi]; + + if (Dist[*vi][j]>max_dist){ + max_dist=Dist[*vi][j]; + } + + + } else { + Dist[*vi][j]=-1.; + Dist[j][*vi]=-1.; + } + } + } + + } + + + } + + //====================================================== + void update_ranks(void){ + + for(int i=0; i0. && Final[i][j] >0.){ + Rank[i]++; + Rank[j]++; + } + } + } + + } + + //==================================================================== + void set_world(double a_i, double a_m, double b, double g, double d){ + + alpha_i=a_i; + alpha_m=a_m; + gamma=g; + beta=b; + delta=d; + + } + + //==================================================================== + void reset_world(){ + + //==================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + + for (int i=0; i 0. && Tried[i][j] > 0){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + //================================================== + + current_loss=0; + current_epoch=0; + current_repeat++; + current_novelty=0; + + for(int i = 0; i < N_nodes; ++i) { + Rank[i]=0.; + for(int j = 0; j < N_nodes; ++j) { + Prob[i][j]=0.; + Dist[i][j]=-1.; + Tried[i][j]=0.; + } + } + } + + + //============================================== + void show_parameters(void){ + + std::cout << "Parameters: " + << alpha_i << " " + << alpha_m << " | " + << beta << " " + << gamma << " | " + << delta << std::endl; + + } + + + + //=============================================== + string file_name(){ + + std::ostringstream s; + s << "world_" + << lexical_cast(alpha_i) << "_" + << lexical_cast(alpha_m) << "_" + << lexical_cast(beta) << "_" + << lexical_cast(gamma) << "_" + << lexical_cast(delta) << "_" + << lexical_cast(N_epochs) << "_" + << lexical_cast(N_steps) << "_" + << lexical_cast(N_repeats) << ".txt"; + + return s.str(); + + } + + + + + //================================================= + void set_verbose(int verbose){ + + verbose_level = verbose; + } + + + //============================================================= + void update_probabilities(void){ + + + //========================= + // Compute sampling probabilities + // first pass: \xi_i,j + for(int i=0; i 0.){ + + double k = Dist[i][j]; + if (k >= k_max){ + k = k_max-1; + } + + bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); + + } else { + bg = delta; + } + + Prob[i][j] = exp(Prob[i][j] + bg); + } + } + + + // second pass: sum + double Summa = 0.; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + + } + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + else { + + double pfail=0.; + int n_failed; + //, n_check = 0; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + } + + current_novelty = novel; + + + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + if (verbose_level == 2){ + std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) + + << " cost=" << cost + << " novel=" << novel + << " rel_loss=" << cost/novel + << std::endl; + } + + current_epoch++; + } + + + //====== Destructor ====== + ~Universe(){ + + delete_2Dmatrix(Final, N_nodes); + delete_2Dmatrix(Dist, N_nodes); + delete_2Dmatrix(Tried, N_nodes); + delete_2Dmatrix(Prob, N_nodes); + delete_2Dmatrix(EdgeIndex, N_nodes); + delete_1Dmatrix(Rank); + } + + //================================================ + // Allocate memory + double** allocate_2Dmatrix(int N, int M) + { + double **pointer; + + if (verbose_level == 2){ + std::cout<< "["< 0){ + + pointer = new double[N]; + + }else { + + pointer = NULL; + } + + return pointer; + + } + + //============================================== + // De-Allocate memory to prevent memory leak + void delete_2Dmatrix(double **pointer, int N){ + + if (pointer != NULL){ + + for (int i = 0; i < N; ++i){ + delete [] pointer[i]; + } + delete [] pointer; + } + } + //==================== + void delete_1Dmatrix(double *pointer){ + + delete [] pointer; + } + + //=========================================== + double get_rel_loss(){ + + return CumulativeRelativeLoss ; + } + + //=========================================== + double get_rel_loss_err(){ + + return CRLsquare ; + } + + + + //================================================================================== + void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ + + double ALOT=100000000000.; + + // std::cout<<" evolve_to_target_and_save: istart=" << istart << "iend=" << iend << "\n"; + + reset_world(); + + for (int k = istart; k < iend; k++){ + + // std::cout<<" evolve: k=" << k << "\n"; + + + + for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ + // std::cout<<" evolve: k=" << k << " i=" << i << " cur=" << current_novelty << " Target=" << TargetNovelty << "\n"; + update_world(); + } + + storage[k]=current_loss/current_novelty; + counters[k]=1; + + + reset_world(); + } + + } + //============================================== + int get_reruns(void){ + return N_repeats; + } + + //============================================== + double get_parameter(int i){ + + switch(i){ + case 0: + return alpha_i; + case 1: + return alpha_m; + case 2: + return beta; + case 3: + return gamma; + case 4: + return delta; + default: + + std::cout << "Erroneous parameter id!!!!\n\n\n"; + return 0.; + } + } + + + //============================================== + void evolve_to_target(){ + + reset_world(); + if (beta < -1. || gamma < -1.){ + CumulativeRelativeLoss = 100000000000.; + CRLsquare = 0.; + return; + } + + + for (int k=0; k< N_repeats; k++){ + + + for(int i=0; i 4) {return 0;} + + else { + + switch(position){ + case 0: + alpha_i=value; + return 1; + case 1: + alpha_m=value; + return 1; + case 2: + beta=value; + return 1; + case 3: + gamma=value; + return 1; + case 4: + delta=value; + return 1; + } + + } + + return 0; + } + +#ifdef notdef + //================================================================= + void try_annealing(double starting_jump, int iterations, + double temp_start, double temp_end, double target_rejection){ + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=alpha_i; + x[1]=alpha_m; + x[2]=beta; + x[3]=gamma; + x[4]=delta; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + + //.......................................... + evolve_to_target(); + std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + //........................................... + + // optimization cycle + for(int i=0; i ratio){ + + std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << alpha_i << " "<< alpha_m << " " + << beta << " " << gamma << " " + << delta << " " << std::endl; + set_parameter(x[j], j); + CumulativeRelativeLoss = 0; + CRLsquare = 0; + + rejection[j]+=1.; + } + + else { + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + x[j] = x_tmp; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) + << " "<< wrap_double(rejection[1], 7) << " " + << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(alpha_i,2) + << " "<< wrap_double(alpha_m, 7) << " " + << wrap_double(beta,5) << " " + << wrap_double(gamma,9) << " " + << wrap_double(delta,6) << " " + << std::endl << std::endl; + + } + //........................................................ + + } + + } + + } + +#endif // notdef + + +}; + + +//============================================================ + +std::pair multi_loss( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double* Results, + int* Counters, + double* params){ + + int N = un[0]->get_reruns(); + int step = (int)(double)N/(double)(Nworkers); + int istart=0; + int iend = istart+step; + + double Loss=0., LossSquare=0.; + + timeval startTime, endTime; + double elapsedTime; + // start timer + gettimeofday(&startTime, NULL); + + //err: for(int i=0; iget_parameter(j) << "," << params[j] << "] "; + un[i]->set_parameter(params[j],j); + } + } + std::cout << "\n"; + int i; + #pragma omp parallel for private (i) + for(i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); + un[i]->evolve_to_target_and_save(i*step, min((i+1)*step,N), Results, Counters); + //}); + + // std::cout<<"multi_loss: Returned from evolve_to_target_and_save " << i << "\n"; + + + //istart += step; + //iend = min(istart+step,N); + + } + // err } + // dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + //dispatch_release(group); + + + for (int i=0; i Res; + Res.first=Loss; + Res.second=two_std; + + gettimeofday(&endTime, NULL); + elapsedTime = (endTime.tv_sec - startTime.tv_sec) * 1000.0; // sec to ms + elapsedTime += (endTime.tv_usec - startTime.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << "multi_loss(N=" << N << ") elapsed time: " << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; + + return Res; +} +//============================================================ + + +//============================================================ +void multi_annealing( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double T_start, double T_end, + double Target_rejection, + int Annealing_repeats, + double starting_jump, + double* Results, + int* Counters, + double* params0, + double annealing_cycles){ + //................................. + // re-implement annealing + + double dx[NEVOPARAMS]={0.,0.,0.,0.,0}; + double x[NEVOPARAMS]={0.,0.,0.,0.,0}; + double rejection[NEVOPARAMS]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + //boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + for(int i=0;iset_parameter(x[i], i); + } + } + + // establish the current value + std::pairRes; + + if ( operation == 'm' ) { + // Nworkers = 1; + } + else if (operation == 'g') { + // generate params + } + else if (operation == 'a') { + // analyze multi_loss() results + + string line; + ifstream mlossdata ("multi_loss.data"); + double d, Loss, LossSquare, two_std; + bool b; + int n=0; + if (mlossdata.is_open()) { + while ( getline (mlossdata,line) ) { + b = from_string(d, std::string(line), std::dec); + cout << line << " d=" << d << endl; + Loss += d; + LossSquare += (d*d); + n++; + } + Loss /= double(n); + LossSquare /= double(n); + two_std = ((LossSquare - Loss*Loss)/(double)n); + two_std = 2.*sqrt(two_std); + std::cout<<"n="<get_reruns(); + + f = fopen("multi_loss.data","w"); + for(int i=0; iset_parameter(x_tmp, j); + } + + + // WRITE OUT PARAMS HERE; then exit. + + std::cout << "Calling multi_loss: i=" << i << " j=" << j << "\n"; + Res = multi_loss(/* group, */ un, /* CustomQueues, */ Results, Counters, x); + std::cout << "Ret from multi_loss: i=" << i << " j=" << j << "\n"; + std::cout << Res.first << " +- " << Res.second << std::endl; + + ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " vs " << ratio << std::endl; + + double ALOT=100000000000.; + + if (Res.first < ALOT) + { + ofstream filestr; + + filestr.open ("best_opt_some.txt", ofstream::app); + + // >> i/o operations here << + filestr << un[0]->get_target() << "," + << Res.first + << "," << un[0]->get_parameter(0) + << "," << un[0]->get_parameter(1) + << "," << un[0]->get_parameter(2) + << "," << un[0]->get_parameter(3) + << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; + + filestr.close(); + + + filestr.open ("max_dist.txt", ofstream::app); + + // >> i/o operations here << + filestr << max_dist << ",\n"; + + filestr.close(); + + } + + + if (r > ratio){ + + std::cout << " "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << un[0]->get_parameter(0) + << " " << un[0]->get_parameter(1) + << " " << un[0]->get_parameter(2) + << " " << un[0]->get_parameter(3) + << " " << un[0]->get_parameter(4) << " " << std::endl; + + x[j]=x_hold; + for(int w=0; wset_parameter(x[j], j); + } + + + //set_parameter(x[j], j); + rejection[j]+=1.; + } + + else { + + curr_x = Res.first; + curr_err = Res.second; + x[j] = x_tmp; + + for(int w=0; wset_parameter(x[j], j); + } + + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) << " " + << wrap_double(rejection[1],7) << " " + << wrap_double(rejection[2],5) << " " + << wrap_double(rejection[3],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << " "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(un[0]->get_parameter(0),2) << " " + << wrap_double(un[0]->get_parameter(1),7) << " " + << wrap_double(un[0]->get_parameter(2),5) << " " + << wrap_double(un[0]->get_parameter(3),9) << " " + << wrap_double(un[0]->get_parameter(4),6) << " " + << std::endl << std::endl; + + + + } + //........................................................ + + } + } + + } + +} + + +//================================================ +int +main(int argc, char* argv[]) +{ + + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; + string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + string par_names4[2] = {"Operation", "Nworkers"}; + int params1[4] = {300, 50, 1000, 10}; + int params3[5] = { 0, 0, 0, 0, 0}; + + // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + int verbose_level = 2; + const std::string one="one", two="two"; + static Universe* un[MAXNworkers]; + // static dispatch_queue_t CustomQueues[MAXNworkers]; + + static double* Results; + static int* Counters; + + timeval t1, t2; + double elapsedTime; + // start timer + gettimeofday(&t1, NULL); + + + if (argc < 8) { + std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; + std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; + std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; + + system("pwd"); + + + return(1); + } + else { + std::cout << "argc=" << argc << std::endl; + + for (int nArg=0; nArg < argc; nArg++){ + //std::cout << nArg << " " << argv[nArg] << std::endl; + if (nArg > 0 && nArg < 7){ + params0[nArg-1]= atof(argv[nArg]); + std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; + } + if (nArg > 6 && nArg < 11){ + params1[nArg-7]= atoi(argv[nArg]); + std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; + } + if (nArg == 11){ + verbose_level = atoi(argv[nArg]); + std::cout << "verbose level: " << verbose_level << std::endl; + } + if (nArg > 11 && nArg < 17){ + params2[nArg-12]= atof(argv[nArg]); + std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; + } + if (nArg > 16 && nArg < 22){ + params3[nArg-17]= atof(argv[nArg]); + var_fixed[nArg-17]= atof(argv[nArg]); + std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; + } + if (nArg == 22 ){ + operation = *argv[nArg]; + std::cout << par_names4[0] << ": " << operation << std::endl; + } + if (nArg == 23 ){ + Nworkers = atoi(argv[nArg]); + std::cout << par_names4[1] << ": " << Nworkers << std::endl; + } + } + } + + /* + for target in range(58,1009,50): + s = ("%d" % target) + print s + + for i in range(15): + # Param groups separated by "|" below for documentation. NOTE that | is not used on command line! + os.system("./supe_duper_optimizer |0 0 4 50 -1 "+s+" | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0") + */ + + /* Parameters, re-iterated: + + "alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + + {"n_epochs", "n_steps", "n_reruns", "range"}; + int params1[4] = {300, 50, 1000, 10}; + + {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params3[5] = { 0, 0, 0, 0, 0}; + + + */ + + for (int j=0; j 0){ + + Results = new double[n_rep]; + Counters = new int[n_rep]; + + }else { + + Results = NULL; + Counters = NULL; + std::cout << " Number of reruns should be positive! " << std::endl; + return 0; + + } + //............................... + + //srand(time(0)); + //srandomdev(); + { + timeval t; + gettimeofday(&t, NULL); + srand(t.tv_usec); + } + + { + double r=0; + for (int j=0; j<100; j++){ + + + + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " "; + } + std::cout << "\n "; + } + //random initiation of starting parameters + + if (range > 0.){ + + for (int i=0; i < 5; i++){ + + if (params0[i]==-100.){ + + double r1 = (rand()/(double)(pow(2.,31)-1.)); + double r2 = (rand()/(double)(pow(2.,31)-1.)); + double sign = 1.; + + if(r1 > 0.5){ + sign=-1.; + } + + params0[i] = sign*r2*range; + + std::cout << par_names0[i] << ": " << params0[i] << std::endl; + } + } + + } + + + double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; + int Annealing_repeats = (int) params2[2]; + + + // dispatch_group_t group = dispatch_group_create(); + + //............................. + multi_annealing( /* group, */ un, /* CustomQueues, */ T_start, T_end, Target_rejection, Annealing_repeats, + starting_jump, Results, Counters, params0, Annealing_repeats); + + //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + // dispatch_release(group); + //............................. + + + // stop timer + gettimeofday(&t2, NULL); + + // compute and print the elapsed time in millisec + elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms + elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; + + //..................... + + for(int i=0; i 0){ + + delete [] Results; + delete [] Counters; + + } + + return 0; + + + +} + Copied: SwiftApps/SciColSim/optimizer.orig.cpp (from rev 5503, SwiftApps/optimizer.orig.cpp) =================================================================== --- SwiftApps/SciColSim/optimizer.orig.cpp (rev 0) +++ SwiftApps/SciColSim/optimizer.orig.cpp 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,1710 @@ +// +// main.cpp +// optimizer +// +// Created by Andrey Rzhetsky on 4/11/11. +// Copyright 2011 University of Chicago. All rights reserved. +// + +#define Nworkers 1 // 24 + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +// #include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define INT_INFINITY 2147483647 + +#define FIX_VARIABLES 1 + +using namespace boost; +using namespace std; +using namespace boost::numeric::ublas; + +static int max_dist=0; + +typedef boost::adjacency_matrix Graph; +typedef std::pair Edge; +typedef boost::graph_traits GraphTraits; +typedef boost::numeric::ublas::triangular_matrix prob; +typedef boost::numeric::ublas::triangular_matrix pathlength; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + +namespace std { + using ::time; +} + +static int var_fixed[5] = {1, 0, 1, 1, 0}; + +typedef boost::minstd_rand base_generator_type; +typedef adjacency_list < listS, vecS, directedS, +no_property, property < edge_weight_t, int > > graph_t; +typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; +typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; + + +//================================================ +string strDouble(double number) +{ + stringstream ss;//create a stringstream + ss << number;//add number to the stream + return ss.str();//return a string with the contents of the stream +} + +//================================================ + +double gaussian(double sigma) +{ + double GaussNum = 0.0; + int NumInSum = 10; + for(int i = 0; i < NumInSum; i++) + { + GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); + } + GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); + + + return GaussNum; + +} + + + +//================================================= +double diffclock(clock_t clock1,clock_t clock2) +{ + double diffticks=clock1-clock2; + double diffms=(diffticks)/CLOCKS_PER_SEC; + return diffms; +} + +//================================================ +//================================================================ +double get_new_x(double x, double dx){ + + double new_x; + // boost::variate_generator > uni(generator, uni_dist); + double r = rand()/(double)(pow(2.,31)-1.); + + if (r > 0.5){ + new_x = x + rand()*dx/(double)(pow(2.,31)-1.); + } else { + new_x = x - rand()*dx/(double)(pow(2.,31)-1.); + } + + return new_x; + +} + + +//=============================================== +string string_wrap(string ins, int mode){ + + std::ostringstream s; + + switch(mode){ + case 0: + s << "\033[1;29m" << ins << "\033[0m"; + break; + case 1: + s << "\033[1;34m" << ins << "\033[0m"; + break; + case 2: + s << "\033[1;44m" << ins << "\033[0m"; + break; + case 3: + s << "\033[1;35m" << ins << "\033[0m"; + break; + case 4: + s << "\033[1;33;44m" << ins << "\033[0m"; + break; + case 5: + s << "\033[1;47;34m" << ins << "\033[0m"; + break; + case 6: + s << "\033[1;1;31m" << ins << "\033[0m"; + break; + case 7: + s << "\033[1;1;33m" << ins << "\033[0m"; + break; + case 8: + s << "\033[1;1;43;34m" << ins << "\033[0m"; + break; + case 9: + s << "\033[1;1;37m" << ins << "\033[0m"; + break; + case 10: + s << "\033[1;30;47m" << ins << "\033[0m"; + break; + default: + s << ins; + } + + return s.str(); +} + + +//=============================================== +string wrap_double(double val, int mode){ + + std::ostringstream s; + s << string_wrap(strDouble(val),mode); + + return s.str(); +} + + + +//=============================================== +const +string i2string(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + return s.str(); + +} + +//=============================================== +char* i2char(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + char* a=new char[s.str().size()+1]; + memcpy(a,s.str().c_str(), s.str().size()); + + return a; +} + +//================================================ +class Universe { + +private: + + double alpha_i; + double alpha_m; + double beta; + double gamma; + double delta; + + double TargetNovelty; + double CumulativeRelativeLoss; + double CRLsquare; + string id; + + + int N_nodes; + int M_edges; + + int N_epochs; + int N_steps; + int N_repeats; + + int current_epoch; + double current_loss; + int current_repeat; + double current_novelty; + + int mode_identify_failed; + int verbose_level; // 0 is silent, higher is more + + double k_max; + + graph_t Full_g; + + double **Prob; + double **Tried; + double **Dist; + double **Final; + double **EdgeIndex; + double *Rank; + + base_generator_type generator; + boost::uniform_real<> uni_dist; + boost::geometric_distribution geo; + +public: + + + + //====== Constructor ====== + Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) + { + //typedef array_type2::index index2; + + + std::ifstream inFile; + //string line; + + //------------------------------- + + base_generator_type gene(42u); + generator = gene; + generator.seed(static_cast(std::time(0))); + boost::uniform_real<> uni_d(0,1); + uni_dist = uni_d; + + //-------------------------------- + + int i, k; + int x, y; + Edge* edge_array_mine; + int num_arcs_mine, num_nodes_mine; + int* weights_mine; + + TargetNovelty = target; + CumulativeRelativeLoss = 0.; + CRLsquare = 0.; + + + N_epochs = Epochs; + N_steps = Steps; + N_repeats = Repeats; + + current_epoch = 0; + current_loss = 0.; + current_repeat = 0; + + id = idd; + + verbose_level = 1; + + mode_identify_failed = identify_failed; + + + //------------------------------- + // The first pass though file with the graph + inFile.open(FileToOpen.c_str()); + if (inFile.fail()) { + cout << "Unable to open file"; + exit(1); // terminate with error + }else { + + if (verbose_level > 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x; + inFile >> y; + + if (verbose_level > 2){ + std::cout << " x: " << x; + std::cout << " y: " << y << std::endl; + } + + if (i==0){ + N_nodes=x; + M_edges=y; + break; + } + i++; + + + } + inFile.close(); + + if (verbose_level == 2){ + std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { + if (i > 0) { + Final[x][y]=1.; + Final[y][x]=1.; + + + if (verbose_level == 2){ + std::cout << "."; + } + } + i++; + + } + if (verbose_level == 2){ + std::cout << std::endl; + } + inFile.close(); + + k=0; + for (int i=0; i 0.){ + EdgeIndex[i][j]=k; + k++; + } + } + } + + + + //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // create graph -- hopefully, we can keep it, just modifying edge weights + + + edge_array_mine = new Edge[2*M_edges]; + num_arcs_mine = 2*M_edges; + num_nodes_mine = N_nodes; + weights_mine = new int[2*M_edges]; + for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} + + k=0; + for(int i=0; i0.){ + edge_array_mine[2*k] =Edge(i,j); + edge_array_mine[2*k+1]=Edge(j,i); + k++; + } + } + } + graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); + + Full_g = g; + delete edge_array_mine; + delete weights_mine; + + //=========================================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + for (int i=0; i 0.){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + + } + + + //===================================================================== + int sample_failed_number(double pfail){ + + //boost::geometric_distribution geo(pfail); + //boost::variate_generator > geom(generator, geo); + + double r, u, g; + + r=0.; + for(int i=0; i=3){ + std::cout << id << " failed " << r << std::endl; + } + return r; + + } + + //============================================= + double get_target(void){ + return TargetNovelty; + } + + //============================================= + void set_target(double target){ + TargetNovelty=target; + } + + //============================================= + int sample(){ + + //boost::variate_generator > uni(generator, uni_dist); + // double r = uni(), Summa = 0.; + + + + double r = rand(), Summa = 0.; + r /= (double)(pow(2.,31)-1.); + int result = 0; + int finished = 0; + + if (verbose_level==4){ + std::cout << id << " sampled " << r << std::endl; + } + + for(int i=0; i r){ + + Tried[i][j]+=1.; + + if (Final[i][j] > 0.){ + result = 1; + } + finished = 1; + } + } + } + + return result; + + } + + //=============================== + void update_current_graph(void){ + + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + //property_map::type weightmap = get(edge_weight, Full_g); + for (int i=0; i 0. && Tried[i][j]>0){ + //s = edge(i, j, Full_g); + boost::graph_traits::edge_descriptor e1,e2; + bool found1, found2; + u = vertex(i, Full_g); + v = vertex(j, Full_g); + tie(e1, found1) = edge(u, v, Full_g); + tie(e2, found2) = edge(v, u, Full_g); + if (!found1 && !found2){ + add_edge(u,v,1,Full_g); + add_edge(v,u,1,Full_g); + } + + } + } + + } + } + + //=============================== + void update_distances(void){ + // put shortest paths to the *Dist[][] + std::vector p(num_vertices(Full_g)); + std::vector d(num_vertices(Full_g)); + vertex_descriptor s; + + + // put shortest paths to the *Dist[][] + for (int j=0; j 0.){ + s = vertex(j, Full_g); + dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); + + //std::cout <<" Vertex "<< j << std::endl; + graph_traits < graph_t >::vertex_iterator vi, vend; + + for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { + + if (p[*vi]!=*vi){ + Dist[*vi][j]=d[*vi]; + Dist[j][*vi]=d[*vi]; + + if (Dist[*vi][j]>max_dist){ + max_dist=Dist[*vi][j]; + } + + + } else { + Dist[*vi][j]=-1.; + Dist[j][*vi]=-1.; + } + } + } + + } + + + } + + //====================================================== + void update_ranks(void){ + + for(int i=0; i0. && Final[i][j] >0.){ + Rank[i]++; + Rank[j]++; + } + } + } + + } + + //==================================================================== + void set_world(double a_i, double a_m, double b, double g, double d){ + + alpha_i=a_i; + alpha_m=a_m; + gamma=g; + beta=b; + delta=d; + + } + + //==================================================================== + void reset_world(){ + + //==================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + + for (int i=0; i 0. && Tried[i][j] > 0){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + //================================================== + + current_loss=0; + current_epoch=0; + current_repeat++; + current_novelty=0; + + for(int i = 0; i < N_nodes; ++i) { + Rank[i]=0.; + for(int j = 0; j < N_nodes; ++j) { + Prob[i][j]=0.; + Dist[i][j]=-1.; + Tried[i][j]=0.; + } + } + } + + + //============================================== + void show_parameters(void){ + + std::cout << "Parameters: " + << alpha_i << " " + << alpha_m << " | " + << beta << " " + << gamma << " | " + << delta << std::endl; + + } + + + + //=============================================== + string file_name(){ + + std::ostringstream s; + s << "world_" + << lexical_cast(alpha_i) << "_" + << lexical_cast(alpha_m) << "_" + << lexical_cast(beta) << "_" + << lexical_cast(gamma) << "_" + << lexical_cast(delta) << "_" + << lexical_cast(N_epochs) << "_" + << lexical_cast(N_steps) << "_" + << lexical_cast(N_repeats) << ".txt"; + + return s.str(); + + } + + + + + //================================================= + void set_verbose(int verbose){ + + verbose_level = verbose; + } + + + //============================================================= + void update_probabilities(void){ + + + //========================= + // Compute sampling probabilities + // first pass: \xi_i,j + for(int i=0; i 0.){ + + double k = Dist[i][j]; + if (k >= k_max){ + k = k_max-1; + } + + bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); + + } else { + bg = delta; + } + + Prob[i][j] = exp(Prob[i][j] + bg); + } + } + + + // second pass: sum + double Summa = 0.; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + + } + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + else { + + double pfail=0.; + int n_failed; + //, n_check = 0; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + } + + current_novelty = novel; + + + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + if (verbose_level == 2){ + std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) + + << " cost=" << cost + << " novel=" << novel + << " rel_loss=" << cost/novel + << std::endl; + } + + current_epoch++; + } + + + //====== Destructor ====== + ~Universe(){ + + delete_2Dmatrix(Final, N_nodes); + delete_2Dmatrix(Dist, N_nodes); + delete_2Dmatrix(Tried, N_nodes); + delete_2Dmatrix(Prob, N_nodes); + delete_2Dmatrix(EdgeIndex, N_nodes); + delete_1Dmatrix(Rank); + } + + //================================================ + // Allocate memory + double** allocate_2Dmatrix(int N, int M) + { + double **pointer; + + if (verbose_level == 2){ + std::cout<< "["< 0){ + + pointer = new double[N]; + + }else { + + pointer = NULL; + } + + return pointer; + + } + + //============================================== + // De-Allocate memory to prevent memory leak + void delete_2Dmatrix(double **pointer, int N){ + + if (pointer != NULL){ + + for (int i = 0; i < N; ++i){ + delete [] pointer[i]; + } + delete [] pointer; + } + } + //==================== + void delete_1Dmatrix(double *pointer){ + + delete [] pointer; + } + + //=========================================== + double get_rel_loss(){ + + return CumulativeRelativeLoss ; + } + + //=========================================== + double get_rel_loss_err(){ + + return CRLsquare ; + } + + + + //================================================================================== + void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ + + double ALOT=100000000000.; + + std::cout<<" evolve_to_target_and_save: istart=" << istart << "iend=" << iend << "\n"; + + reset_world(); + + for (int k = istart; k < iend; k++){ + + std::cout<<" evolve: k=" << k << "\n"; + + + + for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ + std::cout<<" evolve: k=" << k << " i=" << i << " cur=" << current_novelty << " Target=" << TargetNovelty << "\n"; + update_world(); + } + + storage[k]=current_loss/current_novelty; + counters[k]=1; + + + reset_world(); + } + + } + //============================================== + int get_reruns(void){ + return N_repeats; + } + + //============================================== + double get_parameter(int i){ + + switch(i){ + case 0: + return alpha_i; + case 1: + return alpha_m; + case 2: + return beta; + case 3: + return gamma; + case 4: + return delta; + default: + + std::cout << "Erroneous parameter id!!!!\n\n\n"; + return 0.; + } + } + + + //============================================== + void evolve_to_target(){ + + reset_world(); + if (beta < -1. || gamma < -1.){ + CumulativeRelativeLoss = 100000000000.; + CRLsquare = 0.; + return; + } + + + for (int k=0; k< N_repeats; k++){ + + + for(int i=0; i 4) {return 0;} + + else { + + switch(position){ + case 0: + alpha_i=value; + return 1; + case 1: + alpha_m=value; + return 1; + case 2: + beta=value; + return 1; + case 3: + gamma=value; + return 1; + case 4: + delta=value; + return 1; + } + + } + + return 0; + } + + + //================================================================= + void try_annealing(double starting_jump, int iterations, + double temp_start, double temp_end, double target_rejection){ + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=alpha_i; + x[1]=alpha_m; + x[2]=beta; + x[3]=gamma; + x[4]=delta; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + + //.......................................... + evolve_to_target(); + std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + //........................................... + + // optimization cycle + for(int i=0; i ratio){ + + std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << alpha_i << " "<< alpha_m << " " + << beta << " " << gamma << " " + << delta << " " << std::endl; + set_parameter(x[j], j); + CumulativeRelativeLoss = 0; + CRLsquare = 0; + + rejection[j]+=1.; + } + + else { + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + x[j] = x_tmp; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) + << " "<< wrap_double(rejection[1], 7) << " " + << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(alpha_i,2) + << " "<< wrap_double(alpha_m, 7) << " " + << wrap_double(beta,5) << " " + << wrap_double(gamma,9) << " " + << wrap_double(delta,6) << " " + << std::endl << std::endl; + + } + //........................................................ + + } + + } + + } + + +}; + +//============================================================ + +std::pair multi_loss( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double* Results, + int* Counters, + double* params){ + + int N = un[0]->get_reruns(); + int step = (int)(double)N/(double)(Nworkers); + int istart=0; + int iend = istart+step; + + double Loss=0., LossSquare=0.; + + for(int i=0; iset_parameter(params[j],j); + } + + + for(int i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); + //}); + + std::cout<<" Returned from evolve_to_target_and_save\n"; + istart += step; + iend = min(istart+step,N); + + } + } + // dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + //dispatch_release(group); + + for (int i=0; i Res; + Res.first=Loss; + Res.second=two_std; + + return Res; + + +} +//============================================================ + + +//============================================================ +void multi_annealing( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double T_start, double T_end, + double Target_rejection, + int Annealing_repeats, + double starting_jump, + double* Results, + int* Counters, + double* params0, + double annealing_cycles){ + //................................. + // re-implement annealing + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + //boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=params0[0]; + x[1]=params0[1]; + x[2]=params0[2]; + x[3]=params0[3]; + x[4]=params0[4]; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + std::pairRes; + + Res = multi_loss( /* group,*/ un, /* CustomQueues,*/ Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + curr_x = Res.first; + curr_err = Res.second; + + // optimization cycle + + for(int i=0; iset_parameter(x_tmp, j); + } + + + Res = multi_loss(/* group, */ un, /* CustomQueues, */ Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " vs " << ratio << std::endl; + + double ALOT=100000000000.; + + if (Res.first < ALOT) + { + ofstream filestr; + + filestr.open ("best_opt_some.txt", ofstream::app); + + // >> i/o operations here << + filestr << un[0]->get_target() << "," + << Res.first + << "," << un[0]->get_parameter(0) + << "," << un[0]->get_parameter(1) + << "," << un[0]->get_parameter(2) + << "," << un[0]->get_parameter(3) + << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; + + filestr.close(); + + + filestr.open ("max_dist.txt", ofstream::app); + + // >> i/o operations here << + filestr << max_dist << ",\n"; + + filestr.close(); + + } + + + if (r > ratio){ + + std::cout << " "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << un[0]->get_parameter(0) + << " " << un[0]->get_parameter(1) + << " " << un[0]->get_parameter(2) + << " " << un[0]->get_parameter(3) + << " " << un[0]->get_parameter(4) << " " << std::endl; + + x[j]=x_hold; + for(int w=0; wset_parameter(x[j], j); + } + + + //set_parameter(x[j], j); + rejection[j]+=1.; + } + + else { + + curr_x = Res.first; + curr_err = Res.second; + x[j] = x_tmp; + + for(int w=0; wset_parameter(x[j], j); + } + + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) << " " + << wrap_double(rejection[1],7) << " " + << wrap_double(rejection[2],5) << " " + << wrap_double(rejection[3],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << " "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(un[0]->get_parameter(0),2) << " " + << wrap_double(un[0]->get_parameter(1),7) << " " + << wrap_double(un[0]->get_parameter(2),5) << " " + << wrap_double(un[0]->get_parameter(3),9) << " " + << wrap_double(un[0]->get_parameter(4),6) << " " + << std::endl << std::endl; + + + + } + //........................................................ + + } + } + + } + +} + + + +//================================================ +int +main(int argc, char* argv[]) +{ + + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; + string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params1[4] = {300, 50, 1000, 10}; + int params3[5] = { 0, 0, 0, 0, 0}; + + // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + int verbose_level = 2; + const std::string one="one", two="two"; + static Universe* un[Nworkers]; + // static dispatch_queue_t CustomQueues[Nworkers]; + + static double* Results; + static int* Counters; + + timeval t1, t2; + double elapsedTime; + // start timer + gettimeofday(&t1, NULL); + + + if (argc < 8) { + std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; + std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; + std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; + + system("pwd"); + + + return(1); + } + else { + for (int nArg=0; nArg < argc; nArg++){ + //std::cout << nArg << " " << argv[nArg] << std::endl; + if (nArg > 0 && nArg < 7){ + params0[nArg-1]= atof(argv[nArg]); + std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; + } + if (nArg > 6 && nArg < 11){ + params1[nArg-7]= atoi(argv[nArg]); + std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; + } + if (nArg == 11){ + verbose_level = atoi(argv[nArg]); + std::cout << "verbose level: " << verbose_level << std::endl; + } + if (nArg > 11 && nArg < 17){ + params2[nArg-12]= atof(argv[nArg]); + std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; + } + if (nArg > 16 && nArg < 22){ + params3[nArg-17]= atof(argv[nArg]); + var_fixed[nArg-17]= atof(argv[nArg]); + std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; + } + + + } + + } + + /* + for target in range(58,1009,50): + s = ("%d" % target) + print s + + for i in range(15): + # Param groups separated by "|" below for documentation. NOTE that | is not used on command line! + os.system("./supe_duper_optimizer |0 0 4 50 -1 "+s+" | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0") + */ + + /* Parameters, re-iterated: + + "alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + + {"n_epochs", "n_steps", "n_reruns", "range"}; + int params1[4] = {300, 50, 1000, 10}; + + {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params3[5] = { 0, 0, 0, 0, 0}; + + + */ + + for (int j=0; j<5; j++){ + + cout << j << " | " << var_fixed[j] << " (fixed) \n"; + } + + target=params0[5]; + range = (double)params1[3]; + int identify_failed = 0; + char* filename= (char *)"movie_graph.txt"; + int n_ep=params1[0], n_st=params1[1], n_rep=params1[2]; + + //............................... + + for(int i=0; i 0){ + + Results = new double[n_rep]; + Counters = new int[n_rep]; + + }else { + + Results = NULL; + Counters = NULL; + std::cout << " Number of reruns should be positive! " << std::endl; + return 0; + + } + //............................... + srand(time(0)); + //srandomdev(); + + { + double r=0; + for (int j=0; j<100; j++){ + + + + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " "; + } + std::cout << "\n "; + } + //random initiation of starting parameters + + if (range > 0.){ + + for (int i=0; i < 5; i++){ + + if (params0[i]==-100.){ + + double r1 = (rand()/(double)(pow(2.,31)-1.)); + double r2 = (rand()/(double)(pow(2.,31)-1.)); + double sign = 1.; + + if(r1 > 0.5){ + sign=-1.; + } + + params0[i] = sign*r2*range; + + std::cout << par_names0[i] << ": " << params0[i] << std::endl; + } + } + + } + + + double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; + int Annealing_repeats = (int) params2[2]; + + + // dispatch_group_t group = dispatch_group_create(); + + //............................. + multi_annealing( /* group, */ un, /* CustomQueues, */ T_start, T_end, Target_rejection, Annealing_repeats, + starting_jump, Results, Counters, params0, Annealing_repeats); + + //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + // dispatch_release(group); + //............................. + + + // stop timer + gettimeofday(&t2, NULL); + + // compute and print the elapsed time in millisec + elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms + elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << elapsedTime << " seconds \n .....(" << elapsedTime/60. << " minutes)\n\n"; + + //..................... + + for(int i=0; i 0){ + + delete [] Results; + delete [] Counters; + + } + + return 0; + + + +} + Copied: SwiftApps/SciColSim/optimizer.sh (from rev 5503, SwiftApps/optimizer.sh) =================================================================== --- SwiftApps/SciColSim/optimizer.sh (rev 0) +++ SwiftApps/SciColSim/optimizer.sh 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,10 @@ +#1 /bin/sh +bestfile=$1 +maxfile=$2 +datafile=$3 +touch best_opt_some.txt max_dist.txt multi_loss.data +shift 3 +$(dirname $0)/Optimizer $* 2>&1 +mv best_opt_some.txt $bestfile +mv max_dist.txt $maxfile +mv multi_loss.data $datafile Copied: SwiftApps/SciColSim/optimizer.snap01.cpp (from rev 5503, SwiftApps/optimizer.snap01.cpp) =================================================================== --- SwiftApps/SciColSim/optimizer.snap01.cpp (rev 0) +++ SwiftApps/SciColSim/optimizer.snap01.cpp 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,1722 @@ +// +// main.cpp +// optimizer +// +// Created by Andrey Rzhetsky on 4/11/11. +// Copyright 2011 University of Chicago. All rights reserved. +// + +#define Nworkers 24 + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +// #include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define INT_INFINITY 2147483647 + +#define FIX_VARIABLES 1 + +using namespace boost; +using namespace std; +using namespace boost::numeric::ublas; + +static int max_dist=0; + +typedef boost::adjacency_matrix Graph; +typedef std::pair Edge; +typedef boost::graph_traits GraphTraits; +typedef boost::numeric::ublas::triangular_matrix prob; +typedef boost::numeric::ublas::triangular_matrix pathlength; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + +namespace std { + using ::time; +} + +static int var_fixed[5] = {1, 0, 1, 1, 0}; + +typedef boost::minstd_rand base_generator_type; +typedef adjacency_list < listS, vecS, directedS, +no_property, property < edge_weight_t, int > > graph_t; +typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; +typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; + + +//================================================ +string strDouble(double number) +{ + stringstream ss;//create a stringstream + ss << number;//add number to the stream + return ss.str();//return a string with the contents of the stream +} + +//================================================ + +double gaussian(double sigma) +{ + double GaussNum = 0.0; + int NumInSum = 10; + for(int i = 0; i < NumInSum; i++) + { + GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); + } + GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); + + + return GaussNum; + +} + + + +//================================================= +double diffclock(clock_t clock1,clock_t clock2) +{ + double diffticks=clock1-clock2; + double diffms=(diffticks)/CLOCKS_PER_SEC; + return diffms; +} + +//================================================ +//================================================================ +double get_new_x(double x, double dx){ + + double new_x; + // boost::variate_generator > uni(generator, uni_dist); + double r = rand()/(double)(pow(2.,31)-1.); + + if (r > 0.5){ + new_x = x + rand()*dx/(double)(pow(2.,31)-1.); + } else { + new_x = x - rand()*dx/(double)(pow(2.,31)-1.); + } + + return new_x; + +} + + +//=============================================== +string string_wrap(string ins, int mode){ + + std::ostringstream s; + + switch(mode){ + case 0: + s << "\033[1;29m" << ins << "\033[0m"; + break; + case 1: + s << "\033[1;34m" << ins << "\033[0m"; + break; + case 2: + s << "\033[1;44m" << ins << "\033[0m"; + break; + case 3: + s << "\033[1;35m" << ins << "\033[0m"; + break; + case 4: + s << "\033[1;33;44m" << ins << "\033[0m"; + break; + case 5: + s << "\033[1;47;34m" << ins << "\033[0m"; + break; + case 6: + s << "\033[1;1;31m" << ins << "\033[0m"; + break; + case 7: + s << "\033[1;1;33m" << ins << "\033[0m"; + break; + case 8: + s << "\033[1;1;43;34m" << ins << "\033[0m"; + break; + case 9: + s << "\033[1;1;37m" << ins << "\033[0m"; + break; + case 10: + s << "\033[1;30;47m" << ins << "\033[0m"; + break; + default: + s << ins; + } + + return s.str(); +} + + +//=============================================== +string wrap_double(double val, int mode){ + + std::ostringstream s; + s << string_wrap(strDouble(val),mode); + + return s.str(); +} + + + +//=============================================== +const +string i2string(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + return s.str(); + +} + +//=============================================== +char* i2char(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + char* a=new char[s.str().size()+1]; + memcpy(a,s.str().c_str(), s.str().size()); + + return a; +} + +//================================================ +class Universe { + +private: + + double alpha_i; + double alpha_m; + double beta; + double gamma; + double delta; + + double TargetNovelty; + double CumulativeRelativeLoss; + double CRLsquare; + string id; + + + int N_nodes; + int M_edges; + + int N_epochs; + int N_steps; + int N_repeats; + + int current_epoch; + double current_loss; + int current_repeat; + double current_novelty; + + int mode_identify_failed; + int verbose_level; // 0 is silent, higher is more + + double k_max; + + graph_t Full_g; + + double **Prob; + double **Tried; + double **Dist; + double **Final; + double **EdgeIndex; + double *Rank; + + base_generator_type generator; + boost::uniform_real<> uni_dist; + boost::geometric_distribution geo; + +public: + + + + //====== Constructor ====== + Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) + { + //typedef array_type2::index index2; + + + std::ifstream inFile; + //string line; + + //------------------------------- + + base_generator_type gene(42u); + generator = gene; + generator.seed(static_cast(std::time(0))); + boost::uniform_real<> uni_d(0,1); + uni_dist = uni_d; + + //-------------------------------- + + int i, k; + int x, y; + Edge* edge_array_mine; + int num_arcs_mine, num_nodes_mine; + int* weights_mine; + + TargetNovelty = target; + CumulativeRelativeLoss = 0.; + CRLsquare = 0.; + + + N_epochs = Epochs; + N_steps = Steps; + N_repeats = Repeats; + + current_epoch = 0; + current_loss = 0.; + current_repeat = 0; + + id = idd; + + verbose_level = 1; + + mode_identify_failed = identify_failed; + + + //------------------------------- + // The first pass though file with the graph + inFile.open(FileToOpen.c_str()); + if (inFile.fail()) { + cout << "Unable to open file"; + exit(1); // terminate with error + }else { + + if (verbose_level > 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x; + inFile >> y; + + if (verbose_level > 2){ + std::cout << " x: " << x; + std::cout << " y: " << y << std::endl; + } + + if (i==0){ + N_nodes=x; + M_edges=y; + break; + } + i++; + + + } + inFile.close(); + + if (verbose_level == 2){ + std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { + if (i > 0) { + Final[x][y]=1.; + Final[y][x]=1.; + + + if (verbose_level == 2){ + std::cout << "."; + } + } + i++; + + } + if (verbose_level == 2){ + std::cout << std::endl; + } + inFile.close(); + + k=0; + for (int i=0; i 0.){ + EdgeIndex[i][j]=k; + k++; + } + } + } + + + + //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // create graph -- hopefully, we can keep it, just modifying edge weights + + + edge_array_mine = new Edge[2*M_edges]; + num_arcs_mine = 2*M_edges; + num_nodes_mine = N_nodes; + weights_mine = new int[2*M_edges]; + for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} + + k=0; + for(int i=0; i0.){ + edge_array_mine[2*k] =Edge(i,j); + edge_array_mine[2*k+1]=Edge(j,i); + k++; + } + } + } + graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); + + Full_g = g; + delete edge_array_mine; + delete weights_mine; + + //=========================================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + for (int i=0; i 0.){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + + } + + + //===================================================================== + int sample_failed_number(double pfail){ + + //boost::geometric_distribution geo(pfail); + //boost::variate_generator > geom(generator, geo); + + double r, u, g; + + r=0.; + for(int i=0; i=3){ + std::cout << id << " failed " << r << std::endl; + } + return r; + + } + + //============================================= + double get_target(void){ + return TargetNovelty; + } + + //============================================= + void set_target(double target){ + TargetNovelty=target; + } + + //============================================= + int sample(){ + + //boost::variate_generator > uni(generator, uni_dist); + // double r = uni(), Summa = 0.; + + + + double r = rand(), Summa = 0.; + r /= (double)(pow(2.,31)-1.); + int result = 0; + int finished = 0; + + if (verbose_level==4){ + std::cout << id << " sampled " << r << std::endl; + } + + for(int i=0; i r){ + + Tried[i][j]+=1.; + + if (Final[i][j] > 0.){ + result = 1; + } + finished = 1; + } + } + } + + return result; + + } + + //=============================== + void update_current_graph(void){ + + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + //property_map::type weightmap = get(edge_weight, Full_g); + for (int i=0; i 0. && Tried[i][j]>0){ + //s = edge(i, j, Full_g); + boost::graph_traits::edge_descriptor e1,e2; + bool found1, found2; + u = vertex(i, Full_g); + v = vertex(j, Full_g); + tie(e1, found1) = edge(u, v, Full_g); + tie(e2, found2) = edge(v, u, Full_g); + if (!found1 && !found2){ + add_edge(u,v,1,Full_g); + add_edge(v,u,1,Full_g); + } + + } + } + + } + } + + //=============================== + void update_distances(void){ + // put shortest paths to the *Dist[][] + std::vector p(num_vertices(Full_g)); + std::vector d(num_vertices(Full_g)); + vertex_descriptor s; + + + // put shortest paths to the *Dist[][] + for (int j=0; j 0.){ + s = vertex(j, Full_g); + dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); + + //std::cout <<" Vertex "<< j << std::endl; + graph_traits < graph_t >::vertex_iterator vi, vend; + + for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { + + if (p[*vi]!=*vi){ + Dist[*vi][j]=d[*vi]; + Dist[j][*vi]=d[*vi]; + + if (Dist[*vi][j]>max_dist){ + max_dist=Dist[*vi][j]; + } + + + } else { + Dist[*vi][j]=-1.; + Dist[j][*vi]=-1.; + } + } + } + + } + + + } + + //====================================================== + void update_ranks(void){ + + for(int i=0; i0. && Final[i][j] >0.){ + Rank[i]++; + Rank[j]++; + } + } + } + + } + + //==================================================================== + void set_world(double a_i, double a_m, double b, double g, double d){ + + alpha_i=a_i; + alpha_m=a_m; + gamma=g; + beta=b; + delta=d; + + } + + //==================================================================== + void reset_world(){ + + //==================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + + for (int i=0; i 0. && Tried[i][j] > 0){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + //================================================== + + current_loss=0; + current_epoch=0; + current_repeat++; + current_novelty=0; + + for(int i = 0; i < N_nodes; ++i) { + Rank[i]=0.; + for(int j = 0; j < N_nodes; ++j) { + Prob[i][j]=0.; + Dist[i][j]=-1.; + Tried[i][j]=0.; + } + } + } + + + //============================================== + void show_parameters(void){ + + std::cout << "Parameters: " + << alpha_i << " " + << alpha_m << " | " + << beta << " " + << gamma << " | " + << delta << std::endl; + + } + + + + //=============================================== + string file_name(){ + + std::ostringstream s; + s << "world_" + << lexical_cast(alpha_i) << "_" + << lexical_cast(alpha_m) << "_" + << lexical_cast(beta) << "_" + << lexical_cast(gamma) << "_" + << lexical_cast(delta) << "_" + << lexical_cast(N_epochs) << "_" + << lexical_cast(N_steps) << "_" + << lexical_cast(N_repeats) << ".txt"; + + return s.str(); + + } + + + + + //================================================= + void set_verbose(int verbose){ + + verbose_level = verbose; + } + + + //============================================================= + void update_probabilities(void){ + + + //========================= + // Compute sampling probabilities + // first pass: \xi_i,j + for(int i=0; i 0.){ + + double k = Dist[i][j]; + if (k >= k_max){ + k = k_max-1; + } + + bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); + + } else { + bg = delta; + } + + Prob[i][j] = exp(Prob[i][j] + bg); + } + } + + + // second pass: sum + double Summa = 0.; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + + } + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + else { + + double pfail=0.; + int n_failed; + //, n_check = 0; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + } + + current_novelty = novel; + + + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + if (verbose_level == 2){ + std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) + + << " cost=" << cost + << " novel=" << novel + << " rel_loss=" << cost/novel + << std::endl; + } + + current_epoch++; + } + + + //====== Destructor ====== + ~Universe(){ + + delete_2Dmatrix(Final, N_nodes); + delete_2Dmatrix(Dist, N_nodes); + delete_2Dmatrix(Tried, N_nodes); + delete_2Dmatrix(Prob, N_nodes); + delete_2Dmatrix(EdgeIndex, N_nodes); + delete_1Dmatrix(Rank); + } + + //================================================ + // Allocate memory + double** allocate_2Dmatrix(int N, int M) + { + double **pointer; + + if (verbose_level == 2){ + std::cout<< "["< 0){ + + pointer = new double[N]; + + }else { + + pointer = NULL; + } + + return pointer; + + } + + //============================================== + // De-Allocate memory to prevent memory leak + void delete_2Dmatrix(double **pointer, int N){ + + if (pointer != NULL){ + + for (int i = 0; i < N; ++i){ + delete [] pointer[i]; + } + delete [] pointer; + } + } + //==================== + void delete_1Dmatrix(double *pointer){ + + delete [] pointer; + } + + //=========================================== + double get_rel_loss(){ + + return CumulativeRelativeLoss ; + } + + //=========================================== + double get_rel_loss_err(){ + + return CRLsquare ; + } + + + + //================================================================================== + void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ + + double ALOT=100000000000.; + + // std::cout<<" evolve_to_target_and_save: istart=" << istart << "iend=" << iend << "\n"; + + reset_world(); + + for (int k = istart; k < iend; k++){ + + // std::cout<<" evolve: k=" << k << "\n"; + + + + for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ + // std::cout<<" evolve: k=" << k << " i=" << i << " cur=" << current_novelty << " Target=" << TargetNovelty << "\n"; + update_world(); + } + + storage[k]=current_loss/current_novelty; + counters[k]=1; + + + reset_world(); + } + + } + //============================================== + int get_reruns(void){ + return N_repeats; + } + + //============================================== + double get_parameter(int i){ + + switch(i){ + case 0: + return alpha_i; + case 1: + return alpha_m; + case 2: + return beta; + case 3: + return gamma; + case 4: + return delta; + default: + + std::cout << "Erroneous parameter id!!!!\n\n\n"; + return 0.; + } + } + + + //============================================== + void evolve_to_target(){ + + reset_world(); + if (beta < -1. || gamma < -1.){ + CumulativeRelativeLoss = 100000000000.; + CRLsquare = 0.; + return; + } + + + for (int k=0; k< N_repeats; k++){ + + + for(int i=0; i 4) {return 0;} + + else { + + switch(position){ + case 0: + alpha_i=value; + return 1; + case 1: + alpha_m=value; + return 1; + case 2: + beta=value; + return 1; + case 3: + gamma=value; + return 1; + case 4: + delta=value; + return 1; + } + + } + + return 0; + } + + + //================================================================= + void try_annealing(double starting_jump, int iterations, + double temp_start, double temp_end, double target_rejection){ + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=alpha_i; + x[1]=alpha_m; + x[2]=beta; + x[3]=gamma; + x[4]=delta; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + + //.......................................... + evolve_to_target(); + std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + //........................................... + + // optimization cycle + for(int i=0; i ratio){ + + std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << alpha_i << " "<< alpha_m << " " + << beta << " " << gamma << " " + << delta << " " << std::endl; + set_parameter(x[j], j); + CumulativeRelativeLoss = 0; + CRLsquare = 0; + + rejection[j]+=1.; + } + + else { + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + x[j] = x_tmp; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) + << " "<< wrap_double(rejection[1], 7) << " " + << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(alpha_i,2) + << " "<< wrap_double(alpha_m, 7) << " " + << wrap_double(beta,5) << " " + << wrap_double(gamma,9) << " " + << wrap_double(delta,6) << " " + << std::endl << std::endl; + + } + //........................................................ + + } + + } + + } + + +}; + +//============================================================ + +std::pair multi_loss( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double* Results, + int* Counters, + double* params){ + + int N = un[0]->get_reruns(); + int step = (int)(double)N/(double)(Nworkers); + int istart=0; + int iend = istart+step; + + double Loss=0., LossSquare=0.; + + timeval startTime, endTime; + double elapsedTime; + // start timer + gettimeofday(&startTime, NULL); + + //err: for(int i=0; iset_parameter(params[j],j); + } + } + int i; + #pragma omp parallel for private (i) + for(i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); + un[i]->evolve_to_target_and_save(i*step, min((i+1)*step,N), Results, Counters); + //}); + + // std::cout<<"multi_loss: Returned from evolve_to_target_and_save " << i << "\n"; + + + //istart += step; + //iend = min(istart+step,N); + + } + // err } + // dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + //dispatch_release(group); + + for (int i=0; i Res; + Res.first=Loss; + Res.second=two_std; + + gettimeofday(&endTime, NULL); + elapsedTime = (endTime.tv_sec - startTime.tv_sec) * 1000.0; // sec to ms + elapsedTime += (endTime.tv_usec - startTime.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << "multi_loss(N=" << N << ") elapsed time: " << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; + + return Res; +} +//============================================================ + + +//============================================================ +void multi_annealing( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double T_start, double T_end, + double Target_rejection, + int Annealing_repeats, + double starting_jump, + double* Results, + int* Counters, + double* params0, + double annealing_cycles){ + //................................. + // re-implement annealing + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + //boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=params0[0]; + x[1]=params0[1]; + x[2]=params0[2]; + x[3]=params0[3]; + x[4]=params0[4]; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + std::pairRes; + + Res = multi_loss( /* group,*/ un, /* CustomQueues,*/ Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + curr_x = Res.first; + curr_err = Res.second; + + // optimization cycle + + for(int i=0; iset_parameter(x_tmp, j); + } + + + Res = multi_loss(/* group, */ un, /* CustomQueues, */ Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " vs " << ratio << std::endl; + + double ALOT=100000000000.; + + if (Res.first < ALOT) + { + ofstream filestr; + + filestr.open ("best_opt_some.txt", ofstream::app); + + // >> i/o operations here << + filestr << un[0]->get_target() << "," + << Res.first + << "," << un[0]->get_parameter(0) + << "," << un[0]->get_parameter(1) + << "," << un[0]->get_parameter(2) + << "," << un[0]->get_parameter(3) + << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; + + filestr.close(); + + + filestr.open ("max_dist.txt", ofstream::app); + + // >> i/o operations here << + filestr << max_dist << ",\n"; + + filestr.close(); + + } + + + if (r > ratio){ + + std::cout << " "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << un[0]->get_parameter(0) + << " " << un[0]->get_parameter(1) + << " " << un[0]->get_parameter(2) + << " " << un[0]->get_parameter(3) + << " " << un[0]->get_parameter(4) << " " << std::endl; + + x[j]=x_hold; + for(int w=0; wset_parameter(x[j], j); + } + + + //set_parameter(x[j], j); + rejection[j]+=1.; + } + + else { + + curr_x = Res.first; + curr_err = Res.second; + x[j] = x_tmp; + + for(int w=0; wset_parameter(x[j], j); + } + + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) << " " + << wrap_double(rejection[1],7) << " " + << wrap_double(rejection[2],5) << " " + << wrap_double(rejection[3],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << " "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(un[0]->get_parameter(0),2) << " " + << wrap_double(un[0]->get_parameter(1),7) << " " + << wrap_double(un[0]->get_parameter(2),5) << " " + << wrap_double(un[0]->get_parameter(3),9) << " " + << wrap_double(un[0]->get_parameter(4),6) << " " + << std::endl << std::endl; + + + + } + //........................................................ + + } + } + + } + +} + + + +//================================================ +int +main(int argc, char* argv[]) +{ + + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; + string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params1[4] = {300, 50, 1000, 10}; + int params3[5] = { 0, 0, 0, 0, 0}; + + // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + int verbose_level = 2; + const std::string one="one", two="two"; + static Universe* un[Nworkers]; + // static dispatch_queue_t CustomQueues[Nworkers]; + + static double* Results; + static int* Counters; + + timeval t1, t2; + double elapsedTime; + // start timer + gettimeofday(&t1, NULL); + + + if (argc < 8) { + std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; + std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; + std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; + + system("pwd"); + + + return(1); + } + else { + for (int nArg=0; nArg < argc; nArg++){ + //std::cout << nArg << " " << argv[nArg] << std::endl; + if (nArg > 0 && nArg < 7){ + params0[nArg-1]= atof(argv[nArg]); + std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; + } + if (nArg > 6 && nArg < 11){ + params1[nArg-7]= atoi(argv[nArg]); + std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; + } + if (nArg == 11){ + verbose_level = atoi(argv[nArg]); + std::cout << "verbose level: " << verbose_level << std::endl; + } + if (nArg > 11 && nArg < 17){ + params2[nArg-12]= atof(argv[nArg]); + std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; + } + if (nArg > 16 && nArg < 22){ + params3[nArg-17]= atof(argv[nArg]); + var_fixed[nArg-17]= atof(argv[nArg]); + std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; + } + + + } + + } + + /* + for target in range(58,1009,50): + s = ("%d" % target) + print s + + for i in range(15): + # Param groups separated by "|" below for documentation. NOTE that | is not used on command line! + os.system("./supe_duper_optimizer |0 0 4 50 -1 "+s+" | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0") + */ + + /* Parameters, re-iterated: + + "alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + + {"n_epochs", "n_steps", "n_reruns", "range"}; + int params1[4] = {300, 50, 1000, 10}; + + {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params3[5] = { 0, 0, 0, 0, 0}; + + + */ + + for (int j=0; j<5; j++){ + + cout << j << " | " << var_fixed[j] << " (fixed) \n"; + } + + target=params0[5]; + range = (double)params1[3]; + int identify_failed = 0; + char* filename= (char *)"movie_graph.txt"; + int n_ep=params1[0], n_st=params1[1], n_rep=params1[2]; + + //............................... + + for(int i=0; i 0){ + + Results = new double[n_rep]; + Counters = new int[n_rep]; + + }else { + + Results = NULL; + Counters = NULL; + std::cout << " Number of reruns should be positive! " << std::endl; + return 0; + + } + //............................... + srand(time(0)); + //srandomdev(); + + { + double r=0; + for (int j=0; j<100; j++){ + + + + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " "; + } + std::cout << "\n "; + } + //random initiation of starting parameters + + if (range > 0.){ + + for (int i=0; i < 5; i++){ + + if (params0[i]==-100.){ + + double r1 = (rand()/(double)(pow(2.,31)-1.)); + double r2 = (rand()/(double)(pow(2.,31)-1.)); + double sign = 1.; + + if(r1 > 0.5){ + sign=-1.; + } + + params0[i] = sign*r2*range; + + std::cout << par_names0[i] << ": " << params0[i] << std::endl; + } + } + + } + + + double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; + int Annealing_repeats = (int) params2[2]; + + + // dispatch_group_t group = dispatch_group_create(); + + //............................. + multi_annealing( /* group, */ un, /* CustomQueues, */ T_start, T_end, Target_rejection, Annealing_repeats, + starting_jump, Results, Counters, params0, Annealing_repeats); + + //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + // dispatch_release(group); + //............................. + + + // stop timer + gettimeofday(&t2, NULL); + + // compute and print the elapsed time in millisec + elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms + elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; + + //..................... + + for(int i=0; i 0){ + + delete [] Results; + delete [] Counters; + + } + + return 0; + + + +} + Copied: SwiftApps/SciColSim/optirun.swift (from rev 5503, SwiftApps/optirun.swift) =================================================================== --- SwiftApps/SciColSim/optirun.swift (rev 0) +++ SwiftApps/SciColSim/optirun.swift 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,41 @@ +type file; + +app (file outfile, file best, file max) optimize ( string args[], file graph ) +{ + optimizersh @best @max args stdout=@outfile ; +} + +int minrange=58; +int maxrange=1009; +//int maxrange=209; +int rangeinc=50; + +int nreps=2; # 15 + +// [alpha_i alpha_m beta gamma delta target_innov +// [n_epochs n_steps n_reruns] [range] +// [verbose_level] +// [T_start T_end Annealing_steps Target_rejection Starting_jump] +// [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta] + +file graph <"movie_graph.txt">; + +foreach target in [minrange:maxrange:rangeinc] { + foreach rep in [1:nreps] { + file outfile ; + // file errfile ; + file bestfile ; + file maxfile ; + + // string longargs[] = @strcat("0 0 4 50 -1 ",target," 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0"); + + string fastargs1[] = ["0", "0", "4", "50", "-1", @strcat(target), "40000", "20", "1000", "2", "1", "2.", "0.01", "100", "0.3", "2.3", "1", "1", "0", "0", "0"]; + string fastargs2[] = [ + "0", "0", "4", "50", "-1", @strcat(target), + "40000", "20", "1000", "2", + "1", + "2.", "0.01", "5", "0.3", "2.3", + "1", "1", "0", "0", "0"]; + (outfile, bestfile, maxfile) = optimize(fastargs2,graph); + } +} Copied: SwiftApps/SciColSim/script-smaller-a.py (from rev 5503, SwiftApps/script-smaller-a.py) =================================================================== --- SwiftApps/SciColSim/script-smaller-a.py (rev 0) +++ SwiftApps/SciColSim/script-smaller-a.py 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,19 @@ +#! /usr/bin/env python +import os + +# FULL for target in range(58,1009,50): +# FAST for target in range(58,209,50): +for target in range(58,209,50): + s = ("%d" % target) + print s + + for i in range(15): +# FAST for i in range(2): + args="./optimizer 0 0 4 50 -1 "+s+" 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) + print("\n\n **** CALLING APP: "+args+"\n\n\n") + os.system(args); +# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") +# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") + + +print "Done!" Copied: SwiftApps/SciColSim/sumloss.sh (from rev 5503, SwiftApps/sumloss.sh) =================================================================== --- SwiftApps/SciColSim/sumloss.sh (rev 0) +++ SwiftApps/SciColSim/sumloss.sh 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,31 @@ +#! /bin/awk -f + +BEGIN { n = ARGC-1 } +{ + loss += $1/n + loss_sq += ($1*$1)/n +} +END { + x = (loss_sq - (loss*loss))/n + sdev = 2.0 * sqrt(x) + printf "loss sdev\n" + printf "%f %f\n", loss, sdev +} + +# the awk script above implements this c++ logic from optimizer.cpp: +# +# for (int i=0; i Res; +# Res.first=Loss; +# Res.second=two_std; Copied: SwiftApps/SciColSim/t1.py (from rev 5503, SwiftApps/t1.py) =================================================================== --- SwiftApps/SciColSim/t1.py (rev 0) +++ SwiftApps/SciColSim/t1.py 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,22 @@ +#! /usr/bin/env python +import os + +# FULL for target in range(58,1009,50): +# FAST for target in range(58,209,50): +for target in range(58,59,50): + s = ("%d" % target) + print s + +# FULL for i in range(15): +# FAST for i in range(2): + for i in range(1): + args="./toptimizer 0 0 4 50 -1 "+s+" 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) + args="OMP_NUM_THREADS=24 ./toptimizer 0 0 4 50 -1 "+s+" 40000 20 100 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) + args="OMP_NUM_THREADS=24 ./toptimizer 0 0 4 50 -1 "+s+" 40000 20 100 2 1 2. 0.01 2 0.3 2.3 1 1 1 0 0 # > out.T"+str(target)+".i"+str(i) + print("\n\n **** CALLING APP: "+args+"\n\n\n") + os.system(args); +# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") +# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") + + +print "Done!" Copied: SwiftApps/SciColSim/t2.cpp (from rev 5503, SwiftApps/t2.cpp) =================================================================== --- SwiftApps/SciColSim/t2.cpp (rev 0) +++ SwiftApps/SciColSim/t2.cpp 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,44 @@ +#include +#include +#include + +template +bool from_string(T& t, + const std::string& s, + std::ios_base& (*f)(std::ios_base&)) +{ + std::istringstream iss(s); + return !(iss >> f >> t).fail(); +} + +int main() +{ + int i; + float f; + + // the third parameter of from_string() should be + // one of std::hex, std::dec or std::oct + if(from_string(i, std::string("ff"), std::hex)) + { + std::cout << i << std::endl; + } + else + { + std::cout << "from_string failed" << std::endl; + } + + if(from_string(f, std::string("123.456"), std::dec)) + { + std::cout << f << std::endl; + } + else + { + std::cout << "from_string failed" << std::endl; + } + return 0; +} + +/* output: +255 +123.456 +*/ Copied: SwiftApps/SciColSim/t2.py (from rev 5503, SwiftApps/t2.py) =================================================================== --- SwiftApps/SciColSim/t2.py (rev 0) +++ SwiftApps/SciColSim/t2.py 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,23 @@ +#! /usr/bin/env python +import os + +# FULL for target in range(58,1009,50): +# FAST for target in range(58,209,50): +for target in range(58,59,50): + s = ("%d" % target) + print s + +# FULL for i in range(15): +# FAST for i in range(2): + for i in range(1): + args="./toptimizer 0 0 4 50 -1 "+s+" 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) + args="OMP_NUM_THREADS=24 ./toptimizer 0 0 4 50 -1 "+s+" 40000 20 100 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) + args="./toptimizer 0 0 4 50 -1 "+s+" 40000 20 75 2 1 2. 0.01 2 0.3 2.3 1 1 1 0 0 m # > out.T"+str(target)+".i"+str(i) + args="OMP_NUM_THREADS=24 ./toptimizer 0 0 4 50 -1 "+s+" 40000 20 96 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0 m 24 # > out.T"+str(target)+".i"+str(i) + print("\n\n **** CALLING APP: "+args+"\n\n\n") + os.system(args); +# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") +# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") + + +print "Done!" Copied: SwiftApps/SciColSim/t3.py (from rev 5503, SwiftApps/t3.py) =================================================================== --- SwiftApps/SciColSim/t3.py (rev 0) +++ SwiftApps/SciColSim/t3.py 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,22 @@ +#! /usr/bin/env python +import os + +# FULL for target in range(58,1009,50): +# FAST for target in range(58,209,50): +for target in range(58,59,50): + s = ("%d" % target) + print s + +# FULL for i in range(15): +# FAST for i in range(2): + for i in range(1): + args="./toptimizer 0 0 4 50 -1 "+s+" 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) + args="OMP_NUM_THREADS=24 ./toptimizer 0 0 4 50 -1 "+s+" 40000 20 100 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) + args="./toptimizer 0 0 4 50 -1 "+s+" 40000 20 75 2 1 2. 0.01 2 0.3 2.3 1 1 1 0 0 a # > out.T"+str(target)+".i"+str(i) + print("\n\n **** CALLING APP: "+args+"\n\n\n") + os.system(args); +# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") +# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") + + +print "Done!" Copied: SwiftApps/SciColSim/tc (from rev 5503, SwiftApps/tc) =================================================================== --- SwiftApps/SciColSim/tc (rev 0) +++ SwiftApps/SciColSim/tc 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,13 @@ +localhost sh /bin/sh null null null +localhost cat /bin/cat null null null +pbs cat /bin/cat null null null +mcs cat /bin/cat null null null +localhost catnap /home/wilde/swift/lab/catnap.sh null null GLOBUS::maxwalltime="00:01:00" +beagle optimizer /home/wilde/AndreysOptimizer/Optimizer null null GLOBUS::maxwalltime="01:00:00" +beagle optimizersh /home/wilde/AndreysOptimizer/optimizer.sh null null GLOBUS::maxwalltime="02:00:00" + +beagle evolve /home/wilde/AndreysOptimizer/evolve.sh null null GLOBUS::maxwalltime="02:00:00" +localhost evolve /home/wilde/AndreysOptimizer/evolve.sh null null GLOBUS::maxwalltime="02:00:00" + +beagle sumloss /home/wilde/AndreysOptimizer/evolve.sh null null GLOBUS::maxwalltime="02:00:00" +localhost sumloss /home/wilde/AndreysOptimizer/sumloss.sh null null GLOBUS::maxwalltime="02:00:00" Copied: SwiftApps/SciColSim/testO.sh (from rev 5503, SwiftApps/testO.sh) =================================================================== --- SwiftApps/SciColSim/testO.sh (rev 0) +++ SwiftApps/SciColSim/testO.sh 2012-01-20 22:57:44 UTC (rev 5504) @@ -0,0 +1,21 @@ +#! /bin/bash + +python <out.o.T"+s); +os.system("./Optimizer "+args+" >out.O.T"+s); + +# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") +# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") + +print "Done!" +END + Deleted: SwiftApps/annealing.swift =================================================================== --- SwiftApps/annealing.swift 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/annealing.swift 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,278 +0,0 @@ -import "math"; - -type file; - -type Res { - float loss; - float sdev; -} - -global boolean FIX_VARIABLES = true; -global int var_fixed[] = [1,1,0,0,0]; -global int Nworkers = 1; - -(float nx) newx(float x, float dx) -{ - float r = (random()) / (pow(2.0,31.0)-1.0); - if (r > 0.5){ - nx = x + (random())*dx/(pow(2.0,31.0)-1.0); - } else { - nx = x - (random())*dx/(pow(2.0,31.0)-1.0); - } -} - -app (file outfile, file loss) evolve (string args[], file graph) -{ - evolve @loss args stdout=@outfile ; // graph is passed implicitly -} - -app (file x) sumloss(file loss[]) -{ - sumloss @filenames(loss) stdout=@x; -} - -/* - -Program structure: - - main - optimizer_sweep() - formerly, python script - multi_annealing() - multi_loss() - evolve() - sumloass() -*/ - -(file bestfile, file maxfile) multi_annealing ( - float T_start, - float T_end, - float Target_rejection, - int evolve_reruns, - float starting_jump, - float params0[], - float target_innov, - int annealing_cycles) -{ - int cycle=10; # const - int NEVOPARAMS=5; # const - 5 params, alpha 1,m through delta, does not include target_innovation - - float rejection[][]; // [i][j] where i is cycle and j is evolve-parameter (alpha_i, alpha_m, beta, gamma, delta) - - float x[][], dx[][], curr_loss[], curr_sdev[]; - - Res mlres[][]; - mlres[0][0] = multi_loss( params0, target_innov, evolve_reruns ); // Only done once, not 5x; serves for all evolve-params ??? - - foreach j in [0:NEVOPARAMS-1] { - x[0][j]=params0[j]; - dx[0][j] = starting_jump; - rejection[0][j] = 0.0; - curr_loss[j] = mlres[0][0].loss; - curr_sdev[j] = mlres[0][0].sdev; - } - - foreach i in [1:annealing_cycles] { - // set new temperature, rejection threshold, and dx values for this cycle - float temperature = T_start*exp( @tofloat(i)*(jlog(T_end)-jlog(T_start))/@tofloat(annealing_cycles)); - tracef("....T =%f\n", temperature); - // On each new "major" cycle within the annealing_cycles (other than the first) set new rejection and dx values - if ( i %% cycle == 1 && i > 1 ){ - foreach k in [0:NEVOPARAMS-1] { - float newrejection = rejection[i-1][k] / @tofloat(cycle); - if (newrejection > 0.0){ - dx[i][k] = dx[i-1][k] / (newrejection / Target_rejection); - rejection[i][k]=0.0; - } - else{ - dx[i][k] = dx[i-1][k] * 2.0; - rejection[i][k]=rejection[i-1][k]; - } - trace ("Recomputed rejection: i=%d k=%d dx[i][k]=%f\n", i, k, dx[i][k]); - } - } - foreach j in [0:NEVOPARAMS-1] { // Try a new value for each non-fixed param; then write results and accept or reject - float try_x[]; - int curr = (i * NEVOPARAMS) + j; - int prev = curr-1; - if ( FIX_VARIABLES || var_fixed[j]==0) { - foreach k in [0:NEVOPARAMS] { // Select the evolve params to try - if ( k < j ) { - try_x[k] = x[i][k]; // already set x[i][k] - } - else { - if ( k == j ) { - try_x[k] = newx(x[i][j],dx[i][j]); // permute x[i][j] - } - else { - try_x[k] = x[i-1][k]; // use x[i-1][k] (from prior cycle) - } - } - } - - mlres[i][j] = multi_loss(try_x, target_innov, evolve_reruns); - - float ratio = min(1.0, exp( -(mlres[i][j].loss-curr_loss[prev]) /temperature)); - float r = (random()) / (pow(2.0,31.0)-1.0); // why all the 2^31's ??? - - float ALOT=100000000000.0; // 100,000,000,000. = 10^11 - if (mlres[i][j].loss < ALOT) { // does this ever occur? if so did we want to still do the ratio computation above??? - trace("filestr.open (best_opt_some.txt, ofstream::app);"); - # un[0]->get_target() Res.loss un[0]->get_parameter[0:4] Res.error - # filestr.open ("max_dist.txt", ofstream::app); - } - else { tracef("Loss %f > ALOT at [i][j] = [%d][%d]\n", mlres[i][j].loss, i ,j); } - if (r > ratio) { // Reject - x[i][j] = x[i-1][j]; - rejection[i][j] = rejection[i][j] + 1.0; // Is this correct? incr rejection? - curr_loss[curr] = curr_loss[prev]; - curr_sdev[curr] = curr_sdev[prev]; - } - else { // Accept -trace("Accepting try_x[j],j=",j); - x[i][j] = try_x[j]; # FIXME: is this right? Just assign the j'th try_x, or the whole try_x param set? -trace("Accepting try_x[j],x[i][j]=",x[i][j]); - curr_loss[curr] = mlres[i][j].loss; - curr_sdev[curr] = mlres[i][j].sdev; - } - } - else { - x[i][j] = x[i-1][j]; - curr_loss[curr] = curr_loss[prev]; - curr_sdev[curr] = curr_sdev[prev]; - } - } - } -} - -(Res r) multi_loss( float x[], float target_innov, int evolve_reruns ) -{ - file rfile[]; - foreach i in [1:evolve_reruns] { // repeats of the evolove() - same as n_reruns - file outfile; // FIXME: map and save in future - string args[] = [ // FIXME: move this to a setargs() function - // alpha_i alpha_m beta gamma delta target_innov - @strcat(x[0]), @strcat(x[1]), @strcat(x[2]), @strcat(x[3]), @strcat(x[4]), @strcat(target_innov), - - // n_epochs n_steps evolve_reruns range - // "40000", "20", @strcat(evolve_reruns), "2", - "40000", "20", "1", " 2", # Set reruns to 1 for the cpp code; we do the re-runs in Swift for now. - - // verbose_level - "1", - - // T_start T_end Annealing_steps Target_rejection Starting_jump - "2.", "0.01", "2", "0.3", "2.3", - - // FREEZE: alpha_i alpha_m beta gamma delta - "1", "1", "0", "0", "0", - - // operation-code:(m,a) Nworkers - "m", @strcat(Nworkers) ]; - - file graph <"movie_graph.txt">; - (outfile, rfile[i]) = evolve(args,graph); - } - file sumfile = sumloss(rfile); - r = readData(sumfile); - -} - -optimizer_sweep() // Implements logic of python driver script -{ - int minrange=58; - int maxrange=59; - //int maxrange=1009; - //int maxrange=209; - int rangeinc=50; - - // fixme: add provision for random priming and random param values when x[i] == -100 (see optimizer.cpp main()) - - int nreps=1; # 15 - -// file bestfile ; -// file maxfile ; - - foreach target_innov in [minrange:maxrange:rangeinc] { - foreach rep in [1:nreps] { - file outfile; // ; - file lossfile; // ; -/* - (outfile,lossfile) = multi_annealing( - T_start = 2.0, - T_end = 0.01, - Target_rejection = 0.3, - evolve_reruns = 2, - starting_jump = 2.3, - params0[] = [0.0, 0.0, 4.0, 50.0, -1.0], - @tofloat(@strcat(target_innov)), // fixme: would @tofloat(int) work? - annealing_cycles = 1); // fixme: clarify: annealing repeats, steps, and cycles -*/ - (outfile,lossfile) = multi_annealing( - 2.0, - 0.01, - 0.3, - 2, - 2.3, - [0.0, 0.0, 4.0, 50.0, -1.0], - @tofloat(@strcat(target_innov)), // fixme: would @tofloat(int) work? - 1); // fixme: clarify: annealing repeats, steps, and cycles - } - } -} - -main() -{ - optimizer_sweep(); -} - -main(); - -/* - -Program structure: - - main - optimizer_sweep() - multi_annealing() - multi_loss() - evolve() - sumloass() - -Example parameter sets: - -for target in range(58,59,50): - for i in range(1): - args="./toptimizer 0 0 4 50 -1 "+target+" 40000 20 75 2 1 2. 0.01 2 0.3 2.3 1 1 1 0 0 m # > out.T"+str(target)+".i"+str(i) - os.system(args); - - string fastargs1[] = [ - "0", "0", "4", "50", "-1", @strcat(target), - "40000", "20", "1000", "2", - "1", - "2.", "0.01", "100", "0.3", "2.3", - "1", "1", "0", "0", "0"]; - string fastargs2[] = [ - "0", "0", "4", "50", "-1", @strcat(target), - "40000", "20", "1000", "2", - "1", - "2.", "0.01", "5", "0.3", "2.3", - "1", "1", "0", "0", "0", "m"]; - string fastargs3[] = [ - "0", "0", "4", "50", "-1", @strcat(target), - "40000", "20", @strcat(repeats), "2", - "1", - "2.", "0.01", "2", "0.3", "2.3", - "1", "1", "0", "0", "0", "m"]; -*/ - -(string args[]) setargs() -{ - // string longargs[] = @strcat("0 0 4 50 -1 ",target," 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 m"); - - // [alpha_i alpha_m beta gamma delta target_innov - // [n_epochs n_steps n_reruns] [range] - // [verbose_level] - // [T_start T_end Annealing_steps Target_rejection Starting_jump] - // [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta] [operation-code:(m,a) Nworkers] -} - Deleted: SwiftApps/basiclocal.xml =================================================================== --- SwiftApps/basiclocal.xml 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/basiclocal.xml 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,10 +0,0 @@ - - - - - - /home/wilde/swift/lab/swiftwork - 0 - - - Deleted: SwiftApps/beagle.xml =================================================================== --- SwiftApps/beagle.xml 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/beagle.xml 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,60 +0,0 @@ - - - - - - - - pbs.aprun;pbs.mpp;depth=24 - 1 - - 24 - 02:00:00 - 14400 - 20 - 1 - 1 - 100 - 100 - .15 - 10000 - - CI-MCB000119 - route - - - /lustre/beagle/wilde/swiftwork - - - - - Deleted: SwiftApps/cf =================================================================== --- SwiftApps/cf 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/cf 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,7 +0,0 @@ -wrapperlog.always.transfer=true -sitedir.keep=true -execution.retries=3 -lazy.errors=true -status.mode=provider -use.provider.staging=false -provider.staging.pin.swiftfiles=false Deleted: SwiftApps/evolve.sh =================================================================== --- SwiftApps/evolve.sh 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/evolve.sh 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,6 +0,0 @@ -#1 /bin/sh -datafile=$1 -touch multi_loss.data -shift 1 -$(dirname $0)/toptimizer $* 2>&1 -mv multi_loss.data $datafile Deleted: SwiftApps/local.xml =================================================================== --- SwiftApps/local.xml 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/local.xml 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,9 +0,0 @@ - - - - 0.23 - 10000 - - /tmp/wilde/swiftwork - - Deleted: SwiftApps/math.swift =================================================================== --- SwiftApps/math.swift 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/math.swift 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,53 +0,0 @@ - -(float result) sin(float x) -{ - result = @java("java.lang.Math", "sin", x); -} - -(float result) exp(float x) -{ - result = @java("java.lang.Math", "exp", x); -} - -(float result) jlog(float x) -{ - result = @java("java.lang.Math", "log", x); -} - -(float result) log10(float x) -{ - result = @java("java.lang.Math", "log10", x); -} - -(float result) ceil(float x) -{ - result = @java("java.lang.Math", "ceil", x); -} - -(float result) floor (float x) -{ - result = @java("java.lang.Math", "floor", x); -} - -(float result) min (float a, float b) -{ - //result = @java("java.lang.Math", "min", a, b); - if ( a < b ) { - result = a; - } - else { - result = b; - } - tracef("min: result=%f\n",result); -} - -(float result) pow (float x, float y) -{ - result = @java("java.lang.Math", "pow", x, y); -} - -(float result) random () -{ - result = @java("java.lang.Math","random"); -} - Deleted: SwiftApps/mathtest.swift =================================================================== --- SwiftApps/mathtest.swift 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/mathtest.swift 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,18 +0,0 @@ -import "math"; - -float a = 0.5; -tracef("random(): %f\n", random()); -tracef("sin(%f): %f\n", a, sin(a)); -tracef("jlog(%f): %f\n", a, jlog(a)); -tracef("log10(%f): %f\n", a, log10(a)); -tracef("exp(%f): %f\n", a, exp(a)); -tracef("ceil(%f): %f\n", 1.23, ceil(1.23)); -tracef("floor(%f): %f\n", 1.23, floor(1.23)); -tracef("pow(%f,%f): %f\n", 2.0, 4.0, pow(2.0,4.0)); -tracef("min(%f,%f): %f\n", 2.0, 4.0, min(2.0,4.0)); -tracef("min(%f,%f): %f\n", 2.0, 1.5, min(2.0,1.5)); - - - - - Deleted: SwiftApps/movie_graph.txt =================================================================== --- SwiftApps/movie_graph.txt 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/movie_graph.txt 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,1010 +0,0 @@ -500 1008 -0 56 -0 436 -0 446 -1 256 -1 476 -1 260 -1 262 -1 9 -1 266 -1 13 -1 142 -1 273 -1 388 -1 30 -1 36 -1 37 -1 423 -1 168 -1 425 -1 255 -1 175 -1 307 -1 58 -1 316 -1 319 -1 323 -1 68 -1 455 -1 216 -1 82 -1 88 -1 346 -1 348 -1 225 -1 228 -1 236 -1 365 -1 111 -1 424 -1 370 -1 246 -1 376 -1 122 -1 191 -1 252 -1 382 -1 127 -2 3 -3 262 -3 263 -3 392 -3 172 -3 138 -3 395 -3 13 -3 18 -3 150 -3 408 -3 154 -3 156 -3 30 -3 291 -3 37 -3 168 -3 300 -3 52 -3 158 -3 310 -3 265 -3 187 -3 61 -3 319 -3 65 -3 322 -3 54 -3 130 -3 71 -3 332 -3 461 -3 397 -3 419 -3 473 -3 346 -3 95 -3 352 -3 98 -3 103 -3 107 -3 414 -3 368 -3 498 -3 499 -4 224 -4 449 -4 419 -4 356 -4 72 -4 330 -4 173 -4 80 -4 242 -4 180 -4 24 -4 138 -5 33 -5 459 -5 484 -5 106 -5 299 -5 430 -5 16 -5 336 -5 50 -5 147 -5 406 -5 87 -5 91 -5 190 -6 7 -6 264 -6 137 -6 276 -6 149 -6 279 -6 153 -6 29 -6 415 -6 293 -6 166 -6 296 -6 42 -6 44 -6 48 -6 49 -6 438 -6 55 -6 314 -6 69 -6 454 -6 463 -6 84 -6 85 -6 470 -6 349 -6 94 -6 229 -6 233 -6 364 -6 117 -6 248 -6 380 -6 426 -7 129 -7 131 -7 470 -7 136 -7 471 -7 271 -7 402 -7 19 -7 404 -7 282 -7 286 -7 491 -7 35 -7 421 -7 166 -7 295 -7 427 -7 428 -7 301 -7 349 -7 436 -7 439 -7 56 -7 445 -7 446 -7 320 -7 123 -7 451 -7 69 -7 454 -7 78 -7 463 -7 212 -7 213 -7 342 -7 343 -7 474 -7 93 -7 483 -7 357 -7 102 -7 235 -7 237 -7 239 -7 371 -7 379 -8 112 -8 164 -8 10 -8 12 -8 398 -8 176 -8 120 -8 178 -8 373 -8 24 -8 124 -9 262 -10 11 -10 12 -10 47 -10 335 -10 124 -11 96 -11 289 -11 66 -11 283 -11 97 -11 361 -11 47 -11 432 -11 335 -11 215 -11 27 -11 124 -11 189 -12 112 -12 434 -12 47 -13 32 -13 130 -13 260 -13 37 -13 39 -13 202 -13 305 -13 461 -13 145 -13 275 -13 448 -13 54 -13 183 -13 344 -13 36 -14 387 -14 267 -14 155 -14 36 -14 165 -14 51 -14 308 -14 440 -14 441 -14 59 -14 444 -14 199 -14 328 -14 462 -14 81 -14 210 -14 214 -14 91 -14 99 -14 60 -14 106 -14 109 -14 110 -14 244 -15 193 -15 73 -15 400 -15 341 -15 27 -15 31 -16 33 -16 258 -16 353 -16 329 -16 204 -16 207 -16 336 -16 108 -16 50 -16 22 -16 119 -16 169 -16 381 -16 223 -17 321 -17 482 -17 197 -17 276 -17 149 -17 315 -17 94 -18 32 -18 461 -18 305 -18 498 -18 86 -18 25 -19 320 -19 421 -19 334 -19 314 -19 349 -19 446 -20 48 -20 28 -20 83 -20 44 -20 45 -21 288 -21 176 -21 347 -21 325 -21 392 -21 490 -21 366 -21 272 -21 209 -21 115 -21 182 -21 247 -21 184 -21 25 -21 217 -21 27 -21 86 -21 478 -22 353 -23 257 -23 100 -23 25 -24 134 -24 146 -24 302 -24 151 -24 290 -24 291 -24 43 -24 173 -24 46 -24 176 -24 180 -24 245 -24 453 -24 457 -24 208 -24 338 -24 363 -24 116 -24 373 -24 126 -25 32 -25 128 -25 257 -25 86 -26 161 -26 357 -26 193 -26 78 -26 341 -26 69 -27 361 -27 490 -27 333 -27 272 -27 312 -27 468 -27 41 -27 184 -27 429 -27 124 -27 341 -28 64 -28 354 -28 67 -28 135 -28 200 -28 42 -28 75 -28 45 -28 206 -28 48 -28 359 -28 53 -28 238 -29 229 -29 199 -29 296 -29 233 -29 42 -29 274 -29 117 -29 152 -29 155 -29 62 -30 386 -30 225 -30 76 -30 322 -30 367 -30 318 -31 200 -31 73 -31 333 -31 494 -31 45 -31 312 -32 257 -32 305 -32 101 -32 486 -32 39 -32 231 -32 79 -32 145 -32 275 -33 459 -33 336 -33 372 -33 119 -33 409 -34 283 -35 491 -35 243 -35 237 -35 326 -36 260 -36 266 -36 285 -36 292 -36 39 -36 424 -36 171 -36 181 -36 183 -36 440 -36 58 -36 323 -36 328 -36 81 -36 82 -36 87 -36 99 -36 228 -36 101 -36 111 -37 168 -37 202 -38 92 -39 448 -39 101 -39 486 -39 231 -39 145 -39 344 -40 345 -40 355 -40 179 -40 59 -40 125 -41 160 -41 226 -41 230 -41 104 -41 361 -41 492 -41 341 -41 215 -41 121 -41 189 -42 64 -42 67 -42 199 -42 359 -42 109 -42 206 -42 143 -42 48 -42 274 -42 117 -44 193 -44 69 -44 161 -44 73 -44 48 -44 83 -44 279 -45 200 -45 73 -45 83 -46 242 -46 485 -46 126 -46 173 -48 64 -48 206 -50 259 -50 261 -50 329 -50 299 -50 204 -50 430 -50 207 -50 405 -50 59 -50 159 -51 67 -51 101 -51 135 -51 210 -51 244 -51 214 -51 441 -51 249 -52 368 -52 217 -52 347 -52 86 -53 101 -53 327 -53 75 -53 238 -53 79 -53 249 -54 130 -55 84 -57 162 -57 331 -58 266 -58 82 -59 384 -59 259 -59 132 -59 267 -59 496 -59 355 -59 152 -59 91 -59 221 -59 159 -60 91 -60 165 -62 152 -62 155 -62 221 -63 456 -63 334 -63 303 -63 472 -63 314 -63 380 -65 154 -65 499 -65 374 -65 103 -66 96 -66 160 -66 215 -67 359 -67 135 -67 109 -67 143 -67 214 -69 161 -69 166 -69 239 -69 404 -69 85 -69 279 -69 153 -70 410 -70 467 -71 130 -72 138 -73 193 -74 241 -74 82 -74 188 -74 133 -74 469 -75 140 -75 79 -75 90 -75 350 -76 386 -77 120 -77 306 -77 452 -77 254 -77 311 -78 239 -78 357 -79 257 -79 100 -79 101 -80 138 -81 99 -81 171 -82 256 -82 133 -82 348 -82 205 -82 372 -82 181 -82 119 -82 409 -82 255 -82 316 -82 122 -82 469 -84 277 -84 264 -84 149 -84 380 -84 415 -85 153 -85 166 -86 247 -86 217 -87 181 -87 147 -87 285 -89 192 -89 200 -89 333 -89 468 -89 443 -89 222 -90 272 -90 100 -90 350 -91 165 -91 106 -91 430 -91 406 -91 159 -92 258 -93 136 -93 464 -93 493 -93 326 -94 482 -94 233 -94 114 -94 276 -95 107 -95 265 -95 186 -95 332 -96 289 -96 324 -96 102 -96 401 -97 283 -97 220 -97 434 -97 164 -99 101 -99 171 -99 244 -99 251 -100 272 -101 231 -101 466 -101 244 -101 249 -101 251 -102 141 -102 237 -102 369 -102 243 -102 212 -102 121 -102 340 -102 411 -104 121 -104 230 -105 396 -105 309 -106 147 -106 308 -106 406 -106 444 -106 190 -109 199 -109 143 -109 387 -109 214 -110 267 -112 164 -113 195 -114 233 -114 482 -114 315 -114 412 -116 465 -117 296 -118 163 -119 188 -119 409 -120 297 -120 363 -120 398 -120 254 -121 160 -121 230 -121 492 -121 369 -121 212 -122 256 -122 316 -124 176 -125 394 -125 497 -125 179 -125 351 -125 479 -126 465 -126 290 -126 339 -129 491 -130 397 -131 464 -131 136 -132 383 -133 273 -133 232 -133 205 -133 241 -133 316 -134 203 -135 249 -135 354 -136 464 -136 474 -137 276 -138 419 -138 414 -138 158 -139 169 -140 200 -140 222 -140 350 -144 334 -146 363 -147 308 -147 285 -148 175 -149 456 -149 407 -151 422 -152 488 -152 233 -152 221 -152 351 -154 187 -154 358 -154 158 -155 199 -155 267 -155 221 -155 437 -156 332 -156 318 -156 310 -157 436 -157 301 -158 396 -158 187 -158 414 -159 430 -160 215 -161 193 -163 220 -164 297 -164 398 -164 220 -166 427 -167 201 -167 442 -167 170 -167 383 -168 319 -169 280 -169 270 -169 198 -170 353 -170 403 -170 269 -170 207 -170 211 -173 242 -174 194 -174 195 -174 362 -174 177 -174 250 -174 219 -174 412 -175 460 -175 246 -175 447 -176 291 -176 294 -176 366 -176 178 -176 182 -177 219 -179 345 -179 394 -181 372 -182 184 -182 429 -182 294 -184 429 -185 358 -188 280 -188 469 -189 215 -192 272 -192 443 -192 468 -192 287 -193 400 -195 488 -195 233 -196 389 -196 317 -197 321 -198 280 -199 387 -200 333 -200 222 -201 284 -203 311 -207 353 -207 329 -207 269 -207 240 -212 230 -212 341 -212 439 -213 349 -214 462 -215 226 -216 388 -216 236 -217 347 -218 465 -219 450 -219 394 -219 250 -219 298 -219 479 -220 297 -220 283 -221 267 -221 437 -222 443 -222 350 -225 236 -227 472 -227 321 -227 315 -227 412 -227 390 -228 424 -228 260 -230 341 -232 280 -232 241 -233 480 -233 412 -234 243 -234 340 -238 249 -238 354 -240 353 -241 280 -242 356 -243 385 -243 326 -244 251 -246 382 -249 354 -249 327 -249 466 -250 488 -250 479 -250 351 -252 376 -253 384 -253 269 -254 363 -254 302 -254 311 -258 353 -258 317 -258 477 -259 384 -259 405 -259 269 -260 424 -262 352 -262 346 -263 392 -263 300 -263 325 -264 438 -267 437 -268 413 -269 384 -269 383 -270 381 -270 431 -272 443 -272 350 -272 287 -273 316 -276 377 -278 390 -280 417 -281 376 -282 391 -283 289 -283 432 -285 308 -285 292 -288 325 -288 478 -289 401 -289 413 -291 325 -291 478 -292 328 -292 308 -297 398 -297 495 -302 453 -302 311 -304 493 -307 388 -308 328 -309 396 -311 453 -312 333 -312 494 -313 375 -314 487 -314 364 -314 380 -315 482 -315 412 -319 346 -321 456 -326 491 -326 435 -327 466 -328 440 -331 472 -332 408 -332 489 -333 468 -334 446 -337 380 -338 465 -341 400 -343 436 -345 394 -345 399 -347 392 -347 368 -349 364 -349 470 -351 496 -351 479 -353 393 -358 360 -358 396 -365 375 -366 478 -368 392 -372 409 -374 467 -378 411 -379 436 -380 456 -380 415 -382 433 -383 384 -394 481 -394 479 -396 449 -416 420 -416 422 -417 447 -418 446 -450 481 -456 475 -458 471 -463 470 -472 475 -496 497 - Deleted: SwiftApps/optimizer.cpp =================================================================== --- SwiftApps/optimizer.cpp 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/optimizer.cpp 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,1814 +0,0 @@ -// -// main.cpp -// optimizer -// -// Created by Andrey Rzhetsky on 4/11/11. -// Copyright 2011 University of Chicago. All rights reserved. -// - -#define MAXNworkers 24 -int Nworkers=MAXNworkers; -char operation = 'n'; // n: normal; m: multi_loss; a: analyze and generate next annealing parameter set. - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -// #include -#include - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error -#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define INT_INFINITY 2147483647 -#define NEVOPARAMS 5 - -#define FIX_VARIABLES 1 - -using namespace boost; -using namespace std; -using namespace boost::numeric::ublas; - -static int max_dist=0; - -typedef boost::adjacency_matrix Graph; -typedef std::pair Edge; -typedef boost::graph_traits GraphTraits; -typedef boost::numeric::ublas::triangular_matrix prob; -typedef boost::numeric::ublas::triangular_matrix pathlength; -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; - -namespace std { - using ::time; -} - -static int var_fixed[NEVOPARAMS] = {1, 0, 1, 1, 0}; - -typedef boost::minstd_rand base_generator_type; -typedef adjacency_list < listS, vecS, directedS, -no_property, property < edge_weight_t, int > > graph_t; -typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; -typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; - - -//================================================ -string strDouble(double number) -{ - stringstream ss;//create a stringstream - ss << number;//add number to the stream - return ss.str();//return a string with the contents of the stream -} - -//================================================ - -double gaussian(double sigma) -{ - double GaussNum = 0.0; - int NumInSum = 10; - for(int i = 0; i < NumInSum; i++) - { - GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); - } - GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); - - - return GaussNum; - -} - - - -//================================================= -double diffclock(clock_t clock1,clock_t clock2) -{ - double diffticks=clock1-clock2; - double diffms=(diffticks)/CLOCKS_PER_SEC; - return diffms; -} - -//================================================ -//================================================================ -double get_new_x(double x, double dx){ - - double new_x; - // boost::variate_generator > uni(generator, uni_dist); - double r = rand()/(double)(pow(2.,31)-1.); - - if (r > 0.5){ - new_x = x + rand()*dx/(double)(pow(2.,31)-1.); - } else { - new_x = x - rand()*dx/(double)(pow(2.,31)-1.); - } - - return new_x; - -} - - -//=============================================== -string string_wrap(string ins, int mode){ - - std::ostringstream s; - - switch(mode){ - case 0: - s << "\033[1;29m" << ins << "\033[0m"; - break; - case 1: - s << "\033[1;34m" << ins << "\033[0m"; - break; - case 2: - s << "\033[1;44m" << ins << "\033[0m"; - break; - case 3: - s << "\033[1;35m" << ins << "\033[0m"; - break; - case 4: - s << "\033[1;33;44m" << ins << "\033[0m"; - break; - case 5: - s << "\033[1;47;34m" << ins << "\033[0m"; - break; - case 6: - s << "\033[1;1;31m" << ins << "\033[0m"; - break; - case 7: - s << "\033[1;1;33m" << ins << "\033[0m"; - break; - case 8: - s << "\033[1;1;43;34m" << ins << "\033[0m"; - break; - case 9: - s << "\033[1;1;37m" << ins << "\033[0m"; - break; - case 10: - s << "\033[1;30;47m" << ins << "\033[0m"; - break; - default: - s << ins; - } - - return s.str(); -} - - -//=============================================== -string wrap_double(double val, int mode){ - - std::ostringstream s; - s << string_wrap(strDouble(val),mode); - - return s.str(); -} - - - -//=============================================== -const -string i2string(int i){ - - std::ostringstream s; - s << "worker" - << lexical_cast(i); - - return s.str(); - -} - -//=============================================== -char* i2char(int i){ - - std::ostringstream s; - s << "worker" - << lexical_cast(i); - - char* a=new char[s.str().size()+1]; - memcpy(a,s.str().c_str(), s.str().size()); - - return a; -} - - -template -bool from_string(T& t, - const std::string& s, - std::ios_base& (*f)(std::ios_base&)) -{ - std::istringstream iss(s); - return !(iss >> f >> t).fail(); -} - -//================================================ -class Universe { - -private: - - double alpha_i; - double alpha_m; - double beta; - double gamma; - double delta; - - double TargetNovelty; - double CumulativeRelativeLoss; - double CRLsquare; - string id; - - - int N_nodes; - int M_edges; - - int N_epochs; - int N_steps; - int N_repeats; - - int current_epoch; - double current_loss; - int current_repeat; - double current_novelty; - - int mode_identify_failed; - int verbose_level; // 0 is silent, higher is more - - double k_max; - - graph_t Full_g; - - double **Prob; - double **Tried; - double **Dist; - double **Final; - double **EdgeIndex; - double *Rank; - - base_generator_type generator; - boost::uniform_real<> uni_dist; - boost::geometric_distribution geo; - -public: - - - - //====== Constructor ====== - Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) - { - //typedef array_type2::index index2; - - - std::ifstream inFile; - //string line; - - //------------------------------- - - base_generator_type gene(42u); - generator = gene; - generator.seed(static_cast(std::time(0))); - boost::uniform_real<> uni_d(0,1); - uni_dist = uni_d; - - //-------------------------------- - - int i, k; - int x, y; - Edge* edge_array_mine; - int num_arcs_mine, num_nodes_mine; - int* weights_mine; - - TargetNovelty = target; - CumulativeRelativeLoss = 0.; - CRLsquare = 0.; - - - N_epochs = Epochs; - N_steps = Steps; - N_repeats = Repeats; - - current_epoch = 0; - current_loss = 0.; - current_repeat = 0; - - id = idd; - - verbose_level = 1; - - mode_identify_failed = identify_failed; - - - //------------------------------- - // The first pass though file with the graph - inFile.open(FileToOpen.c_str()); - if (inFile.fail()) { - cout << "Unable to open file"; - exit(1); // terminate with error - }else { - - if (verbose_level > 2){ - std::cout << " Opened <" << FileToOpen << ">"<> x; - inFile >> y; - - if (verbose_level > 2){ - std::cout << " x: " << x; - std::cout << " y: " << y << std::endl; - } - - if (i==0){ - N_nodes=x; - M_edges=y; - break; - } - i++; - - - } - inFile.close(); - - if (verbose_level == 2){ - std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ - std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { - if (i > 0) { - Final[x][y]=1.; - Final[y][x]=1.; - - - if (verbose_level == 2){ - std::cout << "."; - } - } - i++; - - } - if (verbose_level == 2){ - std::cout << std::endl; - } - inFile.close(); - - k=0; - for (int i=0; i 0.){ - EdgeIndex[i][j]=k; - k++; - } - } - } - - - - //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - // create graph -- hopefully, we can keep it, just modifying edge weights - - - edge_array_mine = new Edge[2*M_edges]; - num_arcs_mine = 2*M_edges; - num_nodes_mine = N_nodes; - weights_mine = new int[2*M_edges]; - for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} - - k=0; - for(int i=0; i0.){ - edge_array_mine[2*k] =Edge(i,j); - edge_array_mine[2*k+1]=Edge(j,i); - k++; - } - } - } - graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); - - Full_g = g; - delete edge_array_mine; - delete weights_mine; - - //=========================================================================== - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - for (int i=0; i 0.){ - u = vertex(i, Full_g); - v = vertex(j, Full_g); - remove_edge(u,v,Full_g); - remove_edge(v,u,Full_g); - - } - } - } - - - } - - - //===================================================================== - int sample_failed_number(double pfail){ - - //boost::geometric_distribution geo(pfail); - //boost::variate_generator > geom(generator, geo); - - double r, u, g; - - r=0.; - for(int i=0; i=3){ - std::cout << id << " failed " << r << std::endl; - } - return r; - - } - - //============================================= - double get_target(void){ - return TargetNovelty; - } - - //============================================= - void set_target(double target){ - TargetNovelty=target; - } - - //============================================= - int sample(){ - - //boost::variate_generator > uni(generator, uni_dist); - // double r = uni(), Summa = 0.; - - - - double r = rand(), Summa = 0.; - r /= (double)(pow(2.,31)-1.); - int result = 0; - int finished = 0; - - if (verbose_level==4){ - std::cout << id << " sampled " << r << std::endl; - } - - for(int i=0; i r){ - - Tried[i][j]+=1.; - - if (Final[i][j] > 0.){ - result = 1; - } - finished = 1; - } - } - } - - return result; - - } - - //=============================== - void update_current_graph(void){ - - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - //property_map::type weightmap = get(edge_weight, Full_g); - for (int i=0; i 0. && Tried[i][j]>0){ - //s = edge(i, j, Full_g); - boost::graph_traits::edge_descriptor e1,e2; - bool found1, found2; - u = vertex(i, Full_g); - v = vertex(j, Full_g); - tie(e1, found1) = edge(u, v, Full_g); - tie(e2, found2) = edge(v, u, Full_g); - if (!found1 && !found2){ - add_edge(u,v,1,Full_g); - add_edge(v,u,1,Full_g); - } - - } - } - - } - } - - //=============================== - void update_distances(void){ - // put shortest paths to the *Dist[][] - std::vector p(num_vertices(Full_g)); - std::vector d(num_vertices(Full_g)); - vertex_descriptor s; - - - // put shortest paths to the *Dist[][] - for (int j=0; j 0.){ - s = vertex(j, Full_g); - dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); - - //std::cout <<" Vertex "<< j << std::endl; - graph_traits < graph_t >::vertex_iterator vi, vend; - - for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { - - if (p[*vi]!=*vi){ - Dist[*vi][j]=d[*vi]; - Dist[j][*vi]=d[*vi]; - - if (Dist[*vi][j]>max_dist){ - max_dist=Dist[*vi][j]; - } - - - } else { - Dist[*vi][j]=-1.; - Dist[j][*vi]=-1.; - } - } - } - - } - - - } - - //====================================================== - void update_ranks(void){ - - for(int i=0; i0. && Final[i][j] >0.){ - Rank[i]++; - Rank[j]++; - } - } - } - - } - - //==================================================================== - void set_world(double a_i, double a_m, double b, double g, double d){ - - alpha_i=a_i; - alpha_m=a_m; - gamma=g; - beta=b; - delta=d; - - } - - //==================================================================== - void reset_world(){ - - //==================================================== - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - - for (int i=0; i 0. && Tried[i][j] > 0){ - u = vertex(i, Full_g); - v = vertex(j, Full_g); - remove_edge(u,v,Full_g); - remove_edge(v,u,Full_g); - - } - } - } - - //================================================== - - current_loss=0; - current_epoch=0; - current_repeat++; - current_novelty=0; - - for(int i = 0; i < N_nodes; ++i) { - Rank[i]=0.; - for(int j = 0; j < N_nodes; ++j) { - Prob[i][j]=0.; - Dist[i][j]=-1.; - Tried[i][j]=0.; - } - } - } - - - //============================================== - void show_parameters(void){ - - std::cout << "Parameters: " - << alpha_i << " " - << alpha_m << " | " - << beta << " " - << gamma << " | " - << delta << std::endl; - - } - - - - //=============================================== - string file_name(){ - - std::ostringstream s; - s << "world_" - << lexical_cast(alpha_i) << "_" - << lexical_cast(alpha_m) << "_" - << lexical_cast(beta) << "_" - << lexical_cast(gamma) << "_" - << lexical_cast(delta) << "_" - << lexical_cast(N_epochs) << "_" - << lexical_cast(N_steps) << "_" - << lexical_cast(N_repeats) << ".txt"; - - return s.str(); - - } - - - - - //================================================= - void set_verbose(int verbose){ - - verbose_level = verbose; - } - - - //============================================================= - void update_probabilities(void){ - - - //========================= - // Compute sampling probabilities - // first pass: \xi_i,j - for(int i=0; i 0.){ - - double k = Dist[i][j]; - if (k >= k_max){ - k = k_max-1; - } - - bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); - - } else { - bg = delta; - } - - Prob[i][j] = exp(Prob[i][j] + bg); - } - } - - - // second pass: sum - double Summa = 0.; - - for(int i=0; i0. && Final[i][j]>0.){ - novel+=1.; - } - } - } - - } - //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - else { - - double pfail=0.; - int n_failed; - //, n_check = 0; - - for(int i=0; i0. && Final[i][j]>0.){ - novel+=1.; - } - } - } - } - - current_novelty = novel; - - - //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - if (verbose_level == 2){ - std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) - - << " cost=" << cost - << " novel=" << novel - << " rel_loss=" << cost/novel - << std::endl; - } - - current_epoch++; - } - - - //====== Destructor ====== - ~Universe(){ - - delete_2Dmatrix(Final, N_nodes); - delete_2Dmatrix(Dist, N_nodes); - delete_2Dmatrix(Tried, N_nodes); - delete_2Dmatrix(Prob, N_nodes); - delete_2Dmatrix(EdgeIndex, N_nodes); - delete_1Dmatrix(Rank); - } - - //================================================ - // Allocate memory - double** allocate_2Dmatrix(int N, int M) - { - double **pointer; - - if (verbose_level == 2){ - std::cout<< "["< 0){ - - pointer = new double[N]; - - }else { - - pointer = NULL; - } - - return pointer; - - } - - //============================================== - // De-Allocate memory to prevent memory leak - void delete_2Dmatrix(double **pointer, int N){ - - if (pointer != NULL){ - - for (int i = 0; i < N; ++i){ - delete [] pointer[i]; - } - delete [] pointer; - } - } - //==================== - void delete_1Dmatrix(double *pointer){ - - delete [] pointer; - } - - //=========================================== - double get_rel_loss(){ - - return CumulativeRelativeLoss ; - } - - //=========================================== - double get_rel_loss_err(){ - - return CRLsquare ; - } - - - - //================================================================================== - void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ - - double ALOT=100000000000.; - - // std::cout<<" evolve_to_target_and_save: istart=" << istart << "iend=" << iend << "\n"; - - reset_world(); - - for (int k = istart; k < iend; k++){ - - // std::cout<<" evolve: k=" << k << "\n"; - - - - for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ - // std::cout<<" evolve: k=" << k << " i=" << i << " cur=" << current_novelty << " Target=" << TargetNovelty << "\n"; - update_world(); - } - - storage[k]=current_loss/current_novelty; - counters[k]=1; - - - reset_world(); - } - - } - //============================================== - int get_reruns(void){ - return N_repeats; - } - - //============================================== - double get_parameter(int i){ - - switch(i){ - case 0: - return alpha_i; - case 1: - return alpha_m; - case 2: - return beta; - case 3: - return gamma; - case 4: - return delta; - default: - - std::cout << "Erroneous parameter id!!!!\n\n\n"; - return 0.; - } - } - - - //============================================== - void evolve_to_target(){ - - reset_world(); - if (beta < -1. || gamma < -1.){ - CumulativeRelativeLoss = 100000000000.; - CRLsquare = 0.; - return; - } - - - for (int k=0; k< N_repeats; k++){ - - - for(int i=0; i 4) {return 0;} - - else { - - switch(position){ - case 0: - alpha_i=value; - return 1; - case 1: - alpha_m=value; - return 1; - case 2: - beta=value; - return 1; - case 3: - gamma=value; - return 1; - case 4: - delta=value; - return 1; - } - - } - - return 0; - } - -#ifdef notdef - //================================================================= - void try_annealing(double starting_jump, int iterations, - double temp_start, double temp_end, double target_rejection){ - - double dx[5]={0.,0.,0.,0.,0}; - double x[5]={0.,0.,0.,0.,0}; - double rejection[5]={0., 0., 0., 0., 0.}; - double curr_x, curr_err, x_tmp; - double temperature; - double ratio, r; - int cycle=10; - boost::variate_generator > uni(generator, uni_dist); - - // set up parameter for annealing - - x[0]=alpha_i; - x[1]=alpha_m; - x[2]=beta; - x[3]=gamma; - x[4]=delta; - - for(int i=0;i<5;i++){ - dx[i] = starting_jump; - } - - // establish the current value - - //.......................................... - evolve_to_target(); - std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; - - curr_x = CumulativeRelativeLoss; - curr_err = CRLsquare; - CumulativeRelativeLoss = 0; - CRLsquare = 0; - //........................................... - - // optimization cycle - for(int i=0; i ratio){ - - std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) - <<" "<< (i+1) << " Did not accept " - << x_tmp << "(" << j << ")" << std::endl; - std::cout << alpha_i << " "<< alpha_m << " " - << beta << " " << gamma << " " - << delta << " " << std::endl; - set_parameter(x[j], j); - CumulativeRelativeLoss = 0; - CRLsquare = 0; - - rejection[j]+=1.; - } - - else { - - curr_x = CumulativeRelativeLoss; - curr_err = CRLsquare; - x[j] = x_tmp; - CumulativeRelativeLoss = 0; - CRLsquare = 0; - std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) - << wrap_double(rejection[0],2) - << " "<< wrap_double(rejection[1], 7) << " " - << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " - << wrap_double(rejection[4],6) << " " - << std::endl << std::endl; - - std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) - <<" " - << string_wrap((string) "***** Did accept! ", 3) - << wrap_double(alpha_i,2) - << " "<< wrap_double(alpha_m, 7) << " " - << wrap_double(beta,5) << " " - << wrap_double(gamma,9) << " " - << wrap_double(delta,6) << " " - << std::endl << std::endl; - - } - //........................................................ - - } - - } - - } - -#endif // notdef - - -}; - - -//============================================================ - -std::pair multi_loss( // dispatch_group_t group, - Universe* un[], - // dispatch_queue_t* CustomQueues, - double* Results, - int* Counters, - double* params){ - - int N = un[0]->get_reruns(); - int step = (int)(double)N/(double)(Nworkers); - int istart=0; - int iend = istart+step; - - double Loss=0., LossSquare=0.; - - timeval startTime, endTime; - double elapsedTime; - // start timer - gettimeofday(&startTime, NULL); - - //err: for(int i=0; iget_parameter(j) << "," << params[j] << "] "; - un[i]->set_parameter(params[j],j); - } - } - std::cout << "\n"; - int i; - #pragma omp parallel for private (i) - for(i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); - un[i]->evolve_to_target_and_save(i*step, min((i+1)*step,N), Results, Counters); - //}); - - // std::cout<<"multi_loss: Returned from evolve_to_target_and_save " << i << "\n"; - - - //istart += step; - //iend = min(istart+step,N); - - } - // err } - // dispatch_group_wait(group, DISPATCH_TIME_FOREVER); - //dispatch_release(group); - - - for (int i=0; i Res; - Res.first=Loss; - Res.second=two_std; - - gettimeofday(&endTime, NULL); - elapsedTime = (endTime.tv_sec - startTime.tv_sec) * 1000.0; // sec to ms - elapsedTime += (endTime.tv_usec - startTime.tv_usec) / 1000.0; // us to ms - elapsedTime /= 1000.; - cout << "multi_loss(N=" << N << ") elapsed time: " << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; - - return Res; -} -//============================================================ - - -//============================================================ -void multi_annealing( // dispatch_group_t group, - Universe* un[], - // dispatch_queue_t* CustomQueues, - double T_start, double T_end, - double Target_rejection, - int Annealing_repeats, - double starting_jump, - double* Results, - int* Counters, - double* params0, - double annealing_cycles){ - //................................. - // re-implement annealing - - double dx[NEVOPARAMS]={0.,0.,0.,0.,0}; - double x[NEVOPARAMS]={0.,0.,0.,0.,0}; - double rejection[NEVOPARAMS]={0., 0., 0., 0., 0.}; - double curr_x, curr_err, x_tmp; - double temperature; - double ratio, r; - int cycle=10; - //boost::variate_generator > uni(generator, uni_dist); - - // set up parameter for annealing - - for(int i=0;iset_parameter(x[i], i); - } - } - - // establish the current value - std::pairRes; - - if ( operation == 'm' ) { - // Nworkers = 1; - } - else if (operation == 'g') { - // generate params - } - else if (operation == 'a') { - // analyze multi_loss() results - - string line; - ifstream mlossdata ("multi_loss.data"); - double d, Loss, LossSquare, two_std; - bool b; - int n=0; - if (mlossdata.is_open()) { - while ( getline (mlossdata,line) ) { - b = from_string(d, std::string(line), std::dec); - cout << line << " d=" << d << endl; - Loss += d; - LossSquare += (d*d); - n++; - } - Loss /= double(n); - LossSquare /= double(n); - two_std = ((LossSquare - Loss*Loss)/(double)n); - two_std = 2.*sqrt(two_std); - std::cout<<"n="<get_reruns(); - - f = fopen("multi_loss.data","w"); - for(int i=0; iset_parameter(x_tmp, j); - } - - - // WRITE OUT PARAMS HERE; then exit. - - std::cout << "Calling multi_loss: i=" << i << " j=" << j << "\n"; - Res = multi_loss(/* group, */ un, /* CustomQueues, */ Results, Counters, x); - std::cout << "Ret from multi_loss: i=" << i << " j=" << j << "\n"; - std::cout << Res.first << " +- " << Res.second << std::endl; - - ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); - r = rand()/(double)(pow(2.,31)-1.); - std::cout << r << " vs " << ratio << std::endl; - - double ALOT=100000000000.; - - if (Res.first < ALOT) - { - ofstream filestr; - - filestr.open ("best_opt_some.txt", ofstream::app); - - // >> i/o operations here << - filestr << un[0]->get_target() << "," - << Res.first - << "," << un[0]->get_parameter(0) - << "," << un[0]->get_parameter(1) - << "," << un[0]->get_parameter(2) - << "," << un[0]->get_parameter(3) - << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; - - filestr.close(); - - - filestr.open ("max_dist.txt", ofstream::app); - - // >> i/o operations here << - filestr << max_dist << ",\n"; - - filestr.close(); - - } - - - if (r > ratio){ - - std::cout << " "<< (i+1) << ","<< (j) - <<" "<< (i+1) << " Did not accept " - << x_tmp << "(" << j << ")" << std::endl; - std::cout << un[0]->get_parameter(0) - << " " << un[0]->get_parameter(1) - << " " << un[0]->get_parameter(2) - << " " << un[0]->get_parameter(3) - << " " << un[0]->get_parameter(4) << " " << std::endl; - - x[j]=x_hold; - for(int w=0; wset_parameter(x[j], j); - } - - - //set_parameter(x[j], j); - rejection[j]+=1.; - } - - else { - - curr_x = Res.first; - curr_err = Res.second; - x[j] = x_tmp; - - for(int w=0; wset_parameter(x[j], j); - } - - std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) - << wrap_double(rejection[0],2) << " " - << wrap_double(rejection[1],7) << " " - << wrap_double(rejection[2],5) << " " - << wrap_double(rejection[3],9) << " " - << wrap_double(rejection[4],6) << " " - << std::endl << std::endl; - - std::cout << " "<< (i+1) <<","<< (j) - <<" " - << string_wrap((string) "***** Did accept! ", 3) - << wrap_double(un[0]->get_parameter(0),2) << " " - << wrap_double(un[0]->get_parameter(1),7) << " " - << wrap_double(un[0]->get_parameter(2),5) << " " - << wrap_double(un[0]->get_parameter(3),9) << " " - << wrap_double(un[0]->get_parameter(4),6) << " " - << std::endl << std::endl; - - - - } - //........................................................ - - } - } - - } - -} - - -//================================================ -int -main(int argc, char* argv[]) -{ - - double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; - string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; - string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; - string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; - string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; - string par_names4[2] = {"Operation", "Nworkers"}; - int params1[4] = {300, 50, 1000, 10}; - int params3[5] = { 0, 0, 0, 0, 0}; - - // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump - double params2[5] = {1, 0.001, 100, 0.3, 1.5}; - - int verbose_level = 2; - const std::string one="one", two="two"; - static Universe* un[MAXNworkers]; - // static dispatch_queue_t CustomQueues[MAXNworkers]; - - static double* Results; - static int* Counters; - - timeval t1, t2; - double elapsedTime; - // start timer - gettimeofday(&t1, NULL); - - - if (argc < 8) { - std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; - std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; - std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; - - system("pwd"); - - - return(1); - } - else { - std::cout << "argc=" << argc << std::endl; - - for (int nArg=0; nArg < argc; nArg++){ - //std::cout << nArg << " " << argv[nArg] << std::endl; - if (nArg > 0 && nArg < 7){ - params0[nArg-1]= atof(argv[nArg]); - std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; - } - if (nArg > 6 && nArg < 11){ - params1[nArg-7]= atoi(argv[nArg]); - std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; - } - if (nArg == 11){ - verbose_level = atoi(argv[nArg]); - std::cout << "verbose level: " << verbose_level << std::endl; - } - if (nArg > 11 && nArg < 17){ - params2[nArg-12]= atof(argv[nArg]); - std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; - } - if (nArg > 16 && nArg < 22){ - params3[nArg-17]= atof(argv[nArg]); - var_fixed[nArg-17]= atof(argv[nArg]); - std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; - } - if (nArg == 22 ){ - operation = *argv[nArg]; - std::cout << par_names4[0] << ": " << operation << std::endl; - } - if (nArg == 23 ){ - Nworkers = atoi(argv[nArg]); - std::cout << par_names4[1] << ": " << Nworkers << std::endl; - } - } - } - - /* - for target in range(58,1009,50): - s = ("%d" % target) - print s - - for i in range(15): - # Param groups separated by "|" below for documentation. NOTE that | is not used on command line! - os.system("./supe_duper_optimizer |0 0 4 50 -1 "+s+" | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0") - */ - - /* Parameters, re-iterated: - - "alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; - double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; - - {"n_epochs", "n_steps", "n_reruns", "range"}; - int params1[4] = {300, 50, 1000, 10}; - - {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; - temperature_start, temperature_end, annealing_steps target_rejection Starting_jump - double params2[5] = {1, 0.001, 100, 0.3, 1.5}; - - {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; - int params3[5] = { 0, 0, 0, 0, 0}; - - - */ - - for (int j=0; j 0){ - - Results = new double[n_rep]; - Counters = new int[n_rep]; - - }else { - - Results = NULL; - Counters = NULL; - std::cout << " Number of reruns should be positive! " << std::endl; - return 0; - - } - //............................... - - //srand(time(0)); - //srandomdev(); - { - timeval t; - gettimeofday(&t, NULL); - srand(t.tv_usec); - } - - { - double r=0; - for (int j=0; j<100; j++){ - - - - r = rand()/(double)(pow(2.,31)-1.); - std::cout << r << " "; - } - std::cout << "\n "; - } - //random initiation of starting parameters - - if (range > 0.){ - - for (int i=0; i < 5; i++){ - - if (params0[i]==-100.){ - - double r1 = (rand()/(double)(pow(2.,31)-1.)); - double r2 = (rand()/(double)(pow(2.,31)-1.)); - double sign = 1.; - - if(r1 > 0.5){ - sign=-1.; - } - - params0[i] = sign*r2*range; - - std::cout << par_names0[i] << ": " << params0[i] << std::endl; - } - } - - } - - - double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; - int Annealing_repeats = (int) params2[2]; - - - // dispatch_group_t group = dispatch_group_create(); - - //............................. - multi_annealing( /* group, */ un, /* CustomQueues, */ T_start, T_end, Target_rejection, Annealing_repeats, - starting_jump, Results, Counters, params0, Annealing_repeats); - - //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); - // dispatch_release(group); - //............................. - - - // stop timer - gettimeofday(&t2, NULL); - - // compute and print the elapsed time in millisec - elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms - elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms - elapsedTime /= 1000.; - cout << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; - - //..................... - - for(int i=0; i 0){ - - delete [] Results; - delete [] Counters; - - } - - return 0; - - - -} - Deleted: SwiftApps/optimizer.orig.cpp =================================================================== --- SwiftApps/optimizer.orig.cpp 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/optimizer.orig.cpp 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,1710 +0,0 @@ -// -// main.cpp -// optimizer -// -// Created by Andrey Rzhetsky on 4/11/11. -// Copyright 2011 University of Chicago. All rights reserved. -// - -#define Nworkers 1 // 24 - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -// #include -#include - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error -#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define INT_INFINITY 2147483647 - -#define FIX_VARIABLES 1 - -using namespace boost; -using namespace std; -using namespace boost::numeric::ublas; - -static int max_dist=0; - -typedef boost::adjacency_matrix Graph; -typedef std::pair Edge; -typedef boost::graph_traits GraphTraits; -typedef boost::numeric::ublas::triangular_matrix prob; -typedef boost::numeric::ublas::triangular_matrix pathlength; -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; - -namespace std { - using ::time; -} - -static int var_fixed[5] = {1, 0, 1, 1, 0}; - -typedef boost::minstd_rand base_generator_type; -typedef adjacency_list < listS, vecS, directedS, -no_property, property < edge_weight_t, int > > graph_t; -typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; -typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; - - -//================================================ -string strDouble(double number) -{ - stringstream ss;//create a stringstream - ss << number;//add number to the stream - return ss.str();//return a string with the contents of the stream -} - -//================================================ - -double gaussian(double sigma) -{ - double GaussNum = 0.0; - int NumInSum = 10; - for(int i = 0; i < NumInSum; i++) - { - GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); - } - GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); - - - return GaussNum; - -} - - - -//================================================= -double diffclock(clock_t clock1,clock_t clock2) -{ - double diffticks=clock1-clock2; - double diffms=(diffticks)/CLOCKS_PER_SEC; - return diffms; -} - -//================================================ -//================================================================ -double get_new_x(double x, double dx){ - - double new_x; - // boost::variate_generator > uni(generator, uni_dist); - double r = rand()/(double)(pow(2.,31)-1.); - - if (r > 0.5){ - new_x = x + rand()*dx/(double)(pow(2.,31)-1.); - } else { - new_x = x - rand()*dx/(double)(pow(2.,31)-1.); - } - - return new_x; - -} - - -//=============================================== -string string_wrap(string ins, int mode){ - - std::ostringstream s; - - switch(mode){ - case 0: - s << "\033[1;29m" << ins << "\033[0m"; - break; - case 1: - s << "\033[1;34m" << ins << "\033[0m"; - break; - case 2: - s << "\033[1;44m" << ins << "\033[0m"; - break; - case 3: - s << "\033[1;35m" << ins << "\033[0m"; - break; - case 4: - s << "\033[1;33;44m" << ins << "\033[0m"; - break; - case 5: - s << "\033[1;47;34m" << ins << "\033[0m"; - break; - case 6: - s << "\033[1;1;31m" << ins << "\033[0m"; - break; - case 7: - s << "\033[1;1;33m" << ins << "\033[0m"; - break; - case 8: - s << "\033[1;1;43;34m" << ins << "\033[0m"; - break; - case 9: - s << "\033[1;1;37m" << ins << "\033[0m"; - break; - case 10: - s << "\033[1;30;47m" << ins << "\033[0m"; - break; - default: - s << ins; - } - - return s.str(); -} - - -//=============================================== -string wrap_double(double val, int mode){ - - std::ostringstream s; - s << string_wrap(strDouble(val),mode); - - return s.str(); -} - - - -//=============================================== -const -string i2string(int i){ - - std::ostringstream s; - s << "worker" - << lexical_cast(i); - - return s.str(); - -} - -//=============================================== -char* i2char(int i){ - - std::ostringstream s; - s << "worker" - << lexical_cast(i); - - char* a=new char[s.str().size()+1]; - memcpy(a,s.str().c_str(), s.str().size()); - - return a; -} - -//================================================ -class Universe { - -private: - - double alpha_i; - double alpha_m; - double beta; - double gamma; - double delta; - - double TargetNovelty; - double CumulativeRelativeLoss; - double CRLsquare; - string id; - - - int N_nodes; - int M_edges; - - int N_epochs; - int N_steps; - int N_repeats; - - int current_epoch; - double current_loss; - int current_repeat; - double current_novelty; - - int mode_identify_failed; - int verbose_level; // 0 is silent, higher is more - - double k_max; - - graph_t Full_g; - - double **Prob; - double **Tried; - double **Dist; - double **Final; - double **EdgeIndex; - double *Rank; - - base_generator_type generator; - boost::uniform_real<> uni_dist; - boost::geometric_distribution geo; - -public: - - - - //====== Constructor ====== - Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) - { - //typedef array_type2::index index2; - - - std::ifstream inFile; - //string line; - - //------------------------------- - - base_generator_type gene(42u); - generator = gene; - generator.seed(static_cast(std::time(0))); - boost::uniform_real<> uni_d(0,1); - uni_dist = uni_d; - - //-------------------------------- - - int i, k; - int x, y; - Edge* edge_array_mine; - int num_arcs_mine, num_nodes_mine; - int* weights_mine; - - TargetNovelty = target; - CumulativeRelativeLoss = 0.; - CRLsquare = 0.; - - - N_epochs = Epochs; - N_steps = Steps; - N_repeats = Repeats; - - current_epoch = 0; - current_loss = 0.; - current_repeat = 0; - - id = idd; - - verbose_level = 1; - - mode_identify_failed = identify_failed; - - - //------------------------------- - // The first pass though file with the graph - inFile.open(FileToOpen.c_str()); - if (inFile.fail()) { - cout << "Unable to open file"; - exit(1); // terminate with error - }else { - - if (verbose_level > 2){ - std::cout << " Opened <" << FileToOpen << ">"<> x; - inFile >> y; - - if (verbose_level > 2){ - std::cout << " x: " << x; - std::cout << " y: " << y << std::endl; - } - - if (i==0){ - N_nodes=x; - M_edges=y; - break; - } - i++; - - - } - inFile.close(); - - if (verbose_level == 2){ - std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ - std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { - if (i > 0) { - Final[x][y]=1.; - Final[y][x]=1.; - - - if (verbose_level == 2){ - std::cout << "."; - } - } - i++; - - } - if (verbose_level == 2){ - std::cout << std::endl; - } - inFile.close(); - - k=0; - for (int i=0; i 0.){ - EdgeIndex[i][j]=k; - k++; - } - } - } - - - - //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - // create graph -- hopefully, we can keep it, just modifying edge weights - - - edge_array_mine = new Edge[2*M_edges]; - num_arcs_mine = 2*M_edges; - num_nodes_mine = N_nodes; - weights_mine = new int[2*M_edges]; - for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} - - k=0; - for(int i=0; i0.){ - edge_array_mine[2*k] =Edge(i,j); - edge_array_mine[2*k+1]=Edge(j,i); - k++; - } - } - } - graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); - - Full_g = g; - delete edge_array_mine; - delete weights_mine; - - //=========================================================================== - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - for (int i=0; i 0.){ - u = vertex(i, Full_g); - v = vertex(j, Full_g); - remove_edge(u,v,Full_g); - remove_edge(v,u,Full_g); - - } - } - } - - - } - - - //===================================================================== - int sample_failed_number(double pfail){ - - //boost::geometric_distribution geo(pfail); - //boost::variate_generator > geom(generator, geo); - - double r, u, g; - - r=0.; - for(int i=0; i=3){ - std::cout << id << " failed " << r << std::endl; - } - return r; - - } - - //============================================= - double get_target(void){ - return TargetNovelty; - } - - //============================================= - void set_target(double target){ - TargetNovelty=target; - } - - //============================================= - int sample(){ - - //boost::variate_generator > uni(generator, uni_dist); - // double r = uni(), Summa = 0.; - - - - double r = rand(), Summa = 0.; - r /= (double)(pow(2.,31)-1.); - int result = 0; - int finished = 0; - - if (verbose_level==4){ - std::cout << id << " sampled " << r << std::endl; - } - - for(int i=0; i r){ - - Tried[i][j]+=1.; - - if (Final[i][j] > 0.){ - result = 1; - } - finished = 1; - } - } - } - - return result; - - } - - //=============================== - void update_current_graph(void){ - - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - //property_map::type weightmap = get(edge_weight, Full_g); - for (int i=0; i 0. && Tried[i][j]>0){ - //s = edge(i, j, Full_g); - boost::graph_traits::edge_descriptor e1,e2; - bool found1, found2; - u = vertex(i, Full_g); - v = vertex(j, Full_g); - tie(e1, found1) = edge(u, v, Full_g); - tie(e2, found2) = edge(v, u, Full_g); - if (!found1 && !found2){ - add_edge(u,v,1,Full_g); - add_edge(v,u,1,Full_g); - } - - } - } - - } - } - - //=============================== - void update_distances(void){ - // put shortest paths to the *Dist[][] - std::vector p(num_vertices(Full_g)); - std::vector d(num_vertices(Full_g)); - vertex_descriptor s; - - - // put shortest paths to the *Dist[][] - for (int j=0; j 0.){ - s = vertex(j, Full_g); - dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); - - //std::cout <<" Vertex "<< j << std::endl; - graph_traits < graph_t >::vertex_iterator vi, vend; - - for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { - - if (p[*vi]!=*vi){ - Dist[*vi][j]=d[*vi]; - Dist[j][*vi]=d[*vi]; - - if (Dist[*vi][j]>max_dist){ - max_dist=Dist[*vi][j]; - } - - - } else { - Dist[*vi][j]=-1.; - Dist[j][*vi]=-1.; - } - } - } - - } - - - } - - //====================================================== - void update_ranks(void){ - - for(int i=0; i0. && Final[i][j] >0.){ - Rank[i]++; - Rank[j]++; - } - } - } - - } - - //==================================================================== - void set_world(double a_i, double a_m, double b, double g, double d){ - - alpha_i=a_i; - alpha_m=a_m; - gamma=g; - beta=b; - delta=d; - - } - - //==================================================================== - void reset_world(){ - - //==================================================== - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - - for (int i=0; i 0. && Tried[i][j] > 0){ - u = vertex(i, Full_g); - v = vertex(j, Full_g); - remove_edge(u,v,Full_g); - remove_edge(v,u,Full_g); - - } - } - } - - //================================================== - - current_loss=0; - current_epoch=0; - current_repeat++; - current_novelty=0; - - for(int i = 0; i < N_nodes; ++i) { - Rank[i]=0.; - for(int j = 0; j < N_nodes; ++j) { - Prob[i][j]=0.; - Dist[i][j]=-1.; - Tried[i][j]=0.; - } - } - } - - - //============================================== - void show_parameters(void){ - - std::cout << "Parameters: " - << alpha_i << " " - << alpha_m << " | " - << beta << " " - << gamma << " | " - << delta << std::endl; - - } - - - - //=============================================== - string file_name(){ - - std::ostringstream s; - s << "world_" - << lexical_cast(alpha_i) << "_" - << lexical_cast(alpha_m) << "_" - << lexical_cast(beta) << "_" - << lexical_cast(gamma) << "_" - << lexical_cast(delta) << "_" - << lexical_cast(N_epochs) << "_" - << lexical_cast(N_steps) << "_" - << lexical_cast(N_repeats) << ".txt"; - - return s.str(); - - } - - - - - //================================================= - void set_verbose(int verbose){ - - verbose_level = verbose; - } - - - //============================================================= - void update_probabilities(void){ - - - //========================= - // Compute sampling probabilities - // first pass: \xi_i,j - for(int i=0; i 0.){ - - double k = Dist[i][j]; - if (k >= k_max){ - k = k_max-1; - } - - bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); - - } else { - bg = delta; - } - - Prob[i][j] = exp(Prob[i][j] + bg); - } - } - - - // second pass: sum - double Summa = 0.; - - for(int i=0; i0. && Final[i][j]>0.){ - novel+=1.; - } - } - } - - } - //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - else { - - double pfail=0.; - int n_failed; - //, n_check = 0; - - for(int i=0; i0. && Final[i][j]>0.){ - novel+=1.; - } - } - } - } - - current_novelty = novel; - - - //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - if (verbose_level == 2){ - std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) - - << " cost=" << cost - << " novel=" << novel - << " rel_loss=" << cost/novel - << std::endl; - } - - current_epoch++; - } - - - //====== Destructor ====== - ~Universe(){ - - delete_2Dmatrix(Final, N_nodes); - delete_2Dmatrix(Dist, N_nodes); - delete_2Dmatrix(Tried, N_nodes); - delete_2Dmatrix(Prob, N_nodes); - delete_2Dmatrix(EdgeIndex, N_nodes); - delete_1Dmatrix(Rank); - } - - //================================================ - // Allocate memory - double** allocate_2Dmatrix(int N, int M) - { - double **pointer; - - if (verbose_level == 2){ - std::cout<< "["< 0){ - - pointer = new double[N]; - - }else { - - pointer = NULL; - } - - return pointer; - - } - - //============================================== - // De-Allocate memory to prevent memory leak - void delete_2Dmatrix(double **pointer, int N){ - - if (pointer != NULL){ - - for (int i = 0; i < N; ++i){ - delete [] pointer[i]; - } - delete [] pointer; - } - } - //==================== - void delete_1Dmatrix(double *pointer){ - - delete [] pointer; - } - - //=========================================== - double get_rel_loss(){ - - return CumulativeRelativeLoss ; - } - - //=========================================== - double get_rel_loss_err(){ - - return CRLsquare ; - } - - - - //================================================================================== - void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ - - double ALOT=100000000000.; - - std::cout<<" evolve_to_target_and_save: istart=" << istart << "iend=" << iend << "\n"; - - reset_world(); - - for (int k = istart; k < iend; k++){ - - std::cout<<" evolve: k=" << k << "\n"; - - - - for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ - std::cout<<" evolve: k=" << k << " i=" << i << " cur=" << current_novelty << " Target=" << TargetNovelty << "\n"; - update_world(); - } - - storage[k]=current_loss/current_novelty; - counters[k]=1; - - - reset_world(); - } - - } - //============================================== - int get_reruns(void){ - return N_repeats; - } - - //============================================== - double get_parameter(int i){ - - switch(i){ - case 0: - return alpha_i; - case 1: - return alpha_m; - case 2: - return beta; - case 3: - return gamma; - case 4: - return delta; - default: - - std::cout << "Erroneous parameter id!!!!\n\n\n"; - return 0.; - } - } - - - //============================================== - void evolve_to_target(){ - - reset_world(); - if (beta < -1. || gamma < -1.){ - CumulativeRelativeLoss = 100000000000.; - CRLsquare = 0.; - return; - } - - - for (int k=0; k< N_repeats; k++){ - - - for(int i=0; i 4) {return 0;} - - else { - - switch(position){ - case 0: - alpha_i=value; - return 1; - case 1: - alpha_m=value; - return 1; - case 2: - beta=value; - return 1; - case 3: - gamma=value; - return 1; - case 4: - delta=value; - return 1; - } - - } - - return 0; - } - - - //================================================================= - void try_annealing(double starting_jump, int iterations, - double temp_start, double temp_end, double target_rejection){ - - double dx[5]={0.,0.,0.,0.,0}; - double x[5]={0.,0.,0.,0.,0}; - double rejection[5]={0., 0., 0., 0., 0.}; - double curr_x, curr_err, x_tmp; - double temperature; - double ratio, r; - int cycle=10; - boost::variate_generator > uni(generator, uni_dist); - - // set up parameter for annealing - - x[0]=alpha_i; - x[1]=alpha_m; - x[2]=beta; - x[3]=gamma; - x[4]=delta; - - for(int i=0;i<5;i++){ - dx[i] = starting_jump; - } - - // establish the current value - - //.......................................... - evolve_to_target(); - std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; - - curr_x = CumulativeRelativeLoss; - curr_err = CRLsquare; - CumulativeRelativeLoss = 0; - CRLsquare = 0; - //........................................... - - // optimization cycle - for(int i=0; i ratio){ - - std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) - <<" "<< (i+1) << " Did not accept " - << x_tmp << "(" << j << ")" << std::endl; - std::cout << alpha_i << " "<< alpha_m << " " - << beta << " " << gamma << " " - << delta << " " << std::endl; - set_parameter(x[j], j); - CumulativeRelativeLoss = 0; - CRLsquare = 0; - - rejection[j]+=1.; - } - - else { - - curr_x = CumulativeRelativeLoss; - curr_err = CRLsquare; - x[j] = x_tmp; - CumulativeRelativeLoss = 0; - CRLsquare = 0; - std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) - << wrap_double(rejection[0],2) - << " "<< wrap_double(rejection[1], 7) << " " - << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " - << wrap_double(rejection[4],6) << " " - << std::endl << std::endl; - - std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) - <<" " - << string_wrap((string) "***** Did accept! ", 3) - << wrap_double(alpha_i,2) - << " "<< wrap_double(alpha_m, 7) << " " - << wrap_double(beta,5) << " " - << wrap_double(gamma,9) << " " - << wrap_double(delta,6) << " " - << std::endl << std::endl; - - } - //........................................................ - - } - - } - - } - - -}; - -//============================================================ - -std::pair multi_loss( // dispatch_group_t group, - Universe* un[], - // dispatch_queue_t* CustomQueues, - double* Results, - int* Counters, - double* params){ - - int N = un[0]->get_reruns(); - int step = (int)(double)N/(double)(Nworkers); - int istart=0; - int iend = istart+step; - - double Loss=0., LossSquare=0.; - - for(int i=0; iset_parameter(params[j],j); - } - - - for(int i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); - //}); - - std::cout<<" Returned from evolve_to_target_and_save\n"; - istart += step; - iend = min(istart+step,N); - - } - } - // dispatch_group_wait(group, DISPATCH_TIME_FOREVER); - //dispatch_release(group); - - for (int i=0; i Res; - Res.first=Loss; - Res.second=two_std; - - return Res; - - -} -//============================================================ - - -//============================================================ -void multi_annealing( // dispatch_group_t group, - Universe* un[], - // dispatch_queue_t* CustomQueues, - double T_start, double T_end, - double Target_rejection, - int Annealing_repeats, - double starting_jump, - double* Results, - int* Counters, - double* params0, - double annealing_cycles){ - //................................. - // re-implement annealing - - double dx[5]={0.,0.,0.,0.,0}; - double x[5]={0.,0.,0.,0.,0}; - double rejection[5]={0., 0., 0., 0., 0.}; - double curr_x, curr_err, x_tmp; - double temperature; - double ratio, r; - int cycle=10; - //boost::variate_generator > uni(generator, uni_dist); - - // set up parameter for annealing - - x[0]=params0[0]; - x[1]=params0[1]; - x[2]=params0[2]; - x[3]=params0[3]; - x[4]=params0[4]; - - for(int i=0;i<5;i++){ - dx[i] = starting_jump; - } - - // establish the current value - std::pairRes; - - Res = multi_loss( /* group,*/ un, /* CustomQueues,*/ Results, Counters, x); - std::cout << Res.first << " +- " << Res.second << std::endl; - - curr_x = Res.first; - curr_err = Res.second; - - // optimization cycle - - for(int i=0; iset_parameter(x_tmp, j); - } - - - Res = multi_loss(/* group, */ un, /* CustomQueues, */ Results, Counters, x); - std::cout << Res.first << " +- " << Res.second << std::endl; - - ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); - r = rand()/(double)(pow(2.,31)-1.); - std::cout << r << " vs " << ratio << std::endl; - - double ALOT=100000000000.; - - if (Res.first < ALOT) - { - ofstream filestr; - - filestr.open ("best_opt_some.txt", ofstream::app); - - // >> i/o operations here << - filestr << un[0]->get_target() << "," - << Res.first - << "," << un[0]->get_parameter(0) - << "," << un[0]->get_parameter(1) - << "," << un[0]->get_parameter(2) - << "," << un[0]->get_parameter(3) - << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; - - filestr.close(); - - - filestr.open ("max_dist.txt", ofstream::app); - - // >> i/o operations here << - filestr << max_dist << ",\n"; - - filestr.close(); - - } - - - if (r > ratio){ - - std::cout << " "<< (i+1) << ","<< (j) - <<" "<< (i+1) << " Did not accept " - << x_tmp << "(" << j << ")" << std::endl; - std::cout << un[0]->get_parameter(0) - << " " << un[0]->get_parameter(1) - << " " << un[0]->get_parameter(2) - << " " << un[0]->get_parameter(3) - << " " << un[0]->get_parameter(4) << " " << std::endl; - - x[j]=x_hold; - for(int w=0; wset_parameter(x[j], j); - } - - - //set_parameter(x[j], j); - rejection[j]+=1.; - } - - else { - - curr_x = Res.first; - curr_err = Res.second; - x[j] = x_tmp; - - for(int w=0; wset_parameter(x[j], j); - } - - std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) - << wrap_double(rejection[0],2) << " " - << wrap_double(rejection[1],7) << " " - << wrap_double(rejection[2],5) << " " - << wrap_double(rejection[3],9) << " " - << wrap_double(rejection[4],6) << " " - << std::endl << std::endl; - - std::cout << " "<< (i+1) <<","<< (j) - <<" " - << string_wrap((string) "***** Did accept! ", 3) - << wrap_double(un[0]->get_parameter(0),2) << " " - << wrap_double(un[0]->get_parameter(1),7) << " " - << wrap_double(un[0]->get_parameter(2),5) << " " - << wrap_double(un[0]->get_parameter(3),9) << " " - << wrap_double(un[0]->get_parameter(4),6) << " " - << std::endl << std::endl; - - - - } - //........................................................ - - } - } - - } - -} - - - -//================================================ -int -main(int argc, char* argv[]) -{ - - double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; - string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; - string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; - string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; - string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; - int params1[4] = {300, 50, 1000, 10}; - int params3[5] = { 0, 0, 0, 0, 0}; - - // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump - double params2[5] = {1, 0.001, 100, 0.3, 1.5}; - - int verbose_level = 2; - const std::string one="one", two="two"; - static Universe* un[Nworkers]; - // static dispatch_queue_t CustomQueues[Nworkers]; - - static double* Results; - static int* Counters; - - timeval t1, t2; - double elapsedTime; - // start timer - gettimeofday(&t1, NULL); - - - if (argc < 8) { - std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; - std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; - std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; - - system("pwd"); - - - return(1); - } - else { - for (int nArg=0; nArg < argc; nArg++){ - //std::cout << nArg << " " << argv[nArg] << std::endl; - if (nArg > 0 && nArg < 7){ - params0[nArg-1]= atof(argv[nArg]); - std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; - } - if (nArg > 6 && nArg < 11){ - params1[nArg-7]= atoi(argv[nArg]); - std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; - } - if (nArg == 11){ - verbose_level = atoi(argv[nArg]); - std::cout << "verbose level: " << verbose_level << std::endl; - } - if (nArg > 11 && nArg < 17){ - params2[nArg-12]= atof(argv[nArg]); - std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; - } - if (nArg > 16 && nArg < 22){ - params3[nArg-17]= atof(argv[nArg]); - var_fixed[nArg-17]= atof(argv[nArg]); - std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; - } - - - } - - } - - /* - for target in range(58,1009,50): - s = ("%d" % target) - print s - - for i in range(15): - # Param groups separated by "|" below for documentation. NOTE that | is not used on command line! - os.system("./supe_duper_optimizer |0 0 4 50 -1 "+s+" | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0") - */ - - /* Parameters, re-iterated: - - "alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; - double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; - - {"n_epochs", "n_steps", "n_reruns", "range"}; - int params1[4] = {300, 50, 1000, 10}; - - {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; - temperature_start, temperature_end, annealing_steps target_rejection Starting_jump - double params2[5] = {1, 0.001, 100, 0.3, 1.5}; - - {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; - int params3[5] = { 0, 0, 0, 0, 0}; - - - */ - - for (int j=0; j<5; j++){ - - cout << j << " | " << var_fixed[j] << " (fixed) \n"; - } - - target=params0[5]; - range = (double)params1[3]; - int identify_failed = 0; - char* filename= (char *)"movie_graph.txt"; - int n_ep=params1[0], n_st=params1[1], n_rep=params1[2]; - - //............................... - - for(int i=0; i 0){ - - Results = new double[n_rep]; - Counters = new int[n_rep]; - - }else { - - Results = NULL; - Counters = NULL; - std::cout << " Number of reruns should be positive! " << std::endl; - return 0; - - } - //............................... - srand(time(0)); - //srandomdev(); - - { - double r=0; - for (int j=0; j<100; j++){ - - - - r = rand()/(double)(pow(2.,31)-1.); - std::cout << r << " "; - } - std::cout << "\n "; - } - //random initiation of starting parameters - - if (range > 0.){ - - for (int i=0; i < 5; i++){ - - if (params0[i]==-100.){ - - double r1 = (rand()/(double)(pow(2.,31)-1.)); - double r2 = (rand()/(double)(pow(2.,31)-1.)); - double sign = 1.; - - if(r1 > 0.5){ - sign=-1.; - } - - params0[i] = sign*r2*range; - - std::cout << par_names0[i] << ": " << params0[i] << std::endl; - } - } - - } - - - double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; - int Annealing_repeats = (int) params2[2]; - - - // dispatch_group_t group = dispatch_group_create(); - - //............................. - multi_annealing( /* group, */ un, /* CustomQueues, */ T_start, T_end, Target_rejection, Annealing_repeats, - starting_jump, Results, Counters, params0, Annealing_repeats); - - //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); - // dispatch_release(group); - //............................. - - - // stop timer - gettimeofday(&t2, NULL); - - // compute and print the elapsed time in millisec - elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms - elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms - elapsedTime /= 1000.; - cout << elapsedTime << " seconds \n .....(" << elapsedTime/60. << " minutes)\n\n"; - - //..................... - - for(int i=0; i 0){ - - delete [] Results; - delete [] Counters; - - } - - return 0; - - - -} - Deleted: SwiftApps/optimizer.sh =================================================================== --- SwiftApps/optimizer.sh 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/optimizer.sh 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,10 +0,0 @@ -#1 /bin/sh -bestfile=$1 -maxfile=$2 -datafile=$3 -touch best_opt_some.txt max_dist.txt multi_loss.data -shift 3 -$(dirname $0)/Optimizer $* 2>&1 -mv best_opt_some.txt $bestfile -mv max_dist.txt $maxfile -mv multi_loss.data $datafile Deleted: SwiftApps/optimizer.snap01.cpp =================================================================== --- SwiftApps/optimizer.snap01.cpp 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/optimizer.snap01.cpp 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,1722 +0,0 @@ -// -// main.cpp -// optimizer -// -// Created by Andrey Rzhetsky on 4/11/11. -// Copyright 2011 University of Chicago. All rights reserved. -// - -#define Nworkers 24 - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -// #include -#include - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error -#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define INT_INFINITY 2147483647 - -#define FIX_VARIABLES 1 - -using namespace boost; -using namespace std; -using namespace boost::numeric::ublas; - -static int max_dist=0; - -typedef boost::adjacency_matrix Graph; -typedef std::pair Edge; -typedef boost::graph_traits GraphTraits; -typedef boost::numeric::ublas::triangular_matrix prob; -typedef boost::numeric::ublas::triangular_matrix pathlength; -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; - -namespace std { - using ::time; -} - -static int var_fixed[5] = {1, 0, 1, 1, 0}; - -typedef boost::minstd_rand base_generator_type; -typedef adjacency_list < listS, vecS, directedS, -no_property, property < edge_weight_t, int > > graph_t; -typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; -typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; - - -//================================================ -string strDouble(double number) -{ - stringstream ss;//create a stringstream - ss << number;//add number to the stream - return ss.str();//return a string with the contents of the stream -} - -//================================================ - -double gaussian(double sigma) -{ - double GaussNum = 0.0; - int NumInSum = 10; - for(int i = 0; i < NumInSum; i++) - { - GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); - } - GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); - - - return GaussNum; - -} - - - -//================================================= -double diffclock(clock_t clock1,clock_t clock2) -{ - double diffticks=clock1-clock2; - double diffms=(diffticks)/CLOCKS_PER_SEC; - return diffms; -} - -//================================================ -//================================================================ -double get_new_x(double x, double dx){ - - double new_x; - // boost::variate_generator > uni(generator, uni_dist); - double r = rand()/(double)(pow(2.,31)-1.); - - if (r > 0.5){ - new_x = x + rand()*dx/(double)(pow(2.,31)-1.); - } else { - new_x = x - rand()*dx/(double)(pow(2.,31)-1.); - } - - return new_x; - -} - - -//=============================================== -string string_wrap(string ins, int mode){ - - std::ostringstream s; - - switch(mode){ - case 0: - s << "\033[1;29m" << ins << "\033[0m"; - break; - case 1: - s << "\033[1;34m" << ins << "\033[0m"; - break; - case 2: - s << "\033[1;44m" << ins << "\033[0m"; - break; - case 3: - s << "\033[1;35m" << ins << "\033[0m"; - break; - case 4: - s << "\033[1;33;44m" << ins << "\033[0m"; - break; - case 5: - s << "\033[1;47;34m" << ins << "\033[0m"; - break; - case 6: - s << "\033[1;1;31m" << ins << "\033[0m"; - break; - case 7: - s << "\033[1;1;33m" << ins << "\033[0m"; - break; - case 8: - s << "\033[1;1;43;34m" << ins << "\033[0m"; - break; - case 9: - s << "\033[1;1;37m" << ins << "\033[0m"; - break; - case 10: - s << "\033[1;30;47m" << ins << "\033[0m"; - break; - default: - s << ins; - } - - return s.str(); -} - - -//=============================================== -string wrap_double(double val, int mode){ - - std::ostringstream s; - s << string_wrap(strDouble(val),mode); - - return s.str(); -} - - - -//=============================================== -const -string i2string(int i){ - - std::ostringstream s; - s << "worker" - << lexical_cast(i); - - return s.str(); - -} - -//=============================================== -char* i2char(int i){ - - std::ostringstream s; - s << "worker" - << lexical_cast(i); - - char* a=new char[s.str().size()+1]; - memcpy(a,s.str().c_str(), s.str().size()); - - return a; -} - -//================================================ -class Universe { - -private: - - double alpha_i; - double alpha_m; - double beta; - double gamma; - double delta; - - double TargetNovelty; - double CumulativeRelativeLoss; - double CRLsquare; - string id; - - - int N_nodes; - int M_edges; - - int N_epochs; - int N_steps; - int N_repeats; - - int current_epoch; - double current_loss; - int current_repeat; - double current_novelty; - - int mode_identify_failed; - int verbose_level; // 0 is silent, higher is more - - double k_max; - - graph_t Full_g; - - double **Prob; - double **Tried; - double **Dist; - double **Final; - double **EdgeIndex; - double *Rank; - - base_generator_type generator; - boost::uniform_real<> uni_dist; - boost::geometric_distribution geo; - -public: - - - - //====== Constructor ====== - Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) - { - //typedef array_type2::index index2; - - - std::ifstream inFile; - //string line; - - //------------------------------- - - base_generator_type gene(42u); - generator = gene; - generator.seed(static_cast(std::time(0))); - boost::uniform_real<> uni_d(0,1); - uni_dist = uni_d; - - //-------------------------------- - - int i, k; - int x, y; - Edge* edge_array_mine; - int num_arcs_mine, num_nodes_mine; - int* weights_mine; - - TargetNovelty = target; - CumulativeRelativeLoss = 0.; - CRLsquare = 0.; - - - N_epochs = Epochs; - N_steps = Steps; - N_repeats = Repeats; - - current_epoch = 0; - current_loss = 0.; - current_repeat = 0; - - id = idd; - - verbose_level = 1; - - mode_identify_failed = identify_failed; - - - //------------------------------- - // The first pass though file with the graph - inFile.open(FileToOpen.c_str()); - if (inFile.fail()) { - cout << "Unable to open file"; - exit(1); // terminate with error - }else { - - if (verbose_level > 2){ - std::cout << " Opened <" << FileToOpen << ">"<> x; - inFile >> y; - - if (verbose_level > 2){ - std::cout << " x: " << x; - std::cout << " y: " << y << std::endl; - } - - if (i==0){ - N_nodes=x; - M_edges=y; - break; - } - i++; - - - } - inFile.close(); - - if (verbose_level == 2){ - std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ - std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { - if (i > 0) { - Final[x][y]=1.; - Final[y][x]=1.; - - - if (verbose_level == 2){ - std::cout << "."; - } - } - i++; - - } - if (verbose_level == 2){ - std::cout << std::endl; - } - inFile.close(); - - k=0; - for (int i=0; i 0.){ - EdgeIndex[i][j]=k; - k++; - } - } - } - - - - //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - // create graph -- hopefully, we can keep it, just modifying edge weights - - - edge_array_mine = new Edge[2*M_edges]; - num_arcs_mine = 2*M_edges; - num_nodes_mine = N_nodes; - weights_mine = new int[2*M_edges]; - for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} - - k=0; - for(int i=0; i0.){ - edge_array_mine[2*k] =Edge(i,j); - edge_array_mine[2*k+1]=Edge(j,i); - k++; - } - } - } - graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); - - Full_g = g; - delete edge_array_mine; - delete weights_mine; - - //=========================================================================== - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - for (int i=0; i 0.){ - u = vertex(i, Full_g); - v = vertex(j, Full_g); - remove_edge(u,v,Full_g); - remove_edge(v,u,Full_g); - - } - } - } - - - } - - - //===================================================================== - int sample_failed_number(double pfail){ - - //boost::geometric_distribution geo(pfail); - //boost::variate_generator > geom(generator, geo); - - double r, u, g; - - r=0.; - for(int i=0; i=3){ - std::cout << id << " failed " << r << std::endl; - } - return r; - - } - - //============================================= - double get_target(void){ - return TargetNovelty; - } - - //============================================= - void set_target(double target){ - TargetNovelty=target; - } - - //============================================= - int sample(){ - - //boost::variate_generator > uni(generator, uni_dist); - // double r = uni(), Summa = 0.; - - - - double r = rand(), Summa = 0.; - r /= (double)(pow(2.,31)-1.); - int result = 0; - int finished = 0; - - if (verbose_level==4){ - std::cout << id << " sampled " << r << std::endl; - } - - for(int i=0; i r){ - - Tried[i][j]+=1.; - - if (Final[i][j] > 0.){ - result = 1; - } - finished = 1; - } - } - } - - return result; - - } - - //=============================== - void update_current_graph(void){ - - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - //property_map::type weightmap = get(edge_weight, Full_g); - for (int i=0; i 0. && Tried[i][j]>0){ - //s = edge(i, j, Full_g); - boost::graph_traits::edge_descriptor e1,e2; - bool found1, found2; - u = vertex(i, Full_g); - v = vertex(j, Full_g); - tie(e1, found1) = edge(u, v, Full_g); - tie(e2, found2) = edge(v, u, Full_g); - if (!found1 && !found2){ - add_edge(u,v,1,Full_g); - add_edge(v,u,1,Full_g); - } - - } - } - - } - } - - //=============================== - void update_distances(void){ - // put shortest paths to the *Dist[][] - std::vector p(num_vertices(Full_g)); - std::vector d(num_vertices(Full_g)); - vertex_descriptor s; - - - // put shortest paths to the *Dist[][] - for (int j=0; j 0.){ - s = vertex(j, Full_g); - dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); - - //std::cout <<" Vertex "<< j << std::endl; - graph_traits < graph_t >::vertex_iterator vi, vend; - - for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { - - if (p[*vi]!=*vi){ - Dist[*vi][j]=d[*vi]; - Dist[j][*vi]=d[*vi]; - - if (Dist[*vi][j]>max_dist){ - max_dist=Dist[*vi][j]; - } - - - } else { - Dist[*vi][j]=-1.; - Dist[j][*vi]=-1.; - } - } - } - - } - - - } - - //====================================================== - void update_ranks(void){ - - for(int i=0; i0. && Final[i][j] >0.){ - Rank[i]++; - Rank[j]++; - } - } - } - - } - - //==================================================================== - void set_world(double a_i, double a_m, double b, double g, double d){ - - alpha_i=a_i; - alpha_m=a_m; - gamma=g; - beta=b; - delta=d; - - } - - //==================================================================== - void reset_world(){ - - //==================================================== - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - - for (int i=0; i 0. && Tried[i][j] > 0){ - u = vertex(i, Full_g); - v = vertex(j, Full_g); - remove_edge(u,v,Full_g); - remove_edge(v,u,Full_g); - - } - } - } - - //================================================== - - current_loss=0; - current_epoch=0; - current_repeat++; - current_novelty=0; - - for(int i = 0; i < N_nodes; ++i) { - Rank[i]=0.; - for(int j = 0; j < N_nodes; ++j) { - Prob[i][j]=0.; - Dist[i][j]=-1.; - Tried[i][j]=0.; - } - } - } - - - //============================================== - void show_parameters(void){ - - std::cout << "Parameters: " - << alpha_i << " " - << alpha_m << " | " - << beta << " " - << gamma << " | " - << delta << std::endl; - - } - - - - //=============================================== - string file_name(){ - - std::ostringstream s; - s << "world_" - << lexical_cast(alpha_i) << "_" - << lexical_cast(alpha_m) << "_" - << lexical_cast(beta) << "_" - << lexical_cast(gamma) << "_" - << lexical_cast(delta) << "_" - << lexical_cast(N_epochs) << "_" - << lexical_cast(N_steps) << "_" - << lexical_cast(N_repeats) << ".txt"; - - return s.str(); - - } - - - - - //================================================= - void set_verbose(int verbose){ - - verbose_level = verbose; - } - - - //============================================================= - void update_probabilities(void){ - - - //========================= - // Compute sampling probabilities - // first pass: \xi_i,j - for(int i=0; i 0.){ - - double k = Dist[i][j]; - if (k >= k_max){ - k = k_max-1; - } - - bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); - - } else { - bg = delta; - } - - Prob[i][j] = exp(Prob[i][j] + bg); - } - } - - - // second pass: sum - double Summa = 0.; - - for(int i=0; i0. && Final[i][j]>0.){ - novel+=1.; - } - } - } - - } - //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - else { - - double pfail=0.; - int n_failed; - //, n_check = 0; - - for(int i=0; i0. && Final[i][j]>0.){ - novel+=1.; - } - } - } - } - - current_novelty = novel; - - - //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - if (verbose_level == 2){ - std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) - - << " cost=" << cost - << " novel=" << novel - << " rel_loss=" << cost/novel - << std::endl; - } - - current_epoch++; - } - - - //====== Destructor ====== - ~Universe(){ - - delete_2Dmatrix(Final, N_nodes); - delete_2Dmatrix(Dist, N_nodes); - delete_2Dmatrix(Tried, N_nodes); - delete_2Dmatrix(Prob, N_nodes); - delete_2Dmatrix(EdgeIndex, N_nodes); - delete_1Dmatrix(Rank); - } - - //================================================ - // Allocate memory - double** allocate_2Dmatrix(int N, int M) - { - double **pointer; - - if (verbose_level == 2){ - std::cout<< "["< 0){ - - pointer = new double[N]; - - }else { - - pointer = NULL; - } - - return pointer; - - } - - //============================================== - // De-Allocate memory to prevent memory leak - void delete_2Dmatrix(double **pointer, int N){ - - if (pointer != NULL){ - - for (int i = 0; i < N; ++i){ - delete [] pointer[i]; - } - delete [] pointer; - } - } - //==================== - void delete_1Dmatrix(double *pointer){ - - delete [] pointer; - } - - //=========================================== - double get_rel_loss(){ - - return CumulativeRelativeLoss ; - } - - //=========================================== - double get_rel_loss_err(){ - - return CRLsquare ; - } - - - - //================================================================================== - void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ - - double ALOT=100000000000.; - - // std::cout<<" evolve_to_target_and_save: istart=" << istart << "iend=" << iend << "\n"; - - reset_world(); - - for (int k = istart; k < iend; k++){ - - // std::cout<<" evolve: k=" << k << "\n"; - - - - for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ - // std::cout<<" evolve: k=" << k << " i=" << i << " cur=" << current_novelty << " Target=" << TargetNovelty << "\n"; - update_world(); - } - - storage[k]=current_loss/current_novelty; - counters[k]=1; - - - reset_world(); - } - - } - //============================================== - int get_reruns(void){ - return N_repeats; - } - - //============================================== - double get_parameter(int i){ - - switch(i){ - case 0: - return alpha_i; - case 1: - return alpha_m; - case 2: - return beta; - case 3: - return gamma; - case 4: - return delta; - default: - - std::cout << "Erroneous parameter id!!!!\n\n\n"; - return 0.; - } - } - - - //============================================== - void evolve_to_target(){ - - reset_world(); - if (beta < -1. || gamma < -1.){ - CumulativeRelativeLoss = 100000000000.; - CRLsquare = 0.; - return; - } - - - for (int k=0; k< N_repeats; k++){ - - - for(int i=0; i 4) {return 0;} - - else { - - switch(position){ - case 0: - alpha_i=value; - return 1; - case 1: - alpha_m=value; - return 1; - case 2: - beta=value; - return 1; - case 3: - gamma=value; - return 1; - case 4: - delta=value; - return 1; - } - - } - - return 0; - } - - - //================================================================= - void try_annealing(double starting_jump, int iterations, - double temp_start, double temp_end, double target_rejection){ - - double dx[5]={0.,0.,0.,0.,0}; - double x[5]={0.,0.,0.,0.,0}; - double rejection[5]={0., 0., 0., 0., 0.}; - double curr_x, curr_err, x_tmp; - double temperature; - double ratio, r; - int cycle=10; - boost::variate_generator > uni(generator, uni_dist); - - // set up parameter for annealing - - x[0]=alpha_i; - x[1]=alpha_m; - x[2]=beta; - x[3]=gamma; - x[4]=delta; - - for(int i=0;i<5;i++){ - dx[i] = starting_jump; - } - - // establish the current value - - //.......................................... - evolve_to_target(); - std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; - - curr_x = CumulativeRelativeLoss; - curr_err = CRLsquare; - CumulativeRelativeLoss = 0; - CRLsquare = 0; - //........................................... - - // optimization cycle - for(int i=0; i ratio){ - - std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) - <<" "<< (i+1) << " Did not accept " - << x_tmp << "(" << j << ")" << std::endl; - std::cout << alpha_i << " "<< alpha_m << " " - << beta << " " << gamma << " " - << delta << " " << std::endl; - set_parameter(x[j], j); - CumulativeRelativeLoss = 0; - CRLsquare = 0; - - rejection[j]+=1.; - } - - else { - - curr_x = CumulativeRelativeLoss; - curr_err = CRLsquare; - x[j] = x_tmp; - CumulativeRelativeLoss = 0; - CRLsquare = 0; - std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) - << wrap_double(rejection[0],2) - << " "<< wrap_double(rejection[1], 7) << " " - << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " - << wrap_double(rejection[4],6) << " " - << std::endl << std::endl; - - std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) - <<" " - << string_wrap((string) "***** Did accept! ", 3) - << wrap_double(alpha_i,2) - << " "<< wrap_double(alpha_m, 7) << " " - << wrap_double(beta,5) << " " - << wrap_double(gamma,9) << " " - << wrap_double(delta,6) << " " - << std::endl << std::endl; - - } - //........................................................ - - } - - } - - } - - -}; - -//============================================================ - -std::pair multi_loss( // dispatch_group_t group, - Universe* un[], - // dispatch_queue_t* CustomQueues, - double* Results, - int* Counters, - double* params){ - - int N = un[0]->get_reruns(); - int step = (int)(double)N/(double)(Nworkers); - int istart=0; - int iend = istart+step; - - double Loss=0., LossSquare=0.; - - timeval startTime, endTime; - double elapsedTime; - // start timer - gettimeofday(&startTime, NULL); - - //err: for(int i=0; iset_parameter(params[j],j); - } - } - int i; - #pragma omp parallel for private (i) - for(i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); - un[i]->evolve_to_target_and_save(i*step, min((i+1)*step,N), Results, Counters); - //}); - - // std::cout<<"multi_loss: Returned from evolve_to_target_and_save " << i << "\n"; - - - //istart += step; - //iend = min(istart+step,N); - - } - // err } - // dispatch_group_wait(group, DISPATCH_TIME_FOREVER); - //dispatch_release(group); - - for (int i=0; i Res; - Res.first=Loss; - Res.second=two_std; - - gettimeofday(&endTime, NULL); - elapsedTime = (endTime.tv_sec - startTime.tv_sec) * 1000.0; // sec to ms - elapsedTime += (endTime.tv_usec - startTime.tv_usec) / 1000.0; // us to ms - elapsedTime /= 1000.; - cout << "multi_loss(N=" << N << ") elapsed time: " << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; - - return Res; -} -//============================================================ - - -//============================================================ -void multi_annealing( // dispatch_group_t group, - Universe* un[], - // dispatch_queue_t* CustomQueues, - double T_start, double T_end, - double Target_rejection, - int Annealing_repeats, - double starting_jump, - double* Results, - int* Counters, - double* params0, - double annealing_cycles){ - //................................. - // re-implement annealing - - double dx[5]={0.,0.,0.,0.,0}; - double x[5]={0.,0.,0.,0.,0}; - double rejection[5]={0., 0., 0., 0., 0.}; - double curr_x, curr_err, x_tmp; - double temperature; - double ratio, r; - int cycle=10; - //boost::variate_generator > uni(generator, uni_dist); - - // set up parameter for annealing - - x[0]=params0[0]; - x[1]=params0[1]; - x[2]=params0[2]; - x[3]=params0[3]; - x[4]=params0[4]; - - for(int i=0;i<5;i++){ - dx[i] = starting_jump; - } - - // establish the current value - std::pairRes; - - Res = multi_loss( /* group,*/ un, /* CustomQueues,*/ Results, Counters, x); - std::cout << Res.first << " +- " << Res.second << std::endl; - - curr_x = Res.first; - curr_err = Res.second; - - // optimization cycle - - for(int i=0; iset_parameter(x_tmp, j); - } - - - Res = multi_loss(/* group, */ un, /* CustomQueues, */ Results, Counters, x); - std::cout << Res.first << " +- " << Res.second << std::endl; - - ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); - r = rand()/(double)(pow(2.,31)-1.); - std::cout << r << " vs " << ratio << std::endl; - - double ALOT=100000000000.; - - if (Res.first < ALOT) - { - ofstream filestr; - - filestr.open ("best_opt_some.txt", ofstream::app); - - // >> i/o operations here << - filestr << un[0]->get_target() << "," - << Res.first - << "," << un[0]->get_parameter(0) - << "," << un[0]->get_parameter(1) - << "," << un[0]->get_parameter(2) - << "," << un[0]->get_parameter(3) - << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; - - filestr.close(); - - - filestr.open ("max_dist.txt", ofstream::app); - - // >> i/o operations here << - filestr << max_dist << ",\n"; - - filestr.close(); - - } - - - if (r > ratio){ - - std::cout << " "<< (i+1) << ","<< (j) - <<" "<< (i+1) << " Did not accept " - << x_tmp << "(" << j << ")" << std::endl; - std::cout << un[0]->get_parameter(0) - << " " << un[0]->get_parameter(1) - << " " << un[0]->get_parameter(2) - << " " << un[0]->get_parameter(3) - << " " << un[0]->get_parameter(4) << " " << std::endl; - - x[j]=x_hold; - for(int w=0; wset_parameter(x[j], j); - } - - - //set_parameter(x[j], j); - rejection[j]+=1.; - } - - else { - - curr_x = Res.first; - curr_err = Res.second; - x[j] = x_tmp; - - for(int w=0; wset_parameter(x[j], j); - } - - std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) - << wrap_double(rejection[0],2) << " " - << wrap_double(rejection[1],7) << " " - << wrap_double(rejection[2],5) << " " - << wrap_double(rejection[3],9) << " " - << wrap_double(rejection[4],6) << " " - << std::endl << std::endl; - - std::cout << " "<< (i+1) <<","<< (j) - <<" " - << string_wrap((string) "***** Did accept! ", 3) - << wrap_double(un[0]->get_parameter(0),2) << " " - << wrap_double(un[0]->get_parameter(1),7) << " " - << wrap_double(un[0]->get_parameter(2),5) << " " - << wrap_double(un[0]->get_parameter(3),9) << " " - << wrap_double(un[0]->get_parameter(4),6) << " " - << std::endl << std::endl; - - - - } - //........................................................ - - } - } - - } - -} - - - -//================================================ -int -main(int argc, char* argv[]) -{ - - double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; - string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; - string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; - string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; - string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; - int params1[4] = {300, 50, 1000, 10}; - int params3[5] = { 0, 0, 0, 0, 0}; - - // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump - double params2[5] = {1, 0.001, 100, 0.3, 1.5}; - - int verbose_level = 2; - const std::string one="one", two="two"; - static Universe* un[Nworkers]; - // static dispatch_queue_t CustomQueues[Nworkers]; - - static double* Results; - static int* Counters; - - timeval t1, t2; - double elapsedTime; - // start timer - gettimeofday(&t1, NULL); - - - if (argc < 8) { - std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; - std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; - std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; - - system("pwd"); - - - return(1); - } - else { - for (int nArg=0; nArg < argc; nArg++){ - //std::cout << nArg << " " << argv[nArg] << std::endl; - if (nArg > 0 && nArg < 7){ - params0[nArg-1]= atof(argv[nArg]); - std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; - } - if (nArg > 6 && nArg < 11){ - params1[nArg-7]= atoi(argv[nArg]); - std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; - } - if (nArg == 11){ - verbose_level = atoi(argv[nArg]); - std::cout << "verbose level: " << verbose_level << std::endl; - } - if (nArg > 11 && nArg < 17){ - params2[nArg-12]= atof(argv[nArg]); - std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; - } - if (nArg > 16 && nArg < 22){ - params3[nArg-17]= atof(argv[nArg]); - var_fixed[nArg-17]= atof(argv[nArg]); - std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; - } - - - } - - } - - /* - for target in range(58,1009,50): - s = ("%d" % target) - print s - - for i in range(15): - # Param groups separated by "|" below for documentation. NOTE that | is not used on command line! - os.system("./supe_duper_optimizer |0 0 4 50 -1 "+s+" | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0") - */ - - /* Parameters, re-iterated: - - "alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; - double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; - - {"n_epochs", "n_steps", "n_reruns", "range"}; - int params1[4] = {300, 50, 1000, 10}; - - {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; - temperature_start, temperature_end, annealing_steps target_rejection Starting_jump - double params2[5] = {1, 0.001, 100, 0.3, 1.5}; - - {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; - int params3[5] = { 0, 0, 0, 0, 0}; - - - */ - - for (int j=0; j<5; j++){ - - cout << j << " | " << var_fixed[j] << " (fixed) \n"; - } - - target=params0[5]; - range = (double)params1[3]; - int identify_failed = 0; - char* filename= (char *)"movie_graph.txt"; - int n_ep=params1[0], n_st=params1[1], n_rep=params1[2]; - - //............................... - - for(int i=0; i 0){ - - Results = new double[n_rep]; - Counters = new int[n_rep]; - - }else { - - Results = NULL; - Counters = NULL; - std::cout << " Number of reruns should be positive! " << std::endl; - return 0; - - } - //............................... - srand(time(0)); - //srandomdev(); - - { - double r=0; - for (int j=0; j<100; j++){ - - - - r = rand()/(double)(pow(2.,31)-1.); - std::cout << r << " "; - } - std::cout << "\n "; - } - //random initiation of starting parameters - - if (range > 0.){ - - for (int i=0; i < 5; i++){ - - if (params0[i]==-100.){ - - double r1 = (rand()/(double)(pow(2.,31)-1.)); - double r2 = (rand()/(double)(pow(2.,31)-1.)); - double sign = 1.; - - if(r1 > 0.5){ - sign=-1.; - } - - params0[i] = sign*r2*range; - - std::cout << par_names0[i] << ": " << params0[i] << std::endl; - } - } - - } - - - double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; - int Annealing_repeats = (int) params2[2]; - - - // dispatch_group_t group = dispatch_group_create(); - - //............................. - multi_annealing( /* group, */ un, /* CustomQueues, */ T_start, T_end, Target_rejection, Annealing_repeats, - starting_jump, Results, Counters, params0, Annealing_repeats); - - //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); - // dispatch_release(group); - //............................. - - - // stop timer - gettimeofday(&t2, NULL); - - // compute and print the elapsed time in millisec - elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms - elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms - elapsedTime /= 1000.; - cout << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; - - //..................... - - for(int i=0; i 0){ - - delete [] Results; - delete [] Counters; - - } - - return 0; - - - -} - Deleted: SwiftApps/optirun.swift =================================================================== --- SwiftApps/optirun.swift 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/optirun.swift 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,41 +0,0 @@ -type file; - -app (file outfile, file best, file max) optimize ( string args[], file graph ) -{ - optimizersh @best @max args stdout=@outfile ; -} - -int minrange=58; -int maxrange=1009; -//int maxrange=209; -int rangeinc=50; - -int nreps=2; # 15 - -// [alpha_i alpha_m beta gamma delta target_innov -// [n_epochs n_steps n_reruns] [range] -// [verbose_level] -// [T_start T_end Annealing_steps Target_rejection Starting_jump] -// [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta] - -file graph <"movie_graph.txt">; - -foreach target in [minrange:maxrange:rangeinc] { - foreach rep in [1:nreps] { - file outfile ; - // file errfile ; - file bestfile ; - file maxfile ; - - // string longargs[] = @strcat("0 0 4 50 -1 ",target," 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0"); - - string fastargs1[] = ["0", "0", "4", "50", "-1", @strcat(target), "40000", "20", "1000", "2", "1", "2.", "0.01", "100", "0.3", "2.3", "1", "1", "0", "0", "0"]; - string fastargs2[] = [ - "0", "0", "4", "50", "-1", @strcat(target), - "40000", "20", "1000", "2", - "1", - "2.", "0.01", "5", "0.3", "2.3", - "1", "1", "0", "0", "0"]; - (outfile, bestfile, maxfile) = optimize(fastargs2,graph); - } -} Deleted: SwiftApps/script-smaller-a.py =================================================================== --- SwiftApps/script-smaller-a.py 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/script-smaller-a.py 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,19 +0,0 @@ -#! /usr/bin/env python -import os - -# FULL for target in range(58,1009,50): -# FAST for target in range(58,209,50): -for target in range(58,209,50): - s = ("%d" % target) - print s - - for i in range(15): -# FAST for i in range(2): - args="./optimizer 0 0 4 50 -1 "+s+" 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) - print("\n\n **** CALLING APP: "+args+"\n\n\n") - os.system(args); -# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") -# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") - - -print "Done!" Deleted: SwiftApps/sumloss.sh =================================================================== --- SwiftApps/sumloss.sh 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/sumloss.sh 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,31 +0,0 @@ -#! /bin/awk -f - -BEGIN { n = ARGC-1 } -{ - loss += $1/n - loss_sq += ($1*$1)/n -} -END { - x = (loss_sq - (loss*loss))/n - sdev = 2.0 * sqrt(x) - printf "loss sdev\n" - printf "%f %f\n", loss, sdev -} - -# the awk script above implements this c++ logic from optimizer.cpp: -# -# for (int i=0; i Res; -# Res.first=Loss; -# Res.second=two_std; Deleted: SwiftApps/t1.py =================================================================== --- SwiftApps/t1.py 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/t1.py 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,22 +0,0 @@ -#! /usr/bin/env python -import os - -# FULL for target in range(58,1009,50): -# FAST for target in range(58,209,50): -for target in range(58,59,50): - s = ("%d" % target) - print s - -# FULL for i in range(15): -# FAST for i in range(2): - for i in range(1): - args="./toptimizer 0 0 4 50 -1 "+s+" 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) - args="OMP_NUM_THREADS=24 ./toptimizer 0 0 4 50 -1 "+s+" 40000 20 100 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) - args="OMP_NUM_THREADS=24 ./toptimizer 0 0 4 50 -1 "+s+" 40000 20 100 2 1 2. 0.01 2 0.3 2.3 1 1 1 0 0 # > out.T"+str(target)+".i"+str(i) - print("\n\n **** CALLING APP: "+args+"\n\n\n") - os.system(args); -# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") -# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") - - -print "Done!" Deleted: SwiftApps/t2.cpp =================================================================== --- SwiftApps/t2.cpp 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/t2.cpp 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,44 +0,0 @@ -#include -#include -#include - -template -bool from_string(T& t, - const std::string& s, - std::ios_base& (*f)(std::ios_base&)) -{ - std::istringstream iss(s); - return !(iss >> f >> t).fail(); -} - -int main() -{ - int i; - float f; - - // the third parameter of from_string() should be - // one of std::hex, std::dec or std::oct - if(from_string(i, std::string("ff"), std::hex)) - { - std::cout << i << std::endl; - } - else - { - std::cout << "from_string failed" << std::endl; - } - - if(from_string(f, std::string("123.456"), std::dec)) - { - std::cout << f << std::endl; - } - else - { - std::cout << "from_string failed" << std::endl; - } - return 0; -} - -/* output: -255 -123.456 -*/ Deleted: SwiftApps/t2.py =================================================================== --- SwiftApps/t2.py 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/t2.py 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,23 +0,0 @@ -#! /usr/bin/env python -import os - -# FULL for target in range(58,1009,50): -# FAST for target in range(58,209,50): -for target in range(58,59,50): - s = ("%d" % target) - print s - -# FULL for i in range(15): -# FAST for i in range(2): - for i in range(1): - args="./toptimizer 0 0 4 50 -1 "+s+" 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) - args="OMP_NUM_THREADS=24 ./toptimizer 0 0 4 50 -1 "+s+" 40000 20 100 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) - args="./toptimizer 0 0 4 50 -1 "+s+" 40000 20 75 2 1 2. 0.01 2 0.3 2.3 1 1 1 0 0 m # > out.T"+str(target)+".i"+str(i) - args="OMP_NUM_THREADS=24 ./toptimizer 0 0 4 50 -1 "+s+" 40000 20 96 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0 m 24 # > out.T"+str(target)+".i"+str(i) - print("\n\n **** CALLING APP: "+args+"\n\n\n") - os.system(args); -# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") -# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") - - -print "Done!" Deleted: SwiftApps/t3.py =================================================================== --- SwiftApps/t3.py 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/t3.py 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,22 +0,0 @@ -#! /usr/bin/env python -import os - -# FULL for target in range(58,1009,50): -# FAST for target in range(58,209,50): -for target in range(58,59,50): - s = ("%d" % target) - print s - -# FULL for i in range(15): -# FAST for i in range(2): - for i in range(1): - args="./toptimizer 0 0 4 50 -1 "+s+" 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) - args="OMP_NUM_THREADS=24 ./toptimizer 0 0 4 50 -1 "+s+" 40000 20 100 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0 # > out.T"+str(target)+".i"+str(i) - args="./toptimizer 0 0 4 50 -1 "+s+" 40000 20 75 2 1 2. 0.01 2 0.3 2.3 1 1 1 0 0 a # > out.T"+str(target)+".i"+str(i) - print("\n\n **** CALLING APP: "+args+"\n\n\n") - os.system(args); -# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") -# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") - - -print "Done!" Deleted: SwiftApps/tc =================================================================== --- SwiftApps/tc 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/tc 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,13 +0,0 @@ -localhost sh /bin/sh null null null -localhost cat /bin/cat null null null -pbs cat /bin/cat null null null -mcs cat /bin/cat null null null -localhost catnap /home/wilde/swift/lab/catnap.sh null null GLOBUS::maxwalltime="00:01:00" -beagle optimizer /home/wilde/AndreysOptimizer/Optimizer null null GLOBUS::maxwalltime="01:00:00" -beagle optimizersh /home/wilde/AndreysOptimizer/optimizer.sh null null GLOBUS::maxwalltime="02:00:00" - -beagle evolve /home/wilde/AndreysOptimizer/evolve.sh null null GLOBUS::maxwalltime="02:00:00" -localhost evolve /home/wilde/AndreysOptimizer/evolve.sh null null GLOBUS::maxwalltime="02:00:00" - -beagle sumloss /home/wilde/AndreysOptimizer/evolve.sh null null GLOBUS::maxwalltime="02:00:00" -localhost sumloss /home/wilde/AndreysOptimizer/sumloss.sh null null GLOBUS::maxwalltime="02:00:00" Deleted: SwiftApps/testO.sh =================================================================== --- SwiftApps/testO.sh 2012-01-20 21:32:59 UTC (rev 5503) +++ SwiftApps/testO.sh 2012-01-20 22:57:44 UTC (rev 5504) @@ -1,21 +0,0 @@ -#! /bin/bash - -python <out.o.T"+s); -os.system("./Optimizer "+args+" >out.O.T"+s); - -# print("\n\n **** CALLING APP: ./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0\n\n\n") -# FAST: os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 10 2 1 2. 0.01 2 0.3 2.3 1 1 0 0 0") - -print "Done!" -END - From wilde at ci.uchicago.edu Mon Jan 23 11:07:02 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 23 Jan 2012 17:07:02 -0000 Subject: [Swift-commit] r5508 - in SwiftApps/SciColSim: . original.2011.1014 Message-ID: <20120123170658.BB6059CFA1@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-23 11:06:58 -0600 (Mon, 23 Jan 2012) New Revision: 5508 Added: SwiftApps/SciColSim/original.2011.1014/ SwiftApps/SciColSim/original.2011.1014/Makefile SwiftApps/SciColSim/original.2011.1014/movie_graph.txt SwiftApps/SciColSim/original.2011.1014/optimizer.cpp SwiftApps/SciColSim/original.2011.1014/optimizer.cpp.orig SwiftApps/SciColSim/original.2011.1014/script-smaller-a.py SwiftApps/SciColSim/original.2011.1014/script-smaller-a.py.orig Log: Add a copy of the original starting code. Too late to add this as base for all later revision. Added: SwiftApps/SciColSim/original.2011.1014/Makefile =================================================================== --- SwiftApps/SciColSim/original.2011.1014/Makefile (rev 0) +++ SwiftApps/SciColSim/original.2011.1014/Makefile 2012-01-23 17:06:58 UTC (rev 5508) @@ -0,0 +1,4 @@ +all: optimizer + +optimizer: optimizer.cpp + g++ -I boost_1_47_0 -o optimizer optimizer.cpp Added: SwiftApps/SciColSim/original.2011.1014/movie_graph.txt =================================================================== --- SwiftApps/SciColSim/original.2011.1014/movie_graph.txt (rev 0) +++ SwiftApps/SciColSim/original.2011.1014/movie_graph.txt 2012-01-23 17:06:58 UTC (rev 5508) @@ -0,0 +1,1010 @@ +500 1008 +0 56 +0 436 +0 446 +1 256 +1 476 +1 260 +1 262 +1 9 +1 266 +1 13 +1 142 +1 273 +1 388 +1 30 +1 36 +1 37 +1 423 +1 168 +1 425 +1 255 +1 175 +1 307 +1 58 +1 316 +1 319 +1 323 +1 68 +1 455 +1 216 +1 82 +1 88 +1 346 +1 348 +1 225 +1 228 +1 236 +1 365 +1 111 +1 424 +1 370 +1 246 +1 376 +1 122 +1 191 +1 252 +1 382 +1 127 +2 3 +3 262 +3 263 +3 392 +3 172 +3 138 +3 395 +3 13 +3 18 +3 150 +3 408 +3 154 +3 156 +3 30 +3 291 +3 37 +3 168 +3 300 +3 52 +3 158 +3 310 +3 265 +3 187 +3 61 +3 319 +3 65 +3 322 +3 54 +3 130 +3 71 +3 332 +3 461 +3 397 +3 419 +3 473 +3 346 +3 95 +3 352 +3 98 +3 103 +3 107 +3 414 +3 368 +3 498 +3 499 +4 224 +4 449 +4 419 +4 356 +4 72 +4 330 +4 173 +4 80 +4 242 +4 180 +4 24 +4 138 +5 33 +5 459 +5 484 +5 106 +5 299 +5 430 +5 16 +5 336 +5 50 +5 147 +5 406 +5 87 +5 91 +5 190 +6 7 +6 264 +6 137 +6 276 +6 149 +6 279 +6 153 +6 29 +6 415 +6 293 +6 166 +6 296 +6 42 +6 44 +6 48 +6 49 +6 438 +6 55 +6 314 +6 69 +6 454 +6 463 +6 84 +6 85 +6 470 +6 349 +6 94 +6 229 +6 233 +6 364 +6 117 +6 248 +6 380 +6 426 +7 129 +7 131 +7 470 +7 136 +7 471 +7 271 +7 402 +7 19 +7 404 +7 282 +7 286 +7 491 +7 35 +7 421 +7 166 +7 295 +7 427 +7 428 +7 301 +7 349 +7 436 +7 439 +7 56 +7 445 +7 446 +7 320 +7 123 +7 451 +7 69 +7 454 +7 78 +7 463 +7 212 +7 213 +7 342 +7 343 +7 474 +7 93 +7 483 +7 357 +7 102 +7 235 +7 237 +7 239 +7 371 +7 379 +8 112 +8 164 +8 10 +8 12 +8 398 +8 176 +8 120 +8 178 +8 373 +8 24 +8 124 +9 262 +10 11 +10 12 +10 47 +10 335 +10 124 +11 96 +11 289 +11 66 +11 283 +11 97 +11 361 +11 47 +11 432 +11 335 +11 215 +11 27 +11 124 +11 189 +12 112 +12 434 +12 47 +13 32 +13 130 +13 260 +13 37 +13 39 +13 202 +13 305 +13 461 +13 145 +13 275 +13 448 +13 54 +13 183 +13 344 +13 36 +14 387 +14 267 +14 155 +14 36 +14 165 +14 51 +14 308 +14 440 +14 441 +14 59 +14 444 +14 199 +14 328 +14 462 +14 81 +14 210 +14 214 +14 91 +14 99 +14 60 +14 106 +14 109 +14 110 +14 244 +15 193 +15 73 +15 400 +15 341 +15 27 +15 31 +16 33 +16 258 +16 353 +16 329 +16 204 +16 207 +16 336 +16 108 +16 50 +16 22 +16 119 +16 169 +16 381 +16 223 +17 321 +17 482 +17 197 +17 276 +17 149 +17 315 +17 94 +18 32 +18 461 +18 305 +18 498 +18 86 +18 25 +19 320 +19 421 +19 334 +19 314 +19 349 +19 446 +20 48 +20 28 +20 83 +20 44 +20 45 +21 288 +21 176 +21 347 +21 325 +21 392 +21 490 +21 366 +21 272 +21 209 +21 115 +21 182 +21 247 +21 184 +21 25 +21 217 +21 27 +21 86 +21 478 +22 353 +23 257 +23 100 +23 25 +24 134 +24 146 +24 302 +24 151 +24 290 +24 291 +24 43 +24 173 +24 46 +24 176 +24 180 +24 245 +24 453 +24 457 +24 208 +24 338 +24 363 +24 116 +24 373 +24 126 +25 32 +25 128 +25 257 +25 86 +26 161 +26 357 +26 193 +26 78 +26 341 +26 69 +27 361 +27 490 +27 333 +27 272 +27 312 +27 468 +27 41 +27 184 +27 429 +27 124 +27 341 +28 64 +28 354 +28 67 +28 135 +28 200 +28 42 +28 75 +28 45 +28 206 +28 48 +28 359 +28 53 +28 238 +29 229 +29 199 +29 296 +29 233 +29 42 +29 274 +29 117 +29 152 +29 155 +29 62 +30 386 +30 225 +30 76 +30 322 +30 367 +30 318 +31 200 +31 73 +31 333 +31 494 +31 45 +31 312 +32 257 +32 305 +32 101 +32 486 +32 39 +32 231 +32 79 +32 145 +32 275 +33 459 +33 336 +33 372 +33 119 +33 409 +34 283 +35 491 +35 243 +35 237 +35 326 +36 260 +36 266 +36 285 +36 292 +36 39 +36 424 +36 171 +36 181 +36 183 +36 440 +36 58 +36 323 +36 328 +36 81 +36 82 +36 87 +36 99 +36 228 +36 101 +36 111 +37 168 +37 202 +38 92 +39 448 +39 101 +39 486 +39 231 +39 145 +39 344 +40 345 +40 355 +40 179 +40 59 +40 125 +41 160 +41 226 +41 230 +41 104 +41 361 +41 492 +41 341 +41 215 +41 121 +41 189 +42 64 +42 67 +42 199 +42 359 +42 109 +42 206 +42 143 +42 48 +42 274 +42 117 +44 193 +44 69 +44 161 +44 73 +44 48 +44 83 +44 279 +45 200 +45 73 +45 83 +46 242 +46 485 +46 126 +46 173 +48 64 +48 206 +50 259 +50 261 +50 329 +50 299 +50 204 +50 430 +50 207 +50 405 +50 59 +50 159 +51 67 +51 101 +51 135 +51 210 +51 244 +51 214 +51 441 +51 249 +52 368 +52 217 +52 347 +52 86 +53 101 +53 327 +53 75 +53 238 +53 79 +53 249 +54 130 +55 84 +57 162 +57 331 +58 266 +58 82 +59 384 +59 259 +59 132 +59 267 +59 496 +59 355 +59 152 +59 91 +59 221 +59 159 +60 91 +60 165 +62 152 +62 155 +62 221 +63 456 +63 334 +63 303 +63 472 +63 314 +63 380 +65 154 +65 499 +65 374 +65 103 +66 96 +66 160 +66 215 +67 359 +67 135 +67 109 +67 143 +67 214 +69 161 +69 166 +69 239 +69 404 +69 85 +69 279 +69 153 +70 410 +70 467 +71 130 +72 138 +73 193 +74 241 +74 82 +74 188 +74 133 +74 469 +75 140 +75 79 +75 90 +75 350 +76 386 +77 120 +77 306 +77 452 +77 254 +77 311 +78 239 +78 357 +79 257 +79 100 +79 101 +80 138 +81 99 +81 171 +82 256 +82 133 +82 348 +82 205 +82 372 +82 181 +82 119 +82 409 +82 255 +82 316 +82 122 +82 469 +84 277 +84 264 +84 149 +84 380 +84 415 +85 153 +85 166 +86 247 +86 217 +87 181 +87 147 +87 285 +89 192 +89 200 +89 333 +89 468 +89 443 +89 222 +90 272 +90 100 +90 350 +91 165 +91 106 +91 430 +91 406 +91 159 +92 258 +93 136 +93 464 +93 493 +93 326 +94 482 +94 233 +94 114 +94 276 +95 107 +95 265 +95 186 +95 332 +96 289 +96 324 +96 102 +96 401 +97 283 +97 220 +97 434 +97 164 +99 101 +99 171 +99 244 +99 251 +100 272 +101 231 +101 466 +101 244 +101 249 +101 251 +102 141 +102 237 +102 369 +102 243 +102 212 +102 121 +102 340 +102 411 +104 121 +104 230 +105 396 +105 309 +106 147 +106 308 +106 406 +106 444 +106 190 +109 199 +109 143 +109 387 +109 214 +110 267 +112 164 +113 195 +114 233 +114 482 +114 315 +114 412 +116 465 +117 296 +118 163 +119 188 +119 409 +120 297 +120 363 +120 398 +120 254 +121 160 +121 230 +121 492 +121 369 +121 212 +122 256 +122 316 +124 176 +125 394 +125 497 +125 179 +125 351 +125 479 +126 465 +126 290 +126 339 +129 491 +130 397 +131 464 +131 136 +132 383 +133 273 +133 232 +133 205 +133 241 +133 316 +134 203 +135 249 +135 354 +136 464 +136 474 +137 276 +138 419 +138 414 +138 158 +139 169 +140 200 +140 222 +140 350 +144 334 +146 363 +147 308 +147 285 +148 175 +149 456 +149 407 +151 422 +152 488 +152 233 +152 221 +152 351 +154 187 +154 358 +154 158 +155 199 +155 267 +155 221 +155 437 +156 332 +156 318 +156 310 +157 436 +157 301 +158 396 +158 187 +158 414 +159 430 +160 215 +161 193 +163 220 +164 297 +164 398 +164 220 +166 427 +167 201 +167 442 +167 170 +167 383 +168 319 +169 280 +169 270 +169 198 +170 353 +170 403 +170 269 +170 207 +170 211 +173 242 +174 194 +174 195 +174 362 +174 177 +174 250 +174 219 +174 412 +175 460 +175 246 +175 447 +176 291 +176 294 +176 366 +176 178 +176 182 +177 219 +179 345 +179 394 +181 372 +182 184 +182 429 +182 294 +184 429 +185 358 +188 280 +188 469 +189 215 +192 272 +192 443 +192 468 +192 287 +193 400 +195 488 +195 233 +196 389 +196 317 +197 321 +198 280 +199 387 +200 333 +200 222 +201 284 +203 311 +207 353 +207 329 +207 269 +207 240 +212 230 +212 341 +212 439 +213 349 +214 462 +215 226 +216 388 +216 236 +217 347 +218 465 +219 450 +219 394 +219 250 +219 298 +219 479 +220 297 +220 283 +221 267 +221 437 +222 443 +222 350 +225 236 +227 472 +227 321 +227 315 +227 412 +227 390 +228 424 +228 260 +230 341 +232 280 +232 241 +233 480 +233 412 +234 243 +234 340 +238 249 +238 354 +240 353 +241 280 +242 356 +243 385 +243 326 +244 251 +246 382 +249 354 +249 327 +249 466 +250 488 +250 479 +250 351 +252 376 +253 384 +253 269 +254 363 +254 302 +254 311 +258 353 +258 317 +258 477 +259 384 +259 405 +259 269 +260 424 +262 352 +262 346 +263 392 +263 300 +263 325 +264 438 +267 437 +268 413 +269 384 +269 383 +270 381 +270 431 +272 443 +272 350 +272 287 +273 316 +276 377 +278 390 +280 417 +281 376 +282 391 +283 289 +283 432 +285 308 +285 292 +288 325 +288 478 +289 401 +289 413 +291 325 +291 478 +292 328 +292 308 +297 398 +297 495 +302 453 +302 311 +304 493 +307 388 +308 328 +309 396 +311 453 +312 333 +312 494 +313 375 +314 487 +314 364 +314 380 +315 482 +315 412 +319 346 +321 456 +326 491 +326 435 +327 466 +328 440 +331 472 +332 408 +332 489 +333 468 +334 446 +337 380 +338 465 +341 400 +343 436 +345 394 +345 399 +347 392 +347 368 +349 364 +349 470 +351 496 +351 479 +353 393 +358 360 +358 396 +365 375 +366 478 +368 392 +372 409 +374 467 +378 411 +379 436 +380 456 +380 415 +382 433 +383 384 +394 481 +394 479 +396 449 +416 420 +416 422 +417 447 +418 446 +450 481 +456 475 +458 471 +463 470 +472 475 +496 497 + Property changes on: SwiftApps/SciColSim/original.2011.1014/movie_graph.txt ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/SciColSim/original.2011.1014/optimizer.cpp =================================================================== --- SwiftApps/SciColSim/original.2011.1014/optimizer.cpp (rev 0) +++ SwiftApps/SciColSim/original.2011.1014/optimizer.cpp 2012-01-23 17:06:58 UTC (rev 5508) @@ -0,0 +1,1675 @@ +// +// main.cpp +// optimizer +// +// Created by Andrey Rzhetsky on 4/11/11. +// Copyright 2011 University of Chicago. All rights reserved. +// + +#define Nworkers 24 + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define INT_INFINITY 2147483647 + +#define FIX_VARIABLES 1 + +using namespace boost; +using namespace std; +using namespace boost::numeric::ublas; + +static int max_dist=0; + +typedef boost::adjacency_matrix Graph; +typedef std::pair Edge; +typedef boost::graph_traits GraphTraits; +typedef boost::numeric::ublas::triangular_matrix prob; +typedef boost::numeric::ublas::triangular_matrix pathlength; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + +namespace std { + using ::time; +} + +static int var_fixed[5] = {1, 0, 1, 1, 0}; + +typedef boost::minstd_rand base_generator_type; +typedef adjacency_list < listS, vecS, directedS, +no_property, property < edge_weight_t, int > > graph_t; +typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; +typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; + + +//================================================ +string strDouble(double number) +{ + stringstream ss;//create a stringstream + ss << number;//add number to the stream + return ss.str();//return a string with the contents of the stream +} + +//================================================ + +double gaussian(double sigma) +{ + double GaussNum = 0.0; + int NumInSum = 10; + for(int i = 0; i < NumInSum; i++) + { + GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); + } + GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); + + + return GaussNum; + +} + + + +//================================================= +double diffclock(clock_t clock1,clock_t clock2) +{ + double diffticks=clock1-clock2; + double diffms=(diffticks)/CLOCKS_PER_SEC; + return diffms; +} + +//================================================ +//================================================================ +double get_new_x(double x, double dx){ + + double new_x; + // boost::variate_generator > uni(generator, uni_dist); + double r = rand()/(double)(pow(2.,31)-1.); + + if (r > 0.5){ + new_x = x + rand()*dx/(double)(pow(2.,31)-1.); + } else { + new_x = x - rand()*dx/(double)(pow(2.,31)-1.); + } + + return new_x; + +} + + +//=============================================== +string string_wrap(string ins, int mode){ + + std::ostringstream s; + + switch(mode){ + case 0: + s << "\033[1;29m" << ins << "\033[0m"; + break; + case 1: + s << "\033[1;34m" << ins << "\033[0m"; + break; + case 2: + s << "\033[1;44m" << ins << "\033[0m"; + break; + case 3: + s << "\033[1;35m" << ins << "\033[0m"; + break; + case 4: + s << "\033[1;33;44m" << ins << "\033[0m"; + break; + case 5: + s << "\033[1;47;34m" << ins << "\033[0m"; + break; + case 6: + s << "\033[1;1;31m" << ins << "\033[0m"; + break; + case 7: + s << "\033[1;1;33m" << ins << "\033[0m"; + break; + case 8: + s << "\033[1;1;43;34m" << ins << "\033[0m"; + break; + case 9: + s << "\033[1;1;37m" << ins << "\033[0m"; + break; + case 10: + s << "\033[1;30;47m" << ins << "\033[0m"; + break; + default: + s << ins; + } + + return s.str(); +} + + +//=============================================== +string wrap_double(double val, int mode){ + + std::ostringstream s; + s << string_wrap(strDouble(val),mode); + + return s.str(); +} + + + +//=============================================== +const +string i2string(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + return s.str(); + +} + +//=============================================== +char* i2char(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + char* a=new char[s.str().size()+1]; + memcpy(a,s.str().c_str(), s.str().size()); + + return a; +} + +//================================================ +class Universe { + +private: + + double alpha_i; + double alpha_m; + double beta; + double gamma; + double delta; + + double TargetNovelty; + double CumulativeRelativeLoss; + double CRLsquare; + string id; + + + int N_nodes; + int M_edges; + + int N_epochs; + int N_steps; + int N_repeats; + + int current_epoch; + double current_loss; + int current_repeat; + double current_novelty; + + int mode_identify_failed; + int verbose_level; // 0 is silent, higher is more + + double k_max; + + graph_t Full_g; + + double **Prob; + double **Tried; + double **Dist; + double **Final; + double **EdgeIndex; + double *Rank; + + base_generator_type generator; + boost::uniform_real<> uni_dist; + boost::geometric_distribution geo; + +public: + + + + //====== Constructor ====== + Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) + { + //typedef array_type2::index index2; + + + std::ifstream inFile; + //string line; + + //------------------------------- + + base_generator_type gene(42u); + generator = gene; + generator.seed(static_cast(std::time(0))); + boost::uniform_real<> uni_d(0,1); + uni_dist = uni_d; + + //-------------------------------- + + int i, k; + int x, y; + Edge* edge_array_mine; + int num_arcs_mine, num_nodes_mine; + int* weights_mine; + + TargetNovelty = target; + CumulativeRelativeLoss = 0.; + CRLsquare = 0.; + + + N_epochs = Epochs; + N_steps = Steps; + N_repeats = Repeats; + + current_epoch = 0; + current_loss = 0.; + current_repeat = 0; + + id = idd; + + verbose_level = 1; + + mode_identify_failed = identify_failed; + + + //------------------------------- + // The first pass though file with the graph + inFile.open(FileToOpen.c_str()); + if (inFile.fail()) { + cout << "Unable to open file"; + exit(1); // terminate with error + }else { + + if (verbose_level > 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x; + inFile >> y; + + if (verbose_level > 2){ + std::cout << " x: " << x; + std::cout << " y: " << y << std::endl; + } + + if (i==0){ + N_nodes=x; + M_edges=y; + break; + } + i++; + + + } + inFile.close(); + + if (verbose_level == 2){ + std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { + if (i > 0) { + Final[x][y]=1.; + Final[y][x]=1.; + + + if (verbose_level == 2){ + std::cout << "."; + } + } + i++; + + } + if (verbose_level == 2){ + std::cout << std::endl; + } + inFile.close(); + + k=0; + for (int i=0; i 0.){ + EdgeIndex[i][j]=k; + k++; + } + } + } + + + + //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // create graph -- hopefully, we can keep it, just modifying edge weights + + + edge_array_mine = new Edge[2*M_edges]; + num_arcs_mine = 2*M_edges; + num_nodes_mine = N_nodes; + weights_mine = new int[2*M_edges]; + for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} + + k=0; + for(int i=0; i0.){ + edge_array_mine[2*k] =Edge(i,j); + edge_array_mine[2*k+1]=Edge(j,i); + k++; + } + } + } + graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); + + Full_g = g; + delete edge_array_mine; + delete weights_mine; + + //=========================================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + for (int i=0; i 0.){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + + } + + + //===================================================================== + int sample_failed_number(double pfail){ + + //boost::geometric_distribution geo(pfail); + //boost::variate_generator > geom(generator, geo); + + double r, u, g; + + r=0.; + for(int i=0; i=3){ + std::cout << id << " failed " << r << std::endl; + } + return r; + + } + + //============================================= + double get_target(void){ + return TargetNovelty; + } + + //============================================= + void set_target(double target){ + TargetNovelty=target; + } + + //============================================= + int sample(){ + + //boost::variate_generator > uni(generator, uni_dist); + // double r = uni(), Summa = 0.; + + + + double r = rand(), Summa = 0.; + r /= (double)(pow(2.,31)-1.); + int result = 0; + int finished = 0; + + if (verbose_level==4){ + std::cout << id << " sampled " << r << std::endl; + } + + for(int i=0; i r){ + + Tried[i][j]+=1.; + + if (Final[i][j] > 0.){ + result = 1; + } + finished = 1; + } + } + } + + return result; + + } + + //=============================== + void update_current_graph(void){ + + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + //property_map::type weightmap = get(edge_weight, Full_g); + for (int i=0; i 0. && Tried[i][j]>0){ + //s = edge(i, j, Full_g); + boost::graph_traits::edge_descriptor e1,e2; + bool found1, found2; + u = vertex(i, Full_g); + v = vertex(j, Full_g); + tie(e1, found1) = edge(u, v, Full_g); + tie(e2, found2) = edge(v, u, Full_g); + if (!found1 && !found2){ + add_edge(u,v,1,Full_g); + add_edge(v,u,1,Full_g); + } + + } + } + + } + } + + //=============================== + void update_distances(void){ + // put shortest paths to the *Dist[][] + std::vector p(num_vertices(Full_g)); + std::vector d(num_vertices(Full_g)); + vertex_descriptor s; + + + // put shortest paths to the *Dist[][] + for (int j=0; j 0.){ + s = vertex(j, Full_g); + dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); + + //std::cout <<" Vertex "<< j << std::endl; + graph_traits < graph_t >::vertex_iterator vi, vend; + + for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { + + if (p[*vi]!=*vi){ + Dist[*vi][j]=d[*vi]; + Dist[j][*vi]=d[*vi]; + + if (Dist[*vi][j]>max_dist){ + max_dist=Dist[*vi][j]; + } + + + } else { + Dist[*vi][j]=-1.; + Dist[j][*vi]=-1.; + } + } + } + + } + + + } + + //====================================================== + void update_ranks(void){ + + for(int i=0; i0. && Final[i][j] >0.){ + Rank[i]++; + Rank[j]++; + } + } + } + + } + + //==================================================================== + void set_world(double a_i, double a_m, double b, double g, double d){ + + alpha_i=a_i; + alpha_m=a_m; + gamma=g; + beta=b; + delta=d; + + } + + //==================================================================== + void reset_world(){ + + //==================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + + for (int i=0; i 0. && Tried[i][j] > 0){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + //================================================== + + current_loss=0; + current_epoch=0; + current_repeat++; + current_novelty=0; + + for(int i = 0; i < N_nodes; ++i) { + Rank[i]=0.; + for(int j = 0; j < N_nodes; ++j) { + Prob[i][j]=0.; + Dist[i][j]=-1.; + Tried[i][j]=0.; + } + } + } + + + //============================================== + void show_parameters(void){ + + std::cout << "Parameters: " + << alpha_i << " " + << alpha_m << " | " + << beta << " " + << gamma << " | " + << delta << std::endl; + + } + + + + //=============================================== + string file_name(){ + + std::ostringstream s; + s << "world_" + << lexical_cast(alpha_i) << "_" + << lexical_cast(alpha_m) << "_" + << lexical_cast(beta) << "_" + << lexical_cast(gamma) << "_" + << lexical_cast(delta) << "_" + << lexical_cast(N_epochs) << "_" + << lexical_cast(N_steps) << "_" + << lexical_cast(N_repeats) << ".txt"; + + return s.str(); + + } + + + + + //================================================= + void set_verbose(int verbose){ + + verbose_level = verbose; + } + + + //============================================================= + void update_probabilities(void){ + + + //========================= + // Compute sampling probabilities + // first pass: \xi_i,j + for(int i=0; i 0.){ + + double k = Dist[i][j]; + if (k >= k_max){ + k = k_max-1; + } + + bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); + + } else { + bg = delta; + } + + Prob[i][j] = exp(Prob[i][j] + bg); + } + } + + + // second pass: sum + double Summa = 0.; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + + } + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + else { + + double pfail=0.; + int n_failed; + //, n_check = 0; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + } + + current_novelty = novel; + + + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + if (verbose_level == 2){ + std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) + + << " cost=" << cost + << " novel=" << novel + << " rel_loss=" << cost/novel + << std::endl; + } + + current_epoch++; + } + + + //====== Destructor ====== + ~Universe(){ + + delete_2Dmatrix(Final, N_nodes); + delete_2Dmatrix(Dist, N_nodes); + delete_2Dmatrix(Tried, N_nodes); + delete_2Dmatrix(Prob, N_nodes); + delete_2Dmatrix(EdgeIndex, N_nodes); + delete_1Dmatrix(Rank); + } + + //================================================ + // Allocate memory + double** allocate_2Dmatrix(int N, int M) + { + double **pointer; + + if (verbose_level == 2){ + std::cout<< "["< 0){ + + pointer = new double[N]; + + }else { + + pointer = NULL; + } + + return pointer; + + } + + //============================================== + // De-Allocate memory to prevent memory leak + void delete_2Dmatrix(double **pointer, int N){ + + if (pointer != NULL){ + + for (int i = 0; i < N; ++i){ + delete [] pointer[i]; + } + delete [] pointer; + } + } + //==================== + void delete_1Dmatrix(double *pointer){ + + delete [] pointer; + } + + //=========================================== + double get_rel_loss(){ + + return CumulativeRelativeLoss ; + } + + //=========================================== + double get_rel_loss_err(){ + + return CRLsquare ; + } + + + + //================================================================================== + void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ + + double ALOT=100000000000.; + + reset_world(); + + for (int k = istart; k < iend; k++){ + + + for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ + update_world(); + } + + storage[k]=current_loss/current_novelty; + counters[k]=1; + + + reset_world(); + } + + } + //============================================== + int get_reruns(void){ + return N_repeats; + } + + //============================================== + double get_parameter(int i){ + + switch(i){ + case 0: + return alpha_i; + case 1: + return alpha_m; + case 2: + return beta; + case 3: + return gamma; + case 4: + return delta; + default: + + std::cout << "Erroneous parameter id!!!!\n\n\n"; + return 0.; + } + } + + + //============================================== + void evolve_to_target(){ + + reset_world(); + if (beta < -1. || gamma < -1.){ + CumulativeRelativeLoss = 100000000000.; + CRLsquare = 0.; + return; + } + + + for (int k=0; k< N_repeats; k++){ + + + for(int i=0; i 4) {return 0;} + + else { + + switch(position){ + case 0: + alpha_i=value; + return 1; + case 1: + alpha_m=value; + return 1; + case 2: + beta=value; + return 1; + case 3: + gamma=value; + return 1; + case 4: + delta=value; + return 1; + } + + } + + return 0; + } + + + //================================================================= + void try_annealing(double starting_jump, int iterations, + double temp_start, double temp_end, double target_rejection){ + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=alpha_i; + x[1]=alpha_m; + x[2]=beta; + x[3]=gamma; + x[4]=delta; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + + //.......................................... + evolve_to_target(); + std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + //........................................... + + // optimization cycle + for(int i=0; i ratio){ + + std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << alpha_i << " "<< alpha_m << " " + << beta << " " << gamma << " " + << delta << " " << std::endl; + set_parameter(x[j], j); + CumulativeRelativeLoss = 0; + CRLsquare = 0; + + rejection[j]+=1.; + } + + else { + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + x[j] = x_tmp; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) + << " "<< wrap_double(rejection[1], 7) << " " + << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(alpha_i,2) + << " "<< wrap_double(alpha_m, 7) << " " + << wrap_double(beta,5) << " " + << wrap_double(gamma,9) << " " + << wrap_double(delta,6) << " " + << std::endl << std::endl; + + } + //........................................................ + + } + + } + + } + + +}; + +//============================================================ + +std::pair multi_loss(dispatch_group_t group, + Universe* un[], + dispatch_queue_t* CustomQueues, + double* Results, + int* Counters, + double* params){ + + int N = un[0]->get_reruns(); + int step = (int)(double)N/(double)(Nworkers); + int istart=0; + int iend = istart+step; + + double Loss=0., LossSquare=0.; + + for(int i=0; iset_parameter(params[j],j); + } + + + for(int i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); + }); + + std::cout << "queued: i=" << i << " N=" << N << " istart=" << istart << " iend=" << iend << "\n"; + istart += step; + iend = min(istart+step,N); + + } + } + dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + //dispatch_release(group); + + for (int i=0; i Res; + Res.first=Loss; + Res.second=two_std; + + return Res; + + +} +//============================================================ + + +//============================================================ +void multi_annealing( dispatch_group_t group, + Universe* un[], + dispatch_queue_t* CustomQueues, + double T_start, double T_end, + double Target_rejection, + int Annealing_repeats, + double starting_jump, + double* Results, + int* Counters, + double* params0, + double annealing_cycles){ + //................................. + // re-implement annealing + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + //boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=params0[0]; + x[1]=params0[1]; + x[2]=params0[2]; + x[3]=params0[3]; + x[4]=params0[4]; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + std::pairRes; + + Res = multi_loss(group, un, CustomQueues, Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + curr_x = Res.first; + curr_err = Res.second; + + // optimization cycle + + for(int i=0; iset_parameter(x_tmp, j); + } + + + Res = multi_loss(group, un, CustomQueues, Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " vs " << ratio << std::endl; + + double ALOT=100000000000.; + + if (Res.first < ALOT) + { + ofstream filestr; + + filestr.open ("best_opt_some.txt", ofstream::app); + + // >> i/o operations here << + filestr << un[0]->get_target() << "," + << Res.first + << "," << un[0]->get_parameter(0) + << "," << un[0]->get_parameter(1) + << "," << un[0]->get_parameter(2) + << "," << un[0]->get_parameter(3) + << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; + + filestr.close(); + + + filestr.open ("max_dist.txt", ofstream::app); + + // >> i/o operations here << + filestr << max_dist << ",\n"; + + filestr.close(); + + } + + + if (r > ratio){ + + std::cout << " "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << un[0]->get_parameter(0) + << " " << un[0]->get_parameter(1) + << " " << un[0]->get_parameter(2) + << " " << un[0]->get_parameter(3) + << " " << un[0]->get_parameter(4) << " " << std::endl; + + x[j]=x_hold; + for(int w=0; wset_parameter(x[j], j); + } + + + //set_parameter(x[j], j); + rejection[j]+=1.; + } + + else { + + curr_x = Res.first; + curr_err = Res.second; + x[j] = x_tmp; + + for(int w=0; wset_parameter(x[j], j); + } + + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) << " " + << wrap_double(rejection[1],7) << " " + << wrap_double(rejection[2],5) << " " + << wrap_double(rejection[3],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << " "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(un[0]->get_parameter(0),2) << " " + << wrap_double(un[0]->get_parameter(1),7) << " " + << wrap_double(un[0]->get_parameter(2),5) << " " + << wrap_double(un[0]->get_parameter(3),9) << " " + << wrap_double(un[0]->get_parameter(4),6) << " " + << std::endl << std::endl; + + + + } + //........................................................ + + } + } + + } + +} + + + +//================================================ +int +main(int argc, char* argv[]) +{ + + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; + string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params1[4] = {300, 50, 1000, 10}; + int params3[5] = { 0, 0, 0, 0, 0}; + + // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + int verbose_level = 2; + const std::string one="one", two="two"; + static Universe* un[Nworkers]; + static dispatch_queue_t CustomQueues[Nworkers]; + + static double* Results; + static int* Counters; + + timeval t1, t2; + double elapsedTime; + // start timer + gettimeofday(&t1, NULL); + + + if (argc < 8) { + std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; + std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; + std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; + + system("pwd"); + + + return(1); + } + else { + for (int nArg=0; nArg < argc; nArg++){ + //std::cout << nArg << " " << argv[nArg] << std::endl; + if (nArg > 0 && nArg < 7){ + params0[nArg-1]= atof(argv[nArg]); + std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; + } + if (nArg > 6 && nArg < 11){ + params1[nArg-7]= atoi(argv[nArg]); + std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; + } + if (nArg == 11){ + verbose_level = atoi(argv[nArg]); + std::cout << "verbose level: " << verbose_level << std::endl; + } + if (nArg > 11 && nArg < 17){ + params2[nArg-12]= atof(argv[nArg]); + std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; + } + if (nArg > 16 && nArg < 22){ + params3[nArg-17]= atof(argv[nArg]); + var_fixed[nArg-17]= atof(argv[nArg]); + std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; + } + + + } + + } + + for (int j=0; j<5; j++){ + + cout << j << " | " << var_fixed[j] << " (fixed) \n"; + } + + target=params0[5]; + range = (double)params1[3]; + int identify_failed = 0; + char* filename= (char *)"movie_graph.txt"; + int n_ep=params1[0], n_st=params1[1], n_rep=params1[2]; + + //............................... + + for(int i=0; i 0){ + + Results = new double[n_rep]; + Counters = new int[n_rep]; + + }else { + + Results = NULL; + Counters = NULL; + std::cout << " Number of reruns should be positive! " << std::endl; + return 0; + + } + //............................... + srand(time(0)); + //srandomdev(); + + { + double r=0; + for (int j=0; j<100; j++){ + + + + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " "; + } + std::cout << "\n "; + } + //random initiation of starting parameters + + if (range > 0.){ + + for (int i=0; i < 5; i++){ + + if (params0[i]==-100.){ + + double r1 = (rand()/(double)(pow(2.,31)-1.)); + double r2 = (rand()/(double)(pow(2.,31)-1.)); + double sign = 1.; + + if(r1 > 0.5){ + sign=-1.; + } + + params0[i] = sign*r2*range; + + std::cout << par_names0[i] << ": " << params0[i] << std::endl; + } + } + + } + + + double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; + int Annealing_repeats = (int) params2[2]; + + + dispatch_group_t group = dispatch_group_create(); + + //............................. + multi_annealing(group, un, CustomQueues, T_start, T_end, Target_rejection, Annealing_repeats, + starting_jump, Results, Counters, params0, Annealing_repeats); + + //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + dispatch_release(group); + //............................. + + + // stop timer + gettimeofday(&t2, NULL); + + // compute and print the elapsed time in millisec + elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms + elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << elapsedTime << " seconds \n .....(" << elapsedTime/60. << " minutes)\n\n"; + + //..................... + + for(int i=0; i 0){ + + delete [] Results; + delete [] Counters; + + } + + return 0; + + + +} + Property changes on: SwiftApps/SciColSim/original.2011.1014/optimizer.cpp ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/SciColSim/original.2011.1014/optimizer.cpp.orig =================================================================== --- SwiftApps/SciColSim/original.2011.1014/optimizer.cpp.orig (rev 0) +++ SwiftApps/SciColSim/original.2011.1014/optimizer.cpp.orig 2012-01-23 17:06:58 UTC (rev 5508) @@ -0,0 +1,1674 @@ +// +// main.cpp +// optimizer +// +// Created by Andrey Rzhetsky on 4/11/11. +// Copyright 2011 University of Chicago. All rights reserved. +// + +#define Nworkers 24 + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define INT_INFINITY 2147483647 + +#define FIX_VARIABLES 1 + +using namespace boost; +using namespace std; +using namespace boost::numeric::ublas; + +static int max_dist=0; + +typedef boost::adjacency_matrix Graph; +typedef std::pair Edge; +typedef boost::graph_traits GraphTraits; +typedef boost::numeric::ublas::triangular_matrix prob; +typedef boost::numeric::ublas::triangular_matrix pathlength; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + +namespace std { + using ::time; +} + +static int var_fixed[5] = {1, 0, 1, 1, 0}; + +typedef boost::minstd_rand base_generator_type; +typedef adjacency_list < listS, vecS, directedS, +no_property, property < edge_weight_t, int > > graph_t; +typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; +typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; + + +//================================================ +string strDouble(double number) +{ + stringstream ss;//create a stringstream + ss << number;//add number to the stream + return ss.str();//return a string with the contents of the stream +} + +//================================================ + +double gaussian(double sigma) +{ + double GaussNum = 0.0; + int NumInSum = 10; + for(int i = 0; i < NumInSum; i++) + { + GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); + } + GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); + + + return GaussNum; + +} + + + +//================================================= +double diffclock(clock_t clock1,clock_t clock2) +{ + double diffticks=clock1-clock2; + double diffms=(diffticks)/CLOCKS_PER_SEC; + return diffms; +} + +//================================================ +//================================================================ +double get_new_x(double x, double dx){ + + double new_x; + // boost::variate_generator > uni(generator, uni_dist); + double r = rand()/(double)(pow(2.,31)-1.); + + if (r > 0.5){ + new_x = x + rand()*dx/(double)(pow(2.,31)-1.); + } else { + new_x = x - rand()*dx/(double)(pow(2.,31)-1.); + } + + return new_x; + +} + + +//=============================================== +string string_wrap(string ins, int mode){ + + std::ostringstream s; + + switch(mode){ + case 0: + s << "\033[1;29m" << ins << "\033[0m"; + break; + case 1: + s << "\033[1;34m" << ins << "\033[0m"; + break; + case 2: + s << "\033[1;44m" << ins << "\033[0m"; + break; + case 3: + s << "\033[1;35m" << ins << "\033[0m"; + break; + case 4: + s << "\033[1;33;44m" << ins << "\033[0m"; + break; + case 5: + s << "\033[1;47;34m" << ins << "\033[0m"; + break; + case 6: + s << "\033[1;1;31m" << ins << "\033[0m"; + break; + case 7: + s << "\033[1;1;33m" << ins << "\033[0m"; + break; + case 8: + s << "\033[1;1;43;34m" << ins << "\033[0m"; + break; + case 9: + s << "\033[1;1;37m" << ins << "\033[0m"; + break; + case 10: + s << "\033[1;30;47m" << ins << "\033[0m"; + break; + default: + s << ins; + } + + return s.str(); +} + + +//=============================================== +string wrap_double(double val, int mode){ + + std::ostringstream s; + s << string_wrap(strDouble(val),mode); + + return s.str(); +} + + + +//=============================================== +const +string i2string(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + return s.str(); + +} + +//=============================================== +char* i2char(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + char* a=new char[s.str().size()+1]; + memcpy(a,s.str().c_str(), s.str().size()); + + return a; +} + +//================================================ +class Universe { + +private: + + double alpha_i; + double alpha_m; + double beta; + double gamma; + double delta; + + double TargetNovelty; + double CumulativeRelativeLoss; + double CRLsquare; + string id; + + + int N_nodes; + int M_edges; + + int N_epochs; + int N_steps; + int N_repeats; + + int current_epoch; + double current_loss; + int current_repeat; + double current_novelty; + + int mode_identify_failed; + int verbose_level; // 0 is silent, higher is more + + double k_max; + + graph_t Full_g; + + double **Prob; + double **Tried; + double **Dist; + double **Final; + double **EdgeIndex; + double *Rank; + + base_generator_type generator; + boost::uniform_real<> uni_dist; + boost::geometric_distribution geo; + +public: + + + + //====== Constructor ====== + Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) + { + //typedef array_type2::index index2; + + + std::ifstream inFile; + //string line; + + //------------------------------- + + base_generator_type gene(42u); + generator = gene; + generator.seed(static_cast(std::time(0))); + boost::uniform_real<> uni_d(0,1); + uni_dist = uni_d; + + //-------------------------------- + + int i, k; + int x, y; + Edge* edge_array_mine; + int num_arcs_mine, num_nodes_mine; + int* weights_mine; + + TargetNovelty = target; + CumulativeRelativeLoss = 0.; + CRLsquare = 0.; + + + N_epochs = Epochs; + N_steps = Steps; + N_repeats = Repeats; + + current_epoch = 0; + current_loss = 0.; + current_repeat = 0; + + id = idd; + + verbose_level = 1; + + mode_identify_failed = identify_failed; + + + //------------------------------- + // The first pass though file with the graph + inFile.open(FileToOpen.c_str()); + if (inFile.fail()) { + cout << "Unable to open file"; + exit(1); // terminate with error + }else { + + if (verbose_level > 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x; + inFile >> y; + + if (verbose_level > 2){ + std::cout << " x: " << x; + std::cout << " y: " << y << std::endl; + } + + if (i==0){ + N_nodes=x; + M_edges=y; + break; + } + i++; + + + } + inFile.close(); + + if (verbose_level == 2){ + std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { + if (i > 0) { + Final[x][y]=1.; + Final[y][x]=1.; + + + if (verbose_level == 2){ + std::cout << "."; + } + } + i++; + + } + if (verbose_level == 2){ + std::cout << std::endl; + } + inFile.close(); + + k=0; + for (int i=0; i 0.){ + EdgeIndex[i][j]=k; + k++; + } + } + } + + + + //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // create graph -- hopefully, we can keep it, just modifying edge weights + + + edge_array_mine = new Edge[2*M_edges]; + num_arcs_mine = 2*M_edges; + num_nodes_mine = N_nodes; + weights_mine = new int[2*M_edges]; + for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} + + k=0; + for(int i=0; i0.){ + edge_array_mine[2*k] =Edge(i,j); + edge_array_mine[2*k+1]=Edge(j,i); + k++; + } + } + } + graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); + + Full_g = g; + delete edge_array_mine; + delete weights_mine; + + //=========================================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + for (int i=0; i 0.){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + + } + + + //===================================================================== + int sample_failed_number(double pfail){ + + //boost::geometric_distribution geo(pfail); + //boost::variate_generator > geom(generator, geo); + + double r, u, g; + + r=0.; + for(int i=0; i=3){ + std::cout << id << " failed " << r << std::endl; + } + return r; + + } + + //============================================= + double get_target(void){ + return TargetNovelty; + } + + //============================================= + void set_target(double target){ + TargetNovelty=target; + } + + //============================================= + int sample(){ + + //boost::variate_generator > uni(generator, uni_dist); + // double r = uni(), Summa = 0.; + + + + double r = rand(), Summa = 0.; + r /= (double)(pow(2.,31)-1.); + int result = 0; + int finished = 0; + + if (verbose_level==4){ + std::cout << id << " sampled " << r << std::endl; + } + + for(int i=0; i r){ + + Tried[i][j]+=1.; + + if (Final[i][j] > 0.){ + result = 1; + } + finished = 1; + } + } + } + + return result; + + } + + //=============================== + void update_current_graph(void){ + + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + //property_map::type weightmap = get(edge_weight, Full_g); + for (int i=0; i 0. && Tried[i][j]>0){ + //s = edge(i, j, Full_g); + boost::graph_traits::edge_descriptor e1,e2; + bool found1, found2; + u = vertex(i, Full_g); + v = vertex(j, Full_g); + tie(e1, found1) = edge(u, v, Full_g); + tie(e2, found2) = edge(v, u, Full_g); + if (!found1 && !found2){ + add_edge(u,v,1,Full_g); + add_edge(v,u,1,Full_g); + } + + } + } + + } + } + + //=============================== + void update_distances(void){ + // put shortest paths to the *Dist[][] + std::vector p(num_vertices(Full_g)); + std::vector d(num_vertices(Full_g)); + vertex_descriptor s; + + + // put shortest paths to the *Dist[][] + for (int j=0; j 0.){ + s = vertex(j, Full_g); + dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); + + //std::cout <<" Vertex "<< j << std::endl; + graph_traits < graph_t >::vertex_iterator vi, vend; + + for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { + + if (p[*vi]!=*vi){ + Dist[*vi][j]=d[*vi]; + Dist[j][*vi]=d[*vi]; + + if (Dist[*vi][j]>max_dist){ + max_dist=Dist[*vi][j]; + } + + + } else { + Dist[*vi][j]=-1.; + Dist[j][*vi]=-1.; + } + } + } + + } + + + } + + //====================================================== + void update_ranks(void){ + + for(int i=0; i0. && Final[i][j] >0.){ + Rank[i]++; + Rank[j]++; + } + } + } + + } + + //==================================================================== + void set_world(double a_i, double a_m, double b, double g, double d){ + + alpha_i=a_i; + alpha_m=a_m; + gamma=g; + beta=b; + delta=d; + + } + + //==================================================================== + void reset_world(){ + + //==================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + + for (int i=0; i 0. && Tried[i][j] > 0){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + //================================================== + + current_loss=0; + current_epoch=0; + current_repeat++; + current_novelty=0; + + for(int i = 0; i < N_nodes; ++i) { + Rank[i]=0.; + for(int j = 0; j < N_nodes; ++j) { + Prob[i][j]=0.; + Dist[i][j]=-1.; + Tried[i][j]=0.; + } + } + } + + + //============================================== + void show_parameters(void){ + + std::cout << "Parameters: " + << alpha_i << " " + << alpha_m << " | " + << beta << " " + << gamma << " | " + << delta << std::endl; + + } + + + + //=============================================== + string file_name(){ + + std::ostringstream s; + s << "world_" + << lexical_cast(alpha_i) << "_" + << lexical_cast(alpha_m) << "_" + << lexical_cast(beta) << "_" + << lexical_cast(gamma) << "_" + << lexical_cast(delta) << "_" + << lexical_cast(N_epochs) << "_" + << lexical_cast(N_steps) << "_" + << lexical_cast(N_repeats) << ".txt"; + + return s.str(); + + } + + + + + //================================================= + void set_verbose(int verbose){ + + verbose_level = verbose; + } + + + //============================================================= + void update_probabilities(void){ + + + //========================= + // Compute sampling probabilities + // first pass: \xi_i,j + for(int i=0; i 0.){ + + double k = Dist[i][j]; + if (k >= k_max){ + k = k_max-1; + } + + bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); + + } else { + bg = delta; + } + + Prob[i][j] = exp(Prob[i][j] + bg); + } + } + + + // second pass: sum + double Summa = 0.; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + + } + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + else { + + double pfail=0.; + int n_failed; + //, n_check = 0; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + } + + current_novelty = novel; + + + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + if (verbose_level == 2){ + std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) + + << " cost=" << cost + << " novel=" << novel + << " rel_loss=" << cost/novel + << std::endl; + } + + current_epoch++; + } + + + //====== Destructor ====== + ~Universe(){ + + delete_2Dmatrix(Final, N_nodes); + delete_2Dmatrix(Dist, N_nodes); + delete_2Dmatrix(Tried, N_nodes); + delete_2Dmatrix(Prob, N_nodes); + delete_2Dmatrix(EdgeIndex, N_nodes); + delete_1Dmatrix(Rank); + } + + //================================================ + // Allocate memory + double** allocate_2Dmatrix(int N, int M) + { + double **pointer; + + if (verbose_level == 2){ + std::cout<< "["< 0){ + + pointer = new double[N]; + + }else { + + pointer = NULL; + } + + return pointer; + + } + + //============================================== + // De-Allocate memory to prevent memory leak + void delete_2Dmatrix(double **pointer, int N){ + + if (pointer != NULL){ + + for (int i = 0; i < N; ++i){ + delete [] pointer[i]; + } + delete [] pointer; + } + } + //==================== + void delete_1Dmatrix(double *pointer){ + + delete [] pointer; + } + + //=========================================== + double get_rel_loss(){ + + return CumulativeRelativeLoss ; + } + + //=========================================== + double get_rel_loss_err(){ + + return CRLsquare ; + } + + + + //================================================================================== + void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ + + double ALOT=100000000000.; + + reset_world(); + + for (int k = istart; k < iend; k++){ + + + for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ + update_world(); + } + + storage[k]=current_loss/current_novelty; + counters[k]=1; + + + reset_world(); + } + + } + //============================================== + int get_reruns(void){ + return N_repeats; + } + + //============================================== + double get_parameter(int i){ + + switch(i){ + case 0: + return alpha_i; + case 1: + return alpha_m; + case 2: + return beta; + case 3: + return gamma; + case 4: + return delta; + default: + + std::cout << "Erroneous parameter id!!!!\n\n\n"; + return 0.; + } + } + + + //============================================== + void evolve_to_target(){ + + reset_world(); + if (beta < -1. || gamma < -1.){ + CumulativeRelativeLoss = 100000000000.; + CRLsquare = 0.; + return; + } + + + for (int k=0; k< N_repeats; k++){ + + + for(int i=0; i 4) {return 0;} + + else { + + switch(position){ + case 0: + alpha_i=value; + return 1; + case 1: + alpha_m=value; + return 1; + case 2: + beta=value; + return 1; + case 3: + gamma=value; + return 1; + case 4: + delta=value; + return 1; + } + + } + + return 0; + } + + + //================================================================= + void try_annealing(double starting_jump, int iterations, + double temp_start, double temp_end, double target_rejection){ + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=alpha_i; + x[1]=alpha_m; + x[2]=beta; + x[3]=gamma; + x[4]=delta; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + + //.......................................... + evolve_to_target(); + std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + //........................................... + + // optimization cycle + for(int i=0; i ratio){ + + std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << alpha_i << " "<< alpha_m << " " + << beta << " " << gamma << " " + << delta << " " << std::endl; + set_parameter(x[j], j); + CumulativeRelativeLoss = 0; + CRLsquare = 0; + + rejection[j]+=1.; + } + + else { + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + x[j] = x_tmp; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) + << " "<< wrap_double(rejection[1], 7) << " " + << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(alpha_i,2) + << " "<< wrap_double(alpha_m, 7) << " " + << wrap_double(beta,5) << " " + << wrap_double(gamma,9) << " " + << wrap_double(delta,6) << " " + << std::endl << std::endl; + + } + //........................................................ + + } + + } + + } + + +}; + +//============================================================ + +std::pair multi_loss(dispatch_group_t group, + Universe* un[], + dispatch_queue_t* CustomQueues, + double* Results, + int* Counters, + double* params){ + + int N = un[0]->get_reruns(); + int step = (int)(double)N/(double)(Nworkers); + int istart=0; + int iend = istart+step; + + double Loss=0., LossSquare=0.; + + for(int i=0; iset_parameter(params[j],j); + } + + + for(int i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); + }); + + istart += step; + iend = min(istart+step,N); + + } + } + dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + //dispatch_release(group); + + for (int i=0; i Res; + Res.first=Loss; + Res.second=two_std; + + return Res; + + +} +//============================================================ + + +//============================================================ +void multi_annealing( dispatch_group_t group, + Universe* un[], + dispatch_queue_t* CustomQueues, + double T_start, double T_end, + double Target_rejection, + int Annealing_repeats, + double starting_jump, + double* Results, + int* Counters, + double* params0, + double annealing_cycles){ + //................................. + // re-implement annealing + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + //boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=params0[0]; + x[1]=params0[1]; + x[2]=params0[2]; + x[3]=params0[3]; + x[4]=params0[4]; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + std::pairRes; + + Res = multi_loss(group, un, CustomQueues, Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + curr_x = Res.first; + curr_err = Res.second; + + // optimization cycle + + for(int i=0; iset_parameter(x_tmp, j); + } + + + Res = multi_loss(group, un, CustomQueues, Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " vs " << ratio << std::endl; + + double ALOT=100000000000.; + + if (Res.first < ALOT) + { + ofstream filestr; + + filestr.open ("best_opt_some.txt", ofstream::app); + + // >> i/o operations here << + filestr << un[0]->get_target() << "," + << Res.first + << "," << un[0]->get_parameter(0) + << "," << un[0]->get_parameter(1) + << "," << un[0]->get_parameter(2) + << "," << un[0]->get_parameter(3) + << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; + + filestr.close(); + + + filestr.open ("max_dist.txt", ofstream::app); + + // >> i/o operations here << + filestr << max_dist << ",\n"; + + filestr.close(); + + } + + + if (r > ratio){ + + std::cout << " "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << un[0]->get_parameter(0) + << " " << un[0]->get_parameter(1) + << " " << un[0]->get_parameter(2) + << " " << un[0]->get_parameter(3) + << " " << un[0]->get_parameter(4) << " " << std::endl; + + x[j]=x_hold; + for(int w=0; wset_parameter(x[j], j); + } + + + //set_parameter(x[j], j); + rejection[j]+=1.; + } + + else { + + curr_x = Res.first; + curr_err = Res.second; + x[j] = x_tmp; + + for(int w=0; wset_parameter(x[j], j); + } + + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) << " " + << wrap_double(rejection[1],7) << " " + << wrap_double(rejection[2],5) << " " + << wrap_double(rejection[3],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << " "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(un[0]->get_parameter(0),2) << " " + << wrap_double(un[0]->get_parameter(1),7) << " " + << wrap_double(un[0]->get_parameter(2),5) << " " + << wrap_double(un[0]->get_parameter(3),9) << " " + << wrap_double(un[0]->get_parameter(4),6) << " " + << std::endl << std::endl; + + + + } + //........................................................ + + } + } + + } + +} + + + +//================================================ +int +main(int argc, char* argv[]) +{ + + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; + string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params1[4] = {300, 50, 1000, 10}; + int params3[5] = { 0, 0, 0, 0, 0}; + + // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + int verbose_level = 2; + const std::string one="one", two="two"; + static Universe* un[Nworkers]; + static dispatch_queue_t CustomQueues[Nworkers]; + + static double* Results; + static int* Counters; + + timeval t1, t2; + double elapsedTime; + // start timer + gettimeofday(&t1, NULL); + + + if (argc < 8) { + std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; + std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; + std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; + + system("pwd"); + + + return(1); + } + else { + for (int nArg=0; nArg < argc; nArg++){ + //std::cout << nArg << " " << argv[nArg] << std::endl; + if (nArg > 0 && nArg < 7){ + params0[nArg-1]= atof(argv[nArg]); + std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; + } + if (nArg > 6 && nArg < 11){ + params1[nArg-7]= atoi(argv[nArg]); + std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; + } + if (nArg == 11){ + verbose_level = atoi(argv[nArg]); + std::cout << "verbose level: " << verbose_level << std::endl; + } + if (nArg > 11 && nArg < 17){ + params2[nArg-12]= atof(argv[nArg]); + std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; + } + if (nArg > 16 && nArg < 22){ + params3[nArg-17]= atof(argv[nArg]); + var_fixed[nArg-17]= atof(argv[nArg]); + std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; + } + + + } + + } + + for (int j=0; j<5; j++){ + + cout << j << " | " << var_fixed[j] << " (fixed) \n"; + } + + target=params0[5]; + range = (double)params1[3]; + int identify_failed = 0; + char* filename= (char *)"movie_graph.txt"; + int n_ep=params1[0], n_st=params1[1], n_rep=params1[2]; + + //............................... + + for(int i=0; i 0){ + + Results = new double[n_rep]; + Counters = new int[n_rep]; + + }else { + + Results = NULL; + Counters = NULL; + std::cout << " Number of reruns should be positive! " << std::endl; + return 0; + + } + //............................... + srand(time(0)); + //srandomdev(); + + { + double r=0; + for (int j=0; j<100; j++){ + + + + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " "; + } + std::cout << "\n "; + } + //random initiation of starting parameters + + if (range > 0.){ + + for (int i=0; i < 5; i++){ + + if (params0[i]==-100.){ + + double r1 = (rand()/(double)(pow(2.,31)-1.)); + double r2 = (rand()/(double)(pow(2.,31)-1.)); + double sign = 1.; + + if(r1 > 0.5){ + sign=-1.; + } + + params0[i] = sign*r2*range; + + std::cout << par_names0[i] << ": " << params0[i] << std::endl; + } + } + + } + + + double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; + int Annealing_repeats = (int) params2[2]; + + + dispatch_group_t group = dispatch_group_create(); + + //............................. + multi_annealing(group, un, CustomQueues, T_start, T_end, Target_rejection, Annealing_repeats, + starting_jump, Results, Counters, params0, Annealing_repeats); + + //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + dispatch_release(group); + //............................. + + + // stop timer + gettimeofday(&t2, NULL); + + // compute and print the elapsed time in millisec + elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms + elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << elapsedTime << " seconds \n .....(" << elapsedTime/60. << " minutes)\n\n"; + + //..................... + + for(int i=0; i 0){ + + delete [] Results; + delete [] Counters; + + } + + return 0; + + + +} + Property changes on: SwiftApps/SciColSim/original.2011.1014/optimizer.cpp.orig ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/SciColSim/original.2011.1014/script-smaller-a.py =================================================================== --- SwiftApps/SciColSim/original.2011.1014/script-smaller-a.py (rev 0) +++ SwiftApps/SciColSim/original.2011.1014/script-smaller-a.py 2012-01-23 17:06:58 UTC (rev 5508) @@ -0,0 +1,11 @@ +import os + +for target in range(58,1009,50): + s = ("%d" % target) + print s + + for i in range(15): + os.system("./optimizer 0 0 4 50 -1 "+s+" 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0") + + +print "Done!" Property changes on: SwiftApps/SciColSim/original.2011.1014/script-smaller-a.py ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/SciColSim/original.2011.1014/script-smaller-a.py.orig =================================================================== --- SwiftApps/SciColSim/original.2011.1014/script-smaller-a.py.orig (rev 0) +++ SwiftApps/SciColSim/original.2011.1014/script-smaller-a.py.orig 2012-01-23 17:06:58 UTC (rev 5508) @@ -0,0 +1,11 @@ +import os + +for target in range(58,1009,50): + s = ("%d" % target) + print s + + for i in range(15): + os.system("./supe_duper_optimizer 0 0 4 50 -1 "+s+" 40000 20 1000 2 1 2. 0.01 100 0.3 2.3 1 1 0 0 0") + + +print "Done!" \ No newline at end of file Property changes on: SwiftApps/SciColSim/original.2011.1014/script-smaller-a.py.orig ___________________________________________________________________ Added: svn:executable + * From wilde at ci.uchicago.edu Mon Jan 23 12:21:23 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 23 Jan 2012 18:21:23 -0000 Subject: [Swift-commit] r5511 - SwiftApps/SciColSim Message-ID: <20120123182122.7B8759CC94@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-23 12:21:22 -0600 (Mon, 23 Jan 2012) New Revision: 5511 Added: SwiftApps/SciColSim/optimizer.protomods.cpp Removed: SwiftApps/SciColSim/optimizer.cpp Log: Move prototype of optimizer changes for Swift to new name for archival. Deleted: SwiftApps/SciColSim/optimizer.cpp =================================================================== --- SwiftApps/SciColSim/optimizer.cpp 2012-01-23 18:19:35 UTC (rev 5510) +++ SwiftApps/SciColSim/optimizer.cpp 2012-01-23 18:21:22 UTC (rev 5511) @@ -1,1814 +0,0 @@ -// -// main.cpp -// optimizer -// -// Created by Andrey Rzhetsky on 4/11/11. -// Copyright 2011 University of Chicago. All rights reserved. -// - -#define MAXNworkers 24 -int Nworkers=MAXNworkers; -char operation = 'n'; // n: normal; m: multi_loss; a: analyze and generate next annealing parameter set. - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -// #include -#include - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error -#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define INT_INFINITY 2147483647 -#define NEVOPARAMS 5 - -#define FIX_VARIABLES 1 - -using namespace boost; -using namespace std; -using namespace boost::numeric::ublas; - -static int max_dist=0; - -typedef boost::adjacency_matrix Graph; -typedef std::pair Edge; -typedef boost::graph_traits GraphTraits; -typedef boost::numeric::ublas::triangular_matrix prob; -typedef boost::numeric::ublas::triangular_matrix pathlength; -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; - -namespace std { - using ::time; -} - -static int var_fixed[NEVOPARAMS] = {1, 0, 1, 1, 0}; - -typedef boost::minstd_rand base_generator_type; -typedef adjacency_list < listS, vecS, directedS, -no_property, property < edge_weight_t, int > > graph_t; -typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; -typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; - - -//================================================ -string strDouble(double number) -{ - stringstream ss;//create a stringstream - ss << number;//add number to the stream - return ss.str();//return a string with the contents of the stream -} - -//================================================ - -double gaussian(double sigma) -{ - double GaussNum = 0.0; - int NumInSum = 10; - for(int i = 0; i < NumInSum; i++) - { - GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); - } - GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); - - - return GaussNum; - -} - - - -//================================================= -double diffclock(clock_t clock1,clock_t clock2) -{ - double diffticks=clock1-clock2; - double diffms=(diffticks)/CLOCKS_PER_SEC; - return diffms; -} - -//================================================ -//================================================================ -double get_new_x(double x, double dx){ - - double new_x; - // boost::variate_generator > uni(generator, uni_dist); - double r = rand()/(double)(pow(2.,31)-1.); - - if (r > 0.5){ - new_x = x + rand()*dx/(double)(pow(2.,31)-1.); - } else { - new_x = x - rand()*dx/(double)(pow(2.,31)-1.); - } - - return new_x; - -} - - -//=============================================== -string string_wrap(string ins, int mode){ - - std::ostringstream s; - - switch(mode){ - case 0: - s << "\033[1;29m" << ins << "\033[0m"; - break; - case 1: - s << "\033[1;34m" << ins << "\033[0m"; - break; - case 2: - s << "\033[1;44m" << ins << "\033[0m"; - break; - case 3: - s << "\033[1;35m" << ins << "\033[0m"; - break; - case 4: - s << "\033[1;33;44m" << ins << "\033[0m"; - break; - case 5: - s << "\033[1;47;34m" << ins << "\033[0m"; - break; - case 6: - s << "\033[1;1;31m" << ins << "\033[0m"; - break; - case 7: - s << "\033[1;1;33m" << ins << "\033[0m"; - break; - case 8: - s << "\033[1;1;43;34m" << ins << "\033[0m"; - break; - case 9: - s << "\033[1;1;37m" << ins << "\033[0m"; - break; - case 10: - s << "\033[1;30;47m" << ins << "\033[0m"; - break; - default: - s << ins; - } - - return s.str(); -} - - -//=============================================== -string wrap_double(double val, int mode){ - - std::ostringstream s; - s << string_wrap(strDouble(val),mode); - - return s.str(); -} - - - -//=============================================== -const -string i2string(int i){ - - std::ostringstream s; - s << "worker" - << lexical_cast(i); - - return s.str(); - -} - -//=============================================== -char* i2char(int i){ - - std::ostringstream s; - s << "worker" - << lexical_cast(i); - - char* a=new char[s.str().size()+1]; - memcpy(a,s.str().c_str(), s.str().size()); - - return a; -} - - -template -bool from_string(T& t, - const std::string& s, - std::ios_base& (*f)(std::ios_base&)) -{ - std::istringstream iss(s); - return !(iss >> f >> t).fail(); -} - -//================================================ -class Universe { - -private: - - double alpha_i; - double alpha_m; - double beta; - double gamma; - double delta; - - double TargetNovelty; - double CumulativeRelativeLoss; - double CRLsquare; - string id; - - - int N_nodes; - int M_edges; - - int N_epochs; - int N_steps; - int N_repeats; - - int current_epoch; - double current_loss; - int current_repeat; - double current_novelty; - - int mode_identify_failed; - int verbose_level; // 0 is silent, higher is more - - double k_max; - - graph_t Full_g; - - double **Prob; - double **Tried; - double **Dist; - double **Final; - double **EdgeIndex; - double *Rank; - - base_generator_type generator; - boost::uniform_real<> uni_dist; - boost::geometric_distribution geo; - -public: - - - - //====== Constructor ====== - Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) - { - //typedef array_type2::index index2; - - - std::ifstream inFile; - //string line; - - //------------------------------- - - base_generator_type gene(42u); - generator = gene; - generator.seed(static_cast(std::time(0))); - boost::uniform_real<> uni_d(0,1); - uni_dist = uni_d; - - //-------------------------------- - - int i, k; - int x, y; - Edge* edge_array_mine; - int num_arcs_mine, num_nodes_mine; - int* weights_mine; - - TargetNovelty = target; - CumulativeRelativeLoss = 0.; - CRLsquare = 0.; - - - N_epochs = Epochs; - N_steps = Steps; - N_repeats = Repeats; - - current_epoch = 0; - current_loss = 0.; - current_repeat = 0; - - id = idd; - - verbose_level = 1; - - mode_identify_failed = identify_failed; - - - //------------------------------- - // The first pass though file with the graph - inFile.open(FileToOpen.c_str()); - if (inFile.fail()) { - cout << "Unable to open file"; - exit(1); // terminate with error - }else { - - if (verbose_level > 2){ - std::cout << " Opened <" << FileToOpen << ">"<> x; - inFile >> y; - - if (verbose_level > 2){ - std::cout << " x: " << x; - std::cout << " y: " << y << std::endl; - } - - if (i==0){ - N_nodes=x; - M_edges=y; - break; - } - i++; - - - } - inFile.close(); - - if (verbose_level == 2){ - std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ - std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { - if (i > 0) { - Final[x][y]=1.; - Final[y][x]=1.; - - - if (verbose_level == 2){ - std::cout << "."; - } - } - i++; - - } - if (verbose_level == 2){ - std::cout << std::endl; - } - inFile.close(); - - k=0; - for (int i=0; i 0.){ - EdgeIndex[i][j]=k; - k++; - } - } - } - - - - //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - // create graph -- hopefully, we can keep it, just modifying edge weights - - - edge_array_mine = new Edge[2*M_edges]; - num_arcs_mine = 2*M_edges; - num_nodes_mine = N_nodes; - weights_mine = new int[2*M_edges]; - for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} - - k=0; - for(int i=0; i0.){ - edge_array_mine[2*k] =Edge(i,j); - edge_array_mine[2*k+1]=Edge(j,i); - k++; - } - } - } - graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); - - Full_g = g; - delete edge_array_mine; - delete weights_mine; - - //=========================================================================== - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - for (int i=0; i 0.){ - u = vertex(i, Full_g); - v = vertex(j, Full_g); - remove_edge(u,v,Full_g); - remove_edge(v,u,Full_g); - - } - } - } - - - } - - - //===================================================================== - int sample_failed_number(double pfail){ - - //boost::geometric_distribution geo(pfail); - //boost::variate_generator > geom(generator, geo); - - double r, u, g; - - r=0.; - for(int i=0; i=3){ - std::cout << id << " failed " << r << std::endl; - } - return r; - - } - - //============================================= - double get_target(void){ - return TargetNovelty; - } - - //============================================= - void set_target(double target){ - TargetNovelty=target; - } - - //============================================= - int sample(){ - - //boost::variate_generator > uni(generator, uni_dist); - // double r = uni(), Summa = 0.; - - - - double r = rand(), Summa = 0.; - r /= (double)(pow(2.,31)-1.); - int result = 0; - int finished = 0; - - if (verbose_level==4){ - std::cout << id << " sampled " << r << std::endl; - } - - for(int i=0; i r){ - - Tried[i][j]+=1.; - - if (Final[i][j] > 0.){ - result = 1; - } - finished = 1; - } - } - } - - return result; - - } - - //=============================== - void update_current_graph(void){ - - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - //property_map::type weightmap = get(edge_weight, Full_g); - for (int i=0; i 0. && Tried[i][j]>0){ - //s = edge(i, j, Full_g); - boost::graph_traits::edge_descriptor e1,e2; - bool found1, found2; - u = vertex(i, Full_g); - v = vertex(j, Full_g); - tie(e1, found1) = edge(u, v, Full_g); - tie(e2, found2) = edge(v, u, Full_g); - if (!found1 && !found2){ - add_edge(u,v,1,Full_g); - add_edge(v,u,1,Full_g); - } - - } - } - - } - } - - //=============================== - void update_distances(void){ - // put shortest paths to the *Dist[][] - std::vector p(num_vertices(Full_g)); - std::vector d(num_vertices(Full_g)); - vertex_descriptor s; - - - // put shortest paths to the *Dist[][] - for (int j=0; j 0.){ - s = vertex(j, Full_g); - dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); - - //std::cout <<" Vertex "<< j << std::endl; - graph_traits < graph_t >::vertex_iterator vi, vend; - - for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { - - if (p[*vi]!=*vi){ - Dist[*vi][j]=d[*vi]; - Dist[j][*vi]=d[*vi]; - - if (Dist[*vi][j]>max_dist){ - max_dist=Dist[*vi][j]; - } - - - } else { - Dist[*vi][j]=-1.; - Dist[j][*vi]=-1.; - } - } - } - - } - - - } - - //====================================================== - void update_ranks(void){ - - for(int i=0; i0. && Final[i][j] >0.){ - Rank[i]++; - Rank[j]++; - } - } - } - - } - - //==================================================================== - void set_world(double a_i, double a_m, double b, double g, double d){ - - alpha_i=a_i; - alpha_m=a_m; - gamma=g; - beta=b; - delta=d; - - } - - //==================================================================== - void reset_world(){ - - //==================================================== - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - - for (int i=0; i 0. && Tried[i][j] > 0){ - u = vertex(i, Full_g); - v = vertex(j, Full_g); - remove_edge(u,v,Full_g); - remove_edge(v,u,Full_g); - - } - } - } - - //================================================== - - current_loss=0; - current_epoch=0; - current_repeat++; - current_novelty=0; - - for(int i = 0; i < N_nodes; ++i) { - Rank[i]=0.; - for(int j = 0; j < N_nodes; ++j) { - Prob[i][j]=0.; - Dist[i][j]=-1.; - Tried[i][j]=0.; - } - } - } - - - //============================================== - void show_parameters(void){ - - std::cout << "Parameters: " - << alpha_i << " " - << alpha_m << " | " - << beta << " " - << gamma << " | " - << delta << std::endl; - - } - - - - //=============================================== - string file_name(){ - - std::ostringstream s; - s << "world_" - << lexical_cast(alpha_i) << "_" - << lexical_cast(alpha_m) << "_" - << lexical_cast(beta) << "_" - << lexical_cast(gamma) << "_" - << lexical_cast(delta) << "_" - << lexical_cast(N_epochs) << "_" - << lexical_cast(N_steps) << "_" - << lexical_cast(N_repeats) << ".txt"; - - return s.str(); - - } - - - - - //================================================= - void set_verbose(int verbose){ - - verbose_level = verbose; - } - - - //============================================================= - void update_probabilities(void){ - - - //========================= - // Compute sampling probabilities - // first pass: \xi_i,j - for(int i=0; i 0.){ - - double k = Dist[i][j]; - if (k >= k_max){ - k = k_max-1; - } - - bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); - - } else { - bg = delta; - } - - Prob[i][j] = exp(Prob[i][j] + bg); - } - } - - - // second pass: sum - double Summa = 0.; - - for(int i=0; i0. && Final[i][j]>0.){ - novel+=1.; - } - } - } - - } - //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - else { - - double pfail=0.; - int n_failed; - //, n_check = 0; - - for(int i=0; i0. && Final[i][j]>0.){ - novel+=1.; - } - } - } - } - - current_novelty = novel; - - - //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - if (verbose_level == 2){ - std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) - - << " cost=" << cost - << " novel=" << novel - << " rel_loss=" << cost/novel - << std::endl; - } - - current_epoch++; - } - - - //====== Destructor ====== - ~Universe(){ - - delete_2Dmatrix(Final, N_nodes); - delete_2Dmatrix(Dist, N_nodes); - delete_2Dmatrix(Tried, N_nodes); - delete_2Dmatrix(Prob, N_nodes); - delete_2Dmatrix(EdgeIndex, N_nodes); - delete_1Dmatrix(Rank); - } - - //================================================ - // Allocate memory - double** allocate_2Dmatrix(int N, int M) - { - double **pointer; - - if (verbose_level == 2){ - std::cout<< "["< 0){ - - pointer = new double[N]; - - }else { - - pointer = NULL; - } - - return pointer; - - } - - //============================================== - // De-Allocate memory to prevent memory leak - void delete_2Dmatrix(double **pointer, int N){ - - if (pointer != NULL){ - - for (int i = 0; i < N; ++i){ - delete [] pointer[i]; - } - delete [] pointer; - } - } - //==================== - void delete_1Dmatrix(double *pointer){ - - delete [] pointer; - } - - //=========================================== - double get_rel_loss(){ - - return CumulativeRelativeLoss ; - } - - //=========================================== - double get_rel_loss_err(){ - - return CRLsquare ; - } - - - - //================================================================================== - void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ - - double ALOT=100000000000.; - - // std::cout<<" evolve_to_target_and_save: istart=" << istart << "iend=" << iend << "\n"; - - reset_world(); - - for (int k = istart; k < iend; k++){ - - // std::cout<<" evolve: k=" << k << "\n"; - - - - for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ - // std::cout<<" evolve: k=" << k << " i=" << i << " cur=" << current_novelty << " Target=" << TargetNovelty << "\n"; - update_world(); - } - - storage[k]=current_loss/current_novelty; - counters[k]=1; - - - reset_world(); - } - - } - //============================================== - int get_reruns(void){ - return N_repeats; - } - - //============================================== - double get_parameter(int i){ - - switch(i){ - case 0: - return alpha_i; - case 1: - return alpha_m; - case 2: - return beta; - case 3: - return gamma; - case 4: - return delta; - default: - - std::cout << "Erroneous parameter id!!!!\n\n\n"; - return 0.; - } - } - - - //============================================== - void evolve_to_target(){ - - reset_world(); - if (beta < -1. || gamma < -1.){ - CumulativeRelativeLoss = 100000000000.; - CRLsquare = 0.; - return; - } - - - for (int k=0; k< N_repeats; k++){ - - - for(int i=0; i 4) {return 0;} - - else { - - switch(position){ - case 0: - alpha_i=value; - return 1; - case 1: - alpha_m=value; - return 1; - case 2: - beta=value; - return 1; - case 3: - gamma=value; - return 1; - case 4: - delta=value; - return 1; - } - - } - - return 0; - } - -#ifdef notdef - //================================================================= - void try_annealing(double starting_jump, int iterations, - double temp_start, double temp_end, double target_rejection){ - - double dx[5]={0.,0.,0.,0.,0}; - double x[5]={0.,0.,0.,0.,0}; - double rejection[5]={0., 0., 0., 0., 0.}; - double curr_x, curr_err, x_tmp; - double temperature; - double ratio, r; - int cycle=10; - boost::variate_generator > uni(generator, uni_dist); - - // set up parameter for annealing - - x[0]=alpha_i; - x[1]=alpha_m; - x[2]=beta; - x[3]=gamma; - x[4]=delta; - - for(int i=0;i<5;i++){ - dx[i] = starting_jump; - } - - // establish the current value - - //.......................................... - evolve_to_target(); - std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; - - curr_x = CumulativeRelativeLoss; - curr_err = CRLsquare; - CumulativeRelativeLoss = 0; - CRLsquare = 0; - //........................................... - - // optimization cycle - for(int i=0; i ratio){ - - std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) - <<" "<< (i+1) << " Did not accept " - << x_tmp << "(" << j << ")" << std::endl; - std::cout << alpha_i << " "<< alpha_m << " " - << beta << " " << gamma << " " - << delta << " " << std::endl; - set_parameter(x[j], j); - CumulativeRelativeLoss = 0; - CRLsquare = 0; - - rejection[j]+=1.; - } - - else { - - curr_x = CumulativeRelativeLoss; - curr_err = CRLsquare; - x[j] = x_tmp; - CumulativeRelativeLoss = 0; - CRLsquare = 0; - std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) - << wrap_double(rejection[0],2) - << " "<< wrap_double(rejection[1], 7) << " " - << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " - << wrap_double(rejection[4],6) << " " - << std::endl << std::endl; - - std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) - <<" " - << string_wrap((string) "***** Did accept! ", 3) - << wrap_double(alpha_i,2) - << " "<< wrap_double(alpha_m, 7) << " " - << wrap_double(beta,5) << " " - << wrap_double(gamma,9) << " " - << wrap_double(delta,6) << " " - << std::endl << std::endl; - - } - //........................................................ - - } - - } - - } - -#endif // notdef - - -}; - - -//============================================================ - -std::pair multi_loss( // dispatch_group_t group, - Universe* un[], - // dispatch_queue_t* CustomQueues, - double* Results, - int* Counters, - double* params){ - - int N = un[0]->get_reruns(); - int step = (int)(double)N/(double)(Nworkers); - int istart=0; - int iend = istart+step; - - double Loss=0., LossSquare=0.; - - timeval startTime, endTime; - double elapsedTime; - // start timer - gettimeofday(&startTime, NULL); - - //err: for(int i=0; iget_parameter(j) << "," << params[j] << "] "; - un[i]->set_parameter(params[j],j); - } - } - std::cout << "\n"; - int i; - #pragma omp parallel for private (i) - for(i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); - un[i]->evolve_to_target_and_save(i*step, min((i+1)*step,N), Results, Counters); - //}); - - // std::cout<<"multi_loss: Returned from evolve_to_target_and_save " << i << "\n"; - - - //istart += step; - //iend = min(istart+step,N); - - } - // err } - // dispatch_group_wait(group, DISPATCH_TIME_FOREVER); - //dispatch_release(group); - - - for (int i=0; i Res; - Res.first=Loss; - Res.second=two_std; - - gettimeofday(&endTime, NULL); - elapsedTime = (endTime.tv_sec - startTime.tv_sec) * 1000.0; // sec to ms - elapsedTime += (endTime.tv_usec - startTime.tv_usec) / 1000.0; // us to ms - elapsedTime /= 1000.; - cout << "multi_loss(N=" << N << ") elapsed time: " << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; - - return Res; -} -//============================================================ - - -//============================================================ -void multi_annealing( // dispatch_group_t group, - Universe* un[], - // dispatch_queue_t* CustomQueues, - double T_start, double T_end, - double Target_rejection, - int Annealing_repeats, - double starting_jump, - double* Results, - int* Counters, - double* params0, - double annealing_cycles){ - //................................. - // re-implement annealing - - double dx[NEVOPARAMS]={0.,0.,0.,0.,0}; - double x[NEVOPARAMS]={0.,0.,0.,0.,0}; - double rejection[NEVOPARAMS]={0., 0., 0., 0., 0.}; - double curr_x, curr_err, x_tmp; - double temperature; - double ratio, r; - int cycle=10; - //boost::variate_generator > uni(generator, uni_dist); - - // set up parameter for annealing - - for(int i=0;iset_parameter(x[i], i); - } - } - - // establish the current value - std::pairRes; - - if ( operation == 'm' ) { - // Nworkers = 1; - } - else if (operation == 'g') { - // generate params - } - else if (operation == 'a') { - // analyze multi_loss() results - - string line; - ifstream mlossdata ("multi_loss.data"); - double d, Loss, LossSquare, two_std; - bool b; - int n=0; - if (mlossdata.is_open()) { - while ( getline (mlossdata,line) ) { - b = from_string(d, std::string(line), std::dec); - cout << line << " d=" << d << endl; - Loss += d; - LossSquare += (d*d); - n++; - } - Loss /= double(n); - LossSquare /= double(n); - two_std = ((LossSquare - Loss*Loss)/(double)n); - two_std = 2.*sqrt(two_std); - std::cout<<"n="<get_reruns(); - - f = fopen("multi_loss.data","w"); - for(int i=0; iset_parameter(x_tmp, j); - } - - - // WRITE OUT PARAMS HERE; then exit. - - std::cout << "Calling multi_loss: i=" << i << " j=" << j << "\n"; - Res = multi_loss(/* group, */ un, /* CustomQueues, */ Results, Counters, x); - std::cout << "Ret from multi_loss: i=" << i << " j=" << j << "\n"; - std::cout << Res.first << " +- " << Res.second << std::endl; - - ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); - r = rand()/(double)(pow(2.,31)-1.); - std::cout << r << " vs " << ratio << std::endl; - - double ALOT=100000000000.; - - if (Res.first < ALOT) - { - ofstream filestr; - - filestr.open ("best_opt_some.txt", ofstream::app); - - // >> i/o operations here << - filestr << un[0]->get_target() << "," - << Res.first - << "," << un[0]->get_parameter(0) - << "," << un[0]->get_parameter(1) - << "," << un[0]->get_parameter(2) - << "," << un[0]->get_parameter(3) - << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; - - filestr.close(); - - - filestr.open ("max_dist.txt", ofstream::app); - - // >> i/o operations here << - filestr << max_dist << ",\n"; - - filestr.close(); - - } - - - if (r > ratio){ - - std::cout << " "<< (i+1) << ","<< (j) - <<" "<< (i+1) << " Did not accept " - << x_tmp << "(" << j << ")" << std::endl; - std::cout << un[0]->get_parameter(0) - << " " << un[0]->get_parameter(1) - << " " << un[0]->get_parameter(2) - << " " << un[0]->get_parameter(3) - << " " << un[0]->get_parameter(4) << " " << std::endl; - - x[j]=x_hold; - for(int w=0; wset_parameter(x[j], j); - } - - - //set_parameter(x[j], j); - rejection[j]+=1.; - } - - else { - - curr_x = Res.first; - curr_err = Res.second; - x[j] = x_tmp; - - for(int w=0; wset_parameter(x[j], j); - } - - std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) - << wrap_double(rejection[0],2) << " " - << wrap_double(rejection[1],7) << " " - << wrap_double(rejection[2],5) << " " - << wrap_double(rejection[3],9) << " " - << wrap_double(rejection[4],6) << " " - << std::endl << std::endl; - - std::cout << " "<< (i+1) <<","<< (j) - <<" " - << string_wrap((string) "***** Did accept! ", 3) - << wrap_double(un[0]->get_parameter(0),2) << " " - << wrap_double(un[0]->get_parameter(1),7) << " " - << wrap_double(un[0]->get_parameter(2),5) << " " - << wrap_double(un[0]->get_parameter(3),9) << " " - << wrap_double(un[0]->get_parameter(4),6) << " " - << std::endl << std::endl; - - - - } - //........................................................ - - } - } - - } - -} - - -//================================================ -int -main(int argc, char* argv[]) -{ - - double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; - string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; - string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; - string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; - string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; - string par_names4[2] = {"Operation", "Nworkers"}; - int params1[4] = {300, 50, 1000, 10}; - int params3[5] = { 0, 0, 0, 0, 0}; - - // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump - double params2[5] = {1, 0.001, 100, 0.3, 1.5}; - - int verbose_level = 2; - const std::string one="one", two="two"; - static Universe* un[MAXNworkers]; - // static dispatch_queue_t CustomQueues[MAXNworkers]; - - static double* Results; - static int* Counters; - - timeval t1, t2; - double elapsedTime; - // start timer - gettimeofday(&t1, NULL); - - - if (argc < 8) { - std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; - std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; - std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; - - system("pwd"); - - - return(1); - } - else { - std::cout << "argc=" << argc << std::endl; - - for (int nArg=0; nArg < argc; nArg++){ - //std::cout << nArg << " " << argv[nArg] << std::endl; - if (nArg > 0 && nArg < 7){ - params0[nArg-1]= atof(argv[nArg]); - std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; - } - if (nArg > 6 && nArg < 11){ - params1[nArg-7]= atoi(argv[nArg]); - std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; - } - if (nArg == 11){ - verbose_level = atoi(argv[nArg]); - std::cout << "verbose level: " << verbose_level << std::endl; - } - if (nArg > 11 && nArg < 17){ - params2[nArg-12]= atof(argv[nArg]); - std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; - } - if (nArg > 16 && nArg < 22){ - params3[nArg-17]= atof(argv[nArg]); - var_fixed[nArg-17]= atof(argv[nArg]); - std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; - } - if (nArg == 22 ){ - operation = *argv[nArg]; - std::cout << par_names4[0] << ": " << operation << std::endl; - } - if (nArg == 23 ){ - Nworkers = atoi(argv[nArg]); - std::cout << par_names4[1] << ": " << Nworkers << std::endl; - } - } - } - - /* - for target in range(58,1009,50): - s = ("%d" % target) - print s - - for i in range(15): - # Param groups separated by "|" below for documentation. NOTE that | is not used on command line! - os.system("./supe_duper_optimizer |0 0 4 50 -1 "+s+" | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0") - */ - - /* Parameters, re-iterated: - - "alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; - double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; - - {"n_epochs", "n_steps", "n_reruns", "range"}; - int params1[4] = {300, 50, 1000, 10}; - - {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; - temperature_start, temperature_end, annealing_steps target_rejection Starting_jump - double params2[5] = {1, 0.001, 100, 0.3, 1.5}; - - {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; - int params3[5] = { 0, 0, 0, 0, 0}; - - - */ - - for (int j=0; j 0){ - - Results = new double[n_rep]; - Counters = new int[n_rep]; - - }else { - - Results = NULL; - Counters = NULL; - std::cout << " Number of reruns should be positive! " << std::endl; - return 0; - - } - //............................... - - //srand(time(0)); - //srandomdev(); - { - timeval t; - gettimeofday(&t, NULL); - srand(t.tv_usec); - } - - { - double r=0; - for (int j=0; j<100; j++){ - - - - r = rand()/(double)(pow(2.,31)-1.); - std::cout << r << " "; - } - std::cout << "\n "; - } - //random initiation of starting parameters - - if (range > 0.){ - - for (int i=0; i < 5; i++){ - - if (params0[i]==-100.){ - - double r1 = (rand()/(double)(pow(2.,31)-1.)); - double r2 = (rand()/(double)(pow(2.,31)-1.)); - double sign = 1.; - - if(r1 > 0.5){ - sign=-1.; - } - - params0[i] = sign*r2*range; - - std::cout << par_names0[i] << ": " << params0[i] << std::endl; - } - } - - } - - - double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; - int Annealing_repeats = (int) params2[2]; - - - // dispatch_group_t group = dispatch_group_create(); - - //............................. - multi_annealing( /* group, */ un, /* CustomQueues, */ T_start, T_end, Target_rejection, Annealing_repeats, - starting_jump, Results, Counters, params0, Annealing_repeats); - - //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); - // dispatch_release(group); - //............................. - - - // stop timer - gettimeofday(&t2, NULL); - - // compute and print the elapsed time in millisec - elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms - elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms - elapsedTime /= 1000.; - cout << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; - - //..................... - - for(int i=0; i 0){ - - delete [] Results; - delete [] Counters; - - } - - return 0; - - - -} - Copied: SwiftApps/SciColSim/optimizer.protomods.cpp (from rev 5504, SwiftApps/SciColSim/optimizer.cpp) =================================================================== --- SwiftApps/SciColSim/optimizer.protomods.cpp (rev 0) +++ SwiftApps/SciColSim/optimizer.protomods.cpp 2012-01-23 18:21:22 UTC (rev 5511) @@ -0,0 +1,1818 @@ +// +// main.cpp +// optimizer +// +// Created by Andrey Rzhetsky on 4/11/11. +// Copyright 2011 University of Chicago. All rights reserved. +// + +#define MAXNworkers 24 +int Nworkers=MAXNworkers; + +// Add operation code to enable existing code to be used at lower level from Swift scripts: + +char operation = 'n'; // n: normal; m: do one multi_loss (with n_reruns). + // Not used: a: analyze and generate next annealing parameter set. g: tbd + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +// #include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define INT_INFINITY 2147483647 +#define NEVOPARAMS 5 + +#define FIX_VARIABLES 1 + +using namespace boost; +using namespace std; +using namespace boost::numeric::ublas; + +static int max_dist=0; + +typedef boost::adjacency_matrix Graph; +typedef std::pair Edge; +typedef boost::graph_traits GraphTraits; +typedef boost::numeric::ublas::triangular_matrix prob; +typedef boost::numeric::ublas::triangular_matrix pathlength; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + +namespace std { + using ::time; +} + +static int var_fixed[NEVOPARAMS] = {1, 0, 1, 1, 0}; + +typedef boost::minstd_rand base_generator_type; +typedef adjacency_list < listS, vecS, directedS, +no_property, property < edge_weight_t, int > > graph_t; +typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; +typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; + + +//================================================ +string strDouble(double number) +{ + stringstream ss;//create a stringstream + ss << number;//add number to the stream + return ss.str();//return a string with the contents of the stream +} + +//================================================ + +double gaussian(double sigma) +{ + double GaussNum = 0.0; + int NumInSum = 10; + for(int i = 0; i < NumInSum; i++) + { + GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); + } + GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); + + + return GaussNum; + +} + + + +//================================================= +double diffclock(clock_t clock1,clock_t clock2) +{ + double diffticks=clock1-clock2; + double diffms=(diffticks)/CLOCKS_PER_SEC; + return diffms; +} + +//================================================ +//================================================================ +double get_new_x(double x, double dx){ + + double new_x; + // boost::variate_generator > uni(generator, uni_dist); + double r = rand()/(double)(pow(2.,31)-1.); + + if (r > 0.5){ + new_x = x + rand()*dx/(double)(pow(2.,31)-1.); + } else { + new_x = x - rand()*dx/(double)(pow(2.,31)-1.); + } + + return new_x; + +} + + +//=============================================== +string string_wrap(string ins, int mode){ + + std::ostringstream s; + + switch(mode){ + case 0: + s << "\033[1;29m" << ins << "\033[0m"; + break; + case 1: + s << "\033[1;34m" << ins << "\033[0m"; + break; + case 2: + s << "\033[1;44m" << ins << "\033[0m"; + break; + case 3: + s << "\033[1;35m" << ins << "\033[0m"; + break; + case 4: + s << "\033[1;33;44m" << ins << "\033[0m"; + break; + case 5: + s << "\033[1;47;34m" << ins << "\033[0m"; + break; + case 6: + s << "\033[1;1;31m" << ins << "\033[0m"; + break; + case 7: + s << "\033[1;1;33m" << ins << "\033[0m"; + break; + case 8: + s << "\033[1;1;43;34m" << ins << "\033[0m"; + break; + case 9: + s << "\033[1;1;37m" << ins << "\033[0m"; + break; + case 10: + s << "\033[1;30;47m" << ins << "\033[0m"; + break; + default: + s << ins; + } + + return s.str(); +} + + +//=============================================== +string wrap_double(double val, int mode){ + + std::ostringstream s; + s << string_wrap(strDouble(val),mode); + + return s.str(); +} + + + +//=============================================== +const +string i2string(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + return s.str(); + +} + +//=============================================== +char* i2char(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + char* a=new char[s.str().size()+1]; + memcpy(a,s.str().c_str(), s.str().size()); + + return a; +} + + +template +bool from_string(T& t, + const std::string& s, + std::ios_base& (*f)(std::ios_base&)) +{ + std::istringstream iss(s); + return !(iss >> f >> t).fail(); +} + +//================================================ +class Universe { + +private: + + double alpha_i; + double alpha_m; + double beta; + double gamma; + double delta; + + double TargetNovelty; + double CumulativeRelativeLoss; + double CRLsquare; + string id; + + + int N_nodes; + int M_edges; + + int N_epochs; + int N_steps; + int N_repeats; + + int current_epoch; + double current_loss; + int current_repeat; + double current_novelty; + + int mode_identify_failed; + int verbose_level; // 0 is silent, higher is more + + double k_max; + + graph_t Full_g; + + double **Prob; + double **Tried; + double **Dist; + double **Final; + double **EdgeIndex; + double *Rank; + + base_generator_type generator; + boost::uniform_real<> uni_dist; + boost::geometric_distribution geo; + +public: + + + + //====== Constructor ====== + Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) + { + //typedef array_type2::index index2; + + + std::ifstream inFile; + //string line; + + //------------------------------- + + base_generator_type gene(42u); + generator = gene; + generator.seed(static_cast(std::time(0))); + boost::uniform_real<> uni_d(0,1); + uni_dist = uni_d; + + //-------------------------------- + + int i, k; + int x, y; + Edge* edge_array_mine; + int num_arcs_mine, num_nodes_mine; + int* weights_mine; + + TargetNovelty = target; + CumulativeRelativeLoss = 0.; + CRLsquare = 0.; + + + N_epochs = Epochs; + N_steps = Steps; + N_repeats = Repeats; + + current_epoch = 0; + current_loss = 0.; + current_repeat = 0; + + id = idd; + + verbose_level = 1; + + mode_identify_failed = identify_failed; + + + //------------------------------- + // The first pass though file with the graph + inFile.open(FileToOpen.c_str()); + if (inFile.fail()) { + cout << "Unable to open file"; + exit(1); // terminate with error + }else { + + if (verbose_level > 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x; + inFile >> y; + + if (verbose_level > 2){ + std::cout << " x: " << x; + std::cout << " y: " << y << std::endl; + } + + if (i==0){ + N_nodes=x; + M_edges=y; + break; + } + i++; + + + } + inFile.close(); + + if (verbose_level == 2){ + std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { + if (i > 0) { + Final[x][y]=1.; + Final[y][x]=1.; + + + if (verbose_level == 2){ + std::cout << "."; + } + } + i++; + + } + if (verbose_level == 2){ + std::cout << std::endl; + } + inFile.close(); + + k=0; + for (int i=0; i 0.){ + EdgeIndex[i][j]=k; + k++; + } + } + } + + + + //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // create graph -- hopefully, we can keep it, just modifying edge weights + + + edge_array_mine = new Edge[2*M_edges]; + num_arcs_mine = 2*M_edges; + num_nodes_mine = N_nodes; + weights_mine = new int[2*M_edges]; + for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} + + k=0; + for(int i=0; i0.){ + edge_array_mine[2*k] =Edge(i,j); + edge_array_mine[2*k+1]=Edge(j,i); + k++; + } + } + } + graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); + + Full_g = g; + delete edge_array_mine; + delete weights_mine; + + //=========================================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + for (int i=0; i 0.){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + + } + + + //===================================================================== + int sample_failed_number(double pfail){ + + //boost::geometric_distribution geo(pfail); + //boost::variate_generator > geom(generator, geo); + + double r, u, g; + + r=0.; + for(int i=0; i=3){ + std::cout << id << " failed " << r << std::endl; + } + return r; + + } + + //============================================= + double get_target(void){ + return TargetNovelty; + } + + //============================================= + void set_target(double target){ + TargetNovelty=target; + } + + //============================================= + int sample(){ + + //boost::variate_generator > uni(generator, uni_dist); + // double r = uni(), Summa = 0.; + + + + double r = rand(), Summa = 0.; + r /= (double)(pow(2.,31)-1.); + int result = 0; + int finished = 0; + + if (verbose_level==4){ + std::cout << id << " sampled " << r << std::endl; + } + + for(int i=0; i r){ + + Tried[i][j]+=1.; + + if (Final[i][j] > 0.){ + result = 1; + } + finished = 1; + } + } + } + + return result; + + } + + //=============================== + void update_current_graph(void){ + + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + //property_map::type weightmap = get(edge_weight, Full_g); + for (int i=0; i 0. && Tried[i][j]>0){ + //s = edge(i, j, Full_g); + boost::graph_traits::edge_descriptor e1,e2; + bool found1, found2; + u = vertex(i, Full_g); + v = vertex(j, Full_g); + tie(e1, found1) = edge(u, v, Full_g); + tie(e2, found2) = edge(v, u, Full_g); + if (!found1 && !found2){ + add_edge(u,v,1,Full_g); + add_edge(v,u,1,Full_g); + } + + } + } + + } + } + + //=============================== + void update_distances(void){ + // put shortest paths to the *Dist[][] + std::vector p(num_vertices(Full_g)); + std::vector d(num_vertices(Full_g)); + vertex_descriptor s; + + + // put shortest paths to the *Dist[][] + for (int j=0; j 0.){ + s = vertex(j, Full_g); + dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); + + //std::cout <<" Vertex "<< j << std::endl; + graph_traits < graph_t >::vertex_iterator vi, vend; + + for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { + + if (p[*vi]!=*vi){ + Dist[*vi][j]=d[*vi]; + Dist[j][*vi]=d[*vi]; + + if (Dist[*vi][j]>max_dist){ + max_dist=Dist[*vi][j]; + } + + + } else { + Dist[*vi][j]=-1.; + Dist[j][*vi]=-1.; + } + } + } + + } + + + } + + //====================================================== + void update_ranks(void){ + + for(int i=0; i0. && Final[i][j] >0.){ + Rank[i]++; + Rank[j]++; + } + } + } + + } + + //==================================================================== + void set_world(double a_i, double a_m, double b, double g, double d){ + + alpha_i=a_i; + alpha_m=a_m; + gamma=g; + beta=b; + delta=d; + + } + + //==================================================================== + void reset_world(){ + + //==================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + + for (int i=0; i 0. && Tried[i][j] > 0){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + //================================================== + + current_loss=0; + current_epoch=0; + current_repeat++; + current_novelty=0; + + for(int i = 0; i < N_nodes; ++i) { + Rank[i]=0.; + for(int j = 0; j < N_nodes; ++j) { + Prob[i][j]=0.; + Dist[i][j]=-1.; + Tried[i][j]=0.; + } + } + } + + + //============================================== + void show_parameters(void){ + + std::cout << "Parameters: " + << alpha_i << " " + << alpha_m << " | " + << beta << " " + << gamma << " | " + << delta << std::endl; + + } + + + + //=============================================== + string file_name(){ + + std::ostringstream s; + s << "world_" + << lexical_cast(alpha_i) << "_" + << lexical_cast(alpha_m) << "_" + << lexical_cast(beta) << "_" + << lexical_cast(gamma) << "_" + << lexical_cast(delta) << "_" + << lexical_cast(N_epochs) << "_" + << lexical_cast(N_steps) << "_" + << lexical_cast(N_repeats) << ".txt"; + + return s.str(); + + } + + + + + //================================================= + void set_verbose(int verbose){ + + verbose_level = verbose; + } + + + //============================================================= + void update_probabilities(void){ + + + //========================= + // Compute sampling probabilities + // first pass: \xi_i,j + for(int i=0; i 0.){ + + double k = Dist[i][j]; + if (k >= k_max){ + k = k_max-1; + } + + bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); + + } else { + bg = delta; + } + + Prob[i][j] = exp(Prob[i][j] + bg); + } + } + + + // second pass: sum + double Summa = 0.; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + + } + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + else { + + double pfail=0.; + int n_failed; + //, n_check = 0; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + } + + current_novelty = novel; + + + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + if (verbose_level == 2){ + std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) + + << " cost=" << cost + << " novel=" << novel + << " rel_loss=" << cost/novel + << std::endl; + } + + current_epoch++; + } + + + //====== Destructor ====== + ~Universe(){ + + delete_2Dmatrix(Final, N_nodes); + delete_2Dmatrix(Dist, N_nodes); + delete_2Dmatrix(Tried, N_nodes); + delete_2Dmatrix(Prob, N_nodes); + delete_2Dmatrix(EdgeIndex, N_nodes); + delete_1Dmatrix(Rank); + } + + //================================================ + // Allocate memory + double** allocate_2Dmatrix(int N, int M) + { + double **pointer; + + if (verbose_level == 2){ + std::cout<< "["< 0){ + + pointer = new double[N]; + + }else { + + pointer = NULL; + } + + return pointer; + + } + + //============================================== + // De-Allocate memory to prevent memory leak + void delete_2Dmatrix(double **pointer, int N){ + + if (pointer != NULL){ + + for (int i = 0; i < N; ++i){ + delete [] pointer[i]; + } + delete [] pointer; + } + } + //==================== + void delete_1Dmatrix(double *pointer){ + + delete [] pointer; + } + + //=========================================== + double get_rel_loss(){ + + return CumulativeRelativeLoss ; + } + + //=========================================== + double get_rel_loss_err(){ + + return CRLsquare ; + } + + + + //================================================================================== + void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ + + double ALOT=100000000000.; + + // std::cout<<" evolve_to_target_and_save: istart=" << istart << "iend=" << iend << "\n"; + + reset_world(); + + for (int k = istart; k < iend; k++){ + + // std::cout<<" evolve: k=" << k << "\n"; + + + + for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ + // std::cout<<" evolve: k=" << k << " i=" << i << " cur=" << current_novelty << " Target=" << TargetNovelty << "\n"; + update_world(); + } + + storage[k]=current_loss/current_novelty; + counters[k]=1; + + + reset_world(); + } + + } + //============================================== + int get_reruns(void){ + return N_repeats; + } + + //============================================== + double get_parameter(int i){ + + switch(i){ + case 0: + return alpha_i; + case 1: + return alpha_m; + case 2: + return beta; + case 3: + return gamma; + case 4: + return delta; + default: + + std::cout << "Erroneous parameter id!!!!\n\n\n"; + return 0.; + } + } + + + //============================================== + void evolve_to_target(){ + + reset_world(); + if (beta < -1. || gamma < -1.){ + CumulativeRelativeLoss = 100000000000.; + CRLsquare = 0.; + return; + } + + + for (int k=0; k< N_repeats; k++){ + + + for(int i=0; i 4) {return 0;} + + else { + + switch(position){ + case 0: + alpha_i=value; + return 1; + case 1: + alpha_m=value; + return 1; + case 2: + beta=value; + return 1; + case 3: + gamma=value; + return 1; + case 4: + delta=value; + return 1; + } + + } + + return 0; + } + +#ifdef notdef + //================================================================= + void try_annealing(double starting_jump, int iterations, + double temp_start, double temp_end, double target_rejection){ + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=alpha_i; + x[1]=alpha_m; + x[2]=beta; + x[3]=gamma; + x[4]=delta; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + + //.......................................... + evolve_to_target(); + std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + //........................................... + + // optimization cycle + for(int i=0; i ratio){ + + std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << alpha_i << " "<< alpha_m << " " + << beta << " " << gamma << " " + << delta << " " << std::endl; + set_parameter(x[j], j); + CumulativeRelativeLoss = 0; + CRLsquare = 0; + + rejection[j]+=1.; + } + + else { + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + x[j] = x_tmp; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) + << " "<< wrap_double(rejection[1], 7) << " " + << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(alpha_i,2) + << " "<< wrap_double(alpha_m, 7) << " " + << wrap_double(beta,5) << " " + << wrap_double(gamma,9) << " " + << wrap_double(delta,6) << " " + << std::endl << std::endl; + + } + //........................................................ + + } + + } + + } + +#endif // notdef + + +}; + + +//============================================================ + +std::pair multi_loss( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double* Results, + int* Counters, + double* params){ + + int N = un[0]->get_reruns(); + int step = (int)(double)N/(double)(Nworkers); + int istart=0; + int iend = istart+step; + + double Loss=0., LossSquare=0.; + + timeval startTime, endTime; + double elapsedTime; + // start timer + gettimeofday(&startTime, NULL); + + //err: for(int i=0; iget_parameter(j) << "," << params[j] << "] "; + un[i]->set_parameter(params[j],j); + } + } + std::cout << "\n"; + int i; + #pragma omp parallel for private (i) + for(i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); + un[i]->evolve_to_target_and_save(i*step, min((i+1)*step,N), Results, Counters); + //}); + + // std::cout<<"multi_loss: Returned from evolve_to_target_and_save " << i << "\n"; + + + //istart += step; + //iend = min(istart+step,N); + + } + // err } + // dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + //dispatch_release(group); + + + for (int i=0; i Res; + Res.first=Loss; + Res.second=two_std; + + gettimeofday(&endTime, NULL); + elapsedTime = (endTime.tv_sec - startTime.tv_sec) * 1000.0; // sec to ms + elapsedTime += (endTime.tv_usec - startTime.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << "multi_loss(N=" << N << ") elapsed time: " << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; + + return Res; +} +//============================================================ + + +//============================================================ +void multi_annealing( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double T_start, double T_end, + double Target_rejection, + int Annealing_repeats, + double starting_jump, + double* Results, + int* Counters, + double* params0, + double annealing_cycles){ + //................................. + // re-implement annealing + + double dx[NEVOPARAMS]={0.,0.,0.,0.,0}; + double x[NEVOPARAMS]={0.,0.,0.,0.,0}; + double rejection[NEVOPARAMS]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + //boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + for(int i=0;iset_parameter(x[i], i); + } + } + + // establish the current value + std::pairRes; + + if ( operation == 'm' ) { + // Nworkers = 1; + } + else if (operation == 'g') { + // generate params: not yet implemented - to be deprecated + } + else if (operation == 'a') { + // analyze multi_loss() results: not tested or used - to be deprecated + + string line; + ifstream mlossdata ("multi_loss.data"); + double d, Loss, LossSquare, two_std; + bool b; + int n=0; + if (mlossdata.is_open()) { + while ( getline (mlossdata,line) ) { + b = from_string(d, std::string(line), std::dec); + cout << line << " d=" << d << endl; + Loss += d; + LossSquare += (d*d); + n++; + } + Loss /= double(n); + LossSquare /= double(n); + two_std = ((LossSquare - Loss*Loss)/(double)n); + two_std = 2.*sqrt(two_std); + std::cout<<"n="<get_reruns(); + + f = fopen("multi_loss.data","w"); + for(int i=0; iset_parameter(x_tmp, j); + } + + + // WRITE OUT PARAMS HERE; then exit. + + std::cout << "Calling multi_loss: i=" << i << " j=" << j << "\n"; + Res = multi_loss(/* group, */ un, /* CustomQueues, */ Results, Counters, x); + std::cout << "Ret from multi_loss: i=" << i << " j=" << j << "\n"; + std::cout << Res.first << " +- " << Res.second << std::endl; + + ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " vs " << ratio << std::endl; + + double ALOT=100000000000.; + + if (Res.first < ALOT) + { + ofstream filestr; + + filestr.open ("best_opt_some.txt", ofstream::app); + + // >> i/o operations here << + filestr << un[0]->get_target() << "," + << Res.first + << "," << un[0]->get_parameter(0) + << "," << un[0]->get_parameter(1) + << "," << un[0]->get_parameter(2) + << "," << un[0]->get_parameter(3) + << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; + + filestr.close(); + + + filestr.open ("max_dist.txt", ofstream::app); + + // >> i/o operations here << + filestr << max_dist << ",\n"; + + filestr.close(); + + } + + + if (r > ratio){ + + std::cout << " "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << un[0]->get_parameter(0) + << " " << un[0]->get_parameter(1) + << " " << un[0]->get_parameter(2) + << " " << un[0]->get_parameter(3) + << " " << un[0]->get_parameter(4) << " " << std::endl; + + x[j]=x_hold; + for(int w=0; wset_parameter(x[j], j); + } + + + //set_parameter(x[j], j); + rejection[j]+=1.; + } + + else { + + curr_x = Res.first; + curr_err = Res.second; + x[j] = x_tmp; + + for(int w=0; wset_parameter(x[j], j); + } + + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) << " " + << wrap_double(rejection[1],7) << " " + << wrap_double(rejection[2],5) << " " + << wrap_double(rejection[3],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << " "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(un[0]->get_parameter(0),2) << " " + << wrap_double(un[0]->get_parameter(1),7) << " " + << wrap_double(un[0]->get_parameter(2),5) << " " + << wrap_double(un[0]->get_parameter(3),9) << " " + << wrap_double(un[0]->get_parameter(4),6) << " " + << std::endl << std::endl; + + + + } + //........................................................ + + } + } + + } + +} + + +//================================================ +int +main(int argc, char* argv[]) +{ + + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; + string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + string par_names4[2] = {"Operation", "Nworkers"}; + int params1[4] = {300, 50, 1000, 10}; + int params3[5] = { 0, 0, 0, 0, 0}; + + // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + int verbose_level = 2; + const std::string one="one", two="two"; + static Universe* un[MAXNworkers]; + // static dispatch_queue_t CustomQueues[MAXNworkers]; + + static double* Results; + static int* Counters; + + timeval t1, t2; + double elapsedTime; + // start timer + gettimeofday(&t1, NULL); + + + if (argc < 8) { + std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; + std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; + std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; + + system("pwd"); + + + return(1); + } + else { + std::cout << "argc=" << argc << std::endl; + + for (int nArg=0; nArg < argc; nArg++){ + //std::cout << nArg << " " << argv[nArg] << std::endl; + if (nArg > 0 && nArg < 7){ + params0[nArg-1]= atof(argv[nArg]); + std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; + } + if (nArg > 6 && nArg < 11){ + params1[nArg-7]= atoi(argv[nArg]); + std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; + } + if (nArg == 11){ + verbose_level = atoi(argv[nArg]); + std::cout << "verbose level: " << verbose_level << std::endl; + } + if (nArg > 11 && nArg < 17){ + params2[nArg-12]= atof(argv[nArg]); + std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; + } + if (nArg > 16 && nArg < 22){ + params3[nArg-17]= atof(argv[nArg]); + var_fixed[nArg-17]= atof(argv[nArg]); + std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; + } + if (nArg == 22 ){ + operation = *argv[nArg]; + std::cout << par_names4[0] << ": " << operation << std::endl; + } + if (nArg == 23 ){ + Nworkers = atoi(argv[nArg]); + std::cout << par_names4[1] << ": " << Nworkers << std::endl; + } + } + } + + /* + for target in range(58,1009,50): + s = ("%d" % target) + print s + + for i in range(15): + # Param groups separated by "|" below for documentation. NOTE that | is not used on command line! + os.system("./supe_duper_optimizer |0 0 4 50 -1 "+s+" | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0") + */ + + /* Parameters, re-iterated: + + "alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + + {"n_epochs", "n_steps", "n_reruns", "range"}; + int params1[4] = {300, 50, 1000, 10}; + + {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params3[5] = { 0, 0, 0, 0, 0}; + + + */ + + for (int j=0; j 0){ + + Results = new double[n_rep]; + Counters = new int[n_rep]; + + }else { + + Results = NULL; + Counters = NULL; + std::cout << " Number of reruns should be positive! " << std::endl; + return 0; + + } + //............................... + + //srand(time(0)); + //srandomdev(); + { + timeval t; + gettimeofday(&t, NULL); + srand(t.tv_usec); + } + + { + double r=0; + for (int j=0; j<100; j++){ + + + + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " "; + } + std::cout << "\n "; + } + //random initiation of starting parameters + + if (range > 0.){ + + for (int i=0; i < 5; i++){ + + if (params0[i]==-100.){ + + double r1 = (rand()/(double)(pow(2.,31)-1.)); + double r2 = (rand()/(double)(pow(2.,31)-1.)); + double sign = 1.; + + if(r1 > 0.5){ + sign=-1.; + } + + params0[i] = sign*r2*range; + + std::cout << par_names0[i] << ": " << params0[i] << std::endl; + } + } + + } + + + double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; + int Annealing_repeats = (int) params2[2]; + + + // dispatch_group_t group = dispatch_group_create(); + + //............................. + multi_annealing( /* group, */ un, /* CustomQueues, */ T_start, T_end, Target_rejection, Annealing_repeats, + starting_jump, Results, Counters, params0, Annealing_repeats); + + //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + // dispatch_release(group); + //............................. + + + // stop timer + gettimeofday(&t2, NULL); + + // compute and print the elapsed time in millisec + elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms + elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; + + //..................... + + for(int i=0; i 0){ + + delete [] Results; + delete [] Counters; + + } + + return 0; + + + +} + From wilde at ci.uchicago.edu Mon Jan 23 15:01:51 2012 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 23 Jan 2012 21:01:51 -0000 Subject: [Swift-commit] r5514 - in SwiftApps/SciColSim: . snapshots.2012.0123 Message-ID: <20120123210149.5C8D69CC94@svn.ci.uchicago.edu> Author: wilde Date: 2012-01-23 15:01:49 -0600 (Mon, 23 Jan 2012) New Revision: 5514 Added: SwiftApps/SciColSim/snapshots.2012.0123/ SwiftApps/SciColSim/snapshots.2012.0123/optimizer.orig.cpp SwiftApps/SciColSim/snapshots.2012.0123/optimizer.snap01.cpp SwiftApps/SciColSim/snapshots.2012.0123/t2.cpp Removed: SwiftApps/SciColSim/optimizer.orig.cpp SwiftApps/SciColSim/optimizer.snap01.cpp SwiftApps/SciColSim/t2.cpp Modified: SwiftApps/SciColSim/Makefile SwiftApps/SciColSim/optimizer.cpp Log: Moving interim mods to snapshot dir. Setting up for testaing against orginal Mac version. Modified: SwiftApps/SciColSim/Makefile =================================================================== --- SwiftApps/SciColSim/Makefile 2012-01-23 19:13:49 UTC (rev 5513) +++ SwiftApps/SciColSim/Makefile 2012-01-23 21:01:49 UTC (rev 5514) @@ -1,8 +1,11 @@ -all: macoptimizer +all: mac-optimizer mac-orig-optimizer -macoptimizer: optimizer.cpp - g++ -I boost_1_47_0 -o optimizer optimizer.cpp +mac-optimizer: optimizer.cpp + g++ -I boost_1_47_0 -o mac-optimizer optimizer.cpp +mac-orig-optimizer: optimizer.orig-mac.cpp + g++ -I boost_1_47_0 -o mac-optimizer optimizer.orig-mac.cpp + protoall: toptimizer optimizer Optimizer optimizer: optimizer.snap01.cpp Modified: SwiftApps/SciColSim/optimizer.cpp =================================================================== --- SwiftApps/SciColSim/optimizer.cpp 2012-01-23 19:13:49 UTC (rev 5513) +++ SwiftApps/SciColSim/optimizer.cpp 2012-01-23 21:01:49 UTC (rev 5514) @@ -1259,12 +1259,13 @@ dispatch_group_async(group, CustomQueues[i], ^{ - un[i]->evolve_to_target_and_save(istart, iend, Results, Counters); + // un[i]->evolve_to_target_and_save(istart, iend, Results, Counters); + un[i]->evolve_to_target_and_save(i*step, min((i+1)*step,N), Results, Counters); }); std::cout << "queued: i=" << i << " N=" << N << " istart=" << istart << " iend=" << iend << "\n"; - istart += step; - iend = min(istart+step,N); + // istart += step; + // iend = min(istart+step,N); } dispatch_group_wait(group, DISPATCH_TIME_FOREVER); Deleted: SwiftApps/SciColSim/optimizer.orig.cpp =================================================================== --- SwiftApps/SciColSim/optimizer.orig.cpp 2012-01-23 19:13:49 UTC (rev 5513) +++ SwiftApps/SciColSim/optimizer.orig.cpp 2012-01-23 21:01:49 UTC (rev 5514) @@ -1,1710 +0,0 @@ -// -// main.cpp -// optimizer -// -// Created by Andrey Rzhetsky on 4/11/11. -// Copyright 2011 University of Chicago. All rights reserved. -// - -#define Nworkers 1 // 24 - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -// #include -#include - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error -#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define INT_INFINITY 2147483647 - -#define FIX_VARIABLES 1 - -using namespace boost; -using namespace std; -using namespace boost::numeric::ublas; - -static int max_dist=0; - -typedef boost::adjacency_matrix Graph; -typedef std::pair Edge; -typedef boost::graph_traits GraphTraits; -typedef boost::numeric::ublas::triangular_matrix prob; -typedef boost::numeric::ublas::triangular_matrix pathlength; -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; - -namespace std { - using ::time; -} - -static int var_fixed[5] = {1, 0, 1, 1, 0}; - -typedef boost::minstd_rand base_generator_type; -typedef adjacency_list < listS, vecS, directedS, -no_property, property < edge_weight_t, int > > graph_t; -typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; -typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; - - -//================================================ -string strDouble(double number) -{ - stringstream ss;//create a stringstream - ss << number;//add number to the stream - return ss.str();//return a string with the contents of the stream -} - -//================================================ - -double gaussian(double sigma) -{ - double GaussNum = 0.0; - int NumInSum = 10; - for(int i = 0; i < NumInSum; i++) - { - GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); - } - GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); - - - return GaussNum; - -} - - - -//================================================= -double diffclock(clock_t clock1,clock_t clock2) -{ - double diffticks=clock1-clock2; - double diffms=(diffticks)/CLOCKS_PER_SEC; - return diffms; -} - -//================================================ -//================================================================ -double get_new_x(double x, double dx){ - - double new_x; - // boost::variate_generator > uni(generator, uni_dist); - double r = rand()/(double)(pow(2.,31)-1.); - - if (r > 0.5){ - new_x = x + rand()*dx/(double)(pow(2.,31)-1.); - } else { - new_x = x - rand()*dx/(double)(pow(2.,31)-1.); - } - - return new_x; - -} - - -//=============================================== -string string_wrap(string ins, int mode){ - - std::ostringstream s; - - switch(mode){ - case 0: - s << "\033[1;29m" << ins << "\033[0m"; - break; - case 1: - s << "\033[1;34m" << ins << "\033[0m"; - break; - case 2: - s << "\033[1;44m" << ins << "\033[0m"; - break; - case 3: - s << "\033[1;35m" << ins << "\033[0m"; - break; - case 4: - s << "\033[1;33;44m" << ins << "\033[0m"; - break; - case 5: - s << "\033[1;47;34m" << ins << "\033[0m"; - break; - case 6: - s << "\033[1;1;31m" << ins << "\033[0m"; - break; - case 7: - s << "\033[1;1;33m" << ins << "\033[0m"; - break; - case 8: - s << "\033[1;1;43;34m" << ins << "\033[0m"; - break; - case 9: - s << "\033[1;1;37m" << ins << "\033[0m"; - break; - case 10: - s << "\033[1;30;47m" << ins << "\033[0m"; - break; - default: - s << ins; - } - - return s.str(); -} - - -//=============================================== -string wrap_double(double val, int mode){ - - std::ostringstream s; - s << string_wrap(strDouble(val),mode); - - return s.str(); -} - - - -//=============================================== -const -string i2string(int i){ - - std::ostringstream s; - s << "worker" - << lexical_cast(i); - - return s.str(); - -} - -//=============================================== -char* i2char(int i){ - - std::ostringstream s; - s << "worker" - << lexical_cast(i); - - char* a=new char[s.str().size()+1]; - memcpy(a,s.str().c_str(), s.str().size()); - - return a; -} - -//================================================ -class Universe { - -private: - - double alpha_i; - double alpha_m; - double beta; - double gamma; - double delta; - - double TargetNovelty; - double CumulativeRelativeLoss; - double CRLsquare; - string id; - - - int N_nodes; - int M_edges; - - int N_epochs; - int N_steps; - int N_repeats; - - int current_epoch; - double current_loss; - int current_repeat; - double current_novelty; - - int mode_identify_failed; - int verbose_level; // 0 is silent, higher is more - - double k_max; - - graph_t Full_g; - - double **Prob; - double **Tried; - double **Dist; - double **Final; - double **EdgeIndex; - double *Rank; - - base_generator_type generator; - boost::uniform_real<> uni_dist; - boost::geometric_distribution geo; - -public: - - - - //====== Constructor ====== - Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) - { - //typedef array_type2::index index2; - - - std::ifstream inFile; - //string line; - - //------------------------------- - - base_generator_type gene(42u); - generator = gene; - generator.seed(static_cast(std::time(0))); - boost::uniform_real<> uni_d(0,1); - uni_dist = uni_d; - - //-------------------------------- - - int i, k; - int x, y; - Edge* edge_array_mine; - int num_arcs_mine, num_nodes_mine; - int* weights_mine; - - TargetNovelty = target; - CumulativeRelativeLoss = 0.; - CRLsquare = 0.; - - - N_epochs = Epochs; - N_steps = Steps; - N_repeats = Repeats; - - current_epoch = 0; - current_loss = 0.; - current_repeat = 0; - - id = idd; - - verbose_level = 1; - - mode_identify_failed = identify_failed; - - - //------------------------------- - // The first pass though file with the graph - inFile.open(FileToOpen.c_str()); - if (inFile.fail()) { - cout << "Unable to open file"; - exit(1); // terminate with error - }else { - - if (verbose_level > 2){ - std::cout << " Opened <" << FileToOpen << ">"<> x; - inFile >> y; - - if (verbose_level > 2){ - std::cout << " x: " << x; - std::cout << " y: " << y << std::endl; - } - - if (i==0){ - N_nodes=x; - M_edges=y; - break; - } - i++; - - - } - inFile.close(); - - if (verbose_level == 2){ - std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ - std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { - if (i > 0) { - Final[x][y]=1.; - Final[y][x]=1.; - - - if (verbose_level == 2){ - std::cout << "."; - } - } - i++; - - } - if (verbose_level == 2){ - std::cout << std::endl; - } - inFile.close(); - - k=0; - for (int i=0; i 0.){ - EdgeIndex[i][j]=k; - k++; - } - } - } - - - - //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - // create graph -- hopefully, we can keep it, just modifying edge weights - - - edge_array_mine = new Edge[2*M_edges]; - num_arcs_mine = 2*M_edges; - num_nodes_mine = N_nodes; - weights_mine = new int[2*M_edges]; - for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} - - k=0; - for(int i=0; i0.){ - edge_array_mine[2*k] =Edge(i,j); - edge_array_mine[2*k+1]=Edge(j,i); - k++; - } - } - } - graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); - - Full_g = g; - delete edge_array_mine; - delete weights_mine; - - //=========================================================================== - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - for (int i=0; i 0.){ - u = vertex(i, Full_g); - v = vertex(j, Full_g); - remove_edge(u,v,Full_g); - remove_edge(v,u,Full_g); - - } - } - } - - - } - - - //===================================================================== - int sample_failed_number(double pfail){ - - //boost::geometric_distribution geo(pfail); - //boost::variate_generator > geom(generator, geo); - - double r, u, g; - - r=0.; - for(int i=0; i=3){ - std::cout << id << " failed " << r << std::endl; - } - return r; - - } - - //============================================= - double get_target(void){ - return TargetNovelty; - } - - //============================================= - void set_target(double target){ - TargetNovelty=target; - } - - //============================================= - int sample(){ - - //boost::variate_generator > uni(generator, uni_dist); - // double r = uni(), Summa = 0.; - - - - double r = rand(), Summa = 0.; - r /= (double)(pow(2.,31)-1.); - int result = 0; - int finished = 0; - - if (verbose_level==4){ - std::cout << id << " sampled " << r << std::endl; - } - - for(int i=0; i r){ - - Tried[i][j]+=1.; - - if (Final[i][j] > 0.){ - result = 1; - } - finished = 1; - } - } - } - - return result; - - } - - //=============================== - void update_current_graph(void){ - - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - //property_map::type weightmap = get(edge_weight, Full_g); - for (int i=0; i 0. && Tried[i][j]>0){ - //s = edge(i, j, Full_g); - boost::graph_traits::edge_descriptor e1,e2; - bool found1, found2; - u = vertex(i, Full_g); - v = vertex(j, Full_g); - tie(e1, found1) = edge(u, v, Full_g); - tie(e2, found2) = edge(v, u, Full_g); - if (!found1 && !found2){ - add_edge(u,v,1,Full_g); - add_edge(v,u,1,Full_g); - } - - } - } - - } - } - - //=============================== - void update_distances(void){ - // put shortest paths to the *Dist[][] - std::vector p(num_vertices(Full_g)); - std::vector d(num_vertices(Full_g)); - vertex_descriptor s; - - - // put shortest paths to the *Dist[][] - for (int j=0; j 0.){ - s = vertex(j, Full_g); - dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); - - //std::cout <<" Vertex "<< j << std::endl; - graph_traits < graph_t >::vertex_iterator vi, vend; - - for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { - - if (p[*vi]!=*vi){ - Dist[*vi][j]=d[*vi]; - Dist[j][*vi]=d[*vi]; - - if (Dist[*vi][j]>max_dist){ - max_dist=Dist[*vi][j]; - } - - - } else { - Dist[*vi][j]=-1.; - Dist[j][*vi]=-1.; - } - } - } - - } - - - } - - //====================================================== - void update_ranks(void){ - - for(int i=0; i0. && Final[i][j] >0.){ - Rank[i]++; - Rank[j]++; - } - } - } - - } - - //==================================================================== - void set_world(double a_i, double a_m, double b, double g, double d){ - - alpha_i=a_i; - alpha_m=a_m; - gamma=g; - beta=b; - delta=d; - - } - - //==================================================================== - void reset_world(){ - - //==================================================== - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - - for (int i=0; i 0. && Tried[i][j] > 0){ - u = vertex(i, Full_g); - v = vertex(j, Full_g); - remove_edge(u,v,Full_g); - remove_edge(v,u,Full_g); - - } - } - } - - //================================================== - - current_loss=0; - current_epoch=0; - current_repeat++; - current_novelty=0; - - for(int i = 0; i < N_nodes; ++i) { - Rank[i]=0.; - for(int j = 0; j < N_nodes; ++j) { - Prob[i][j]=0.; - Dist[i][j]=-1.; - Tried[i][j]=0.; - } - } - } - - - //============================================== - void show_parameters(void){ - - std::cout << "Parameters: " - << alpha_i << " " - << alpha_m << " | " - << beta << " " - << gamma << " | " - << delta << std::endl; - - } - - - - //=============================================== - string file_name(){ - - std::ostringstream s; - s << "world_" - << lexical_cast(alpha_i) << "_" - << lexical_cast(alpha_m) << "_" - << lexical_cast(beta) << "_" - << lexical_cast(gamma) << "_" - << lexical_cast(delta) << "_" - << lexical_cast(N_epochs) << "_" - << lexical_cast(N_steps) << "_" - << lexical_cast(N_repeats) << ".txt"; - - return s.str(); - - } - - - - - //================================================= - void set_verbose(int verbose){ - - verbose_level = verbose; - } - - - //============================================================= - void update_probabilities(void){ - - - //========================= - // Compute sampling probabilities - // first pass: \xi_i,j - for(int i=0; i 0.){ - - double k = Dist[i][j]; - if (k >= k_max){ - k = k_max-1; - } - - bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); - - } else { - bg = delta; - } - - Prob[i][j] = exp(Prob[i][j] + bg); - } - } - - - // second pass: sum - double Summa = 0.; - - for(int i=0; i0. && Final[i][j]>0.){ - novel+=1.; - } - } - } - - } - //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - else { - - double pfail=0.; - int n_failed; - //, n_check = 0; - - for(int i=0; i0. && Final[i][j]>0.){ - novel+=1.; - } - } - } - } - - current_novelty = novel; - - - //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - if (verbose_level == 2){ - std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) - - << " cost=" << cost - << " novel=" << novel - << " rel_loss=" << cost/novel - << std::endl; - } - - current_epoch++; - } - - - //====== Destructor ====== - ~Universe(){ - - delete_2Dmatrix(Final, N_nodes); - delete_2Dmatrix(Dist, N_nodes); - delete_2Dmatrix(Tried, N_nodes); - delete_2Dmatrix(Prob, N_nodes); - delete_2Dmatrix(EdgeIndex, N_nodes); - delete_1Dmatrix(Rank); - } - - //================================================ - // Allocate memory - double** allocate_2Dmatrix(int N, int M) - { - double **pointer; - - if (verbose_level == 2){ - std::cout<< "["< 0){ - - pointer = new double[N]; - - }else { - - pointer = NULL; - } - - return pointer; - - } - - //============================================== - // De-Allocate memory to prevent memory leak - void delete_2Dmatrix(double **pointer, int N){ - - if (pointer != NULL){ - - for (int i = 0; i < N; ++i){ - delete [] pointer[i]; - } - delete [] pointer; - } - } - //==================== - void delete_1Dmatrix(double *pointer){ - - delete [] pointer; - } - - //=========================================== - double get_rel_loss(){ - - return CumulativeRelativeLoss ; - } - - //=========================================== - double get_rel_loss_err(){ - - return CRLsquare ; - } - - - - //================================================================================== - void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ - - double ALOT=100000000000.; - - std::cout<<" evolve_to_target_and_save: istart=" << istart << "iend=" << iend << "\n"; - - reset_world(); - - for (int k = istart; k < iend; k++){ - - std::cout<<" evolve: k=" << k << "\n"; - - - - for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ - std::cout<<" evolve: k=" << k << " i=" << i << " cur=" << current_novelty << " Target=" << TargetNovelty << "\n"; - update_world(); - } - - storage[k]=current_loss/current_novelty; - counters[k]=1; - - - reset_world(); - } - - } - //============================================== - int get_reruns(void){ - return N_repeats; - } - - //============================================== - double get_parameter(int i){ - - switch(i){ - case 0: - return alpha_i; - case 1: - return alpha_m; - case 2: - return beta; - case 3: - return gamma; - case 4: - return delta; - default: - - std::cout << "Erroneous parameter id!!!!\n\n\n"; - return 0.; - } - } - - - //============================================== - void evolve_to_target(){ - - reset_world(); - if (beta < -1. || gamma < -1.){ - CumulativeRelativeLoss = 100000000000.; - CRLsquare = 0.; - return; - } - - - for (int k=0; k< N_repeats; k++){ - - - for(int i=0; i 4) {return 0;} - - else { - - switch(position){ - case 0: - alpha_i=value; - return 1; - case 1: - alpha_m=value; - return 1; - case 2: - beta=value; - return 1; - case 3: - gamma=value; - return 1; - case 4: - delta=value; - return 1; - } - - } - - return 0; - } - - - //================================================================= - void try_annealing(double starting_jump, int iterations, - double temp_start, double temp_end, double target_rejection){ - - double dx[5]={0.,0.,0.,0.,0}; - double x[5]={0.,0.,0.,0.,0}; - double rejection[5]={0., 0., 0., 0., 0.}; - double curr_x, curr_err, x_tmp; - double temperature; - double ratio, r; - int cycle=10; - boost::variate_generator > uni(generator, uni_dist); - - // set up parameter for annealing - - x[0]=alpha_i; - x[1]=alpha_m; - x[2]=beta; - x[3]=gamma; - x[4]=delta; - - for(int i=0;i<5;i++){ - dx[i] = starting_jump; - } - - // establish the current value - - //.......................................... - evolve_to_target(); - std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; - - curr_x = CumulativeRelativeLoss; - curr_err = CRLsquare; - CumulativeRelativeLoss = 0; - CRLsquare = 0; - //........................................... - - // optimization cycle - for(int i=0; i ratio){ - - std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) - <<" "<< (i+1) << " Did not accept " - << x_tmp << "(" << j << ")" << std::endl; - std::cout << alpha_i << " "<< alpha_m << " " - << beta << " " << gamma << " " - << delta << " " << std::endl; - set_parameter(x[j], j); - CumulativeRelativeLoss = 0; - CRLsquare = 0; - - rejection[j]+=1.; - } - - else { - - curr_x = CumulativeRelativeLoss; - curr_err = CRLsquare; - x[j] = x_tmp; - CumulativeRelativeLoss = 0; - CRLsquare = 0; - std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) - << wrap_double(rejection[0],2) - << " "<< wrap_double(rejection[1], 7) << " " - << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " - << wrap_double(rejection[4],6) << " " - << std::endl << std::endl; - - std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) - <<" " - << string_wrap((string) "***** Did accept! ", 3) - << wrap_double(alpha_i,2) - << " "<< wrap_double(alpha_m, 7) << " " - << wrap_double(beta,5) << " " - << wrap_double(gamma,9) << " " - << wrap_double(delta,6) << " " - << std::endl << std::endl; - - } - //........................................................ - - } - - } - - } - - -}; - -//============================================================ - -std::pair multi_loss( // dispatch_group_t group, - Universe* un[], - // dispatch_queue_t* CustomQueues, - double* Results, - int* Counters, - double* params){ - - int N = un[0]->get_reruns(); - int step = (int)(double)N/(double)(Nworkers); - int istart=0; - int iend = istart+step; - - double Loss=0., LossSquare=0.; - - for(int i=0; iset_parameter(params[j],j); - } - - - for(int i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); - //}); - - std::cout<<" Returned from evolve_to_target_and_save\n"; - istart += step; - iend = min(istart+step,N); - - } - } - // dispatch_group_wait(group, DISPATCH_TIME_FOREVER); - //dispatch_release(group); - - for (int i=0; i Res; - Res.first=Loss; - Res.second=two_std; - - return Res; - - -} -//============================================================ - - -//============================================================ -void multi_annealing( // dispatch_group_t group, - Universe* un[], - // dispatch_queue_t* CustomQueues, - double T_start, double T_end, - double Target_rejection, - int Annealing_repeats, - double starting_jump, - double* Results, - int* Counters, - double* params0, - double annealing_cycles){ - //................................. - // re-implement annealing - - double dx[5]={0.,0.,0.,0.,0}; - double x[5]={0.,0.,0.,0.,0}; - double rejection[5]={0., 0., 0., 0., 0.}; - double curr_x, curr_err, x_tmp; - double temperature; - double ratio, r; - int cycle=10; - //boost::variate_generator > uni(generator, uni_dist); - - // set up parameter for annealing - - x[0]=params0[0]; - x[1]=params0[1]; - x[2]=params0[2]; - x[3]=params0[3]; - x[4]=params0[4]; - - for(int i=0;i<5;i++){ - dx[i] = starting_jump; - } - - // establish the current value - std::pairRes; - - Res = multi_loss( /* group,*/ un, /* CustomQueues,*/ Results, Counters, x); - std::cout << Res.first << " +- " << Res.second << std::endl; - - curr_x = Res.first; - curr_err = Res.second; - - // optimization cycle - - for(int i=0; iset_parameter(x_tmp, j); - } - - - Res = multi_loss(/* group, */ un, /* CustomQueues, */ Results, Counters, x); - std::cout << Res.first << " +- " << Res.second << std::endl; - - ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); - r = rand()/(double)(pow(2.,31)-1.); - std::cout << r << " vs " << ratio << std::endl; - - double ALOT=100000000000.; - - if (Res.first < ALOT) - { - ofstream filestr; - - filestr.open ("best_opt_some.txt", ofstream::app); - - // >> i/o operations here << - filestr << un[0]->get_target() << "," - << Res.first - << "," << un[0]->get_parameter(0) - << "," << un[0]->get_parameter(1) - << "," << un[0]->get_parameter(2) - << "," << un[0]->get_parameter(3) - << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; - - filestr.close(); - - - filestr.open ("max_dist.txt", ofstream::app); - - // >> i/o operations here << - filestr << max_dist << ",\n"; - - filestr.close(); - - } - - - if (r > ratio){ - - std::cout << " "<< (i+1) << ","<< (j) - <<" "<< (i+1) << " Did not accept " - << x_tmp << "(" << j << ")" << std::endl; - std::cout << un[0]->get_parameter(0) - << " " << un[0]->get_parameter(1) - << " " << un[0]->get_parameter(2) - << " " << un[0]->get_parameter(3) - << " " << un[0]->get_parameter(4) << " " << std::endl; - - x[j]=x_hold; - for(int w=0; wset_parameter(x[j], j); - } - - - //set_parameter(x[j], j); - rejection[j]+=1.; - } - - else { - - curr_x = Res.first; - curr_err = Res.second; - x[j] = x_tmp; - - for(int w=0; wset_parameter(x[j], j); - } - - std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) - << wrap_double(rejection[0],2) << " " - << wrap_double(rejection[1],7) << " " - << wrap_double(rejection[2],5) << " " - << wrap_double(rejection[3],9) << " " - << wrap_double(rejection[4],6) << " " - << std::endl << std::endl; - - std::cout << " "<< (i+1) <<","<< (j) - <<" " - << string_wrap((string) "***** Did accept! ", 3) - << wrap_double(un[0]->get_parameter(0),2) << " " - << wrap_double(un[0]->get_parameter(1),7) << " " - << wrap_double(un[0]->get_parameter(2),5) << " " - << wrap_double(un[0]->get_parameter(3),9) << " " - << wrap_double(un[0]->get_parameter(4),6) << " " - << std::endl << std::endl; - - - - } - //........................................................ - - } - } - - } - -} - - - -//================================================ -int -main(int argc, char* argv[]) -{ - - double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; - string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; - string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; - string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; - string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; - int params1[4] = {300, 50, 1000, 10}; - int params3[5] = { 0, 0, 0, 0, 0}; - - // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump - double params2[5] = {1, 0.001, 100, 0.3, 1.5}; - - int verbose_level = 2; - const std::string one="one", two="two"; - static Universe* un[Nworkers]; - // static dispatch_queue_t CustomQueues[Nworkers]; - - static double* Results; - static int* Counters; - - timeval t1, t2; - double elapsedTime; - // start timer - gettimeofday(&t1, NULL); - - - if (argc < 8) { - std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; - std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; - std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; - - system("pwd"); - - - return(1); - } - else { - for (int nArg=0; nArg < argc; nArg++){ - //std::cout << nArg << " " << argv[nArg] << std::endl; - if (nArg > 0 && nArg < 7){ - params0[nArg-1]= atof(argv[nArg]); - std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; - } - if (nArg > 6 && nArg < 11){ - params1[nArg-7]= atoi(argv[nArg]); - std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; - } - if (nArg == 11){ - verbose_level = atoi(argv[nArg]); - std::cout << "verbose level: " << verbose_level << std::endl; - } - if (nArg > 11 && nArg < 17){ - params2[nArg-12]= atof(argv[nArg]); - std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; - } - if (nArg > 16 && nArg < 22){ - params3[nArg-17]= atof(argv[nArg]); - var_fixed[nArg-17]= atof(argv[nArg]); - std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; - } - - - } - - } - - /* - for target in range(58,1009,50): - s = ("%d" % target) - print s - - for i in range(15): - # Param groups separated by "|" below for documentation. NOTE that | is not used on command line! - os.system("./supe_duper_optimizer |0 0 4 50 -1 "+s+" | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0") - */ - - /* Parameters, re-iterated: - - "alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; - double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; - - {"n_epochs", "n_steps", "n_reruns", "range"}; - int params1[4] = {300, 50, 1000, 10}; - - {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; - temperature_start, temperature_end, annealing_steps target_rejection Starting_jump - double params2[5] = {1, 0.001, 100, 0.3, 1.5}; - - {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; - int params3[5] = { 0, 0, 0, 0, 0}; - - - */ - - for (int j=0; j<5; j++){ - - cout << j << " | " << var_fixed[j] << " (fixed) \n"; - } - - target=params0[5]; - range = (double)params1[3]; - int identify_failed = 0; - char* filename= (char *)"movie_graph.txt"; - int n_ep=params1[0], n_st=params1[1], n_rep=params1[2]; - - //............................... - - for(int i=0; i 0){ - - Results = new double[n_rep]; - Counters = new int[n_rep]; - - }else { - - Results = NULL; - Counters = NULL; - std::cout << " Number of reruns should be positive! " << std::endl; - return 0; - - } - //............................... - srand(time(0)); - //srandomdev(); - - { - double r=0; - for (int j=0; j<100; j++){ - - - - r = rand()/(double)(pow(2.,31)-1.); - std::cout << r << " "; - } - std::cout << "\n "; - } - //random initiation of starting parameters - - if (range > 0.){ - - for (int i=0; i < 5; i++){ - - if (params0[i]==-100.){ - - double r1 = (rand()/(double)(pow(2.,31)-1.)); - double r2 = (rand()/(double)(pow(2.,31)-1.)); - double sign = 1.; - - if(r1 > 0.5){ - sign=-1.; - } - - params0[i] = sign*r2*range; - - std::cout << par_names0[i] << ": " << params0[i] << std::endl; - } - } - - } - - - double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; - int Annealing_repeats = (int) params2[2]; - - - // dispatch_group_t group = dispatch_group_create(); - - //............................. - multi_annealing( /* group, */ un, /* CustomQueues, */ T_start, T_end, Target_rejection, Annealing_repeats, - starting_jump, Results, Counters, params0, Annealing_repeats); - - //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); - // dispatch_release(group); - //............................. - - - // stop timer - gettimeofday(&t2, NULL); - - // compute and print the elapsed time in millisec - elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms - elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms - elapsedTime /= 1000.; - cout << elapsedTime << " seconds \n .....(" << elapsedTime/60. << " minutes)\n\n"; - - //..................... - - for(int i=0; i 0){ - - delete [] Results; - delete [] Counters; - - } - - return 0; - - - -} - Deleted: SwiftApps/SciColSim/optimizer.snap01.cpp =================================================================== --- SwiftApps/SciColSim/optimizer.snap01.cpp 2012-01-23 19:13:49 UTC (rev 5513) +++ SwiftApps/SciColSim/optimizer.snap01.cpp 2012-01-23 21:01:49 UTC (rev 5514) @@ -1,1722 +0,0 @@ -// -// main.cpp -// optimizer -// -// Created by Andrey Rzhetsky on 4/11/11. -// Copyright 2011 University of Chicago. All rights reserved. -// - -#define Nworkers 24 - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -// #include -#include - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error -#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define INT_INFINITY 2147483647 - -#define FIX_VARIABLES 1 - -using namespace boost; -using namespace std; -using namespace boost::numeric::ublas; - -static int max_dist=0; - -typedef boost::adjacency_matrix Graph; -typedef std::pair Edge; -typedef boost::graph_traits GraphTraits; -typedef boost::numeric::ublas::triangular_matrix prob; -typedef boost::numeric::ublas::triangular_matrix pathlength; -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; - -namespace std { - using ::time; -} - -static int var_fixed[5] = {1, 0, 1, 1, 0}; - -typedef boost::minstd_rand base_generator_type; -typedef adjacency_list < listS, vecS, directedS, -no_property, property < edge_weight_t, int > > graph_t; -typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; -typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; - - -//================================================ -string strDouble(double number) -{ - stringstream ss;//create a stringstream - ss << number;//add number to the stream - return ss.str();//return a string with the contents of the stream -} - -//================================================ - -double gaussian(double sigma) -{ - double GaussNum = 0.0; - int NumInSum = 10; - for(int i = 0; i < NumInSum; i++) - { - GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); - } - GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); - - - return GaussNum; - -} - - - -//================================================= -double diffclock(clock_t clock1,clock_t clock2) -{ - double diffticks=clock1-clock2; - double diffms=(diffticks)/CLOCKS_PER_SEC; - return diffms; -} - -//================================================ -//================================================================ -double get_new_x(double x, double dx){ - - double new_x; - // boost::variate_generator > uni(generator, uni_dist); - double r = rand()/(double)(pow(2.,31)-1.); - - if (r > 0.5){ - new_x = x + rand()*dx/(double)(pow(2.,31)-1.); - } else { - new_x = x - rand()*dx/(double)(pow(2.,31)-1.); - } - - return new_x; - -} - - -//=============================================== -string string_wrap(string ins, int mode){ - - std::ostringstream s; - - switch(mode){ - case 0: - s << "\033[1;29m" << ins << "\033[0m"; - break; - case 1: - s << "\033[1;34m" << ins << "\033[0m"; - break; - case 2: - s << "\033[1;44m" << ins << "\033[0m"; - break; - case 3: - s << "\033[1;35m" << ins << "\033[0m"; - break; - case 4: - s << "\033[1;33;44m" << ins << "\033[0m"; - break; - case 5: - s << "\033[1;47;34m" << ins << "\033[0m"; - break; - case 6: - s << "\033[1;1;31m" << ins << "\033[0m"; - break; - case 7: - s << "\033[1;1;33m" << ins << "\033[0m"; - break; - case 8: - s << "\033[1;1;43;34m" << ins << "\033[0m"; - break; - case 9: - s << "\033[1;1;37m" << ins << "\033[0m"; - break; - case 10: - s << "\033[1;30;47m" << ins << "\033[0m"; - break; - default: - s << ins; - } - - return s.str(); -} - - -//=============================================== -string wrap_double(double val, int mode){ - - std::ostringstream s; - s << string_wrap(strDouble(val),mode); - - return s.str(); -} - - - -//=============================================== -const -string i2string(int i){ - - std::ostringstream s; - s << "worker" - << lexical_cast(i); - - return s.str(); - -} - -//=============================================== -char* i2char(int i){ - - std::ostringstream s; - s << "worker" - << lexical_cast(i); - - char* a=new char[s.str().size()+1]; - memcpy(a,s.str().c_str(), s.str().size()); - - return a; -} - -//================================================ -class Universe { - -private: - - double alpha_i; - double alpha_m; - double beta; - double gamma; - double delta; - - double TargetNovelty; - double CumulativeRelativeLoss; - double CRLsquare; - string id; - - - int N_nodes; - int M_edges; - - int N_epochs; - int N_steps; - int N_repeats; - - int current_epoch; - double current_loss; - int current_repeat; - double current_novelty; - - int mode_identify_failed; - int verbose_level; // 0 is silent, higher is more - - double k_max; - - graph_t Full_g; - - double **Prob; - double **Tried; - double **Dist; - double **Final; - double **EdgeIndex; - double *Rank; - - base_generator_type generator; - boost::uniform_real<> uni_dist; - boost::geometric_distribution geo; - -public: - - - - //====== Constructor ====== - Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) - { - //typedef array_type2::index index2; - - - std::ifstream inFile; - //string line; - - //------------------------------- - - base_generator_type gene(42u); - generator = gene; - generator.seed(static_cast(std::time(0))); - boost::uniform_real<> uni_d(0,1); - uni_dist = uni_d; - - //-------------------------------- - - int i, k; - int x, y; - Edge* edge_array_mine; - int num_arcs_mine, num_nodes_mine; - int* weights_mine; - - TargetNovelty = target; - CumulativeRelativeLoss = 0.; - CRLsquare = 0.; - - - N_epochs = Epochs; - N_steps = Steps; - N_repeats = Repeats; - - current_epoch = 0; - current_loss = 0.; - current_repeat = 0; - - id = idd; - - verbose_level = 1; - - mode_identify_failed = identify_failed; - - - //------------------------------- - // The first pass though file with the graph - inFile.open(FileToOpen.c_str()); - if (inFile.fail()) { - cout << "Unable to open file"; - exit(1); // terminate with error - }else { - - if (verbose_level > 2){ - std::cout << " Opened <" << FileToOpen << ">"<> x; - inFile >> y; - - if (verbose_level > 2){ - std::cout << " x: " << x; - std::cout << " y: " << y << std::endl; - } - - if (i==0){ - N_nodes=x; - M_edges=y; - break; - } - i++; - - - } - inFile.close(); - - if (verbose_level == 2){ - std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ - std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { - if (i > 0) { - Final[x][y]=1.; - Final[y][x]=1.; - - - if (verbose_level == 2){ - std::cout << "."; - } - } - i++; - - } - if (verbose_level == 2){ - std::cout << std::endl; - } - inFile.close(); - - k=0; - for (int i=0; i 0.){ - EdgeIndex[i][j]=k; - k++; - } - } - } - - - - //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - // create graph -- hopefully, we can keep it, just modifying edge weights - - - edge_array_mine = new Edge[2*M_edges]; - num_arcs_mine = 2*M_edges; - num_nodes_mine = N_nodes; - weights_mine = new int[2*M_edges]; - for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} - - k=0; - for(int i=0; i0.){ - edge_array_mine[2*k] =Edge(i,j); - edge_array_mine[2*k+1]=Edge(j,i); - k++; - } - } - } - graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); - - Full_g = g; - delete edge_array_mine; - delete weights_mine; - - //=========================================================================== - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - for (int i=0; i 0.){ - u = vertex(i, Full_g); - v = vertex(j, Full_g); - remove_edge(u,v,Full_g); - remove_edge(v,u,Full_g); - - } - } - } - - - } - - - //===================================================================== - int sample_failed_number(double pfail){ - - //boost::geometric_distribution geo(pfail); - //boost::variate_generator > geom(generator, geo); - - double r, u, g; - - r=0.; - for(int i=0; i=3){ - std::cout << id << " failed " << r << std::endl; - } - return r; - - } - - //============================================= - double get_target(void){ - return TargetNovelty; - } - - //============================================= - void set_target(double target){ - TargetNovelty=target; - } - - //============================================= - int sample(){ - - //boost::variate_generator > uni(generator, uni_dist); - // double r = uni(), Summa = 0.; - - - - double r = rand(), Summa = 0.; - r /= (double)(pow(2.,31)-1.); - int result = 0; - int finished = 0; - - if (verbose_level==4){ - std::cout << id << " sampled " << r << std::endl; - } - - for(int i=0; i r){ - - Tried[i][j]+=1.; - - if (Final[i][j] > 0.){ - result = 1; - } - finished = 1; - } - } - } - - return result; - - } - - //=============================== - void update_current_graph(void){ - - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - //property_map::type weightmap = get(edge_weight, Full_g); - for (int i=0; i 0. && Tried[i][j]>0){ - //s = edge(i, j, Full_g); - boost::graph_traits::edge_descriptor e1,e2; - bool found1, found2; - u = vertex(i, Full_g); - v = vertex(j, Full_g); - tie(e1, found1) = edge(u, v, Full_g); - tie(e2, found2) = edge(v, u, Full_g); - if (!found1 && !found2){ - add_edge(u,v,1,Full_g); - add_edge(v,u,1,Full_g); - } - - } - } - - } - } - - //=============================== - void update_distances(void){ - // put shortest paths to the *Dist[][] - std::vector p(num_vertices(Full_g)); - std::vector d(num_vertices(Full_g)); - vertex_descriptor s; - - - // put shortest paths to the *Dist[][] - for (int j=0; j 0.){ - s = vertex(j, Full_g); - dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); - - //std::cout <<" Vertex "<< j << std::endl; - graph_traits < graph_t >::vertex_iterator vi, vend; - - for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { - - if (p[*vi]!=*vi){ - Dist[*vi][j]=d[*vi]; - Dist[j][*vi]=d[*vi]; - - if (Dist[*vi][j]>max_dist){ - max_dist=Dist[*vi][j]; - } - - - } else { - Dist[*vi][j]=-1.; - Dist[j][*vi]=-1.; - } - } - } - - } - - - } - - //====================================================== - void update_ranks(void){ - - for(int i=0; i0. && Final[i][j] >0.){ - Rank[i]++; - Rank[j]++; - } - } - } - - } - - //==================================================================== - void set_world(double a_i, double a_m, double b, double g, double d){ - - alpha_i=a_i; - alpha_m=a_m; - gamma=g; - beta=b; - delta=d; - - } - - //==================================================================== - void reset_world(){ - - //==================================================== - std::vector p(num_edges(Full_g)); - std::vector d(num_edges(Full_g)); - edge_descriptor s; - boost::graph_traits::vertex_descriptor u, v; - - - for (int i=0; i 0. && Tried[i][j] > 0){ - u = vertex(i, Full_g); - v = vertex(j, Full_g); - remove_edge(u,v,Full_g); - remove_edge(v,u,Full_g); - - } - } - } - - //================================================== - - current_loss=0; - current_epoch=0; - current_repeat++; - current_novelty=0; - - for(int i = 0; i < N_nodes; ++i) { - Rank[i]=0.; - for(int j = 0; j < N_nodes; ++j) { - Prob[i][j]=0.; - Dist[i][j]=-1.; - Tried[i][j]=0.; - } - } - } - - - //============================================== - void show_parameters(void){ - - std::cout << "Parameters: " - << alpha_i << " " - << alpha_m << " | " - << beta << " " - << gamma << " | " - << delta << std::endl; - - } - - - - //=============================================== - string file_name(){ - - std::ostringstream s; - s << "world_" - << lexical_cast(alpha_i) << "_" - << lexical_cast(alpha_m) << "_" - << lexical_cast(beta) << "_" - << lexical_cast(gamma) << "_" - << lexical_cast(delta) << "_" - << lexical_cast(N_epochs) << "_" - << lexical_cast(N_steps) << "_" - << lexical_cast(N_repeats) << ".txt"; - - return s.str(); - - } - - - - - //================================================= - void set_verbose(int verbose){ - - verbose_level = verbose; - } - - - //============================================================= - void update_probabilities(void){ - - - //========================= - // Compute sampling probabilities - // first pass: \xi_i,j - for(int i=0; i 0.){ - - double k = Dist[i][j]; - if (k >= k_max){ - k = k_max-1; - } - - bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); - - } else { - bg = delta; - } - - Prob[i][j] = exp(Prob[i][j] + bg); - } - } - - - // second pass: sum - double Summa = 0.; - - for(int i=0; i0. && Final[i][j]>0.){ - novel+=1.; - } - } - } - - } - //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - else { - - double pfail=0.; - int n_failed; - //, n_check = 0; - - for(int i=0; i0. && Final[i][j]>0.){ - novel+=1.; - } - } - } - } - - current_novelty = novel; - - - //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - if (verbose_level == 2){ - std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) - - << " cost=" << cost - << " novel=" << novel - << " rel_loss=" << cost/novel - << std::endl; - } - - current_epoch++; - } - - - //====== Destructor ====== - ~Universe(){ - - delete_2Dmatrix(Final, N_nodes); - delete_2Dmatrix(Dist, N_nodes); - delete_2Dmatrix(Tried, N_nodes); - delete_2Dmatrix(Prob, N_nodes); - delete_2Dmatrix(EdgeIndex, N_nodes); - delete_1Dmatrix(Rank); - } - - //================================================ - // Allocate memory - double** allocate_2Dmatrix(int N, int M) - { - double **pointer; - - if (verbose_level == 2){ - std::cout<< "["< 0){ - - pointer = new double[N]; - - }else { - - pointer = NULL; - } - - return pointer; - - } - - //============================================== - // De-Allocate memory to prevent memory leak - void delete_2Dmatrix(double **pointer, int N){ - - if (pointer != NULL){ - - for (int i = 0; i < N; ++i){ - delete [] pointer[i]; - } - delete [] pointer; - } - } - //==================== - void delete_1Dmatrix(double *pointer){ - - delete [] pointer; - } - - //=========================================== - double get_rel_loss(){ - - return CumulativeRelativeLoss ; - } - - //=========================================== - double get_rel_loss_err(){ - - return CRLsquare ; - } - - - - //================================================================================== - void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ - - double ALOT=100000000000.; - - // std::cout<<" evolve_to_target_and_save: istart=" << istart << "iend=" << iend << "\n"; - - reset_world(); - - for (int k = istart; k < iend; k++){ - - // std::cout<<" evolve: k=" << k << "\n"; - - - - for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ - // std::cout<<" evolve: k=" << k << " i=" << i << " cur=" << current_novelty << " Target=" << TargetNovelty << "\n"; - update_world(); - } - - storage[k]=current_loss/current_novelty; - counters[k]=1; - - - reset_world(); - } - - } - //============================================== - int get_reruns(void){ - return N_repeats; - } - - //============================================== - double get_parameter(int i){ - - switch(i){ - case 0: - return alpha_i; - case 1: - return alpha_m; - case 2: - return beta; - case 3: - return gamma; - case 4: - return delta; - default: - - std::cout << "Erroneous parameter id!!!!\n\n\n"; - return 0.; - } - } - - - //============================================== - void evolve_to_target(){ - - reset_world(); - if (beta < -1. || gamma < -1.){ - CumulativeRelativeLoss = 100000000000.; - CRLsquare = 0.; - return; - } - - - for (int k=0; k< N_repeats; k++){ - - - for(int i=0; i 4) {return 0;} - - else { - - switch(position){ - case 0: - alpha_i=value; - return 1; - case 1: - alpha_m=value; - return 1; - case 2: - beta=value; - return 1; - case 3: - gamma=value; - return 1; - case 4: - delta=value; - return 1; - } - - } - - return 0; - } - - - //================================================================= - void try_annealing(double starting_jump, int iterations, - double temp_start, double temp_end, double target_rejection){ - - double dx[5]={0.,0.,0.,0.,0}; - double x[5]={0.,0.,0.,0.,0}; - double rejection[5]={0., 0., 0., 0., 0.}; - double curr_x, curr_err, x_tmp; - double temperature; - double ratio, r; - int cycle=10; - boost::variate_generator > uni(generator, uni_dist); - - // set up parameter for annealing - - x[0]=alpha_i; - x[1]=alpha_m; - x[2]=beta; - x[3]=gamma; - x[4]=delta; - - for(int i=0;i<5;i++){ - dx[i] = starting_jump; - } - - // establish the current value - - //.......................................... - evolve_to_target(); - std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; - - curr_x = CumulativeRelativeLoss; - curr_err = CRLsquare; - CumulativeRelativeLoss = 0; - CRLsquare = 0; - //........................................... - - // optimization cycle - for(int i=0; i ratio){ - - std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) - <<" "<< (i+1) << " Did not accept " - << x_tmp << "(" << j << ")" << std::endl; - std::cout << alpha_i << " "<< alpha_m << " " - << beta << " " << gamma << " " - << delta << " " << std::endl; - set_parameter(x[j], j); - CumulativeRelativeLoss = 0; - CRLsquare = 0; - - rejection[j]+=1.; - } - - else { - - curr_x = CumulativeRelativeLoss; - curr_err = CRLsquare; - x[j] = x_tmp; - CumulativeRelativeLoss = 0; - CRLsquare = 0; - std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) - << wrap_double(rejection[0],2) - << " "<< wrap_double(rejection[1], 7) << " " - << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " - << wrap_double(rejection[4],6) << " " - << std::endl << std::endl; - - std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) - <<" " - << string_wrap((string) "***** Did accept! ", 3) - << wrap_double(alpha_i,2) - << " "<< wrap_double(alpha_m, 7) << " " - << wrap_double(beta,5) << " " - << wrap_double(gamma,9) << " " - << wrap_double(delta,6) << " " - << std::endl << std::endl; - - } - //........................................................ - - } - - } - - } - - -}; - -//============================================================ - -std::pair multi_loss( // dispatch_group_t group, - Universe* un[], - // dispatch_queue_t* CustomQueues, - double* Results, - int* Counters, - double* params){ - - int N = un[0]->get_reruns(); - int step = (int)(double)N/(double)(Nworkers); - int istart=0; - int iend = istart+step; - - double Loss=0., LossSquare=0.; - - timeval startTime, endTime; - double elapsedTime; - // start timer - gettimeofday(&startTime, NULL); - - //err: for(int i=0; iset_parameter(params[j],j); - } - } - int i; - #pragma omp parallel for private (i) - for(i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); - un[i]->evolve_to_target_and_save(i*step, min((i+1)*step,N), Results, Counters); - //}); - - // std::cout<<"multi_loss: Returned from evolve_to_target_and_save " << i << "\n"; - - - //istart += step; - //iend = min(istart+step,N); - - } - // err } - // dispatch_group_wait(group, DISPATCH_TIME_FOREVER); - //dispatch_release(group); - - for (int i=0; i Res; - Res.first=Loss; - Res.second=two_std; - - gettimeofday(&endTime, NULL); - elapsedTime = (endTime.tv_sec - startTime.tv_sec) * 1000.0; // sec to ms - elapsedTime += (endTime.tv_usec - startTime.tv_usec) / 1000.0; // us to ms - elapsedTime /= 1000.; - cout << "multi_loss(N=" << N << ") elapsed time: " << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; - - return Res; -} -//============================================================ - - -//============================================================ -void multi_annealing( // dispatch_group_t group, - Universe* un[], - // dispatch_queue_t* CustomQueues, - double T_start, double T_end, - double Target_rejection, - int Annealing_repeats, - double starting_jump, - double* Results, - int* Counters, - double* params0, - double annealing_cycles){ - //................................. - // re-implement annealing - - double dx[5]={0.,0.,0.,0.,0}; - double x[5]={0.,0.,0.,0.,0}; - double rejection[5]={0., 0., 0., 0., 0.}; - double curr_x, curr_err, x_tmp; - double temperature; - double ratio, r; - int cycle=10; - //boost::variate_generator > uni(generator, uni_dist); - - // set up parameter for annealing - - x[0]=params0[0]; - x[1]=params0[1]; - x[2]=params0[2]; - x[3]=params0[3]; - x[4]=params0[4]; - - for(int i=0;i<5;i++){ - dx[i] = starting_jump; - } - - // establish the current value - std::pairRes; - - Res = multi_loss( /* group,*/ un, /* CustomQueues,*/ Results, Counters, x); - std::cout << Res.first << " +- " << Res.second << std::endl; - - curr_x = Res.first; - curr_err = Res.second; - - // optimization cycle - - for(int i=0; iset_parameter(x_tmp, j); - } - - - Res = multi_loss(/* group, */ un, /* CustomQueues, */ Results, Counters, x); - std::cout << Res.first << " +- " << Res.second << std::endl; - - ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); - r = rand()/(double)(pow(2.,31)-1.); - std::cout << r << " vs " << ratio << std::endl; - - double ALOT=100000000000.; - - if (Res.first < ALOT) - { - ofstream filestr; - - filestr.open ("best_opt_some.txt", ofstream::app); - - // >> i/o operations here << - filestr << un[0]->get_target() << "," - << Res.first - << "," << un[0]->get_parameter(0) - << "," << un[0]->get_parameter(1) - << "," << un[0]->get_parameter(2) - << "," << un[0]->get_parameter(3) - << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; - - filestr.close(); - - - filestr.open ("max_dist.txt", ofstream::app); - - // >> i/o operations here << - filestr << max_dist << ",\n"; - - filestr.close(); - - } - - - if (r > ratio){ - - std::cout << " "<< (i+1) << ","<< (j) - <<" "<< (i+1) << " Did not accept " - << x_tmp << "(" << j << ")" << std::endl; - std::cout << un[0]->get_parameter(0) - << " " << un[0]->get_parameter(1) - << " " << un[0]->get_parameter(2) - << " " << un[0]->get_parameter(3) - << " " << un[0]->get_parameter(4) << " " << std::endl; - - x[j]=x_hold; - for(int w=0; wset_parameter(x[j], j); - } - - - //set_parameter(x[j], j); - rejection[j]+=1.; - } - - else { - - curr_x = Res.first; - curr_err = Res.second; - x[j] = x_tmp; - - for(int w=0; wset_parameter(x[j], j); - } - - std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) - << wrap_double(rejection[0],2) << " " - << wrap_double(rejection[1],7) << " " - << wrap_double(rejection[2],5) << " " - << wrap_double(rejection[3],9) << " " - << wrap_double(rejection[4],6) << " " - << std::endl << std::endl; - - std::cout << " "<< (i+1) <<","<< (j) - <<" " - << string_wrap((string) "***** Did accept! ", 3) - << wrap_double(un[0]->get_parameter(0),2) << " " - << wrap_double(un[0]->get_parameter(1),7) << " " - << wrap_double(un[0]->get_parameter(2),5) << " " - << wrap_double(un[0]->get_parameter(3),9) << " " - << wrap_double(un[0]->get_parameter(4),6) << " " - << std::endl << std::endl; - - - - } - //........................................................ - - } - } - - } - -} - - - -//================================================ -int -main(int argc, char* argv[]) -{ - - double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; - string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; - string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; - string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; - string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; - int params1[4] = {300, 50, 1000, 10}; - int params3[5] = { 0, 0, 0, 0, 0}; - - // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump - double params2[5] = {1, 0.001, 100, 0.3, 1.5}; - - int verbose_level = 2; - const std::string one="one", two="two"; - static Universe* un[Nworkers]; - // static dispatch_queue_t CustomQueues[Nworkers]; - - static double* Results; - static int* Counters; - - timeval t1, t2; - double elapsedTime; - // start timer - gettimeofday(&t1, NULL); - - - if (argc < 8) { - std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; - std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; - std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; - - system("pwd"); - - - return(1); - } - else { - for (int nArg=0; nArg < argc; nArg++){ - //std::cout << nArg << " " << argv[nArg] << std::endl; - if (nArg > 0 && nArg < 7){ - params0[nArg-1]= atof(argv[nArg]); - std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; - } - if (nArg > 6 && nArg < 11){ - params1[nArg-7]= atoi(argv[nArg]); - std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; - } - if (nArg == 11){ - verbose_level = atoi(argv[nArg]); - std::cout << "verbose level: " << verbose_level << std::endl; - } - if (nArg > 11 && nArg < 17){ - params2[nArg-12]= atof(argv[nArg]); - std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; - } - if (nArg > 16 && nArg < 22){ - params3[nArg-17]= atof(argv[nArg]); - var_fixed[nArg-17]= atof(argv[nArg]); - std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; - } - - - } - - } - - /* - for target in range(58,1009,50): - s = ("%d" % target) - print s - - for i in range(15): - # Param groups separated by "|" below for documentation. NOTE that | is not used on command line! - os.system("./supe_duper_optimizer |0 0 4 50 -1 "+s+" | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0") - */ - - /* Parameters, re-iterated: - - "alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; - double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; - - {"n_epochs", "n_steps", "n_reruns", "range"}; - int params1[4] = {300, 50, 1000, 10}; - - {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; - temperature_start, temperature_end, annealing_steps target_rejection Starting_jump - double params2[5] = {1, 0.001, 100, 0.3, 1.5}; - - {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; - int params3[5] = { 0, 0, 0, 0, 0}; - - - */ - - for (int j=0; j<5; j++){ - - cout << j << " | " << var_fixed[j] << " (fixed) \n"; - } - - target=params0[5]; - range = (double)params1[3]; - int identify_failed = 0; - char* filename= (char *)"movie_graph.txt"; - int n_ep=params1[0], n_st=params1[1], n_rep=params1[2]; - - //............................... - - for(int i=0; i 0){ - - Results = new double[n_rep]; - Counters = new int[n_rep]; - - }else { - - Results = NULL; - Counters = NULL; - std::cout << " Number of reruns should be positive! " << std::endl; - return 0; - - } - //............................... - srand(time(0)); - //srandomdev(); - - { - double r=0; - for (int j=0; j<100; j++){ - - - - r = rand()/(double)(pow(2.,31)-1.); - std::cout << r << " "; - } - std::cout << "\n "; - } - //random initiation of starting parameters - - if (range > 0.){ - - for (int i=0; i < 5; i++){ - - if (params0[i]==-100.){ - - double r1 = (rand()/(double)(pow(2.,31)-1.)); - double r2 = (rand()/(double)(pow(2.,31)-1.)); - double sign = 1.; - - if(r1 > 0.5){ - sign=-1.; - } - - params0[i] = sign*r2*range; - - std::cout << par_names0[i] << ": " << params0[i] << std::endl; - } - } - - } - - - double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; - int Annealing_repeats = (int) params2[2]; - - - // dispatch_group_t group = dispatch_group_create(); - - //............................. - multi_annealing( /* group, */ un, /* CustomQueues, */ T_start, T_end, Target_rejection, Annealing_repeats, - starting_jump, Results, Counters, params0, Annealing_repeats); - - //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); - // dispatch_release(group); - //............................. - - - // stop timer - gettimeofday(&t2, NULL); - - // compute and print the elapsed time in millisec - elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms - elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms - elapsedTime /= 1000.; - cout << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; - - //..................... - - for(int i=0; i 0){ - - delete [] Results; - delete [] Counters; - - } - - return 0; - - - -} - Copied: SwiftApps/SciColSim/snapshots.2012.0123/optimizer.orig.cpp (from rev 5504, SwiftApps/SciColSim/optimizer.orig.cpp) =================================================================== --- SwiftApps/SciColSim/snapshots.2012.0123/optimizer.orig.cpp (rev 0) +++ SwiftApps/SciColSim/snapshots.2012.0123/optimizer.orig.cpp 2012-01-23 21:01:49 UTC (rev 5514) @@ -0,0 +1,1710 @@ +// +// main.cpp +// optimizer +// +// Created by Andrey Rzhetsky on 4/11/11. +// Copyright 2011 University of Chicago. All rights reserved. +// + +#define Nworkers 1 // 24 + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +// #include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define INT_INFINITY 2147483647 + +#define FIX_VARIABLES 1 + +using namespace boost; +using namespace std; +using namespace boost::numeric::ublas; + +static int max_dist=0; + +typedef boost::adjacency_matrix Graph; +typedef std::pair Edge; +typedef boost::graph_traits GraphTraits; +typedef boost::numeric::ublas::triangular_matrix prob; +typedef boost::numeric::ublas::triangular_matrix pathlength; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + +namespace std { + using ::time; +} + +static int var_fixed[5] = {1, 0, 1, 1, 0}; + +typedef boost::minstd_rand base_generator_type; +typedef adjacency_list < listS, vecS, directedS, +no_property, property < edge_weight_t, int > > graph_t; +typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; +typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; + + +//================================================ +string strDouble(double number) +{ + stringstream ss;//create a stringstream + ss << number;//add number to the stream + return ss.str();//return a string with the contents of the stream +} + +//================================================ + +double gaussian(double sigma) +{ + double GaussNum = 0.0; + int NumInSum = 10; + for(int i = 0; i < NumInSum; i++) + { + GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); + } + GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); + + + return GaussNum; + +} + + + +//================================================= +double diffclock(clock_t clock1,clock_t clock2) +{ + double diffticks=clock1-clock2; + double diffms=(diffticks)/CLOCKS_PER_SEC; + return diffms; +} + +//================================================ +//================================================================ +double get_new_x(double x, double dx){ + + double new_x; + // boost::variate_generator > uni(generator, uni_dist); + double r = rand()/(double)(pow(2.,31)-1.); + + if (r > 0.5){ + new_x = x + rand()*dx/(double)(pow(2.,31)-1.); + } else { + new_x = x - rand()*dx/(double)(pow(2.,31)-1.); + } + + return new_x; + +} + + +//=============================================== +string string_wrap(string ins, int mode){ + + std::ostringstream s; + + switch(mode){ + case 0: + s << "\033[1;29m" << ins << "\033[0m"; + break; + case 1: + s << "\033[1;34m" << ins << "\033[0m"; + break; + case 2: + s << "\033[1;44m" << ins << "\033[0m"; + break; + case 3: + s << "\033[1;35m" << ins << "\033[0m"; + break; + case 4: + s << "\033[1;33;44m" << ins << "\033[0m"; + break; + case 5: + s << "\033[1;47;34m" << ins << "\033[0m"; + break; + case 6: + s << "\033[1;1;31m" << ins << "\033[0m"; + break; + case 7: + s << "\033[1;1;33m" << ins << "\033[0m"; + break; + case 8: + s << "\033[1;1;43;34m" << ins << "\033[0m"; + break; + case 9: + s << "\033[1;1;37m" << ins << "\033[0m"; + break; + case 10: + s << "\033[1;30;47m" << ins << "\033[0m"; + break; + default: + s << ins; + } + + return s.str(); +} + + +//=============================================== +string wrap_double(double val, int mode){ + + std::ostringstream s; + s << string_wrap(strDouble(val),mode); + + return s.str(); +} + + + +//=============================================== +const +string i2string(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + return s.str(); + +} + +//=============================================== +char* i2char(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + char* a=new char[s.str().size()+1]; + memcpy(a,s.str().c_str(), s.str().size()); + + return a; +} + +//================================================ +class Universe { + +private: + + double alpha_i; + double alpha_m; + double beta; + double gamma; + double delta; + + double TargetNovelty; + double CumulativeRelativeLoss; + double CRLsquare; + string id; + + + int N_nodes; + int M_edges; + + int N_epochs; + int N_steps; + int N_repeats; + + int current_epoch; + double current_loss; + int current_repeat; + double current_novelty; + + int mode_identify_failed; + int verbose_level; // 0 is silent, higher is more + + double k_max; + + graph_t Full_g; + + double **Prob; + double **Tried; + double **Dist; + double **Final; + double **EdgeIndex; + double *Rank; + + base_generator_type generator; + boost::uniform_real<> uni_dist; + boost::geometric_distribution geo; + +public: + + + + //====== Constructor ====== + Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) + { + //typedef array_type2::index index2; + + + std::ifstream inFile; + //string line; + + //------------------------------- + + base_generator_type gene(42u); + generator = gene; + generator.seed(static_cast(std::time(0))); + boost::uniform_real<> uni_d(0,1); + uni_dist = uni_d; + + //-------------------------------- + + int i, k; + int x, y; + Edge* edge_array_mine; + int num_arcs_mine, num_nodes_mine; + int* weights_mine; + + TargetNovelty = target; + CumulativeRelativeLoss = 0.; + CRLsquare = 0.; + + + N_epochs = Epochs; + N_steps = Steps; + N_repeats = Repeats; + + current_epoch = 0; + current_loss = 0.; + current_repeat = 0; + + id = idd; + + verbose_level = 1; + + mode_identify_failed = identify_failed; + + + //------------------------------- + // The first pass though file with the graph + inFile.open(FileToOpen.c_str()); + if (inFile.fail()) { + cout << "Unable to open file"; + exit(1); // terminate with error + }else { + + if (verbose_level > 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x; + inFile >> y; + + if (verbose_level > 2){ + std::cout << " x: " << x; + std::cout << " y: " << y << std::endl; + } + + if (i==0){ + N_nodes=x; + M_edges=y; + break; + } + i++; + + + } + inFile.close(); + + if (verbose_level == 2){ + std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { + if (i > 0) { + Final[x][y]=1.; + Final[y][x]=1.; + + + if (verbose_level == 2){ + std::cout << "."; + } + } + i++; + + } + if (verbose_level == 2){ + std::cout << std::endl; + } + inFile.close(); + + k=0; + for (int i=0; i 0.){ + EdgeIndex[i][j]=k; + k++; + } + } + } + + + + //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // create graph -- hopefully, we can keep it, just modifying edge weights + + + edge_array_mine = new Edge[2*M_edges]; + num_arcs_mine = 2*M_edges; + num_nodes_mine = N_nodes; + weights_mine = new int[2*M_edges]; + for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} + + k=0; + for(int i=0; i0.){ + edge_array_mine[2*k] =Edge(i,j); + edge_array_mine[2*k+1]=Edge(j,i); + k++; + } + } + } + graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); + + Full_g = g; + delete edge_array_mine; + delete weights_mine; + + //=========================================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + for (int i=0; i 0.){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + + } + + + //===================================================================== + int sample_failed_number(double pfail){ + + //boost::geometric_distribution geo(pfail); + //boost::variate_generator > geom(generator, geo); + + double r, u, g; + + r=0.; + for(int i=0; i=3){ + std::cout << id << " failed " << r << std::endl; + } + return r; + + } + + //============================================= + double get_target(void){ + return TargetNovelty; + } + + //============================================= + void set_target(double target){ + TargetNovelty=target; + } + + //============================================= + int sample(){ + + //boost::variate_generator > uni(generator, uni_dist); + // double r = uni(), Summa = 0.; + + + + double r = rand(), Summa = 0.; + r /= (double)(pow(2.,31)-1.); + int result = 0; + int finished = 0; + + if (verbose_level==4){ + std::cout << id << " sampled " << r << std::endl; + } + + for(int i=0; i r){ + + Tried[i][j]+=1.; + + if (Final[i][j] > 0.){ + result = 1; + } + finished = 1; + } + } + } + + return result; + + } + + //=============================== + void update_current_graph(void){ + + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + //property_map::type weightmap = get(edge_weight, Full_g); + for (int i=0; i 0. && Tried[i][j]>0){ + //s = edge(i, j, Full_g); + boost::graph_traits::edge_descriptor e1,e2; + bool found1, found2; + u = vertex(i, Full_g); + v = vertex(j, Full_g); + tie(e1, found1) = edge(u, v, Full_g); + tie(e2, found2) = edge(v, u, Full_g); + if (!found1 && !found2){ + add_edge(u,v,1,Full_g); + add_edge(v,u,1,Full_g); + } + + } + } + + } + } + + //=============================== + void update_distances(void){ + // put shortest paths to the *Dist[][] + std::vector p(num_vertices(Full_g)); + std::vector d(num_vertices(Full_g)); + vertex_descriptor s; + + + // put shortest paths to the *Dist[][] + for (int j=0; j 0.){ + s = vertex(j, Full_g); + dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); + + //std::cout <<" Vertex "<< j << std::endl; + graph_traits < graph_t >::vertex_iterator vi, vend; + + for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { + + if (p[*vi]!=*vi){ + Dist[*vi][j]=d[*vi]; + Dist[j][*vi]=d[*vi]; + + if (Dist[*vi][j]>max_dist){ + max_dist=Dist[*vi][j]; + } + + + } else { + Dist[*vi][j]=-1.; + Dist[j][*vi]=-1.; + } + } + } + + } + + + } + + //====================================================== + void update_ranks(void){ + + for(int i=0; i0. && Final[i][j] >0.){ + Rank[i]++; + Rank[j]++; + } + } + } + + } + + //==================================================================== + void set_world(double a_i, double a_m, double b, double g, double d){ + + alpha_i=a_i; + alpha_m=a_m; + gamma=g; + beta=b; + delta=d; + + } + + //==================================================================== + void reset_world(){ + + //==================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + + for (int i=0; i 0. && Tried[i][j] > 0){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + //================================================== + + current_loss=0; + current_epoch=0; + current_repeat++; + current_novelty=0; + + for(int i = 0; i < N_nodes; ++i) { + Rank[i]=0.; + for(int j = 0; j < N_nodes; ++j) { + Prob[i][j]=0.; + Dist[i][j]=-1.; + Tried[i][j]=0.; + } + } + } + + + //============================================== + void show_parameters(void){ + + std::cout << "Parameters: " + << alpha_i << " " + << alpha_m << " | " + << beta << " " + << gamma << " | " + << delta << std::endl; + + } + + + + //=============================================== + string file_name(){ + + std::ostringstream s; + s << "world_" + << lexical_cast(alpha_i) << "_" + << lexical_cast(alpha_m) << "_" + << lexical_cast(beta) << "_" + << lexical_cast(gamma) << "_" + << lexical_cast(delta) << "_" + << lexical_cast(N_epochs) << "_" + << lexical_cast(N_steps) << "_" + << lexical_cast(N_repeats) << ".txt"; + + return s.str(); + + } + + + + + //================================================= + void set_verbose(int verbose){ + + verbose_level = verbose; + } + + + //============================================================= + void update_probabilities(void){ + + + //========================= + // Compute sampling probabilities + // first pass: \xi_i,j + for(int i=0; i 0.){ + + double k = Dist[i][j]; + if (k >= k_max){ + k = k_max-1; + } + + bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); + + } else { + bg = delta; + } + + Prob[i][j] = exp(Prob[i][j] + bg); + } + } + + + // second pass: sum + double Summa = 0.; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + + } + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + else { + + double pfail=0.; + int n_failed; + //, n_check = 0; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + } + + current_novelty = novel; + + + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + if (verbose_level == 2){ + std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) + + << " cost=" << cost + << " novel=" << novel + << " rel_loss=" << cost/novel + << std::endl; + } + + current_epoch++; + } + + + //====== Destructor ====== + ~Universe(){ + + delete_2Dmatrix(Final, N_nodes); + delete_2Dmatrix(Dist, N_nodes); + delete_2Dmatrix(Tried, N_nodes); + delete_2Dmatrix(Prob, N_nodes); + delete_2Dmatrix(EdgeIndex, N_nodes); + delete_1Dmatrix(Rank); + } + + //================================================ + // Allocate memory + double** allocate_2Dmatrix(int N, int M) + { + double **pointer; + + if (verbose_level == 2){ + std::cout<< "["< 0){ + + pointer = new double[N]; + + }else { + + pointer = NULL; + } + + return pointer; + + } + + //============================================== + // De-Allocate memory to prevent memory leak + void delete_2Dmatrix(double **pointer, int N){ + + if (pointer != NULL){ + + for (int i = 0; i < N; ++i){ + delete [] pointer[i]; + } + delete [] pointer; + } + } + //==================== + void delete_1Dmatrix(double *pointer){ + + delete [] pointer; + } + + //=========================================== + double get_rel_loss(){ + + return CumulativeRelativeLoss ; + } + + //=========================================== + double get_rel_loss_err(){ + + return CRLsquare ; + } + + + + //================================================================================== + void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ + + double ALOT=100000000000.; + + std::cout<<" evolve_to_target_and_save: istart=" << istart << "iend=" << iend << "\n"; + + reset_world(); + + for (int k = istart; k < iend; k++){ + + std::cout<<" evolve: k=" << k << "\n"; + + + + for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ + std::cout<<" evolve: k=" << k << " i=" << i << " cur=" << current_novelty << " Target=" << TargetNovelty << "\n"; + update_world(); + } + + storage[k]=current_loss/current_novelty; + counters[k]=1; + + + reset_world(); + } + + } + //============================================== + int get_reruns(void){ + return N_repeats; + } + + //============================================== + double get_parameter(int i){ + + switch(i){ + case 0: + return alpha_i; + case 1: + return alpha_m; + case 2: + return beta; + case 3: + return gamma; + case 4: + return delta; + default: + + std::cout << "Erroneous parameter id!!!!\n\n\n"; + return 0.; + } + } + + + //============================================== + void evolve_to_target(){ + + reset_world(); + if (beta < -1. || gamma < -1.){ + CumulativeRelativeLoss = 100000000000.; + CRLsquare = 0.; + return; + } + + + for (int k=0; k< N_repeats; k++){ + + + for(int i=0; i 4) {return 0;} + + else { + + switch(position){ + case 0: + alpha_i=value; + return 1; + case 1: + alpha_m=value; + return 1; + case 2: + beta=value; + return 1; + case 3: + gamma=value; + return 1; + case 4: + delta=value; + return 1; + } + + } + + return 0; + } + + + //================================================================= + void try_annealing(double starting_jump, int iterations, + double temp_start, double temp_end, double target_rejection){ + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=alpha_i; + x[1]=alpha_m; + x[2]=beta; + x[3]=gamma; + x[4]=delta; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + + //.......................................... + evolve_to_target(); + std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + //........................................... + + // optimization cycle + for(int i=0; i ratio){ + + std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << alpha_i << " "<< alpha_m << " " + << beta << " " << gamma << " " + << delta << " " << std::endl; + set_parameter(x[j], j); + CumulativeRelativeLoss = 0; + CRLsquare = 0; + + rejection[j]+=1.; + } + + else { + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + x[j] = x_tmp; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) + << " "<< wrap_double(rejection[1], 7) << " " + << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(alpha_i,2) + << " "<< wrap_double(alpha_m, 7) << " " + << wrap_double(beta,5) << " " + << wrap_double(gamma,9) << " " + << wrap_double(delta,6) << " " + << std::endl << std::endl; + + } + //........................................................ + + } + + } + + } + + +}; + +//============================================================ + +std::pair multi_loss( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double* Results, + int* Counters, + double* params){ + + int N = un[0]->get_reruns(); + int step = (int)(double)N/(double)(Nworkers); + int istart=0; + int iend = istart+step; + + double Loss=0., LossSquare=0.; + + for(int i=0; iset_parameter(params[j],j); + } + + + for(int i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); + //}); + + std::cout<<" Returned from evolve_to_target_and_save\n"; + istart += step; + iend = min(istart+step,N); + + } + } + // dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + //dispatch_release(group); + + for (int i=0; i Res; + Res.first=Loss; + Res.second=two_std; + + return Res; + + +} +//============================================================ + + +//============================================================ +void multi_annealing( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double T_start, double T_end, + double Target_rejection, + int Annealing_repeats, + double starting_jump, + double* Results, + int* Counters, + double* params0, + double annealing_cycles){ + //................................. + // re-implement annealing + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + //boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=params0[0]; + x[1]=params0[1]; + x[2]=params0[2]; + x[3]=params0[3]; + x[4]=params0[4]; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + std::pairRes; + + Res = multi_loss( /* group,*/ un, /* CustomQueues,*/ Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + curr_x = Res.first; + curr_err = Res.second; + + // optimization cycle + + for(int i=0; iset_parameter(x_tmp, j); + } + + + Res = multi_loss(/* group, */ un, /* CustomQueues, */ Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " vs " << ratio << std::endl; + + double ALOT=100000000000.; + + if (Res.first < ALOT) + { + ofstream filestr; + + filestr.open ("best_opt_some.txt", ofstream::app); + + // >> i/o operations here << + filestr << un[0]->get_target() << "," + << Res.first + << "," << un[0]->get_parameter(0) + << "," << un[0]->get_parameter(1) + << "," << un[0]->get_parameter(2) + << "," << un[0]->get_parameter(3) + << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; + + filestr.close(); + + + filestr.open ("max_dist.txt", ofstream::app); + + // >> i/o operations here << + filestr << max_dist << ",\n"; + + filestr.close(); + + } + + + if (r > ratio){ + + std::cout << " "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << un[0]->get_parameter(0) + << " " << un[0]->get_parameter(1) + << " " << un[0]->get_parameter(2) + << " " << un[0]->get_parameter(3) + << " " << un[0]->get_parameter(4) << " " << std::endl; + + x[j]=x_hold; + for(int w=0; wset_parameter(x[j], j); + } + + + //set_parameter(x[j], j); + rejection[j]+=1.; + } + + else { + + curr_x = Res.first; + curr_err = Res.second; + x[j] = x_tmp; + + for(int w=0; wset_parameter(x[j], j); + } + + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) << " " + << wrap_double(rejection[1],7) << " " + << wrap_double(rejection[2],5) << " " + << wrap_double(rejection[3],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << " "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(un[0]->get_parameter(0),2) << " " + << wrap_double(un[0]->get_parameter(1),7) << " " + << wrap_double(un[0]->get_parameter(2),5) << " " + << wrap_double(un[0]->get_parameter(3),9) << " " + << wrap_double(un[0]->get_parameter(4),6) << " " + << std::endl << std::endl; + + + + } + //........................................................ + + } + } + + } + +} + + + +//================================================ +int +main(int argc, char* argv[]) +{ + + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; + string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params1[4] = {300, 50, 1000, 10}; + int params3[5] = { 0, 0, 0, 0, 0}; + + // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + int verbose_level = 2; + const std::string one="one", two="two"; + static Universe* un[Nworkers]; + // static dispatch_queue_t CustomQueues[Nworkers]; + + static double* Results; + static int* Counters; + + timeval t1, t2; + double elapsedTime; + // start timer + gettimeofday(&t1, NULL); + + + if (argc < 8) { + std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; + std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; + std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; + + system("pwd"); + + + return(1); + } + else { + for (int nArg=0; nArg < argc; nArg++){ + //std::cout << nArg << " " << argv[nArg] << std::endl; + if (nArg > 0 && nArg < 7){ + params0[nArg-1]= atof(argv[nArg]); + std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; + } + if (nArg > 6 && nArg < 11){ + params1[nArg-7]= atoi(argv[nArg]); + std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; + } + if (nArg == 11){ + verbose_level = atoi(argv[nArg]); + std::cout << "verbose level: " << verbose_level << std::endl; + } + if (nArg > 11 && nArg < 17){ + params2[nArg-12]= atof(argv[nArg]); + std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; + } + if (nArg > 16 && nArg < 22){ + params3[nArg-17]= atof(argv[nArg]); + var_fixed[nArg-17]= atof(argv[nArg]); + std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; + } + + + } + + } + + /* + for target in range(58,1009,50): + s = ("%d" % target) + print s + + for i in range(15): + # Param groups separated by "|" below for documentation. NOTE that | is not used on command line! + os.system("./supe_duper_optimizer |0 0 4 50 -1 "+s+" | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0") + */ + + /* Parameters, re-iterated: + + "alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + + {"n_epochs", "n_steps", "n_reruns", "range"}; + int params1[4] = {300, 50, 1000, 10}; + + {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params3[5] = { 0, 0, 0, 0, 0}; + + + */ + + for (int j=0; j<5; j++){ + + cout << j << " | " << var_fixed[j] << " (fixed) \n"; + } + + target=params0[5]; + range = (double)params1[3]; + int identify_failed = 0; + char* filename= (char *)"movie_graph.txt"; + int n_ep=params1[0], n_st=params1[1], n_rep=params1[2]; + + //............................... + + for(int i=0; i 0){ + + Results = new double[n_rep]; + Counters = new int[n_rep]; + + }else { + + Results = NULL; + Counters = NULL; + std::cout << " Number of reruns should be positive! " << std::endl; + return 0; + + } + //............................... + srand(time(0)); + //srandomdev(); + + { + double r=0; + for (int j=0; j<100; j++){ + + + + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " "; + } + std::cout << "\n "; + } + //random initiation of starting parameters + + if (range > 0.){ + + for (int i=0; i < 5; i++){ + + if (params0[i]==-100.){ + + double r1 = (rand()/(double)(pow(2.,31)-1.)); + double r2 = (rand()/(double)(pow(2.,31)-1.)); + double sign = 1.; + + if(r1 > 0.5){ + sign=-1.; + } + + params0[i] = sign*r2*range; + + std::cout << par_names0[i] << ": " << params0[i] << std::endl; + } + } + + } + + + double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; + int Annealing_repeats = (int) params2[2]; + + + // dispatch_group_t group = dispatch_group_create(); + + //............................. + multi_annealing( /* group, */ un, /* CustomQueues, */ T_start, T_end, Target_rejection, Annealing_repeats, + starting_jump, Results, Counters, params0, Annealing_repeats); + + //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + // dispatch_release(group); + //............................. + + + // stop timer + gettimeofday(&t2, NULL); + + // compute and print the elapsed time in millisec + elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms + elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << elapsedTime << " seconds \n .....(" << elapsedTime/60. << " minutes)\n\n"; + + //..................... + + for(int i=0; i 0){ + + delete [] Results; + delete [] Counters; + + } + + return 0; + + + +} + Copied: SwiftApps/SciColSim/snapshots.2012.0123/optimizer.snap01.cpp (from rev 5504, SwiftApps/SciColSim/optimizer.snap01.cpp) =================================================================== --- SwiftApps/SciColSim/snapshots.2012.0123/optimizer.snap01.cpp (rev 0) +++ SwiftApps/SciColSim/snapshots.2012.0123/optimizer.snap01.cpp 2012-01-23 21:01:49 UTC (rev 5514) @@ -0,0 +1,1722 @@ +// +// main.cpp +// optimizer +// +// Created by Andrey Rzhetsky on 4/11/11. +// Copyright 2011 University of Chicago. All rights reserved. +// + +#define Nworkers 24 + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +// #include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define INT_INFINITY 2147483647 + +#define FIX_VARIABLES 1 + +using namespace boost; +using namespace std; +using namespace boost::numeric::ublas; + +static int max_dist=0; + +typedef boost::adjacency_matrix Graph; +typedef std::pair Edge; +typedef boost::graph_traits GraphTraits; +typedef boost::numeric::ublas::triangular_matrix prob; +typedef boost::numeric::ublas::triangular_matrix pathlength; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + +namespace std { + using ::time; +} + +static int var_fixed[5] = {1, 0, 1, 1, 0}; + +typedef boost::minstd_rand base_generator_type; +typedef adjacency_list < listS, vecS, directedS, +no_property, property < edge_weight_t, int > > graph_t; +typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; +typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; + + +//================================================ +string strDouble(double number) +{ + stringstream ss;//create a stringstream + ss << number;//add number to the stream + return ss.str();//return a string with the contents of the stream +} + +//================================================ + +double gaussian(double sigma) +{ + double GaussNum = 0.0; + int NumInSum = 10; + for(int i = 0; i < NumInSum; i++) + { + GaussNum += ((double)rand()/(double)RAND_MAX - 0.5); + } + GaussNum = GaussNum*sqrt((double)12/(double)NumInSum); + + + return GaussNum; + +} + + + +//================================================= +double diffclock(clock_t clock1,clock_t clock2) +{ + double diffticks=clock1-clock2; + double diffms=(diffticks)/CLOCKS_PER_SEC; + return diffms; +} + +//================================================ +//================================================================ +double get_new_x(double x, double dx){ + + double new_x; + // boost::variate_generator > uni(generator, uni_dist); + double r = rand()/(double)(pow(2.,31)-1.); + + if (r > 0.5){ + new_x = x + rand()*dx/(double)(pow(2.,31)-1.); + } else { + new_x = x - rand()*dx/(double)(pow(2.,31)-1.); + } + + return new_x; + +} + + +//=============================================== +string string_wrap(string ins, int mode){ + + std::ostringstream s; + + switch(mode){ + case 0: + s << "\033[1;29m" << ins << "\033[0m"; + break; + case 1: + s << "\033[1;34m" << ins << "\033[0m"; + break; + case 2: + s << "\033[1;44m" << ins << "\033[0m"; + break; + case 3: + s << "\033[1;35m" << ins << "\033[0m"; + break; + case 4: + s << "\033[1;33;44m" << ins << "\033[0m"; + break; + case 5: + s << "\033[1;47;34m" << ins << "\033[0m"; + break; + case 6: + s << "\033[1;1;31m" << ins << "\033[0m"; + break; + case 7: + s << "\033[1;1;33m" << ins << "\033[0m"; + break; + case 8: + s << "\033[1;1;43;34m" << ins << "\033[0m"; + break; + case 9: + s << "\033[1;1;37m" << ins << "\033[0m"; + break; + case 10: + s << "\033[1;30;47m" << ins << "\033[0m"; + break; + default: + s << ins; + } + + return s.str(); +} + + +//=============================================== +string wrap_double(double val, int mode){ + + std::ostringstream s; + s << string_wrap(strDouble(val),mode); + + return s.str(); +} + + + +//=============================================== +const +string i2string(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + return s.str(); + +} + +//=============================================== +char* i2char(int i){ + + std::ostringstream s; + s << "worker" + << lexical_cast(i); + + char* a=new char[s.str().size()+1]; + memcpy(a,s.str().c_str(), s.str().size()); + + return a; +} + +//================================================ +class Universe { + +private: + + double alpha_i; + double alpha_m; + double beta; + double gamma; + double delta; + + double TargetNovelty; + double CumulativeRelativeLoss; + double CRLsquare; + string id; + + + int N_nodes; + int M_edges; + + int N_epochs; + int N_steps; + int N_repeats; + + int current_epoch; + double current_loss; + int current_repeat; + double current_novelty; + + int mode_identify_failed; + int verbose_level; // 0 is silent, higher is more + + double k_max; + + graph_t Full_g; + + double **Prob; + double **Tried; + double **Dist; + double **Final; + double **EdgeIndex; + double *Rank; + + base_generator_type generator; + boost::uniform_real<> uni_dist; + boost::geometric_distribution geo; + +public: + + + + //====== Constructor ====== + Universe(const std::string FileToOpen, int Epochs, int Steps, int Repeats, int identify_failed, double target, const std::string idd) + { + //typedef array_type2::index index2; + + + std::ifstream inFile; + //string line; + + //------------------------------- + + base_generator_type gene(42u); + generator = gene; + generator.seed(static_cast(std::time(0))); + boost::uniform_real<> uni_d(0,1); + uni_dist = uni_d; + + //-------------------------------- + + int i, k; + int x, y; + Edge* edge_array_mine; + int num_arcs_mine, num_nodes_mine; + int* weights_mine; + + TargetNovelty = target; + CumulativeRelativeLoss = 0.; + CRLsquare = 0.; + + + N_epochs = Epochs; + N_steps = Steps; + N_repeats = Repeats; + + current_epoch = 0; + current_loss = 0.; + current_repeat = 0; + + id = idd; + + verbose_level = 1; + + mode_identify_failed = identify_failed; + + + //------------------------------- + // The first pass though file with the graph + inFile.open(FileToOpen.c_str()); + if (inFile.fail()) { + cout << "Unable to open file"; + exit(1); // terminate with error + }else { + + if (verbose_level > 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x; + inFile >> y; + + if (verbose_level > 2){ + std::cout << " x: " << x; + std::cout << " y: " << y << std::endl; + } + + if (i==0){ + N_nodes=x; + M_edges=y; + break; + } + i++; + + + } + inFile.close(); + + if (verbose_level == 2){ + std::cout << N_nodes << " nodes, " << M_edges << " edges"< 2){ + std::cout << " Opened <" << FileToOpen << ">"<> x && inFile >>y) { + if (i > 0) { + Final[x][y]=1.; + Final[y][x]=1.; + + + if (verbose_level == 2){ + std::cout << "."; + } + } + i++; + + } + if (verbose_level == 2){ + std::cout << std::endl; + } + inFile.close(); + + k=0; + for (int i=0; i 0.){ + EdgeIndex[i][j]=k; + k++; + } + } + } + + + + //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // create graph -- hopefully, we can keep it, just modifying edge weights + + + edge_array_mine = new Edge[2*M_edges]; + num_arcs_mine = 2*M_edges; + num_nodes_mine = N_nodes; + weights_mine = new int[2*M_edges]; + for (int i=0; i<2*M_edges; i++){ weights_mine[i]=1;} + + k=0; + for(int i=0; i0.){ + edge_array_mine[2*k] =Edge(i,j); + edge_array_mine[2*k+1]=Edge(j,i); + k++; + } + } + } + graph_t g(edge_array_mine, edge_array_mine + num_arcs_mine, weights_mine, num_nodes_mine); + + Full_g = g; + delete edge_array_mine; + delete weights_mine; + + //=========================================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + for (int i=0; i 0.){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + + } + + + //===================================================================== + int sample_failed_number(double pfail){ + + //boost::geometric_distribution geo(pfail); + //boost::variate_generator > geom(generator, geo); + + double r, u, g; + + r=0.; + for(int i=0; i=3){ + std::cout << id << " failed " << r << std::endl; + } + return r; + + } + + //============================================= + double get_target(void){ + return TargetNovelty; + } + + //============================================= + void set_target(double target){ + TargetNovelty=target; + } + + //============================================= + int sample(){ + + //boost::variate_generator > uni(generator, uni_dist); + // double r = uni(), Summa = 0.; + + + + double r = rand(), Summa = 0.; + r /= (double)(pow(2.,31)-1.); + int result = 0; + int finished = 0; + + if (verbose_level==4){ + std::cout << id << " sampled " << r << std::endl; + } + + for(int i=0; i r){ + + Tried[i][j]+=1.; + + if (Final[i][j] > 0.){ + result = 1; + } + finished = 1; + } + } + } + + return result; + + } + + //=============================== + void update_current_graph(void){ + + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + //property_map::type weightmap = get(edge_weight, Full_g); + for (int i=0; i 0. && Tried[i][j]>0){ + //s = edge(i, j, Full_g); + boost::graph_traits::edge_descriptor e1,e2; + bool found1, found2; + u = vertex(i, Full_g); + v = vertex(j, Full_g); + tie(e1, found1) = edge(u, v, Full_g); + tie(e2, found2) = edge(v, u, Full_g); + if (!found1 && !found2){ + add_edge(u,v,1,Full_g); + add_edge(v,u,1,Full_g); + } + + } + } + + } + } + + //=============================== + void update_distances(void){ + // put shortest paths to the *Dist[][] + std::vector p(num_vertices(Full_g)); + std::vector d(num_vertices(Full_g)); + vertex_descriptor s; + + + // put shortest paths to the *Dist[][] + for (int j=0; j 0.){ + s = vertex(j, Full_g); + dijkstra_shortest_paths(Full_g, s, predecessor_map(&p[0]).distance_map(&d[0])); + + //std::cout <<" Vertex "<< j << std::endl; + graph_traits < graph_t >::vertex_iterator vi, vend; + + for (boost::tie(vi, vend) = vertices(Full_g); vi != vend; ++vi) { + + if (p[*vi]!=*vi){ + Dist[*vi][j]=d[*vi]; + Dist[j][*vi]=d[*vi]; + + if (Dist[*vi][j]>max_dist){ + max_dist=Dist[*vi][j]; + } + + + } else { + Dist[*vi][j]=-1.; + Dist[j][*vi]=-1.; + } + } + } + + } + + + } + + //====================================================== + void update_ranks(void){ + + for(int i=0; i0. && Final[i][j] >0.){ + Rank[i]++; + Rank[j]++; + } + } + } + + } + + //==================================================================== + void set_world(double a_i, double a_m, double b, double g, double d){ + + alpha_i=a_i; + alpha_m=a_m; + gamma=g; + beta=b; + delta=d; + + } + + //==================================================================== + void reset_world(){ + + //==================================================== + std::vector p(num_edges(Full_g)); + std::vector d(num_edges(Full_g)); + edge_descriptor s; + boost::graph_traits::vertex_descriptor u, v; + + + for (int i=0; i 0. && Tried[i][j] > 0){ + u = vertex(i, Full_g); + v = vertex(j, Full_g); + remove_edge(u,v,Full_g); + remove_edge(v,u,Full_g); + + } + } + } + + //================================================== + + current_loss=0; + current_epoch=0; + current_repeat++; + current_novelty=0; + + for(int i = 0; i < N_nodes; ++i) { + Rank[i]=0.; + for(int j = 0; j < N_nodes; ++j) { + Prob[i][j]=0.; + Dist[i][j]=-1.; + Tried[i][j]=0.; + } + } + } + + + //============================================== + void show_parameters(void){ + + std::cout << "Parameters: " + << alpha_i << " " + << alpha_m << " | " + << beta << " " + << gamma << " | " + << delta << std::endl; + + } + + + + //=============================================== + string file_name(){ + + std::ostringstream s; + s << "world_" + << lexical_cast(alpha_i) << "_" + << lexical_cast(alpha_m) << "_" + << lexical_cast(beta) << "_" + << lexical_cast(gamma) << "_" + << lexical_cast(delta) << "_" + << lexical_cast(N_epochs) << "_" + << lexical_cast(N_steps) << "_" + << lexical_cast(N_repeats) << ".txt"; + + return s.str(); + + } + + + + + //================================================= + void set_verbose(int verbose){ + + verbose_level = verbose; + } + + + //============================================================= + void update_probabilities(void){ + + + //========================= + // Compute sampling probabilities + // first pass: \xi_i,j + for(int i=0; i 0.){ + + double k = Dist[i][j]; + if (k >= k_max){ + k = k_max-1; + } + + bg = beta * log(k/k_max) + gamma * log(1. - k/k_max); + + } else { + bg = delta; + } + + Prob[i][j] = exp(Prob[i][j] + bg); + } + } + + + // second pass: sum + double Summa = 0.; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + + } + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + else { + + double pfail=0.; + int n_failed; + //, n_check = 0; + + for(int i=0; i0. && Final[i][j]>0.){ + novel+=1.; + } + } + } + } + + current_novelty = novel; + + + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + if (verbose_level == 2){ + std::cout << (current_repeat+1) << " epoch=" << (current_epoch+1) + + << " cost=" << cost + << " novel=" << novel + << " rel_loss=" << cost/novel + << std::endl; + } + + current_epoch++; + } + + + //====== Destructor ====== + ~Universe(){ + + delete_2Dmatrix(Final, N_nodes); + delete_2Dmatrix(Dist, N_nodes); + delete_2Dmatrix(Tried, N_nodes); + delete_2Dmatrix(Prob, N_nodes); + delete_2Dmatrix(EdgeIndex, N_nodes); + delete_1Dmatrix(Rank); + } + + //================================================ + // Allocate memory + double** allocate_2Dmatrix(int N, int M) + { + double **pointer; + + if (verbose_level == 2){ + std::cout<< "["< 0){ + + pointer = new double[N]; + + }else { + + pointer = NULL; + } + + return pointer; + + } + + //============================================== + // De-Allocate memory to prevent memory leak + void delete_2Dmatrix(double **pointer, int N){ + + if (pointer != NULL){ + + for (int i = 0; i < N; ++i){ + delete [] pointer[i]; + } + delete [] pointer; + } + } + //==================== + void delete_1Dmatrix(double *pointer){ + + delete [] pointer; + } + + //=========================================== + double get_rel_loss(){ + + return CumulativeRelativeLoss ; + } + + //=========================================== + double get_rel_loss_err(){ + + return CRLsquare ; + } + + + + //================================================================================== + void evolve_to_target_and_save(int istart, int iend, double* storage, int* counters){ + + double ALOT=100000000000.; + + // std::cout<<" evolve_to_target_and_save: istart=" << istart << "iend=" << iend << "\n"; + + reset_world(); + + for (int k = istart; k < iend; k++){ + + // std::cout<<" evolve: k=" << k << "\n"; + + + + for(int i=0; i< N_epochs && current_novelty < TargetNovelty; i++){ + // std::cout<<" evolve: k=" << k << " i=" << i << " cur=" << current_novelty << " Target=" << TargetNovelty << "\n"; + update_world(); + } + + storage[k]=current_loss/current_novelty; + counters[k]=1; + + + reset_world(); + } + + } + //============================================== + int get_reruns(void){ + return N_repeats; + } + + //============================================== + double get_parameter(int i){ + + switch(i){ + case 0: + return alpha_i; + case 1: + return alpha_m; + case 2: + return beta; + case 3: + return gamma; + case 4: + return delta; + default: + + std::cout << "Erroneous parameter id!!!!\n\n\n"; + return 0.; + } + } + + + //============================================== + void evolve_to_target(){ + + reset_world(); + if (beta < -1. || gamma < -1.){ + CumulativeRelativeLoss = 100000000000.; + CRLsquare = 0.; + return; + } + + + for (int k=0; k< N_repeats; k++){ + + + for(int i=0; i 4) {return 0;} + + else { + + switch(position){ + case 0: + alpha_i=value; + return 1; + case 1: + alpha_m=value; + return 1; + case 2: + beta=value; + return 1; + case 3: + gamma=value; + return 1; + case 4: + delta=value; + return 1; + } + + } + + return 0; + } + + + //================================================================= + void try_annealing(double starting_jump, int iterations, + double temp_start, double temp_end, double target_rejection){ + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=alpha_i; + x[1]=alpha_m; + x[2]=beta; + x[3]=gamma; + x[4]=delta; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + + //.......................................... + evolve_to_target(); + std::cout << CumulativeRelativeLoss << " +- " << CRLsquare << std::endl; + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + //........................................... + + // optimization cycle + for(int i=0; i ratio){ + + std::cout << string_wrap(id, 4) <<" "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << alpha_i << " "<< alpha_m << " " + << beta << " " << gamma << " " + << delta << " " << std::endl; + set_parameter(x[j], j); + CumulativeRelativeLoss = 0; + CRLsquare = 0; + + rejection[j]+=1.; + } + + else { + + curr_x = CumulativeRelativeLoss; + curr_err = CRLsquare; + x[j] = x_tmp; + CumulativeRelativeLoss = 0; + CRLsquare = 0; + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) + << " "<< wrap_double(rejection[1], 7) << " " + << wrap_double(rejection[2],5) << " " << wrap_double(rejection[2],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << string_wrap(id, 4) <<" "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(alpha_i,2) + << " "<< wrap_double(alpha_m, 7) << " " + << wrap_double(beta,5) << " " + << wrap_double(gamma,9) << " " + << wrap_double(delta,6) << " " + << std::endl << std::endl; + + } + //........................................................ + + } + + } + + } + + +}; + +//============================================================ + +std::pair multi_loss( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double* Results, + int* Counters, + double* params){ + + int N = un[0]->get_reruns(); + int step = (int)(double)N/(double)(Nworkers); + int istart=0; + int iend = istart+step; + + double Loss=0., LossSquare=0.; + + timeval startTime, endTime; + double elapsedTime; + // start timer + gettimeofday(&startTime, NULL); + + //err: for(int i=0; iset_parameter(params[j],j); + } + } + int i; + #pragma omp parallel for private (i) + for(i=0; ievolve_to_target_and_save(istart, iend, Results, Counters); + un[i]->evolve_to_target_and_save(i*step, min((i+1)*step,N), Results, Counters); + //}); + + // std::cout<<"multi_loss: Returned from evolve_to_target_and_save " << i << "\n"; + + + //istart += step; + //iend = min(istart+step,N); + + } + // err } + // dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + //dispatch_release(group); + + for (int i=0; i Res; + Res.first=Loss; + Res.second=two_std; + + gettimeofday(&endTime, NULL); + elapsedTime = (endTime.tv_sec - startTime.tv_sec) * 1000.0; // sec to ms + elapsedTime += (endTime.tv_usec - startTime.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << "multi_loss(N=" << N << ") elapsed time: " << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; + + return Res; +} +//============================================================ + + +//============================================================ +void multi_annealing( // dispatch_group_t group, + Universe* un[], + // dispatch_queue_t* CustomQueues, + double T_start, double T_end, + double Target_rejection, + int Annealing_repeats, + double starting_jump, + double* Results, + int* Counters, + double* params0, + double annealing_cycles){ + //................................. + // re-implement annealing + + double dx[5]={0.,0.,0.,0.,0}; + double x[5]={0.,0.,0.,0.,0}; + double rejection[5]={0., 0., 0., 0., 0.}; + double curr_x, curr_err, x_tmp; + double temperature; + double ratio, r; + int cycle=10; + //boost::variate_generator > uni(generator, uni_dist); + + // set up parameter for annealing + + x[0]=params0[0]; + x[1]=params0[1]; + x[2]=params0[2]; + x[3]=params0[3]; + x[4]=params0[4]; + + for(int i=0;i<5;i++){ + dx[i] = starting_jump; + } + + // establish the current value + std::pairRes; + + Res = multi_loss( /* group,*/ un, /* CustomQueues,*/ Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + curr_x = Res.first; + curr_err = Res.second; + + // optimization cycle + + for(int i=0; iset_parameter(x_tmp, j); + } + + + Res = multi_loss(/* group, */ un, /* CustomQueues, */ Results, Counters, x); + std::cout << Res.first << " +- " << Res.second << std::endl; + + ratio = min(1.,exp(-(Res.first-curr_x)/temperature)); + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " vs " << ratio << std::endl; + + double ALOT=100000000000.; + + if (Res.first < ALOT) + { + ofstream filestr; + + filestr.open ("best_opt_some.txt", ofstream::app); + + // >> i/o operations here << + filestr << un[0]->get_target() << "," + << Res.first + << "," << un[0]->get_parameter(0) + << "," << un[0]->get_parameter(1) + << "," << un[0]->get_parameter(2) + << "," << un[0]->get_parameter(3) + << "," << un[0]->get_parameter(4) << "," << Res.second << ",\n"; + + filestr.close(); + + + filestr.open ("max_dist.txt", ofstream::app); + + // >> i/o operations here << + filestr << max_dist << ",\n"; + + filestr.close(); + + } + + + if (r > ratio){ + + std::cout << " "<< (i+1) << ","<< (j) + <<" "<< (i+1) << " Did not accept " + << x_tmp << "(" << j << ")" << std::endl; + std::cout << un[0]->get_parameter(0) + << " " << un[0]->get_parameter(1) + << " " << un[0]->get_parameter(2) + << " " << un[0]->get_parameter(3) + << " " << un[0]->get_parameter(4) << " " << std::endl; + + x[j]=x_hold; + for(int w=0; wset_parameter(x[j], j); + } + + + //set_parameter(x[j], j); + rejection[j]+=1.; + } + + else { + + curr_x = Res.first; + curr_err = Res.second; + x[j] = x_tmp; + + for(int w=0; wset_parameter(x[j], j); + } + + std::cout << (i+1) << string_wrap((string) " Rejection counts: ", 8) + << wrap_double(rejection[0],2) << " " + << wrap_double(rejection[1],7) << " " + << wrap_double(rejection[2],5) << " " + << wrap_double(rejection[3],9) << " " + << wrap_double(rejection[4],6) << " " + << std::endl << std::endl; + + std::cout << " "<< (i+1) <<","<< (j) + <<" " + << string_wrap((string) "***** Did accept! ", 3) + << wrap_double(un[0]->get_parameter(0),2) << " " + << wrap_double(un[0]->get_parameter(1),7) << " " + << wrap_double(un[0]->get_parameter(2),5) << " " + << wrap_double(un[0]->get_parameter(3),9) << " " + << wrap_double(un[0]->get_parameter(4),6) << " " + << std::endl << std::endl; + + + + } + //........................................................ + + } + } + + } + +} + + + +//================================================ +int +main(int argc, char* argv[]) +{ + + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + string par_names0[6] = {"alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + string par_names1[4] = {"n_epochs", "n_steps", "n_reruns", "range"}; + string par_names2[5] = {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + string par_names3[5] = {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params1[4] = {300, 50, 1000, 10}; + int params3[5] = { 0, 0, 0, 0, 0}; + + // temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + int verbose_level = 2; + const std::string one="one", two="two"; + static Universe* un[Nworkers]; + // static dispatch_queue_t CustomQueues[Nworkers]; + + static double* Results; + static int* Counters; + + timeval t1, t2; + double elapsedTime; + // start timer + gettimeofday(&t1, NULL); + + + if (argc < 8) { + std::cout << "Usage: super_optimizer alpha_i alpha_m beta gamma delta target_innov [n_epochs n_steps n_reruns] [range] [verbose_level]\n"; + std::cout << " [T_start T_end Annealing_steps Target_rejection Starting_jump]\n"; + std::cout << " [FREEZE_alpha_i FREEZE_alpha_m FREEZE_beta FREEZE_gamma FREEZE_delta]\n"; + + system("pwd"); + + + return(1); + } + else { + for (int nArg=0; nArg < argc; nArg++){ + //std::cout << nArg << " " << argv[nArg] << std::endl; + if (nArg > 0 && nArg < 7){ + params0[nArg-1]= atof(argv[nArg]); + std::cout << par_names0[nArg-1] << ": " << params0[nArg-1] << std::endl; + } + if (nArg > 6 && nArg < 11){ + params1[nArg-7]= atoi(argv[nArg]); + std::cout << par_names1[nArg-7] << ": " << params1[nArg-7] << std::endl; + } + if (nArg == 11){ + verbose_level = atoi(argv[nArg]); + std::cout << "verbose level: " << verbose_level << std::endl; + } + if (nArg > 11 && nArg < 17){ + params2[nArg-12]= atof(argv[nArg]); + std::cout << par_names2[nArg-12] << ": " << params2[nArg-12] << std::endl; + } + if (nArg > 16 && nArg < 22){ + params3[nArg-17]= atof(argv[nArg]); + var_fixed[nArg-17]= atof(argv[nArg]); + std::cout << par_names3[nArg-17] << ": " << var_fixed[nArg-17] << std::endl; + } + + + } + + } + + /* + for target in range(58,1009,50): + s = ("%d" % target) + print s + + for i in range(15): + # Param groups separated by "|" below for documentation. NOTE that | is not used on command line! + os.system("./supe_duper_optimizer |0 0 4 50 -1 "+s+" | 40000 20 1000 2 | 1 | 2. 0.01 100 0.3 2.3 | 1 1 0 0 0") + */ + + /* Parameters, re-iterated: + + "alpha_i", "alpha_m", "beta", "gamma", "delta", "target"}; + double params0[6] = {0., 0., 0., 0., 0., 0.2}, target=50., range; + + {"n_epochs", "n_steps", "n_reruns", "range"}; + int params1[4] = {300, 50, 1000, 10}; + + {"T_start", "T_end", "Annealing_steps","Target_rejection","Starting_jump"}; + temperature_start, temperature_end, annealing_steps target_rejection Starting_jump + double params2[5] = {1, 0.001, 100, 0.3, 1.5}; + + {"FREEZE_alpha_i", "FREEZE_alpha_m", "FREEZE_beta", "FREEZE_gamma", "FREEZE_delta"}; + int params3[5] = { 0, 0, 0, 0, 0}; + + + */ + + for (int j=0; j<5; j++){ + + cout << j << " | " << var_fixed[j] << " (fixed) \n"; + } + + target=params0[5]; + range = (double)params1[3]; + int identify_failed = 0; + char* filename= (char *)"movie_graph.txt"; + int n_ep=params1[0], n_st=params1[1], n_rep=params1[2]; + + //............................... + + for(int i=0; i 0){ + + Results = new double[n_rep]; + Counters = new int[n_rep]; + + }else { + + Results = NULL; + Counters = NULL; + std::cout << " Number of reruns should be positive! " << std::endl; + return 0; + + } + //............................... + srand(time(0)); + //srandomdev(); + + { + double r=0; + for (int j=0; j<100; j++){ + + + + r = rand()/(double)(pow(2.,31)-1.); + std::cout << r << " "; + } + std::cout << "\n "; + } + //random initiation of starting parameters + + if (range > 0.){ + + for (int i=0; i < 5; i++){ + + if (params0[i]==-100.){ + + double r1 = (rand()/(double)(pow(2.,31)-1.)); + double r2 = (rand()/(double)(pow(2.,31)-1.)); + double sign = 1.; + + if(r1 > 0.5){ + sign=-1.; + } + + params0[i] = sign*r2*range; + + std::cout << par_names0[i] << ": " << params0[i] << std::endl; + } + } + + } + + + double T_start=params2[0], T_end=params2[1], Target_rejection=params2[3], starting_jump=params2[4]; + int Annealing_repeats = (int) params2[2]; + + + // dispatch_group_t group = dispatch_group_create(); + + //............................. + multi_annealing( /* group, */ un, /* CustomQueues, */ T_start, T_end, Target_rejection, Annealing_repeats, + starting_jump, Results, Counters, params0, Annealing_repeats); + + //dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + // dispatch_release(group); + //............................. + + + // stop timer + gettimeofday(&t2, NULL); + + // compute and print the elapsed time in millisec + elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms + elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms + elapsedTime /= 1000.; + cout << elapsedTime << " seconds " << elapsedTime/60. << " minutes\n\n"; + + //..................... + + for(int i=0; i 0){ + + delete [] Results; + delete [] Counters; + + } + + return 0; + + + +} + Copied: SwiftApps/SciColSim/snapshots.2012.0123/t2.cpp (from rev 5504, SwiftApps/SciColSim/t2.cpp) =================================================================== --- SwiftApps/SciColSim/snapshots.2012.0123/t2.cpp (rev 0) +++ SwiftApps/SciColSim/snapshots.2012.0123/t2.cpp 2012-01-23 21:01:49 UTC (rev 5514) @@ -0,0 +1,44 @@ +#include +#include +#include + +template +bool from_string(T& t, + const std::string& s, + std::ios_base& (*f)(std::ios_base&)) +{ + std::istringstream iss(s); + return !(iss >> f >> t).fail(); +} + +int main() +{ + int i; + float f; + + // the third parameter of from_string() should be + // one of std::hex, std::dec or std::oct + if(from_string(i, std::string("ff"), std::hex)) + { + std::cout << i << std::endl; + } + else + { + std::cout << "from_string failed" << std::endl; + } + + if(from_string(f, std::string("123.456"), std::dec)) + { + std::cout << f << std::endl; + } + else + { + std::cout << "from_string failed" << std::endl; + } + return 0; +} + +/* output: +255 +123.456 +*/ Deleted: SwiftApps/SciColSim/t2.cpp =================================================================== --- SwiftApps/SciColSim/t2.cpp 2012-01-23 19:13:49 UTC (rev 5513) +++ SwiftApps/SciColSim/t2.cpp 2012-01-23 21:01:49 UTC (rev 5514) @@ -1,44 +0,0 @@ -#include -#include -#include - -template -bool from_string(T& t, - const std::string& s, - std::ios_base& (*f)(std::ios_base&)) -{ - std::istringstream iss(s); - return !(iss >> f >> t).fail(); -} - -int main() -{ - int i; - float f; - - // the third parameter of from_string() should be - // one of std::hex, std::dec or std::oct - if(from_string(i, std::string("ff"), std::hex)) - { - std::cout << i << std::endl; - } - else - { - std::cout << "from_string failed" << std::endl; - } - - if(from_string(f, std::string("123.456"), std::dec)) - { - std::cout << f << std::endl; - } - else - { - std::cout << "from_string failed" << std::endl; - } - return 0; -} - -/* output: -255 -123.456 -*/