[Swift-commit] r5764 - in SwiftApps/DSSAT/benchmark-release: . bin conf gridLists

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Fri Apr 27 16:40:14 CDT 2012


Author: davidk
Date: 2012-04-27 16:39:20 -0500 (Fri, 27 Apr 2012)
New Revision: 5764

Added:
   SwiftApps/DSSAT/benchmark-release/conf/sites.localhost.xml
Modified:
   SwiftApps/DSSAT/benchmark-release/RunDSSAT.swift
   SwiftApps/DSSAT/benchmark-release/bin/RunDSSAT.sh
   SwiftApps/DSSAT/benchmark-release/gridLists/gridList10.txt
   SwiftApps/DSSAT/benchmark-release/gridLists/gridList1000.txt
   SwiftApps/DSSAT/benchmark-release/gridLists/gridList10000.txt
   SwiftApps/DSSAT/benchmark-release/gridLists/gridList100000.txt
   SwiftApps/DSSAT/benchmark-release/gridLists/gridList40000.txt
   SwiftApps/DSSAT/benchmark-release/gridLists/gridList80000.txt
Log:
gridLists should start at 00000000
Add localhost template
Updated RunDSSAT.swift and RunDSSAT.sh


Modified: SwiftApps/DSSAT/benchmark-release/RunDSSAT.swift
===================================================================
--- SwiftApps/DSSAT/benchmark-release/RunDSSAT.swift	2012-04-27 20:52:10 UTC (rev 5763)
+++ SwiftApps/DSSAT/benchmark-release/RunDSSAT.swift	2012-04-27 21:39:20 UTC (rev 5764)
@@ -1,8 +1,8 @@
 type file;
 
-app (file output) RunDSSAT (file input[])
+app (file output) RunDSSAT (string input_directory, string refdatapath, string campaignpath, string binpath)
 {
-  RunDSSAT @output @input ;
+  RunDSSAT @output input_directory refdatapath campaignpath binpath;
 }
 
 //This is unused at the moment since it was used to check bad cells (bad cell means that the cell doesn't have soil files)
@@ -11,21 +11,11 @@
   gridCheck @output path;
 }
 
-//gridList.txt contains the list of good grid cells
-//file gl <"gridList.txt">;
-
-//gridCheck app discards empty grid cells or those containing unusable files 
-//gl = gridCheck(@arg("path","/gpfs/pads/projects/CI-SES000031/data/dssat/grid/"));
-
 string gridLists[] = readData("gridList.txt");
 
-foreach g,i in gridLists
-{
-//file out<single_file_mapper;file=@strcat("output/",gridLists[i],"output.tar")>;
-file out<concurrent_mapper;prefix="output", suffix=".tar">;
-
-file in1[] <filesys_mapper;location=@strcat(@arg("path","/gpfs/pads/projects/CI-SES000031/data/dssat/grid/"), gridLists[i]), pattern="*">;
-
-out = RunDSSAT(in1);
+foreach g,i in gridLists{
+ file out <single_file_mapper; file=@strcat("output/", gridLists[i], "output.tar")>;
+ string input_directory = @strcat(@arg("cmppath"), "/", gridLists[i]);
+ out = RunDSSAT(input_directory, @arg("refdata"), @arg("campaign"), @arg("bindata"));
 }
 

Modified: SwiftApps/DSSAT/benchmark-release/bin/RunDSSAT.sh
===================================================================
--- SwiftApps/DSSAT/benchmark-release/bin/RunDSSAT.sh	2012-04-27 20:52:10 UTC (rev 5763)
+++ SwiftApps/DSSAT/benchmark-release/bin/RunDSSAT.sh	2012-04-27 21:39:20 UTC (rev 5764)
@@ -1,32 +1,60 @@
 #!/bin/bash
 
-rm -rf run
-mkdir run
-cd run
-mkdir data
+dssatdir=/dev/shm/dssat
+dssattmp=/dev/shm/dssat.tmp
+
 out=$1
+indata=$2
+refdata=$3
+campaign=$4
+binpath=$5
 
-#copy files of grid cell into data directory
-for i in $2
-do
-  cp ../$i data;
-done
-                                              
-cp /gpfs/pads/projects/CI-SES000031/csm/sim/* data          
-cp /gpfs/pads/projects/CI-SES000031/csm/*.CDE data
+if [ ! -d $dssatdir ]; then
+  if mkdir $dssattmp 2>/dev/null; then
+    echo $$ copying
+    savewd=$PWD
+    cd $dssattmp
 
-cp /gpfs/pads/projects/CI-SES000031/csm/dssat.papia/bin/*.EXE .
-cd data                                                             
+    mkdir -p refdata
+    cp $refdata/* refdata/
 
-../DSSAT040.EXE A H1234567.MZX > RESULT.OUT
- 
+    mkdir -p campaign
+    cp $campaign/*.MZX campaign/
+    
+    mkdir -p binpath
+    cp $binpath/*.EXE binpath/
+
+    cd $savewd
+    mv $dssattmp $dssatdir
+  else
+    while [ ! -d $dssatdir ]; do
+      echo $$ sleeping
+      sleep 1;
+    done
+  fi
+fi
+
+mkdir -p data
+
+ln -s $indata/* data
+ln -s $dssatdir/refdata/* data
+ln -s $dssatdir/campaign/*.MZX data
+ln -s $dssatdir/binpath/*.EXE .
+
+# Run 
+cd data
+../DSSAT040.EXE A X1234567.MZX > RESULT.OUT 2>&1
+exit_status=$?
 cd ..
-mkdir output
 
-mv data/*.OUT output
-mv data/RESULT.OUT output
+# Tar
+mkdir -p output
+cp data/*.OUT output
+tar cf $out output
 
-tar cf ../$out output
+if [ "$exit_status" -ne 0 ]; then
+    echo $2 | awk '{ print $1 }' >> FailedList.txt
+fi
 
 exit
 

Added: SwiftApps/DSSAT/benchmark-release/conf/sites.localhost.xml
===================================================================
--- SwiftApps/DSSAT/benchmark-release/conf/sites.localhost.xml	                        (rev 0)
+++ SwiftApps/DSSAT/benchmark-release/conf/sites.localhost.xml	2012-04-27 21:39:20 UTC (rev 5764)
@@ -0,0 +1,9 @@
+<config>
+  <pool handle="localhost">
+    <filesystem provider="local" />
+    <execution provider="coaster" jobmanager="local:local"/>
+    <profile namespace="karajan"  key="jobthrottle">0.0099</profile>
+    <profile namespace="karajan"  key="initialScore">10000</profile>
+    <workdirectory>_WORK_</workdirectory>
+  </pool>
+</config>

Modified: SwiftApps/DSSAT/benchmark-release/gridLists/gridList10.txt
===================================================================
--- SwiftApps/DSSAT/benchmark-release/gridLists/gridList10.txt	2012-04-27 20:52:10 UTC (rev 5763)
+++ SwiftApps/DSSAT/benchmark-release/gridLists/gridList10.txt	2012-04-27 21:39:20 UTC (rev 5764)
@@ -1,3 +1,4 @@
+0000000
 0000001
 0000002
 0000003
@@ -7,4 +8,3 @@
 0000007
 0000008
 0000009
-0000010

Modified: SwiftApps/DSSAT/benchmark-release/gridLists/gridList1000.txt
===================================================================
--- SwiftApps/DSSAT/benchmark-release/gridLists/gridList1000.txt	2012-04-27 20:52:10 UTC (rev 5763)
+++ SwiftApps/DSSAT/benchmark-release/gridLists/gridList1000.txt	2012-04-27 21:39:20 UTC (rev 5764)
@@ -1,3 +1,4 @@
+0000000
 0000001
 0000002
 0000003
@@ -997,4 +998,3 @@
 0000997
 0000998
 0000999
-0001000

Modified: SwiftApps/DSSAT/benchmark-release/gridLists/gridList10000.txt
===================================================================
--- SwiftApps/DSSAT/benchmark-release/gridLists/gridList10000.txt	2012-04-27 20:52:10 UTC (rev 5763)
+++ SwiftApps/DSSAT/benchmark-release/gridLists/gridList10000.txt	2012-04-27 21:39:20 UTC (rev 5764)
@@ -1,3 +1,4 @@
+0000000
 0000001
 0000002
 0000003
@@ -9997,4 +9998,3 @@
 0009997
 0009998
 0009999
-0010000

Modified: SwiftApps/DSSAT/benchmark-release/gridLists/gridList100000.txt
===================================================================
--- SwiftApps/DSSAT/benchmark-release/gridLists/gridList100000.txt	2012-04-27 20:52:10 UTC (rev 5763)
+++ SwiftApps/DSSAT/benchmark-release/gridLists/gridList100000.txt	2012-04-27 21:39:20 UTC (rev 5764)
@@ -1,3 +1,4 @@
+0000000
 0000001
 0000002
 0000003
@@ -99997,4 +99998,3 @@
 0099997
 0099998
 0099999
-0100000

Modified: SwiftApps/DSSAT/benchmark-release/gridLists/gridList40000.txt
===================================================================
--- SwiftApps/DSSAT/benchmark-release/gridLists/gridList40000.txt	2012-04-27 20:52:10 UTC (rev 5763)
+++ SwiftApps/DSSAT/benchmark-release/gridLists/gridList40000.txt	2012-04-27 21:39:20 UTC (rev 5764)
@@ -1,3 +1,4 @@
+0000000
 0000001
 0000002
 0000003
@@ -39997,4 +39998,3 @@
 0039997
 0039998
 0039999
-0040000

Modified: SwiftApps/DSSAT/benchmark-release/gridLists/gridList80000.txt
===================================================================
--- SwiftApps/DSSAT/benchmark-release/gridLists/gridList80000.txt	2012-04-27 20:52:10 UTC (rev 5763)
+++ SwiftApps/DSSAT/benchmark-release/gridLists/gridList80000.txt	2012-04-27 21:39:20 UTC (rev 5764)
@@ -1,3 +1,4 @@
+0000000
 0000001
 0000002
 0000003
@@ -79997,4 +79998,3 @@
 0079997
 0079998
 0079999
-0080000




More information about the Swift-commit mailing list