From davidk at ci.uchicago.edu Mon Jul 1 11:33:46 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Mon, 1 Jul 2013 11:33:46 -0500 (CDT) Subject: [Swift-commit] r6591 - in SwiftApps/strains: . midway Message-ID: <20130701163346.BDFFB9D897@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-01 11:33:46 -0500 (Mon, 01 Jul 2013) New Revision: 6591 Added: SwiftApps/strains/midway/ SwiftApps/strains/midway/FitPosOrStrains SwiftApps/strains/midway/clean.sh SwiftApps/strains/midway/sites.xml SwiftApps/strains/midway/strains.sh SwiftApps/strains/midway/strains.swift SwiftApps/strains/midway/tc.data Log: Strains swift script for midway Added: SwiftApps/strains/midway/FitPosOrStrains =================================================================== (Binary files differ) Property changes on: SwiftApps/strains/midway/FitPosOrStrains ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: SwiftApps/strains/midway/clean.sh =================================================================== --- SwiftApps/strains/midway/clean.sh (rev 0) +++ SwiftApps/strains/midway/clean.sh 2013-07-01 16:33:46 UTC (rev 6591) @@ -0,0 +1,3 @@ +#!/bin/bash -x + +rm -rf *.log *.rlog *.d *.kml *.swiftx SpotsToIndex*.csv FitBest_*.csv OrientPosIndexer_*.csv NrDiffIndexerFit_*.csv Property changes on: SwiftApps/strains/midway/clean.sh ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/strains/midway/sites.xml =================================================================== --- SwiftApps/strains/midway/sites.xml (rev 0) +++ SwiftApps/strains/midway/sites.xml 2013-07-01 16:33:46 UTC (rev 6591) @@ -0,0 +1,13 @@ + + + + 12 + 00:10:00 + 100 + 100 + bigmem + 10000 + + /scratch/midway/{env.USER} + + Added: SwiftApps/strains/midway/strains.sh =================================================================== --- SwiftApps/strains/midway/strains.sh (rev 0) +++ SwiftApps/strains/midway/strains.sh 2013-07-01 16:33:46 UTC (rev 6591) @@ -0,0 +1,4 @@ +#!/bin/bash + +cat SpotsToIndex.*.csv > SpotsToIndex.csv +/home/davidkelly999/strains/bin/run_FitPosOrStrains.sh /software/matlab-2012a-x86_64 Property changes on: SwiftApps/strains/midway/strains.sh ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/strains/midway/strains.swift =================================================================== --- SwiftApps/strains/midway/strains.swift (rev 0) +++ SwiftApps/strains/midway/strains.swift 2013-07-01 16:33:46 UTC (rev 6591) @@ -0,0 +1,27 @@ +type file; + +app (file o, file e, file fb, file nrd, file ori) strains (file pos, file extra, file param, file spotsti) +{ + strains stdout=@o stderr=@e; +} + +file extrainfo <"InputAllExtraInfoFittingAll.csv">; +file params <"paramstest.txt">; + +int spots[] = readData("spots.txt"); + +foreach i in spots { + file SpotsToIndex ; + SpotsToIndex=writeData(i); + + string spotlong = @strcut(@strcat("0000000", i), "([0-9]........$)"); + file bestpos ; + file fitbest ; + file nrdiff ; + file orient ; + + file olog ; + file elog ; + (olog, elog, fitbest, nrdiff, orient) = strains(bestpos, extrainfo, params, SpotsToIndex); +} + Added: SwiftApps/strains/midway/tc.data =================================================================== --- SwiftApps/strains/midway/tc.data (rev 0) +++ SwiftApps/strains/midway/tc.data 2013-07-01 16:33:46 UTC (rev 6591) @@ -0,0 +1 @@ +midway-westmere strains /home/davidkelly999/strains/midway/strains.sh From swift at ci.uchicago.edu Mon Jul 1 15:00:02 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Mon, 1 Jul 2013 15:00:02 -0500 (CDT) Subject: [Swift-commit] cog r3675 Message-ID: <20130701200002.DD7088D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3675 | hategan | 2013-07-01 14:58:32 -0500 (Mon, 01 Jul 2013) | 1 line only set processed property in import after the actual import to prevent marking as imported a file that has errors ------------------------------------------------------------------------ Index: modules/karajan/src/org/globus/cog/karajan/workflow/nodes/Include.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/nodes/Include.java (revision 3674) +++ modules/karajan/src/org/globus/cog/karajan/workflow/nodes/Include.java (working copy) @@ -156,7 +156,6 @@ if (hasProperty("_processed")) { return; } - setProperty("_processed", elementCount()); A_FILE.setStatic(this, iname); logger.debug("Importing: " + iname); Reader reader = null; @@ -290,6 +289,7 @@ throw new ExecutionException("Internal error. No reader set"); } } + setProperty("_processed", elementCount()); } public void loadStarted() { From swift at ci.uchicago.edu Mon Jul 1 15:35:02 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Mon, 1 Jul 2013 15:35:02 -0500 (CDT) Subject: [Swift-commit] cog r3676 Message-ID: <20130701203502.D768A8D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3676 | hategan | 2013-07-01 15:32:05 -0500 (Mon, 01 Jul 2013) | 1 line correctly set _path property for import node rather than root node ------------------------------------------------------------------------ Index: modules/karajan/src/org/globus/cog/karajan/workflow/nodes/Include.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/nodes/Include.java (revision 3675) +++ modules/karajan/src/org/globus/cog/karajan/workflow/nodes/Include.java (working copy) @@ -276,7 +276,7 @@ XMLConverter.read(this, tree, new KarajanTranslator(reader, iname).translate(), iname, false); } - tree.getRoot().setProperty("_path", dir); + setProperty("_path", dir); reader.close(); } catch (Exception e) { From davidk at ci.uchicago.edu Tue Jul 2 11:58:37 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Tue, 2 Jul 2013 11:58:37 -0500 (CDT) Subject: [Swift-commit] r6592 - SwiftApps/strains/midway Message-ID: <20130702165837.1E0DA187CC1@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-02 11:58:36 -0500 (Tue, 02 Jul 2013) New Revision: 6592 Added: SwiftApps/strains/midway/Output/ SwiftApps/strains/midway/badspots.txt SwiftApps/strains/midway/cf SwiftApps/strains/midway/logs/ SwiftApps/strains/midway/run.sh SwiftApps/strains/midway/spots.txt Removed: SwiftApps/strains/midway/FitPosOrStrains Modified: SwiftApps/strains/midway/clean.sh SwiftApps/strains/midway/sites.xml SwiftApps/strains/midway/strains.swift Log: Updated swift config file Remove 'bad' spots, for now Deleted: SwiftApps/strains/midway/FitPosOrStrains =================================================================== (Binary files differ) Added: SwiftApps/strains/midway/badspots.txt =================================================================== --- SwiftApps/strains/midway/badspots.txt (rev 0) +++ SwiftApps/strains/midway/badspots.txt 2013-07-02 16:58:36 UTC (rev 6592) @@ -0,0 +1,7 @@ +1873 +10840 +14640 +14936 +2765 +10954 +12143 Added: SwiftApps/strains/midway/cf =================================================================== --- SwiftApps/strains/midway/cf (rev 0) +++ SwiftApps/strains/midway/cf 2013-07-02 16:58:36 UTC (rev 6592) @@ -0,0 +1,9 @@ +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +status.mode=provider +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=true +sitedir.keep=true +file.gc.enabled=false Modified: SwiftApps/strains/midway/clean.sh =================================================================== --- SwiftApps/strains/midway/clean.sh 2013-07-01 16:33:46 UTC (rev 6591) +++ SwiftApps/strains/midway/clean.sh 2013-07-02 16:58:36 UTC (rev 6592) @@ -1,3 +1,3 @@ #!/bin/bash -x -rm -rf *.log *.rlog *.d *.kml *.swiftx SpotsToIndex*.csv FitBest_*.csv OrientPosIndexer_*.csv NrDiffIndexerFit_*.csv +rm -rf Results/* logs/* *.log *.rlog *.d *.kml *.swiftx SpotsToIndex*.csv FitBest_*.csv OrientPosIndexer_*.csv NrDiffIndexerFit_*.csv Added: SwiftApps/strains/midway/run.sh =================================================================== --- SwiftApps/strains/midway/run.sh (rev 0) +++ SwiftApps/strains/midway/run.sh 2013-07-02 16:58:36 UTC (rev 6592) @@ -0,0 +1,3 @@ +#!/bin/bash + +swift -sites.file sites.xml -tc.file tc.data -config cf strains.swift Property changes on: SwiftApps/strains/midway/run.sh ___________________________________________________________________ Added: svn:executable + * Modified: SwiftApps/strains/midway/sites.xml =================================================================== --- SwiftApps/strains/midway/sites.xml 2013-07-01 16:33:46 UTC (rev 6591) +++ SwiftApps/strains/midway/sites.xml 2013-07-02 16:58:36 UTC (rev 6592) @@ -1,11 +1,15 @@ - 12 - 00:10:00 + 16 + 00:20:00 100 100 - bigmem + sandyb + 1 + 1 + 9 + 9 10000 /scratch/midway/{env.USER} Added: SwiftApps/strains/midway/spots.txt =================================================================== --- SwiftApps/strains/midway/spots.txt (rev 0) +++ SwiftApps/strains/midway/spots.txt 2013-07-02 16:58:36 UTC (rev 6592) @@ -0,0 +1,140 @@ +67 +166 +269 +366 +467 +577 +683 +768 +882 +985 +1082 +1168 +1280 +1374 +1476 +1572 +1672 +1772 +1975 +2066 +2160 +2260 +2373 +2472 +2563 +2665 +2861 +2960 +3056 +3153 +3361 +3452 +3560 +3660 +3763 +3870 +3954 +4070 +4155 +4263 +4368 +4464 +4557 +4657 +4761 +4858 +4958 +5062 +5159 +5258 +5358 +5459 +5552 +5661 +5759 +5855 +5957 +6153 +6258 +6454 +6551 +6650 +6759 +6859 +6954 +7059 +7151 +7250 +7350 +7452 +7550 +7651 +7750 +7856 +7960 +8056 +8145 +8242 +8351 +8446 +8544 +8649 +8751 +8851 +8948 +9049 +9142 +9240 +9342 +9445 +9559 +9660 +9760 +9850 +9948 +10043 +10143 +10253 +10353 +10451 +10549 +10651 +10748 +11044 +11146 +11246 +11346 +11443 +11543 +11648 +11749 +11849 +11942 +12048 +12245 +12344 +12444 +12540 +12645 +12746 +12846 +12951 +13047 +13143 +13250 +13349 +13445 +13538 +13632 +13753 +13842 +13944 +14048 +14150 +14252 +14349 +14452 +14540 +14747 +14834 Modified: SwiftApps/strains/midway/strains.swift =================================================================== --- SwiftApps/strains/midway/strains.swift 2013-07-01 16:33:46 UTC (rev 6591) +++ SwiftApps/strains/midway/strains.swift 2013-07-02 16:58:36 UTC (rev 6592) @@ -20,8 +20,8 @@ file nrdiff ; file orient ; - file olog ; - file elog ; + file olog ; + file elog ; (olog, elog, fitbest, nrdiff, orient) = strains(bestpos, extrainfo, params, SpotsToIndex); } From davidk at ci.uchicago.edu Tue Jul 2 13:36:19 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Tue, 2 Jul 2013 13:36:19 -0500 (CDT) Subject: [Swift-commit] r6593 - branches/release-0.94/tests/sites Message-ID: <20130702183619.3CABA187CC1@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-02 13:36:19 -0500 (Tue, 02 Jul 2013) New Revision: 6593 Removed: branches/release-0.94/tests/sites/pads/ branches/release-0.94/tests/sites/queenbee/ branches/release-0.94/tests/sites/ranger/ Log: Remove old decommissioned sites From davidk at ci.uchicago.edu Tue Jul 2 13:39:25 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Tue, 2 Jul 2013 13:39:25 -0500 (CDT) Subject: [Swift-commit] r6594 - in SwiftApps/strains: . bin Message-ID: <20130702183925.652EC187CC1@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-02 13:39:25 -0500 (Tue, 02 Jul 2013) New Revision: 6594 Added: SwiftApps/strains/bin/ SwiftApps/strains/bin/FitPosOrStrains SwiftApps/strains/bin/run_FitPosOrStrains.sh Log: FitPosOrStrains and run_FitPosOrStrains.sh Added: SwiftApps/strains/bin/FitPosOrStrains =================================================================== (Binary files differ) Property changes on: SwiftApps/strains/bin/FitPosOrStrains ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: SwiftApps/strains/bin/run_FitPosOrStrains.sh =================================================================== --- SwiftApps/strains/bin/run_FitPosOrStrains.sh (rev 0) +++ SwiftApps/strains/bin/run_FitPosOrStrains.sh 2013-07-02 18:39:25 UTC (rev 6594) @@ -0,0 +1,39 @@ +#!/bin/sh +# script for execution of deployed applications +# +# Sets up the MCR environment for the current $ARCH and executes +# the specified command. +# +exe_name=$0 +exe_dir=`dirname "$0"` +echo "------------------------------------------" +if [ "x$1" = "x" ]; then + echo Usage: + echo $0 \ args +else + echo Setting up environment variables + MCRROOT="$1" + echo --- + LD_LIBRARY_PATH=.:${MCRROOT}/runtime/glnxa64 ; + LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRROOT}/bin/glnxa64 ; + LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRROOT}/sys/os/glnxa64; + MCRJRE=${MCRROOT}/sys/java/jre/glnxa64/jre/lib/amd64 ; + LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRJRE}/native_threads ; + LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRJRE}/server ; + LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRJRE}/client ; + LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRJRE} ; + XAPPLRESDIR=${MCRROOT}/X11/app-defaults ; + export LD_LIBRARY_PATH; + export XAPPLRESDIR; + echo LD_LIBRARY_PATH is ${LD_LIBRARY_PATH}; + shift 1 + args= + while [ $# -gt 0 ]; do + token=`echo "$1" | sed 's/ /\\\\ /g'` # Add blackslash before each blank + args="${args} ${token}" + shift + done + "${exe_dir}"/FitPosOrStrains $args +fi +exit + Property changes on: SwiftApps/strains/bin/run_FitPosOrStrains.sh ___________________________________________________________________ Added: svn:executable + * From davidk at ci.uchicago.edu Tue Jul 2 17:27:03 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Tue, 2 Jul 2013 17:27:03 -0500 (CDT) Subject: [Swift-commit] r6601 - in SwiftApps/strains: . orthros Message-ID: <20130702222703.96291187CC1@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-02 17:27:03 -0500 (Tue, 02 Jul 2013) New Revision: 6601 Added: SwiftApps/strains/orthros/ SwiftApps/strains/orthros/Output/ SwiftApps/strains/orthros/Results/ SwiftApps/strains/orthros/badspots.txt SwiftApps/strains/orthros/cf SwiftApps/strains/orthros/clean.sh SwiftApps/strains/orthros/logs/ SwiftApps/strains/orthros/paramstest.txt SwiftApps/strains/orthros/run.sh SwiftApps/strains/orthros/sites.xml SwiftApps/strains/orthros/spots.txt SwiftApps/strains/orthros/spots.txt.orig SwiftApps/strains/orthros/strains.sh SwiftApps/strains/orthros/strains.swift SwiftApps/strains/orthros/tc.data Log: Orthros configs Added: SwiftApps/strains/orthros/badspots.txt =================================================================== --- SwiftApps/strains/orthros/badspots.txt (rev 0) +++ SwiftApps/strains/orthros/badspots.txt 2013-07-02 22:27:03 UTC (rev 6601) @@ -0,0 +1,7 @@ +1873 +10840 +14640 +14936 +2765 +10954 +12143 Added: SwiftApps/strains/orthros/cf =================================================================== --- SwiftApps/strains/orthros/cf (rev 0) +++ SwiftApps/strains/orthros/cf 2013-07-02 22:27:03 UTC (rev 6601) @@ -0,0 +1,9 @@ +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +status.mode=provider +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=true +sitedir.keep=true +file.gc.enabled=false Added: SwiftApps/strains/orthros/clean.sh =================================================================== --- SwiftApps/strains/orthros/clean.sh (rev 0) +++ SwiftApps/strains/orthros/clean.sh 2013-07-02 22:27:03 UTC (rev 6601) @@ -0,0 +1,3 @@ +#!/bin/bash -x + +rm -rf Results/* logs/* *.log *.rlog *.d *.kml *.swiftx SpotsToIndex*.csv FitBest_*.csv OrientPosIndexer_*.csv NrDiffIndexerFit_*.csv Property changes on: SwiftApps/strains/orthros/clean.sh ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/strains/orthros/paramstest.txt =================================================================== --- SwiftApps/strains/orthros/paramstest.txt (rev 0) +++ SwiftApps/strains/orthros/paramstest.txt 2013-07-02 22:27:03 UTC (rev 6601) @@ -0,0 +1,33 @@ +LatticeConstant 3.550000; +CellStruct 2.000000; +Wavelength 0.141000; +Distance 315696.000000; +Rsample 500.000000; +Hbeam 500.000000; +StepsizePos 5.000000; +StepsizeOrient 0.200000; +MarginRadius 10.000000; +OmeBinSize 0.100000; +EtaBinSize 0.100000; +ExcludePoleAngle 6; +RingNumbers 1.000000; +RingNumbers 2.000000; +RingNumbers 3.000000; +RingNumbers 4.000000; +RingRadii 21757.300153; +RingRadii 25137.927663; +RingRadii 35634.653342; +RingRadii 41860.082190; +UseFriedelPairs 1.000000; +Wedge 0.000000; +OmegaRange -180.00 0.00 +OmegaRange 0.00 180.00 +BoxSize -100000.00 100000.00 -100000.00 100000.00 +BoxSize -100000.00 100000.00 -100000.00 100000.00 +MarginEta 150.000000; +MarginOme 1.000000; +MarginRadial 150.000000; +MinMatchesToAcceptFrac 0.900000; +SpotsFileName InputAll.csv +IDsFileName SpotsToIndex.csv +OutputFolder Output Added: SwiftApps/strains/orthros/run.sh =================================================================== --- SwiftApps/strains/orthros/run.sh (rev 0) +++ SwiftApps/strains/orthros/run.sh 2013-07-02 22:27:03 UTC (rev 6601) @@ -0,0 +1,3 @@ +#!/bin/bash + +swift -sites.file sites.xml -tc.file tc.data -config cf strains.swift Property changes on: SwiftApps/strains/orthros/run.sh ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/strains/orthros/sites.xml =================================================================== --- SwiftApps/strains/orthros/sites.xml (rev 0) +++ SwiftApps/strains/orthros/sites.xml 2013-07-02 22:27:03 UTC (rev 6601) @@ -0,0 +1,16 @@ + + + + 16 + 00:20:00 + 100 + 100 + 1 + 20 + 10000 + sec1all.q --> + sec1_all --> + + /clhome/WILDE/strains/swiftwork + + Added: SwiftApps/strains/orthros/spots.txt =================================================================== --- SwiftApps/strains/orthros/spots.txt (rev 0) +++ SwiftApps/strains/orthros/spots.txt 2013-07-02 22:27:03 UTC (rev 6601) @@ -0,0 +1 @@ +67 Added: SwiftApps/strains/orthros/spots.txt.orig =================================================================== --- SwiftApps/strains/orthros/spots.txt.orig (rev 0) +++ SwiftApps/strains/orthros/spots.txt.orig 2013-07-02 22:27:03 UTC (rev 6601) @@ -0,0 +1,140 @@ +67 +166 +269 +366 +467 +577 +683 +768 +882 +985 +1082 +1168 +1280 +1374 +1476 +1572 +1672 +1772 +1975 +2066 +2160 +2260 +2373 +2472 +2563 +2665 +2861 +2960 +3056 +3153 +3361 +3452 +3560 +3660 +3763 +3870 +3954 +4070 +4155 +4263 +4368 +4464 +4557 +4657 +4761 +4858 +4958 +5062 +5159 +5258 +5358 +5459 +5552 +5661 +5759 +5855 +5957 +6153 +6258 +6454 +6551 +6650 +6759 +6859 +6954 +7059 +7151 +7250 +7350 +7452 +7550 +7651 +7750 +7856 +7960 +8056 +8145 +8242 +8351 +8446 +8544 +8649 +8751 +8851 +8948 +9049 +9142 +9240 +9342 +9445 +9559 +9660 +9760 +9850 +9948 +10043 +10143 +10253 +10353 +10451 +10549 +10651 +10748 +11044 +11146 +11246 +11346 +11443 +11543 +11648 +11749 +11849 +11942 +12048 +12245 +12344 +12444 +12540 +12645 +12746 +12846 +12951 +13047 +13143 +13250 +13349 +13445 +13538 +13632 +13753 +13842 +13944 +14048 +14150 +14252 +14349 +14452 +14540 +14747 +14834 Added: SwiftApps/strains/orthros/strains.sh =================================================================== --- SwiftApps/strains/orthros/strains.sh (rev 0) +++ SwiftApps/strains/orthros/strains.sh 2013-07-02 22:27:03 UTC (rev 6601) @@ -0,0 +1,4 @@ +#!/bin/bash + +cat SpotsToIndex.*.csv > SpotsToIndex.csv +/clhome/WILDE/strains/bin/run_FitPosOrStrains.sh /clhome/WILDE/strains/bin/v717 Property changes on: SwiftApps/strains/orthros/strains.sh ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/strains/orthros/strains.swift =================================================================== --- SwiftApps/strains/orthros/strains.swift (rev 0) +++ SwiftApps/strains/orthros/strains.swift 2013-07-02 22:27:03 UTC (rev 6601) @@ -0,0 +1,27 @@ +type file; + +app (file o, file e, file fb, file nrd, file ori) strains (file pos, file extra, file param, file spotsti) +{ + strains stdout=@o stderr=@e; +} + +file extrainfo <"InputAllExtraInfoFittingAll.csv">; +file params <"paramstest.txt">; + +int spots[] = readData("spots.txt"); + +foreach i in spots { + file SpotsToIndex ; + SpotsToIndex=writeData(i); + + string spotlong = @strcut(@strcat("0000000", i), "([0-9]........$)"); + file bestpos ; + file fitbest ; + file nrdiff ; + file orient ; + + file olog ; + file elog ; + (olog, elog, fitbest, nrdiff, orient) = strains(bestpos, extrainfo, params, SpotsToIndex); +} + Added: SwiftApps/strains/orthros/tc.data =================================================================== --- SwiftApps/strains/orthros/tc.data (rev 0) +++ SwiftApps/strains/orthros/tc.data 2013-07-02 22:27:03 UTC (rev 6601) @@ -0,0 +1 @@ +orthros strains /clhome/WILDE/strains/orthros/strains.sh From swift at ci.uchicago.edu Wed Jul 3 20:45:03 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Wed, 3 Jul 2013 20:45:03 -0500 (CDT) Subject: [Swift-commit] cog r3677 Message-ID: <20130704014504.33D388D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3677 | hategan | 2013-07-03 20:41:23 -0500 (Wed, 03 Jul 2013) | 1 line added redirect ability to coasters ------------------------------------------------------------------------ Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/local/JobStatusHandler.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/local/JobStatusHandler.java (revision 3676) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/local/JobStatusHandler.java (working copy) @@ -31,6 +31,8 @@ int code = getInDataAsInt(2); String message = getInDataAsString(3); + String out = null, err = null; + Status s = new StatusImpl(); s.setStatusCode(status); if (status == Status.FAILED && code != 0) { @@ -41,13 +43,17 @@ s.setException(new JobException(code)); } } + if (status == Status.FAILED || status == Status.COMPLETED) { + if (getInDataSize() == 7) { + out = getInDataAsString(5); + err = getInDataAsString(6); + } + } if (message != null && !message.equals("")) { s.setMessage(message); } - if (getInDataChunks().size() > 4) { - s.setTime(new Date(this.getInDataAsLong(4))); - } - NotificationManager.getDefault().notificationReceived(jobId, s); + s.setTime(new Date(this.getInDataAsLong(4))); + NotificationManager.getDefault().notificationReceived(jobId, s, out, err); sendReply("OK"); } catch (Exception e) { Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/JobStatusCommand.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/JobStatusCommand.java (revision 3676) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/JobStatusCommand.java (working copy) @@ -13,22 +13,32 @@ import java.io.PrintWriter; import java.io.StringWriter; +import org.apache.log4j.Logger; import org.globus.cog.abstraction.impl.common.execution.JobException; import org.globus.cog.abstraction.interfaces.Status; import org.globus.cog.karajan.workflow.service.ProtocolException; import org.globus.cog.karajan.workflow.service.commands.Command; public class JobStatusCommand extends Command { + public static final Logger logger = Logger.getLogger(JobStatusCommand.class); + public static final String NAME = "JOBSTATUS"; private String taskId; private Status status; + private String out, err; public JobStatusCommand(String taskId, Status status) { super(NAME); this.taskId = taskId; this.status = status; } + + public JobStatusCommand(String taskId, Status status, String out, String err) { + this(taskId, status); + this.out = out; + this.err = err; + } public void send() throws ProtocolException { @@ -63,5 +73,12 @@ } addOutData(sb.toString()); addOutData(status.getTime().getTime()); + if (out != null && err != null) { + addOutData(out); + addOutData(err); + } + else if (out != null || err != null) { + logger.warn("Only one of job STDOUT or STDERR is non-null"); + } } } Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/ExtendedStatusListener.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/ExtendedStatusListener.java (revision 0) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/ExtendedStatusListener.java (revision 3677) @@ -0,0 +1,7 @@ +package org.globus.cog.abstraction.coaster.service.job.manager; + +import org.globus.cog.abstraction.interfaces.Status; + +public interface ExtendedStatusListener { + public void statusChanged(Status s, String out, String err); +} Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/TaskNotifier.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/TaskNotifier.java (revision 3676) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/TaskNotifier.java (working copy) @@ -9,11 +9,7 @@ */ package org.globus.cog.abstraction.coaster.service.job.manager; -import java.util.LinkedList; -import java.util.TimerTask; - import org.apache.log4j.Logger; -import org.globus.cog.abstraction.coaster.service.CoasterService; import org.globus.cog.abstraction.coaster.service.JobStatusCommand; import org.globus.cog.abstraction.impl.common.StatusEvent; import org.globus.cog.abstraction.impl.execution.coaster.NotificationManager; @@ -26,64 +22,47 @@ import org.globus.cog.karajan.workflow.service.commands.Command; import org.globus.cog.karajan.workflow.service.commands.Command.Callback; -public class TaskNotifier implements StatusListener, Callback { +public class TaskNotifier implements StatusListener, ExtendedStatusListener, Callback { public static final Logger logger = Logger.getLogger(TaskNotifier.class); - public static final int CONGESTION_THRESHOLD = 64; - private ChannelContext channelContext; private Task task; private KarajanChannel channel; private static int notacknowledged; - private static LinkedList queue; - static { - queue = new LinkedList(); - CoasterService.addPeriodicWatchdog(new TimerTask() { - public void run() { - synchronized (TaskNotifier.class) { - if (logger.isInfoEnabled()) { - logger.info("Congestion queue size: " + queue.size()); - } - checkQueue(); - } - } - }, 10000); - } - public TaskNotifier(Task task, ChannelContext channelContext) { this.task = task; this.channelContext = channelContext; - task.addStatusListener(this); - NotificationManager.getDefault().registerTask(task.getIdentity().getValue(), task); + this.task.addStatusListener(this); + NotificationManager.getDefault().registerTask(task.getIdentity().getValue(), task, this); } - + + public void statusChanged(StatusEvent event) { - int code = event.getStatus().getStatusCode(); + sendStatus(this, event.getStatus(), null, null); + } + + public void statusChanged(Status s, String out, String err) { + int code = s.getStatusCode(); if (code != Status.SUBMITTED && code != Status.SUBMITTING) { - sendStatus(this, event.getStatus()); + sendStatus(this, s, out, err); } } - public static synchronized void sendStatus(TaskNotifier tn, Status s) { - if (notacknowledged >= CONGESTION_THRESHOLD) { - queue.addLast(new Entry(tn, s)); - } - else { - String taskId = tn.task.getIdentity().toString(); - JobStatusCommand c = new JobStatusCommand(taskId, s); - try { - tn.channel = ChannelManager.getManager().reserveChannel(tn.channelContext); - if (s.isTerminal()) { - ChannelManager.getManager().releaseLongTerm(tn.channel); - } - c.executeAsync(tn.channel, tn); - notacknowledged++; + public static synchronized void sendStatus(TaskNotifier tn, Status s, String out, String err) { + String taskId = tn.task.getIdentity().toString(); + JobStatusCommand c = new JobStatusCommand(taskId, s, out, err); + try { + tn.channel = ChannelManager.getManager().reserveChannel(tn.channelContext); + if (s.isTerminal()) { + ChannelManager.getManager().releaseLongTerm(tn.channel); } - catch (Exception e) { - logger.warn("Failed to send task notification", e); - } + c.executeAsync(tn.channel, tn); + notacknowledged++; } + catch (Exception e) { + logger.warn("Failed to send task notification", e); + } } public void errorReceived(Command cmd, String msg, Exception t) { @@ -91,7 +70,6 @@ ChannelManager.getManager().releaseChannel(channel); synchronized(TaskNotifier.class) { notacknowledged--; - checkQueue(); } } @@ -99,24 +77,6 @@ ChannelManager.getManager().releaseChannel(channel); synchronized(TaskNotifier.class) { notacknowledged--; - checkQueue(); } } - - private static void checkQueue() { - if (notacknowledged < CONGESTION_THRESHOLD && !queue.isEmpty()) { - Entry e = queue.removeFirst(); - sendStatus(e.tn, e.s); - } - } - - private static class Entry { - TaskNotifier tn; - Status s; - - public Entry(TaskNotifier tn, Status s) { - this.tn = tn; - this.s = s; - } - } } 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 3676) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockTask.java (working copy) @@ -107,12 +107,11 @@ js.addArgument(join(settings.getCallbackURIs(), ",")); js.addArgument(block.getId()); - if (settings.getWorkerLoggingLevel().equals("NONE")) - { + settings.setWorkerLoggingLevel("DEBUG"); + if (settings.getWorkerLoggingLevel().equals("NONE")) { js.addArgument("NOLOGGING"); } - else - { + else { String logDir = settings.getWorkerLoggingDirectory(); if (logDir.equals("DEFAULT")) js.addArgument(Bootstrap.LOG_DIR.getAbsolutePath()); Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Job.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Job.java (revision 3676) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Job.java (working copy) @@ -15,6 +15,7 @@ import org.apache.log4j.Logger; import org.globus.cog.abstraction.impl.common.StatusImpl; import org.globus.cog.abstraction.impl.common.execution.WallTime; +import org.globus.cog.abstraction.impl.execution.coaster.NotificationManager; import org.globus.cog.abstraction.interfaces.JobSpecification; import org.globus.cog.abstraction.interfaces.Status; import org.globus.cog.abstraction.interfaces.Task; @@ -179,7 +180,8 @@ } public void fail(String message, Exception e) { - task.setStatus(new StatusImpl(Status.FAILED, message, e)); + NotificationManager.getDefault().notificationReceived(task.getIdentity().getValue(), + new StatusImpl(Status.FAILED, message, e), null, null); } public Task getTask() { 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 3676) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Cpu.java (working copy) @@ -346,7 +346,7 @@ bqp.jobTerminated(running); } if (running != null) { - running.fail("Task failed: " + msg, e); + running.fail("Block task failed: " + msg, e); } } Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Mpiexec.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Mpiexec.java (revision 3676) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Mpiexec.java (working copy) @@ -13,13 +13,11 @@ import org.apache.log4j.Logger; import org.globus.cog.abstraction.impl.common.IdentityImpl; -import org.globus.cog.abstraction.impl.common.StatusEvent; import org.globus.cog.abstraction.impl.execution.coaster.NotificationManager; import org.globus.cog.abstraction.interfaces.ExecutionService; import org.globus.cog.abstraction.interfaces.Identity; import org.globus.cog.abstraction.interfaces.JobSpecification; 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.util.ProcessListener; import org.globus.cog.util.ProcessMonitor; @@ -33,7 +31,7 @@ * * @author wozniak */ -public class Mpiexec implements ProcessListener, StatusListener { +public class Mpiexec implements ProcessListener, ExtendedStatusListener { public static final Logger logger = Logger.getLogger(Mpiexec.class); @@ -336,15 +334,12 @@ // Clone original job as proxy job Task clone = (Task) job.getTask().clone(); - // Set clone to notify this Mpiexec instance - clone.addStatusListener(this); - // Update Task Identity and set Notification Identity cloneID = new IdentityImpl(clone.getIdentity()); String value = cloneID.getValue() + ":" + i; cloneID.setValue(value); clone.setIdentity(cloneID); - NotificationManager.getDefault().registerTask(value, clone); + NotificationManager.getDefault().registerTask(value, clone, this); // Update Task Specification JobSpecification spec = (JobSpecification) clone.getSpecification(); @@ -399,10 +394,10 @@ * Multiplex Hydra proxy StatusEvents into the StatusEvents for * the original job */ - public void statusChanged(StatusEvent event) { - logger.debug(event); + public void statusChanged(Status s, String out, String err) { + logger.debug(s); synchronized (statusCount) { - int code = event.getStatus().getStatusCode(); + int code = s.getStatusCode(); Integer count = statusCount.get(code); if (count == null) count = 1; @@ -410,12 +405,11 @@ count++; statusCount.put(code, count); if (count == proxies.size()) - propagate(event); + propagate(s); } } - private void propagate(StatusEvent event) { - Status s = event.getStatus(); + private void propagate(Status s) { logger.debug("propagating: to: " + job + " " + s); job.getTask().setStatus(s); } Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/SubmitJobHandler.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/SubmitJobHandler.java (revision 3676) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/SubmitJobHandler.java (working copy) @@ -92,6 +92,7 @@ spec.setStdInput(helper.read("stdin")); spec.setStdOutput(helper.read("stdout")); spec.setStdError(helper.read("stderr")); + spec.setRedirected(helper.read("redirect") != null); String s; while ((s = helper.read("arg")) != null) { spec.addArgument(s); Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/NotificationManager.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/NotificationManager.java (revision 3676) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/NotificationManager.java (working copy) @@ -16,6 +16,7 @@ import java.util.Map; import org.apache.log4j.Logger; +import org.globus.cog.abstraction.coaster.service.job.manager.ExtendedStatusListener; import org.globus.cog.abstraction.impl.common.StatusImpl; import org.globus.cog.abstraction.interfaces.ServiceContact; import org.globus.cog.abstraction.interfaces.Status; @@ -42,56 +43,58 @@ /** Map from Task IDs to Tasks */ - private Map tasks; + private Map listeners; /** Map from Task IDs to Status updates that arrived before the Task existed in the Map {@link tasks} */ - private Map> pending; + private Map> pending; private long lastNotificationTime; public NotificationManager() { - tasks = new HashMap(); - pending = new HashMap>(); + listeners = new HashMap(); + pending = new HashMap>(); lastNotificationTime = System.currentTimeMillis(); } - public void registerTask(String id, Task task) { - List p; - synchronized (tasks) { - tasks.put(id, task); + public void registerTask(String id, Task task, ExtendedStatusListener l) { + List p; + synchronized (listeners) { + listeners.put(id, new TaskListenerPair(task, l)); p = pending.remove(id); } - if (p != null) - for (Status status : p) - setStatus(task, status); + if (p != null) { + for (ExtendedStatus e : p) { + notify(l, e); + } + } } - public void notificationReceived(String id, Status s) { + public void notificationReceived(String id, Status s, String out, String err) { if (logger.isDebugEnabled()) logger.debug("recvd: for: " + id + " " + s); - Task task; - synchronized (tasks) { + TaskListenerPair l; + synchronized (listeners) { if (s.isTerminal()) { - task = tasks.remove(id); + l = listeners.remove(id); } else { - task = tasks.get(id); + l = listeners.get(id); } lastNotificationTime = System.currentTimeMillis(); - if (task == null) { - addPending(id, s); + if (l == null) { + addPending(id, new ExtendedStatus(s, out, err)); } } - if (task != null) { - setStatus(task, s); + if (l != null) { + l.listener.statusChanged(s, out, err); } } public long getIdleTime() { - synchronized (tasks) { - if (tasks.size() == 0 && lastNotificationTime != 0) { + synchronized (listeners) { + if (listeners.size() == 0 && lastNotificationTime != 0) { return System.currentTimeMillis() - lastNotificationTime; } else { @@ -101,50 +104,72 @@ } public void notIdle() { - synchronized (tasks) { + synchronized (listeners) { lastNotificationTime = System.currentTimeMillis(); } } public int getActiveTaskCount() { - synchronized (tasks) { - return tasks.size(); + synchronized (listeners) { + return listeners.size(); } } - private void setStatus(Task t, Status s) { + private void notify(ExtendedStatusListener l, ExtendedStatus e) { try { - t.setStatus(s); + l.statusChanged(e.status, e.out, e.err); } - catch (Exception e) { - logger.warn("Could not set task status", e); + catch (Exception ex) { + logger.warn("Could not set task status", ex); } } - private void addPending(String id, Status status) { - List p = pending.get(id); + private void addPending(String id, ExtendedStatus es) { + List p = pending.get(id); if (p == null) { - p = new LinkedList(); + p = new LinkedList(); pending.put(id, p); } - p.add(status); + p.add(es); } public void serviceTaskEnded(ServiceContact contact1, String msg) { - List ts; - synchronized (tasks) { - ts = new ArrayList(tasks.values()); + List> ts; + synchronized (listeners) { + ts = new ArrayList>(listeners.entrySet()); } logger.info(contact1.toString()); - for (Task t : ts) { + for (Map.Entry e: ts) { ServiceContact contact2 = - t.getService(0).getServiceContact(); + e.getValue().task.getService(0).getServiceContact(); logger.info(contact2.toString()); if (contact2.equals(contact1)) - notificationReceived(t.getIdentity().toString(), + notificationReceived(e.getKey(), new StatusImpl(Status.FAILED, - msg, null)); + msg, null), null, null); } } + + private static final class ExtendedStatus { + public final Status status; + public final String out; + public final String err; + + public ExtendedStatus(Status status, String out, String err) { + this.status = status; + this.out = out; + this.err = err; + } + } + + private static final class TaskListenerPair { + public final Task task; + public final ExtendedStatusListener listener; + + public TaskListenerPair(Task task, ExtendedStatusListener listener) { + this.task = task; + this.listener = listener; + } + } } 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 3676) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/JobSubmissionTaskHandler.java (working copy) @@ -15,6 +15,7 @@ import java.util.regex.Pattern; import org.apache.log4j.Logger; +import org.globus.cog.abstraction.coaster.service.job.manager.ExtendedStatusListener; import org.globus.cog.abstraction.coaster.service.local.CoasterResourceTracker; import org.globus.cog.abstraction.coaster.service.local.LocalRequestManager; import org.globus.cog.abstraction.coaster.service.local.LocalService; @@ -42,7 +43,7 @@ import org.globus.cog.karajan.workflow.service.commands.Command.Callback; import org.ietf.jgss.GSSCredential; -public class JobSubmissionTaskHandler extends AbstractDelegatedTaskHandler implements Callback { +public class JobSubmissionTaskHandler extends AbstractDelegatedTaskHandler implements Callback, ExtendedStatusListener { private static Logger logger = Logger.getLogger(JobSubmissionTaskHandler.class); private static Set configured, configuring; @@ -235,10 +236,21 @@ if (logger.isDebugEnabled()) { logger.debug("Submitted task " + getTask() + ". Job id: " + jobid); } - NotificationManager.getDefault().registerTask(jobid, getTask()); + NotificationManager.getDefault().registerTask(jobid, getTask(), this); } } + public void statusChanged(Status s, String out, String err) { + Task t = getTask(); + if (out != null) { + t.setStdOutput(out); + } + if (err != null) { + t.setStdError(err); + } + t.setStatus(s); + } + public boolean getAutostart() { return autostart; } @@ -363,15 +375,16 @@ Task t = new TaskImpl(); t.setType(Task.JOB_SUBMISSION); JobSpecification js = new JobSpecificationImpl(); - js.setExecutable("/bin/sleep"); + js.setExecutable("/bin/date"); int base = (int) (rnd.nextDouble() * 20) + 5; - js.addArgument(String.valueOf(base + (int) (rnd.nextDouble() * base))); + //js.addArgument(String.valueOf(base + (int) (rnd.nextDouble() * base))); js.setAttribute("maxwalltime", "00:00:" + String.valueOf(base * 2)); - js.setAttribute("slots", "8"); + js.setAttribute("slots", "2"); js.setAttribute("lowOverallocation", "6"); - js.setAttribute("nodeGranularity", "8"); - js.setAttribute("maxNodes", "8"); - js.setAttribute("remoteMonitorEnabled", "true"); + js.setAttribute("nodeGranularity", "1"); + js.setAttribute("maxNodes", "2"); + js.setRedirected(true); + //js.setAttribute("remoteMonitorEnabled", "true"); t.setSpecification(js); ExecutionService s = new ExecutionServiceImpl(); // s.setServiceContact(new ServiceContactImpl("localhost")); @@ -388,7 +401,7 @@ // JobSubmissionTaskHandler th = new JobSubmissionTaskHandler( // AbstractionFactory.newExecutionTaskHandler("local")); JobSubmissionTaskHandler th = new JobSubmissionTaskHandler(); - // th.setAutostart(true); + th.setAutostart(true); th.submit(t); return t; } @@ -400,11 +413,11 @@ rnd = new Random(); rnd.setSeed(10L); long s = System.currentTimeMillis(); - Task[] ts = new Task[2048]; + Task[] ts = new Task[1]; for (int i = 0; i < ts.length; i++) { ts[i] = submitTask(); - if (i % 100 == 0) { - System.err.println(i + " submitted"); + if (i % 1 == 0) { + System.err.println((i + 1) + " submitted"); } } for (int i = 0; i < ts.length; i++) { @@ -416,6 +429,9 @@ ts[i].getStatus().getException().printStackTrace(); } } + else { + System.out.println(ts[i].getStdOutput()); + } if (i % 100 == 0 && i > 0) { System.err.println(i + " done"); } Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java (revision 3676) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java (working copy) @@ -96,6 +96,10 @@ add(sb, "stdin", spec.getStdInput()); add(sb, "stdout", spec.getStdOutput()); add(sb, "stderr", spec.getStdError()); + + if (spec.isRedirected()) { + add(sb, "redirect", true); + } for (String arg : spec.getArgumentsAsList()) add(sb, "arg", arg); Index: modules/provider-coaster/resources/worker.pl =================================================================== --- modules/provider-coaster/resources/worker.pl (revision 3676) +++ modules/provider-coaster/resources/worker.pl (working copy) @@ -126,6 +126,7 @@ # TODO: Make this configurable (#537) use constant MAX_RECONNECT_ATTEMPTS => 3; use constant NEVER => 9999999999; +use constant NULL_TIMESTAMP => "\x00\x00\x00\x00\x00\x00\x00\x00"; use constant JOB_CHECK_INTERVAL => 0.1; # seconds @@ -137,6 +138,9 @@ use constant IOBUFSZ => 32768; use constant IOBLOCKSZ => 8; +# Maximum size of re-directed output +use constant MAX_OUT_REDIR_SIZE => 2048; + # If true, enable a profile result that is written to the log my $PROFILE = 0; # Contains tuples (EVENT, PID, TIMESTAMP) (flattened) @@ -1042,9 +1046,16 @@ my ($jobid, $statusCode, $errorCode, $msg) = @_; queueCmd((nullCB(), "JOBSTATUS", $jobid, - encodeInt($statusCode), encodeInt($errorCode), $msg)); + encodeInt($statusCode), encodeInt($errorCode), $msg, NULL_TIMESTAMP)); } +sub queueJobStatusCmdExt { + my ($jobid, $statusCode, $errorCode, $msg, $out, $err) = @_; + + queueCmd((nullCB(), "JOBSTATUS", $jobid, + encodeInt($statusCode), encodeInt($errorCode), $msg, NULL_TIMESTAMP, $out, $err)); +} + sub dieNicely { my ($msg) = @_; @@ -1529,16 +1540,80 @@ } } +sub readFile { + my ($jobid, $fname) = @_; + + wlog DEBUG, "$jobid Reading $fname\n"; + if (-e $fname) { + my $fd; + my $content; + + $content = ""; + + open($fd, "<", $fname) or return "Error: could not open $fname"; + while (<$fd>) { + chomp; + $content = $content . $_; + if (length($content) > MAX_OUT_REDIR_SIZE) { + close($fd); + $content = $content . "\n"; + last; + } + } + close($fd); + wlog DEBUG, "$jobid $fname: $content\n"; + return $content; + } + else { + wlog DEBUG, "$jobid $fname does not exist\n"; + return ""; + } +} + +sub readFiles { + my ($jobid) = @_; + + my $pid = $JOBDATA{$jobid}{"pid"}; + + return (readFile($jobid, tmpSFile($pid, "out")), readFile($jobid, tmpSFile($pid, "err"))); +} + sub sendStatus { my ($jobid) = @_; my $ec = $JOBDATA{$jobid}{"exitcode"}; - + + my $stdoutRedir; + my $stderrRedir; + my $redirect; + + $redirect = 0; + + if (defined $JOBDATA{$jobid}{"job"}{"redirect"}) { + wlog DEBUG, "$jobid Output is redirected\n"; + ($stdoutRedir, $stderrRedir) = readFiles($jobid); + $redirect = 1; + } + else { + $stdoutRedir = ""; + $stderrRedir = ""; + } + if ($ec == 0) { - queueJobStatusCmd($jobid, COMPLETED, 0, ""); + if ($redirect) { + queueJobStatusCmdExt($jobid, COMPLETED, 0, "", $stdoutRedir, $stderrRedir); + } + else { + queueJobStatusCmd($jobid, COMPLETED, 0, ""); + } } else { - queueJobStatusCmd($jobid, FAILED, $ec, getExitMessage($jobid, $ec)); + if ($redirect) { + queueJobStatusCmdExt($jobid, FAILED, $ec, getExitMessage($jobid, $ec), $stdoutRedir, $stderrRedir); + } + else { + queueJobStatusCmd($jobid, FAILED, $ec, getExitMessage($jobid, $ec)); + } } } @@ -1833,7 +1908,7 @@ pipe($PARENT_R, $CHILD_W); $pid = fork(); - + if (defined($pid)) { if ($pid == 0) { close $PARENT_R; @@ -1843,6 +1918,7 @@ else { wlog INFO, "$JOBID Forked process $pid. Waiting for its completion\n"; close $CHILD_W; + $JOBDATA{$JOBID}{"pid"} = $pid; $JOBS_RUNNING++; $JOBWAITDATA{$JOBID} = { pid => $pid, @@ -1970,11 +2046,17 @@ return 1; } +sub tmpSFile { + my ($pid, $suffix) = @_; + + return "/tmp/$pid.$suffix"; +} + sub runjob { my ($WR, $JOB, $JOBARGS, $JOBENV, $JOBSLOT, $WORKERPID) = @_; my $executable = $$JOB{"executable"}; - my $stdout = $$JOB{"stdout"}; - my $stderr = $$JOB{"stderr"}; + my $sout = $$JOB{"stdout"}; + my $serr = $$JOB{"stderr"}; my $cwd = getcwd(); # wlog DEBUG, "CWD: $cwd\n"; @@ -1987,19 +2069,24 @@ $ENV{"SWIFT_WORKER_PID"} = $WORKERPID; unshift @$JOBARGS, $executable; wlog DEBUG, "Command: @$JOBARGS\n"; - if (defined $$JOB{directory}) { + if (defined $$JOB{"directory"}) { wlog DEBUG, "chdir: $$JOB{directory}\n"; chdir $$JOB{directory}; } - if (defined $stdout) { - wlog DEBUG, "STDOUT: $stdout\n"; + if (defined $$JOB{"redirect"}) { + wlog DEBUG, "Redirection is on\n"; + $sout = tmpSFile($$, "out"); + $serr = tmpSFile($$, "err"); + } + if (defined $sout) { + wlog DEBUG, "STDOUT: $sout\n"; close STDOUT; - open STDOUT, ">$stdout" or dieNicely("Cannot redirect STDOUT"); + open STDOUT, ">$sout" or dieNicely("Cannot redirect STDOUT"); } - if (defined $stderr) { - wlog DEBUG, "STDERR: $stderr\n"; + if (defined $serr) { + wlog DEBUG, "STDERR: $serr\n"; close STDERR; - open STDERR, ">$stderr" or dieNicely("Cannot redirect STDERR"); + open STDERR, ">$serr" or dieNicely("Cannot redirect STDERR"); } close STDIN; From swift at ci.uchicago.edu Wed Jul 3 22:05:02 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Wed, 3 Jul 2013 22:05:02 -0500 (CDT) Subject: [Swift-commit] cog r3678 Message-ID: <20130704030502.967BD8D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3678 | hategan | 2013-07-03 22:00:38 -0500 (Wed, 03 Jul 2013) | 1 line also redirect when the new redirect stuff is set; log whether redirection or not is done in the worker ------------------------------------------------------------------------ Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java (revision 3677) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java (working copy) @@ -25,6 +25,7 @@ import org.globus.cog.abstraction.coaster.service.job.manager.Settings; import org.globus.cog.abstraction.impl.common.execution.WallTime; import org.globus.cog.abstraction.interfaces.ExecutionService; +import org.globus.cog.abstraction.interfaces.FileLocation; import org.globus.cog.abstraction.interfaces.JobSpecification; import org.globus.cog.abstraction.interfaces.Service; import org.globus.cog.abstraction.interfaces.StagingSetEntry; @@ -97,7 +98,9 @@ add(sb, "stdout", spec.getStdOutput()); add(sb, "stderr", spec.getStdError()); - if (spec.isRedirected()) { + if (spec.isRedirected() || + spec.getStdOutputLocation().overlaps(FileLocation.MEMORY) || + spec.getStdErrorLocation().overlaps(FileLocation.MEMORY)) { add(sb, "redirect", true); } Index: modules/provider-coaster/resources/worker.pl =================================================================== --- modules/provider-coaster/resources/worker.pl (revision 3677) +++ modules/provider-coaster/resources/worker.pl (working copy) @@ -1595,6 +1595,7 @@ $redirect = 1; } else { + wlog DEBUG, "$jobid Output is NOT redirected\n"; $stdoutRedir = ""; $stderrRedir = ""; } From swift at ci.uchicago.edu Wed Jul 3 22:25:03 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Wed, 3 Jul 2013 22:25:03 -0500 (CDT) Subject: [Swift-commit] cog r3679 Message-ID: <20130704032504.1C4618D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3679 | hategan | 2013-07-03 22:23:26 -0500 (Wed, 03 Jul 2013) | 1 line capilal Y is not a valid year specifier in java 6 ------------------------------------------------------------------------ Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/CoasterService.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/CoasterService.java (revision 3678) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/CoasterService.java (working copy) @@ -417,7 +417,7 @@ } private static String makeLogFileName() { - DateFormat df = new SimpleDateFormat("YYYY-MM-dd"); + DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); return "coasters-" + df.format(new Date()) + ".log"; } From swift at ci.uchicago.edu Wed Jul 3 22:35:02 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Wed, 3 Jul 2013 22:35:02 -0500 (CDT) Subject: [Swift-commit] cog r3680 Message-ID: <20130704033502.B49E98D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3680 | hategan | 2013-07-03 22:30:59 -0500 (Wed, 03 Jul 2013) | 1 line don't remove trailing new line when reading stdout/stderr ------------------------------------------------------------------------ Index: modules/provider-coaster/resources/worker.pl =================================================================== --- modules/provider-coaster/resources/worker.pl (revision 3679) +++ modules/provider-coaster/resources/worker.pl (working copy) @@ -1552,7 +1552,6 @@ open($fd, "<", $fname) or return "Error: could not open $fname"; while (<$fd>) { - chomp; $content = $content . $_; if (length($content) > MAX_OUT_REDIR_SIZE) { close($fd); From swift at ci.uchicago.edu Mon Jul 8 00:20:03 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Mon, 8 Jul 2013 00:20:03 -0500 (CDT) Subject: [Swift-commit] cog r3702 Message-ID: <20130708052003.E06AD8D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3702 | hategan | 2013-07-08 00:16:59 -0500 (Mon, 08 Jul 2013) | 1 line removed debugging statement ------------------------------------------------------------------------ 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 3701) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockTask.java (working copy) @@ -107,7 +107,6 @@ js.addArgument(join(settings.getCallbackURIs(), ",")); js.addArgument(block.getId()); - settings.setWorkerLoggingLevel("DEBUG"); if (settings.getWorkerLoggingLevel().equals("NONE")) { js.addArgument("NOLOGGING"); } From hategan at ci.uchicago.edu Mon Jul 8 00:31:00 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 00:31:00 -0500 (CDT) Subject: [Swift-commit] r6604 - in branches/faster: . libexec Message-ID: <20130708053100.9B71A9CC45@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 00:30:38 -0500 (Mon, 08 Jul 2013) New Revision: 6604 Modified: branches/faster/ branches/faster/libexec/_swiftwrap Log: merged 6172 from trunk Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 + /branches/release-0.93:4761-5122 /trunk:6172 Modified: branches/faster/libexec/_swiftwrap =================================================================== --- branches/faster/libexec/_swiftwrap 2013-07-03 21:44:35 UTC (rev 6603) +++ branches/faster/libexec/_swiftwrap 2013-07-08 05:30:38 UTC (rev 6604) @@ -475,19 +475,27 @@ TIMEARGS=(-o swiftapp.resources -f APP_RESOURCES=real_secs:%e,kernel_secs:%S,user_secs:%U,percent_cpu:%P,max_rss:%M,avg_rss:%t,avg_tot_vm:%K,avg_priv_data:%D,avg_priv_stack:%p,avg_shared_text:%X,page_size:%Z,major_pgfaults:%F,minor_pgfaults:%R,swaps:%W,invol_context_switches:%c,vol_waits:%w,fs_reads:%I,fs_writes:%O,sock_recv:%r,sock_send:%s,signals:%k,exit_status:%x) - if [ -x /usr/bin/time ]; then + if [[ "$OSTYPE" == *darwin* ]]; then + TIMECMD= + TIMEARGS= + elif [ -x /usr/bin/time ]; then TIMECMD="/usr/bin/time" elif [ -x $HOME/swift.time ]; then TIMECMD="$HOME/swift.time" else TIMECMD="" - TIMEARGS="" + TIMEARGS="" fi if [ "$STDIN" == "" ]; then if [ "$SWIFT_GEN_SCRIPTS" != "" ]; then genScripts fi - "$TIMECMD" "${TIMEARGS[@]}" "$EXEC" "${CMDARGS[@]}" 1>>"$STDOUT" 2>>"$STDERR" + + if [ -n "$TIMECMD" ] && [ -n "$TIMEARGS" ]; then + "$TIMECMD" "${TIMEARGS[@]}" "$EXEC" "${CMDARGS[@]}" 1>>"$STDOUT" 2>>"$STDERR" + else + "$EXEC" "${CMDARGS[@]}" 1>>"$STDOUT" 2>>"$STDERR" + fi else if [ "$SWIFT_GEN_SCRIPTS" != "" ]; then genScripts From hategan at ci.uchicago.edu Mon Jul 8 00:33:06 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 00:33:06 -0500 (CDT) Subject: [Swift-commit] r6605 - in branches/faster: . bin Message-ID: <20130708053306.2E82B9CC45@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 00:33:04 -0500 (Mon, 08 Jul 2013) New Revision: 6605 Modified: branches/faster/ branches/faster/bin/swiftrun Log: merged 6177 from trunk Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 /trunk:6172 + /branches/release-0.93:4761-5122 /trunk:6172,6177 Modified: branches/faster/bin/swiftrun =================================================================== --- branches/faster/bin/swiftrun 2013-07-08 05:30:38 UTC (rev 6604) +++ branches/faster/bin/swiftrun 2013-07-08 05:33:04 UTC (rev 6605) @@ -65,17 +65,30 @@ cp $script $rundir fi +# Copy config file if specified +if [ -f "$CONFIG" ]; then + cp $CONFIG $rundir + CONFIG=$( basename $CONFIG ) +fi + # Create sites.xml cd $rundir IFS="," echo "" > sites.xml for site in $SITES do + # If config is not defined, but there is a config in conf/ that matches, use that + if [ -z "$CONFIG" ] && [ -f "../conf/$site.cf" ]; then + cp ../conf/$site.cf . + CONFIG=$site.cf + fi + if [ -f "$CONFIG" ]; then gensites -p $CONFIG $site >> sites.xml else gensites $site >> sites.xml fi + done echo "" >> sites.xml From hategan at ci.uchicago.edu Mon Jul 8 00:34:35 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 00:34:35 -0500 (CDT) Subject: [Swift-commit] r6606 - in branches/faster: . etc/sites Message-ID: <20130708053435.C7823187CC1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 00:34:34 -0500 (Mon, 08 Jul 2013) New Revision: 6606 Modified: branches/faster/ branches/faster/etc/sites/midway Log: merged 6182 from trunk Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 /trunk:6172,6177 + /branches/release-0.93:4761-5122 /trunk:6172,6177,6182 Modified: branches/faster/etc/sites/midway =================================================================== --- branches/faster/etc/sites/midway 2013-07-08 05:33:04 UTC (rev 6605) +++ branches/faster/etc/sites/midway 2013-07-08 05:34:34 UTC (rev 6606) @@ -1,7 +1,9 @@ 16 - 24:00:00 + _WALLTIME_ + 100 + 100 sandyb 10000 @@ -11,7 +13,9 @@ 12 - 24:00:00 + _WALLTIME_ + 100 + 100 westmere 10000 From hategan at ci.uchicago.edu Mon Jul 8 00:36:42 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 00:36:42 -0500 (CDT) Subject: [Swift-commit] r6607 - in branches/faster: . etc/sites Message-ID: <20130708053642.978E2187CC1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 00:36:41 -0500 (Mon, 08 Jul 2013) New Revision: 6607 Added: branches/faster/etc/sites/local Modified: branches/faster/ Log: merged 6189 from trunk Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 /trunk:6172,6177,6182 + /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189 Copied: branches/faster/etc/sites/local (from rev 6189, trunk/etc/sites/local) =================================================================== --- branches/faster/etc/sites/local (rev 0) +++ branches/faster/etc/sites/local 2013-07-08 05:36:41 UTC (rev 6607) @@ -0,0 +1,7 @@ + + + .31 + 10000 + + {env.HOME}/swiftwork + From hategan at ci.uchicago.edu Mon Jul 8 00:37:40 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 00:37:40 -0500 (CDT) Subject: [Swift-commit] r6608 - in branches/faster: . bin Message-ID: <20130708053740.030D9187CC1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 00:37:39 -0500 (Mon, 08 Jul 2013) New Revision: 6608 Modified: branches/faster/ branches/faster/bin/swiftrun Log: merged 6190 from trunk Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189 + /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190 Modified: branches/faster/bin/swiftrun =================================================================== --- branches/faster/bin/swiftrun 2013-07-08 05:36:41 UTC (rev 6607) +++ branches/faster/bin/swiftrun 2013-07-08 05:37:39 UTC (rev 6608) @@ -48,7 +48,7 @@ case "$1" in -site|-sites|-s) SITES=$2; verify_not_null sites $SITES; shift ;; -config|-c) CONFIG=$2; verify_not_null config $CONFIG; shift ;; - *) if [ -z "$script" ]; then script="$1" + *) if [ -z "$script" ] && [[ $1 == *.swift ]]; then script="$1" else args+="$1 " fi ;; esac From hategan at ci.uchicago.edu Mon Jul 8 00:41:00 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 00:41:00 -0500 (CDT) Subject: [Swift-commit] r6609 - in branches/faster: . libexec/log-processing Message-ID: <20130708054100.28408187CC1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 00:40:59 -0500 (Mon, 08 Jul 2013) New Revision: 6609 Modified: branches/faster/ branches/faster/libexec/log-processing/log-to-execute-transitions branches/faster/libexec/log-processing/log-to-execute2-transitions Log: merged 6202 from trunk Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190 + /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202 Modified: branches/faster/libexec/log-processing/log-to-execute-transitions =================================================================== --- branches/faster/libexec/log-processing/log-to-execute-transitions 2013-07-08 05:37:39 UTC (rev 6608) +++ branches/faster/libexec/log-processing/log-to-execute-transitions 2013-07-08 05:40:59 UTC (rev 6609) @@ -11,15 +11,16 @@ # then change relevant lines to transition format # then filter out unchanged lines because they're irrelevant +grep ' INFO swift ' | grep thread | grep -v provenanceid | \ +grep -v ARRAYRANGE | iso-to-secs | grep -E '^[^ ]+ +[^ ]+ +swift ' | \ +sed 's/\([^ ]*\) INFO swift Exception in .*://' | \ +sed 's/\([^ ]*\) INFO swift \([^ =]*\) \([^ =]*\) .*thread=\([^ ]*\).*$/\1 \4 \2.\3/' | \ +sed 's/\([^ ]*\) INFO swift \([^ ]*\) .*thread=\([^ ]*\).*tr=\([^ ]*\).*$/\1 \3 \2 \4/' | \ +sed 's/\([^ ]*\) INFO swift \([^ ]*\) .*thread=\([^ ]*\).*$/\1 \3 \2/' | \ +grep -E '^[^$]' -grep ' vdl:execute ' | iso-to-secs | \ -grep -E '^[^ ]+ +[^ ]+ +vdl:execute ' | \ -sed 's/\([^ ]*\) INFO vdl:execute Exception in .*://' | \ -sed 's/\([^ ]*\) INFO vdl:execute \([^ =]*\) \([^ =]*\) .*thread=\([^ ]*\).*$/\1 \4 \2.\3/' |\ -sed 's/\([^ ]*\) INFO vdl:execute \([^ ]*\) .*thread=\([^ ]*\).*tr=\([^ ]*\).*$/\1 \3 \2 \4/' |\ -sed 's/\([^ ]*\) INFO vdl:execute \([^ ]*\) .*thread=\([^ ]*\).*$/\1 \3 \2/' |\ - grep -E '^[^$]' + # force a successful exit, rather than using the exit codes from pipeline # components above (most probably grep?) Modified: branches/faster/libexec/log-processing/log-to-execute2-transitions =================================================================== --- branches/faster/libexec/log-processing/log-to-execute2-transitions 2013-07-08 05:37:39 UTC (rev 6608) +++ branches/faster/libexec/log-processing/log-to-execute2-transitions 2013-07-08 05:40:59 UTC (rev 6609) @@ -12,12 +12,19 @@ # then filter out unchanged lines because they're irrelevant -grep ' vdl:execute2 ' | iso-to-secs | \ -grep -E '^[^ ]+ +[^ ]+ +vdl:execute2 ' | \ -sed 's/^\(.*\) DEBUG vdl:execute2 THREAD_ASSOCIATION jobid=\([^ ]*\) thread=\([0-9\-]*\) host=\([^ ]*\) replicationGroup=\([^ ]*\).*$/\1 \2 ASSOCIATED \3 \4 \5/' | \ +#grep ' vdl:execute2 ' | iso-to-secs | \ +#grep -E '^[^ ]+ +[^ ]+ +vdl:execute2 ' | \ +#sed 's/^\(.*\) DEBUG vdl:execute2 THREAD_ASSOCIATION jobid=\([^ ]*\) thread=\([0-9\-]*\) host=\([^ ]*\) replicationGroup=\([^ ]*\).*$/\1 \2 ASSOCIATED \3 \4 \5/' | \ +#\ +#sed 's/^\([^ ]*\) DEBUG vdl:execute2 \([^ ]*\) jobid=\([^ ]*\).*/\1 \3 \2/' + +grep ' swift ' | iso-to-secs | \ +grep -E '^[^ ]+ +[^ ]+ +swift ' | \ +sed 's/^\(.*\) DEBUG swift THREAD_ASSOCIATION jobid=\([^ ]*\) thread=\([0-9\-]*\) host=\([^ ]*\) replicationGroup=\([^ ]*\).*$/\1 \2 ASSOCIATED \3 \4 \5/' | \ \ -sed 's/^\([^ ]*\) DEBUG vdl:execute2 \([^ ]*\) jobid=\([^ ]*\).*/\1 \3 \2/' +sed 's/^\([^ ]*\) DEBUG swift \([^ ]*\) jobid=\([^ ]*\).*/\1 \3 \2/' | grep -v DEBUG | grep -v INFO + # | \ #sed 's/^\([^ ]*\) DEBUG vdl:execute2 \([^ ]*\) application exception: \(.*\)$/\1 \2 FAILED \3/' | \ #sed 's/^\([^ ]*\) INFO vdl:execute2 Completed job \([^ ]*\) \([^ ]*\) .* on [^ ]*$/\1 \2 EXECCOMPLETED/' | \ From hategan at ci.uchicago.edu Mon Jul 8 00:41:57 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 00:41:57 -0500 (CDT) Subject: [Swift-commit] r6610 - in branches/faster: . etc/sites Message-ID: <20130708054157.5BD26187CC1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 00:41:56 -0500 (Mon, 08 Jul 2013) New Revision: 6610 Modified: branches/faster/ branches/faster/etc/sites/local Log: merged 6203 from trunk Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202 + /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203 Modified: branches/faster/etc/sites/local =================================================================== --- branches/faster/etc/sites/local 2013-07-08 05:40:59 UTC (rev 6609) +++ branches/faster/etc/sites/local 2013-07-08 05:41:56 UTC (rev 6610) @@ -1,6 +1,6 @@ - .31 + _JOBTHROTTLE_ 10000 {env.HOME}/swiftwork From hategan at ci.uchicago.edu Mon Jul 8 00:44:24 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 00:44:24 -0500 (CDT) Subject: [Swift-commit] r6611 - in branches/faster: . docs/userguide Message-ID: <20130708054424.E0C4F9CCB1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 00:44:24 -0500 (Mon, 08 Jul 2013) New Revision: 6611 Modified: branches/faster/ branches/faster/docs/userguide/mappers Log: merged 6206-6208 from trunk Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203 + /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208 Modified: branches/faster/docs/userguide/mappers =================================================================== --- branches/faster/docs/userguide/mappers 2013-07-08 05:41:56 UTC (rev 6610) +++ branches/faster/docs/userguide/mappers 2013-07-08 05:44:24 UTC (rev 6611) @@ -338,7 +338,7 @@ will only process the imports once. Imports may contain anything that is valid in a SwiftScript program, -including code that causes remote execution. +including the code that causes remote execution. Mappers ------- @@ -347,9 +347,9 @@ remote sites for execution or to pass to applications. Swift provides a number of mappers that are useful in common cases. This -section details those standard mappers. For more complex cases, it is +section details those mappers. For more complex cases, it is possible to write application-specific mappers in Java and use them -within a SwiftScript program. +within a Swift script. The single file mapper @@ -360,7 +360,7 @@ |======================= |Swift variable|Filename |f|myfile -|f[0]|INVALID +|f [0]|INVALID |f.bar|INVALID |======================= @@ -392,6 +392,7 @@ |location|A directory that the files are located. |prefix|The prefix of the files |suffix|The suffix of the files, for instance: ".txt" +|padding| The number of digits used to uniquely identify the mapped file. This is an optional parameter which defaults to 4. |pattern|A UNIX glob style pattern, for instance: "\*foo*" would match all file names that contain foo. When this mapper is used to specify output filenames, pattern is ignored. @@ -438,7 +439,7 @@ } } -messagefile outfile[] ; +messagefile outfile[] ; outfile[0] = greeting("hello"); outfile[1] = greeting("middle"); @@ -448,9 +449,9 @@ [options="header, autowidth"] |======================= |Swift variable|Filename -|outfile[0]|baz0000.txt -|outfile[1]|baz0001.txt -|outfile[2]|baz0002.txt +|outfile[0]|baz00.txt +|outfile[1]|baz01.txt +|outfile[2]|baz02.txt |======================= simple_mapper can be used to map structures. It will map the name of @@ -488,7 +489,7 @@ concurrent mapper ~~~~~~~~~~~~~~~~~ -concurrent_mapper is almost the same as the simple mapper, except that +The concurrent_mapper is almost the same as the simple mapper, except that it is used to map an output file, and the filename generated will contain an extract sequence that is unique. This mapper is the default mapper for variables when no mapper is specified. @@ -516,12 +517,12 @@ File system mapper ~~~~~~~~~~~~~~~~~~ -filesys_mapper is similar to the simple mapper, but maps a file or a +The filesys_mapper is similar to the simple mapper, but maps a file or a list of files to an array. Each of the filename is mapped as an element in the array. The order of files in the resulting array is not defined. TODO: note on difference between location as a relative vs absolute path -wrt staging to remote location - as mihael said: It's because you +w.r.t. staging to remote location - as mihael said: It's because you specify that location in the mapper. Try location="." instead of location="/sandbox/..." From hategan at ci.uchicago.edu Mon Jul 8 00:54:14 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 00:54:14 -0500 (CDT) Subject: [Swift-commit] r6612 - in branches/faster: . docs/cookbook docs/siteguide docs/userguide Message-ID: <20130708055414.B3FFC9CCF5@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 00:54:14 -0500 (Mon, 08 Jul 2013) New Revision: 6612 Removed: branches/faster/docs/cookbook/cookbook-asciidoc.txt Modified: branches/faster/ branches/faster/docs/cookbook/cookbook.txt branches/faster/docs/cookbook/overview branches/faster/docs/siteguide/futuregrid branches/faster/docs/userguide/coasters branches/faster/docs/userguide/howto_tips branches/faster/docs/userguide/log-processing Log: merged 6215-6223 from trunk Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208 + /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223 Deleted: branches/faster/docs/cookbook/cookbook-asciidoc.txt =================================================================== --- branches/faster/docs/cookbook/cookbook-asciidoc.txt 2013-07-08 05:44:24 UTC (rev 6611) +++ branches/faster/docs/cookbook/cookbook-asciidoc.txt 2013-07-08 05:54:14 UTC (rev 6612) @@ -1,20 +0,0 @@ -// To compile use: asciidoc -a toc -n cookbook-asciidoc.txt - -:numbered: - -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: branches/faster/docs/cookbook/cookbook.txt =================================================================== --- branches/faster/docs/cookbook/cookbook.txt 2013-07-08 05:44:24 UTC (rev 6611) +++ branches/faster/docs/cookbook/cookbook.txt 2013-07-08 05:54:14 UTC (rev 6612) @@ -1,3 +1,7 @@ +// To compile use: asciidoc -a toc -n cookbook-asciidoc.txt + +:numbered: + Swift Cookbook ============== Swift team Modified: branches/faster/docs/cookbook/overview =================================================================== --- branches/faster/docs/cookbook/overview 2013-07-08 05:44:24 UTC (rev 6611) +++ branches/faster/docs/cookbook/overview 2013-07-08 05:54:14 UTC (rev 6612) @@ -5,7 +5,7 @@ infrastructures. The Swift system comprises of SwiftScript language and the Swift runtime system. For introductory material, consult the Swift tutorial found -link:http://www.ci.uchicago.edu/swift/guides/tutorial.php[here]. +link:http://www.ci.uchicago.edu/swift/guides/trunk/tutorial/tutorial.html[here]. -WARNING: Please be warned that the cookbook is under construction and most recipes are not tested rigorously. You are advised to use them at your own risk. +WARNING: Please be warned that the cookbook is under construction and the recipes are not tested rigorously. Modified: branches/faster/docs/siteguide/futuregrid =================================================================== --- branches/faster/docs/siteguide/futuregrid 2013-07-08 05:44:24 UTC (rev 6611) +++ branches/faster/docs/siteguide/futuregrid 2013-07-08 05:54:14 UTC (rev 6612) @@ -1,10 +1,14 @@ -Futuregrid (x86 cloud) ----------------------- +Futuregrid Cloud +---------------- +The NSF-funded FutureGrid cloud is administered by Indiana University. It +offers a variety of resources via a multitude of interfaces. Currently, it +offers cloud resources via three different interfaces: Eucalyptus, +Nimbus (www.nimbusproject.org), and +OpenStack (www.openstack.org). The total number of resources at +FutureGrid is close to 5000 CPU cores and 220~TB of storage from more than six +physical clusters. We use the resources offered by one such cluster via the +Nebula middleware. -FutureGrid is a distributed, high-performance test-bed that allows -scientists to collaboratively develop and test innovative approaches -to parallel, grid, and cloud computing. - More information on futuregrid can be found at https://portal.futuregrid.org/. Requesting Futuregrid Access Modified: branches/faster/docs/userguide/coasters =================================================================== --- branches/faster/docs/userguide/coasters 2013-07-08 05:44:24 UTC (rev 6611) +++ branches/faster/docs/userguide/coasters 2013-07-08 05:54:14 UTC (rev 6612) @@ -1,30 +1,42 @@ Coasters -------- + +Introduction +~~~~~~~~~~~~ In many applications, Swift performance can be greatly enhanced by the -use of CoG coasters. CoG coasters provide a low-overhead job submission +use of coasters. Coasters provide a low-overhead job submission and file transfer mechanism suited for the execution of short jobs (on the order of a few seconds) and the transfer of small files (on the order of a few kilobytes) for which other grid protocols such as GRAM and GridFTP are poorly suited. -The coaster mechanism submits a head job using some other execution +Benefits +~~~~~~~~ + +The coaster mechanism submits a pilot job using some other execution mechanism such as GRAM, and for each worker node that will be used in a remote cluster, it submits a worker job, again using some other execution mechanism such as GRAM. Details on the design of the coaster mechanism can be found here. -The head job manages file transfers and the dispatch of execution jobs +Mechanism +~~~~~~~~~ + +The pilot job manages file transfers and the dispatch of execution jobs to workers. Much of the overhead associated with other grid protocols (such as authentication and authorization, and allocation of worker nodes by the site's local resource manager) is reduced, because that -overhead is associated with the allocation of a coaster head or coaster +overhead is associated with the allocation of a coaster pilot or coaster worker, rather than with every Swift-level procedure invocation; potentially hundreds or thousands of Swift-level procedure invocations can be run through a single worker. -Coasters can be configured for use in two situations: job execution and -file transfer. +Coasters can be configured for two purposes: job execution and +file staging. +Coasters How-to +~~~~~~~~~~~~~~~ + To use for job execution, specify a sites.xml execution element like this: ---- @@ -46,6 +58,7 @@ ---- ---- + The url parameter should be a pseudo-URI formed with the URI scheme being the name of the provider to use to submit the coaster head job, and the hostname portion being the hostname to be used to execute the Modified: branches/faster/docs/userguide/howto_tips =================================================================== --- branches/faster/docs/userguide/howto_tips 2013-07-08 05:44:24 UTC (rev 6611) +++ branches/faster/docs/userguide/howto_tips 2013-07-08 05:54:14 UTC (rev 6612) @@ -39,8 +39,8 @@ This use case allows the user to submit an MPI job to a remote queue. -In SwiftScript, we make an invocation that does not look any different -from any other invocation. In the below code, we do not have any input +Swift makes an invocation that does not look any different +from any other invocation. In the code below, we do not have any input files, and have two output files on stdout and stderr: ---- Modified: branches/faster/docs/userguide/log-processing =================================================================== --- branches/faster/docs/userguide/log-processing 2013-07-08 05:44:24 UTC (rev 6611) +++ branches/faster/docs/userguide/log-processing 2013-07-08 05:54:14 UTC (rev 6612) @@ -5,7 +5,6 @@ To properly generate log plots, you must enable VDL/Karajan logging. TODO:How? - You should check the scripts that you intend to use to determine what log lines they require and ensure that you are generating those lines via log4j.properties @@ -18,8 +17,55 @@ -------------------------------------- TODO: Does it work for coasters-based runs only? +Meaning and interpretation of Swift log messages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A Swift log file is typically a text file with the name of the Swift run and +its timestamp in the filename and an extension ".log". In addition, a ".rlog" +file is Swift's resume log which is used by Swift when a run is resumed using +the "-resume" option. The .rlog file is only for Swift's internal purpose and +not to be interpreted by the user. + +Each line in the log file is typically made up of three parts. The first part +is the timestamp, the second is the type of log message and the third is the +message itself. The types of log messages follows the java log4j standard types +of TRACE, DEBUG, INFO, WARN, ERROR and FATAL. This section lists the various +Swift log messages and explains the meaning and likely interpretation of those +messages. Please note that the list is not comprehensive at this time. Also +note that we will ignore the timestamps here. + +. _DEBUG Loader arguments: [-sites.file, sites.xml, -config, cf, -tc.file, tc, postproc-gridftp.swift]_ +. _DEBUG Loader Max heap: 5592449024_ +. _DEBUG textfiles BEGIN_ +. _DEBUG Loader kmlversion is_ +. _DEBUG VDL2ExecutionContext Stack dump_ +. _INFO SetFieldValue Set_ +. _INFO get__site STARTCOMPOUND thread=0-8 name=get__site_ +. _INFO vdl:execute START thread=0-8-0 tr=_ +. _INFO GlobalSubmitQueue No global submit throttle set. Using default (1024)_ +. _DEBUG vdl:execute2 THREAD_ASSOCIATION jobid=getsite-ymj72ook thread=0-8-0-1 host=localhost replicationGroup=xmj72ook_ +. _DEBUG vdl:execute2 JOB_START jobid=getsite-ymj72ook tr=getsite arguments=[644] tmpdir=postproc-gridftp-20120319-0942-adf1o1u2/jobs/y/getsite-ymj72ook host=localhost_ +. _INFO GridExec TASK_DEFINITION_ +. _WARN RemoteConfiguration Find: http://140.221.8.62:38260_ +. _INFO AbstractStreamKarajanChannel$Multiplexer Multiplexer 0 started_ +. _INFO AbstractStreamKarajanChannel$Multiplexer (0) Scheduling SC-null for addition_ +. _INFO AbstractStreamKarajanChannel Channel configured_ +. _INFO MetaChannel MetaChannel: 651528505[1478354072: {}] -> null.bind -> SC-null_ +. _INFO ReadBuffer Will ask for 1 buffers for a size of 6070_ +. _INFO ThrottleManager O maxBuffers=512, crtBuffers=0, allowedTransfers=256, active=0, suspended=0_ +. _INFO ThrottleManager mem=113.54 MB, heap=482.88 MB, maxHeap=5.21 GB_ +. _INFO ThrottleManager I maxBuffers=512, crtBuffers=0, allowedTransfers=256, active=0, suspended=0_ +. _INFO PerformanceDiagnosticInputStream [MEM] Heap total: 482.88 MB, Heap used: 118.58 MB_ +. _INFO vdl:execute END_SUCCESS thread=0-8-0 tr=getsite_ +. _INFO WeightedHostScoreScheduler CONTACT_SELECTED host=localhost, score=99.854_ +. _ + + +Log plotting +~~~~~~~~~~~~ + Normalize event times in the log to the run start time -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Generate the log, assuming the log is titled +swift-run.log+ @@ -30,7 +76,7 @@ Make a basic load plot from Coasters Cpu log lines -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ . Normalize the log. . Build up a load data file: @@ -47,7 +93,7 @@ Make a basic job completion plot from Coasters Cpu log lines -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ . Normalize the log. @@ -64,7 +110,7 @@ ------------------------------------------ Make a basic Block allocation plot from Coasters Block log lines -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ . Normalize the log. @@ -81,7 +127,7 @@ ------------------------------------------ Make a job runtime distribution plot from Coasters Cpu log lines -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ . Normalize the log. From hategan at ci.uchicago.edu Mon Jul 8 01:01:40 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 01:01:40 -0500 (CDT) Subject: [Swift-commit] r6613 - in branches/faster: . docs docs/cookbook docs/documentation docs/userguide docs/utils libexec/log-processing Message-ID: <20130708060140.D3E8F9CCB1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 01:01:39 -0500 (Mon, 08 Jul 2013) New Revision: 6613 Added: branches/faster/docs/cookbook/debugging branches/faster/docs/cookbook/infrastructures Removed: branches/faster/docs/cookbook/debugging_swift branches/faster/docs/cookbook/diverse_infrastructures Modified: branches/faster/ branches/faster/docs/build_docs.sh branches/faster/docs/cookbook/cookbook.txt branches/faster/docs/cookbook/log_processing branches/faster/docs/cookbook/overview branches/faster/docs/cookbook/swift_basics branches/faster/docs/documentation/building branches/faster/docs/userguide/app_procedures branches/faster/docs/userguide/coasters branches/faster/docs/userguide/commands branches/faster/docs/userguide/configuration_properties branches/faster/docs/userguide/language branches/faster/docs/userguide/log-processing branches/faster/docs/userguide/mappers branches/faster/docs/userguide/overview branches/faster/docs/userguide/reliability_mechanisms branches/faster/docs/userguide/transformation_catalog branches/faster/docs/utils/gensites.txt branches/faster/libexec/log-processing/README.txt Log: merged 6231-6241 from trunk Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223 + /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241 Modified: branches/faster/docs/build_docs.sh =================================================================== --- branches/faster/docs/build_docs.sh 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/build_docs.sh 2013-07-08 06:01:39 UTC (rev 6613) @@ -57,8 +57,14 @@ chmod $CHMOD_DIRECTORY_MODE $INSTALLATION_DIRECTORY > /dev/null 2>&1 fi +unamestr=`\uname` +if [[ "$unamestr" == 'Linux' ]]; then + pushd $(dirname $(readlink -f $0)) > /dev/null 2>&1 +else + pushd $(dirname $(greadlink -f $0)) > /dev/null 2>&1 +fi + # Gather version information -pushd $(dirname $(readlink -f $0)) > /dev/null 2>&1 pushd .. > /dev/null 2>&1 VERSION=`svn info |grep URL|awk -F / '{print $NF}'` popd > /dev/null 2>&1 Modified: branches/faster/docs/cookbook/cookbook.txt =================================================================== --- branches/faster/docs/cookbook/cookbook.txt 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/cookbook/cookbook.txt 2013-07-08 06:01:39 UTC (rev 6613) @@ -13,8 +13,8 @@ include::coasters[] -include::diverse_infrastructures[] +include::infrastructures[] -include::debugging_swift[] +include::debugging[] include::log_processing[] Copied: branches/faster/docs/cookbook/debugging (from rev 6232, trunk/docs/cookbook/debugging) =================================================================== --- branches/faster/docs/cookbook/debugging (rev 0) +++ branches/faster/docs/cookbook/debugging 2013-07-08 06:01:39 UTC (rev 6613) @@ -0,0 +1,23 @@ +Debugging Swift +--------------- + +Swift errors are logged in several places. In case of a failed Swift run, following places +should be inspected for clues: + +. Text from standard output and standard error produced by running +Swift + +. The .log file from this run. It will be named script.uniqueID.log +where "script" is the name of your Swift script source file, and +uniqueID is a long unique id which starts with the date and time you ran the +swift command. + +. $HOME/.globus/scripts directory on the host on which you run the Swift +command, when swift is submitting to a local scheduler (Condor, PBS, SGE, +Cobalt) + +. $HOME/.globus/coasters directory on remote machines on which you are +running coasters + +. $HOME/.globus/* files on remote systems accessed via Coaster providers + Deleted: branches/faster/docs/cookbook/debugging_swift =================================================================== --- branches/faster/docs/cookbook/debugging_swift 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/cookbook/debugging_swift 2013-07-08 06:01:39 UTC (rev 6613) @@ -1,17 +0,0 @@ -Debugging Swift ---------------- -Swift errors are logged in several places: - -. All text from standard output and standard error produced by running the -swift command -. The .log file from this run. It will be named swiftscript.uniqueID.log -where "swiftscript" is the name of your *.swift script source file, and -uniqueID is a long unique id which starts with the date and time you ran the -swift command. -. $HOME/.globus/coasters directory on remote machines on which you are -running coasters -. $HOME/.globus/scripts directory on the host on which you run the Swift -command, when swift is submitting to a local scheduler (Condor, PBS, SGE, -Cobalt) -. $HOME/.globus/??? on remote systems that you access via Globus - Deleted: branches/faster/docs/cookbook/diverse_infrastructures =================================================================== --- branches/faster/docs/cookbook/diverse_infrastructures 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/cookbook/diverse_infrastructures 2013-07-08 06:01:39 UTC (rev 6613) @@ -1,182 +0,0 @@ -Swift on Diverse Infrastructures ---------------------------------- - -Beagle -~~~~~~ -Swift is available on Beagle as a software module. -In this recipe, we will walk you through a very simple example running Swift -on Beagle. The prerequisites required for running this example on Beagle is an access to Beagle and a project allocation. The example is a simplest form of a real application that involves reading from a disc file and writing onto another disc file. It runs the +/bin/cat+ Unix command to read an input file called +data.txt+ and write it to an output file in a folder +outdir+, called +f.nnn.out+. - -image::figures/catsn.png[Swift Example] - -The steps are as follows: - -*step 1.* Load the Swift module on Beagle commandline as follows: +$ module load swift+ - -*step 2.* Create and change to a directory where your Swift related work (source, inputs, outputs) will -stay. (say, +$ mkdir swift-lab+, followed by, +$ cd swift-lab+) - -*step 3.* copy the folder at +/home/ketan/labs/catsn+ to the above directory. (+$cp -r /home/ketan/catsn .+ followed by +$ cd catsn+). - -*step 4.* In the sites file: +sites.xml+ make the following two -changes: - - 1. change the path of the +$$$$+ element to your preferred location (this location is *required* to be on /lustre, say to +/lustre/beagle//swift-lab/swift.workdir+), and - - 2. Change the project name to your project (for instance, +CI-CCR000013+) . The workdirectory will contain - execution data related to each run, e.g. wrapper scripts, system information, inputs and outputs. - -*step 5.* Run the example using following commandline (also found in run.sh): - ----- -$ 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+ - -*step 6.* Check the output in the generated +outdir+ directory (+ls outdir+) - -Note: Running from sandbox node or requesting 1 hour walltime for upto 3 nodes -will get fast prioritized execution. Good for small tests -Swift supports a coasters based computing environment for Beagle. A detailed version of Swift documentation is maintained -http://www.ci.uchicago.edu/swift/docs/index.php[here]. - -// -//Intrepid-BG/P -//~~~~~~~~~~~~~ -//Swift on Intrepid-BG/P -// - -PADS -~~~~ -Swift on PADS -To execute your Swift script on the PADS cluster use this command: - ----- -swift -tc.file tc -sites.file pbs.xml modis.swift ----- -where the contents of a simple pbs.xml sites file could be: -[xml] -source~~~~ - - - - fast - 00:05:00 - 10000 - .10 - - /home/you/swiftwork - - -source~~~~ - -OSG -~~~ -This section describes how to get Swift running on the OSG Grid. We will use a -manual coaster setup to get Swift running on OSG. - -.Coaster setup on OSG -The following figure shows an abstract scheme for the manual coasters setup on -OSG. - -image::figures/coaster_setup.png[Coaster setup] - -In the following steps, we will go through the process of manually setting -//Swift on OSG -// - -Bionimbus -~~~~~~~~~ -This section explains a step by step procedure on getting Swift running on the -Bionimbus cloud. We will use the _manual_ _coasters_ configuration on the -Bionimbus cloud. - -**step1.** Connect to the gateway (ssh gatewayx.lac.uic.edu) - -**step2.** Start a virtual machine (euca-run-instances -n 1 -t m1.small -emi-17EB1170) - -**step3.** Start the coaster-service on gateway -+coaster-service -port 1984 -localport 35753 -nosec+ - -**step4.** Start the Swift-script from the gateway using normal Swift commandline - -+swift -config cf -tc.file tc -sites.file sites.xml yourscript.swift -aparam=999+ - -.cf ----- -wrapperlog.always.transfer=true -sitedir.keep=true -execution.retries=1 -lazy.errors=true -status.mode=provider -use.provider.staging=true -provider.staging.pin.swiftfiles=false -foreach.max.threads=100 -provenance.log=true ----- - -.tc ----- -localhost modftdock /home/ketan/swift-labs/bionimbus-coaster-modftdock/app/modftdock.sh null null GLOBUS::maxwalltime="1:00:00" ----- - -(See below for a sample sites.xml for this run) - -**step5.** Connect back to gateway from virtual machines using reverse ssh tunneling as follows: - -.From the gateway prompt - -+ssh -R *:5000:localhost:5000 root at 10.101.8.50 sleep 999+ - -WHERE: -*=network interface, should remain the same on all cases - -localhost=the gateway host, should remain the same - -5000(LEFT OF localhost)=the port number on localhost to listen to **THIS WILL -vary depending upon which port you want to listen to - -5000(RIGHT OF localhost)=the port on target host that you want to forward - -root at 10.101.8.50=the ip of the Virtual Machine on Bionimbus cloud, this will -vary based on what ip you get for your Virtual Machine instance - -#On anywhere as long as provide the correct callback uri: here the -"http://140.221.9.110:42195" is the callback uri of previous ones - -**step6.** Start the worker from the virtual machine -+worker.pl http://localhost:42195 tmp /tmp # where 42195 is the port where the -coaster service is listening to the workers+ - -.sites.xml for the above run - ----- - - - - passive - - 4 - 10000 - 100 - 100 - 100 - 1 - 10 - 25.00 - 10000 - proxy - - /home/ketan/swift-labs/bionimbus-coaster-modftdock/swift.workdir - - ----- - -//Magellan -//~~~~~~~~ -//Swift on Magellan -// - Copied: branches/faster/docs/cookbook/infrastructures (from rev 6232, trunk/docs/cookbook/infrastructures) =================================================================== --- branches/faster/docs/cookbook/infrastructures (rev 0) +++ branches/faster/docs/cookbook/infrastructures 2013-07-08 06:01:39 UTC (rev 6613) @@ -0,0 +1,246 @@ +Swift on Computational Infrastructures +-------------------------------------- + +Introduction +~~~~~~~~~~~~ + +We will use the following Swift example, called "catsn" throughout the present section of this cookbook: + +---- +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +file out[]; +foreach j in [1:@toint(@arg("n","1"))] { + file data<"data.txt">; + out[j] = cat(data); +} +---- + +Beagle +~~~~~~ +Beagle is a University of Chicago's Computational Institute super computer +dedicated to bioinformatics research. It is a cray XE6 machine running PBS job +scheduler. More on Beagle could be found +link:https://beagle.ci.uchicago.edu[here]. + +Swift is available on Beagle as a software module. This recipe will walk you +through a very simple example running Swift on Beagle. The prerequisites for +running this example on Beagle is an access to and a project allocation on +Beagle. The example is a simplest form of a real application which involves +reading from a disc file and writing onto another disc file. It runs the ++/bin/cat+ Unix command to read an input file called +data.txt+ and write it to +an output file in a folder +outdir+, called +f.nnn.out+. + +image::figures/catsn.png[Swift Example] + +The steps are as follows: + +*step 1.* Load the Swift module on Beagle commandline as follows: +$ module +load swift+ + +*step 2.* Create and change to a directory where your Swift related work +(source, inputs, outputs) will stay. (say, +$ mkdir swift-lab+, followed by, +$ +cd swift-lab+) + +*step 3.* copy the folder at +/home/ketan/labs/catsn+ to the above directory. +(+$cp -r /home/ketan/catsn .+ followed by +$ cd catsn+). + +*step 4.* In the sites file: +sites.xml+ make the following two changes: + + 1. change the path of the +$$$$+ element to your preferred + location (this location is *required* to be on /lustre, say to + +/lustre/beagle//swift-lab/swift.workdir+), and + + 2. Change the project name to your project (for instance, +CI-CCR000013+) . + The workdirectory will contain execution data related to each run, e.g. + wrapper scripts, system information, inputs and outputs. + +*step 5.* 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+ + +*step 6.* Check the output in the generated +outdir+ directory (+ls outdir+) + +// +//Intrepid-BG/P +//~~~~~~~~~~~~~ +//Swift on Intrepid-BG/P +// + +PADS +~~~~ +Swift on PADS +To execute your Swift script on the PADS cluster use this command: + +---- +swift -tc.file tc -sites.file pbs.xml catsn.swift +---- +where the contents of a simple pbs.xml sites file could be: +[xml] +source~~~~ + + + + fast + 00:05:00 + 10000 + .10 + + /home/you/swiftwork + + +source~~~~ + +Fusion +~~~~~~ +Fusion is an Argonne-LCRC computational facility. More information on Fusion can be found link:http://www.lcrc.anl.gov/using-fusion[here]. + +In the current section, we present a recipe to use Swift on Fusion system. +Fusion employs a PBS schedular. Consequently, we will use the Coasters PBS provider. +The jobmanager string will be "local:pbs" as follows: + +---- + +---- + +The complete sites.xml file is as follows: + +[xml] +source~~~~ + + + + ProteinPrediction + batch + 1000 + 1 + 2 + 2 + + 0.23 + + + /fusion/gpfs/home/${HOME}/SwiftWork + + +source~~~~ + + +OSG +~~~ +This section describes how to get Swift running on the OSG Grid. We will use a +manual coaster setup to get Swift running on OSG. + +.Coaster setup on OSG +The following figure shows an abstract scheme for the manual coasters setup on +OSG. + +image::figures/coaster_setup.png[Coaster setup] + +In the following steps, we will go through the process of manually setting +//Swift on OSG +// + +Bionimbus +~~~~~~~~~ +This section explains a step by step procedure on getting Swift running on the +Bionimbus cloud. We will use the _manual_ _coasters_ configuration on the +Bionimbus cloud. + +**step1.** Connect to the gateway (ssh gatewayx.lac.uic.edu) + +**step2.** Start a virtual machine (euca-run-instances -n 1 -t m1.small +emi-17EB1170) + +**step3.** Start the coaster-service on gateway ++coaster-service -port 1984 -localport 35753 -nosec+ + +**step4.** Start the Swift-script from the gateway using normal Swift commandline + ++swift -config cf -tc.file tc -sites.file sites.xml yourscript.swift -aparam=999+ + +.cf +---- +wrapperlog.always.transfer=true +sitedir.keep=true +execution.retries=1 +lazy.errors=true +status.mode=provider +use.provider.staging=true +provider.staging.pin.swiftfiles=false +foreach.max.threads=100 +provenance.log=true +---- + +.tc +---- +localhost modftdock /home/ketan/swift-labs/bionimbus-coaster-modftdock/app/modftdock.sh null null GLOBUS::maxwalltime="1:00:00" +---- + +(See below for a sample sites.xml for this run) + +**step5.** Connect back to gateway from virtual machines using reverse ssh tunneling as follows: + +.From the gateway prompt + ++ssh -R *:5000:localhost:5000 root at 10.101.8.50 sleep 999+ + +WHERE: +*=network interface, should remain the same on all cases + +localhost=the gateway host, should remain the same + +5000(LEFT OF localhost)=the port number on localhost to listen to **THIS WILL +vary depending upon which port you want to listen to + +5000(RIGHT OF localhost)=the port on target host that you want to forward + +root at 10.101.8.50=the ip of the Virtual Machine on Bionimbus cloud, this will +vary based on what ip you get for your Virtual Machine instance + +#On anywhere as long as provide the correct callback uri: here the +"http://140.221.9.110:42195" is the callback uri of previous ones + +**step6.** Start the worker from the virtual machine ++worker.pl http://localhost:42195 tmp /tmp # where 42195 is the port where the +coaster service is listening to the workers+ + +.sites.xml for the above run + +---- + + + + passive + + 4 + 10000 + 100 + 100 + 100 + 1 + 10 + 25.00 + 10000 + proxy + + /home/ketan/swift-labs/bionimbus-coaster-modftdock/swift.workdir + + +---- + +//Magellan +//~~~~~~~~ +//Swift on Magellan +// + Modified: branches/faster/docs/cookbook/log_processing =================================================================== --- branches/faster/docs/cookbook/log_processing 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/cookbook/log_processing 2013-07-08 06:01:39 UTC (rev 6613) @@ -2,7 +2,7 @@ --------------- To properly generate log plots, you must enable VDL/Karajan logging. Make sure -log4.properties contains: +log4j.properties contains: ---- log4j.logger.swift=DEBUG log4j.logger.org.globus.cog.abstraction.coaster.service.job.manager.Cpu=DEBUG Modified: branches/faster/docs/cookbook/overview =================================================================== --- branches/faster/docs/cookbook/overview 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/cookbook/overview 2013-07-08 06:01:39 UTC (rev 6613) @@ -1,11 +1,11 @@ Overview -------- -This cookbook covers various recipes involving setting up and running Swift under diverse -configurations based on the application requirements and the underlying -infrastructures. The Swift system comprises of SwiftScript language and the -Swift runtime system. For -introductory material, consult the Swift tutorial found +This cookbook covers recipes involving setting up and running Swift +under various computational systems based on the application requirements and the +underlying infrastructures. The Swift framework comprises of a scripting language +and the Swift runtime system. For introductory material, consult the Swift +tutorial found link:http://www.ci.uchicago.edu/swift/guides/trunk/tutorial/tutorial.html[here]. -WARNING: Please be warned that the cookbook is under construction and the recipes are not tested rigorously. +WARNING: Note that the cookbook is under construction and the recipes presented here are not tested rigorously. Modified: branches/faster/docs/cookbook/swift_basics =================================================================== --- branches/faster/docs/cookbook/swift_basics 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/cookbook/swift_basics 2013-07-08 06:01:39 UTC (rev 6613) @@ -12,10 +12,10 @@ ^^^^^^^^^^^^^^ .Check your Java Swift is a Java application. Make sure you are running Java version 5 or higher. You -can make sure you have Java in your $PATH (or $HOME/.soft file depending upon +can make sure you have Java in your $PATH (or file such as $HOME/.soft depending upon your environment) -Following are the possible ways to detect and run Java: +Following are some possible ways to detect and run Java: ---- $ grep java $HOME/.soft @@ -32,10 +32,12 @@ Setting up to run Swift ~~~~~~~~~~~~~~~~~~~~~~~~ This is simple. We will be using a pre-compiled version of Swift that can be -downloaded from link:http://www.ci.uchicago.edu/swift/downloads/index.php[here]. Download and untar the latest precompiled version as follows: +downloaded from +link:http://www.ci.uchicago.edu/swift/downloads/index.php[here]. Download and +untar the latest precompiled version as follows: ---- -$ tar xf swift-0.92.1.tar.gz +$ tar zxf swift-0.92.1.tar.gz ---- Environment Setup @@ -88,7 +90,7 @@ The _site_ field should correspond to a site name listed in the sites catalog. The _transformation-name_ should correspond to the transformation name used in a -SwiftScript app procedure. +Swift script app procedure. The _executable-path_ should specify where the particular executable is located on that site. @@ -99,7 +101,7 @@ The _profiles_ field should be set to null if no profile entries are to be specified, or should contain the profile entries separated by semicolons. -Setting swift configuration +Setting Swift configuration ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Many configuration properties could be set using the Swift configuration file. We will not cover them all in this section. see @@ -139,9 +141,9 @@ source~~~~~~ -First SwiftScript +First Swift script ~~~~~~~~~~~~~~~~~ -Your first SwiftScript +Your first Swift script Hello Swift-World! A good sanity check that Swift is set up and running OK locally is this: @@ -161,7 +163,7 @@ Progress: -SwiftScript trace: Hello, Swift world! +Swift trace: Hello, Swift world! Final status: @@ -171,7 +173,7 @@ http://www.ci.uchicago.edu/swift/guides/tutorial.php. Follow the steps in that tutorial to learn how to run a few simple scripts on the login host. -second SwiftScript +second Swift script ~~~~~~~~~~~~~~~~~~~ Following is a more involved Swift script. [java] @@ -201,16 +203,16 @@ What if Swift hangs ~~~~~~~~~~~~~~~~~~~ -Owing to its highly multithreaded architecture it is often the case that the +Owing to its multi-threaded architecture it is often the case that the underlying java virtual machine gets into deadlock situations or Swift hangs -because of other complications in its threaded operations. Under such -situations, Swift _hang-checker_ chips in and resolves the situation. +because of other complications in its operations. Under such +situations, Swift _hang-checker_ chips in and gives indication of the situation. . how to use the information to identify and correct the deadlock. . How close to the Swift source code can we make the hang-checker messages, so that the user can relate it to Swift functions, expressions, and ideally source code lines? -. The current Hang Checker output is actually *very* nice and useful already: +. The Hang Checker output is nice and useful: ---- Registered futures: @@ -224,7 +226,7 @@ Resuming a stopped or crashed Swift Run ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -I had a .rlog file from a Swift run that ran out of time. I kicked it off +I had a .rlog file from a Swift run that ran out of time. I resumed the run using the -resume flag described in section 16.2 of the Swift User Guide and it picked up where it left off. Then I killed it because I wanted to make changes to my sites file. @@ -250,8 +252,8 @@ [nbest at login2 files]$ pwd /home/nbest/bigdata/files [nbest at login2 files]$ -~wilde/swift/src/stable/cog/modules/swift/dist/swift-svn/bin/swift \ -> -tc.file tc -sites.file pbs.xml ~/scripts/mcd12q1.swift -resume +~wilde/swift/src/stable/cog/modules/swift/dist/swift-svn/bin/swift -resume \ +> -tc.file tc -sites.file pbs.xml ~/scripts/mcd12q1.swift > mcd12q1-20100310-1326-ptxe1x1d.0.rlog Swift svn swift-r3255 (swift modified locally) cog-r2723 (cog modified locally) @@ -274,13 +276,6 @@ in previous run:2558 ---- - -From Neil: A comment about that section of the user guide: It says "In order -to restart from a restart log file, the -resume logfile argument can be used -after the SwiftScript? program file name." and then puts the -resume logfile -argument before the script file name. I'm sure the order doesn't matter but -the contradiction is confusing. - Notes to add (from Mike): - explain what aspects of a Swift script make it restartable, and which @@ -443,14 +438,14 @@ RunID: 20100310-1105-4okarq08 Progress: -SwiftScript trace: 1, output/myfile.h11v04.mytype -SwiftScript trace: 2, home/wilde/bigdata/data/sample/h11v05.tif -SwiftScript trace: 3, home/wilde/bigdata/data/sample/h12v04.tif -SwiftScript trace: 0, output/myfile.h32v08.mytype -SwiftScript trace: 0, home/wilde/bigdata/data/sample/h32v08.tif -SwiftScript trace: 3, output/myfile.h12v04.mytype -SwiftScript trace: 1, home/wilde/bigdata/data/sample/h11v04.tif -SwiftScript trace: 2, output/myfile.h11v05.mytype +Swift script trace: 1, output/myfile.h11v04.mytype +Swift script trace: 2, home/wilde/bigdata/data/sample/h11v05.tif +Swift script trace: 3, home/wilde/bigdata/data/sample/h12v04.tif +Swift script trace: 0, output/myfile.h32v08.mytype +Swift script trace: 0, home/wilde/bigdata/data/sample/h32v08.tif +Swift script trace: 3, output/myfile.h12v04.mytype +Swift script trace: 1, home/wilde/bigdata/data/sample/h11v04.tif +Swift script trace: 2, output/myfile.h11v05.mytype Final status: login1$ ---- Modified: branches/faster/docs/documentation/building =================================================================== --- branches/faster/docs/documentation/building 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/documentation/building 2013-07-08 06:01:39 UTC (rev 6613) @@ -10,6 +10,7 @@ * asciidoc and a2x (http://www.methods.co.nz/asciidoc) * dblatex (http://dblatex.sourceforge.net) * source-highlight (http://www.gnu.org/software/src-highlite) +* For Mac OSX users only: coreutils (installation via macports recommended) For CI users, compiled versions of these packages can be found in ~davidk. Modified: branches/faster/docs/userguide/app_procedures =================================================================== --- branches/faster/docs/userguide/app_procedures 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/userguide/app_procedures 2013-07-08 06:01:39 UTC (rev 6613) @@ -15,7 +15,7 @@ mechanisms by which Swift performs that translation; that is described in the next section. -In this section, this example SwiftScript program is used for reference: +In this section, this example Swift script is used for reference: ---- type file; @@ -40,7 +40,7 @@ This application workspace directory will not be shared with any other application procedure execution attempt; all application procedure execution attempts will run with distinct application procedure -workspaces. (for the avoidance of doubt: If a SwiftScript procedure +workspaces. (for the avoidance of doubt: If a Swift script procedure invocation is subject to multiple application procedure execution attempts (due to Swift-level restarts, retries or replication) then each of those application procedure execution attempts will be made in a @@ -87,7 +87,7 @@ of the application executable), then the application executable should exit with unix return code not equal to 0. - * Each file mapped from an output parameter of the SwiftScript + * Each file mapped from an output parameter of the Swift script procedure call must exist. Files will be mapped in the same way as for input files. @@ -212,7 +212,7 @@ information at execution time to aid in debugging and provenance capture. -SwiftScript language compilation layer +Swift script language compilation layer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Step i: text to XML intermediate form parser/processor. parser written in ANTLR - see resources/VDL.g. The XML Schema Definition (XSD) for the @@ -220,7 +220,7 @@ Step ii: XML intermediate form to Karajan workflow. Karajan.java - reads the XML intermediate form. compiles to karajan workflow language - for -example, expressions are converted from SwiftScript syntax into Karajan +example, expressions are converted from Swift script syntax into Karajan syntax, and function invocations become karajan function invocations with various modifications to parameters to accomodate return parameters and dataset handling. @@ -261,7 +261,7 @@ Function reference ------------------ This section details functions that are available for use in the -SwiftScript language. +Swift scripting language. @arg ~~~~ @@ -287,8 +287,8 @@ Swift v0.3-dev r1674 (modified locally) RunID: 20080220-1548-ylc4pmda -SwiftScript trace: defaultvalue -SwiftScript trace: hello +Swift trace: defaultvalue +Swift trace: hello ---- @extractint @@ -408,13 +408,13 @@ @toint ~~~~~~ @toint(input) will parse its input string into an integer. This can be -used with @arg to pass input parameters to a SwiftScript program as +used with @arg to pass input parameters to a Swift script as integers. @tofloat ~~~~~~ @tofloat(input) will parse its input string into a floating point number. This can be -used with @arg to pass input parameters to a SwiftScript program as +used with @arg to pass input parameters to a Swift script as floating point numbers. @length @@ -428,7 +428,7 @@ Built-in procedure reference ---------------------------- This section details built-in procedures that are available for use in -the SwiftScript language. +the Swift scripting language. readData ~~~~~~~~ Modified: branches/faster/docs/userguide/coasters =================================================================== --- branches/faster/docs/userguide/coasters 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/userguide/coasters 2013-07-08 06:01:39 UTC (rev 6613) @@ -3,40 +3,39 @@ Introduction ~~~~~~~~~~~~ -In many applications, Swift performance can be greatly enhanced by the -use of coasters. Coasters provide a low-overhead job submission -and file transfer mechanism suited for the execution of short jobs (on -the order of a few seconds) and the transfer of small files (on the -order of a few kilobytes) for which other grid protocols such as GRAM -and GridFTP are poorly suited. +Coasters are the Swift's implementation of _pilot job abstraction_. +In many applications, Swift performance can be greatly enhanced by the use of +coasters. Coasters provide a low-overhead job submission and file transfer +mechanism suited for the execution of jobs and the transfer of files for which +other grid protocols such as GRAM and GridFTP are poorly suited. + Benefits ~~~~~~~~ +Much of the overhead associated with other grid protocols (such as +authentication and authorization, and allocation of worker nodes by the site's +local resource manager) is reduced, because that overhead is associated with +the allocation of a coaster pilot or coaster worker, rather than with every +Swift-level procedure invocation; potentially hundreds or thousands of +Swift-level procedure invocations can be run through a single worker. Coasters +can be configured for two purposes: job execution and file staging. In +practice, the Swift script remains the same while working with coasters. A +detailed description of coaster mechanism is explained in the next section. -The coaster mechanism submits a pilot job using some other execution -mechanism such as GRAM, and for each worker node that will be used in a -remote cluster, it submits a worker job, again using some other -execution mechanism such as GRAM. Details on the design of the coaster -mechanism can be found here. - Mechanism ~~~~~~~~~ +Coasters run at the task management layer logically under the Swift script. The +jobs and data movement requirements resulting after the interpretation of a +Swift script are handled by the coasters. The coaster mechanism submits a pilot +job using some other execution mechanism such as GRAM, SGE or PBS scheduler, +and for each worker node that will be used in a remote cluster, it submits a +worker job, again using some other execution mechanism such as GRAM. Details on +the design of the coaster mechanism can be found here: +. The pilot job manages file transfers +and the dispatch of execution jobs to workers. -The pilot job manages file transfers and the dispatch of execution jobs -to workers. Much of the overhead associated with other grid protocols -(such as authentication and authorization, and allocation of worker -nodes by the site's local resource manager) is reduced, because that -overhead is associated with the allocation of a coaster pilot or coaster -worker, rather than with every Swift-level procedure invocation; -potentially hundreds or thousands of Swift-level procedure invocations -can be run through a single worker. - -Coasters can be configured for two purposes: job execution and -file staging. - Coasters How-to ~~~~~~~~~~~~~~~ - To use for job execution, specify a sites.xml execution element like this: ---- @@ -45,10 +44,10 @@ The jobmanager string contains more detail than with other providers. It contains either two or three colon separated fields: 1:the provider to -be use to execute the coaster head job - this provider will submit from +be use to execute the coaster pilot job - this provider will submit from the Swift client side environment. Commonly this will be one of the GRAM providers; 2: the provider to be used to execute coaster worker jobs. -This provider will be used to submit from the coaster head job +This provider will be used to submit from the coaster pilot job environment, so a local scheduler provider can sometimes be used instead of GRAM. 3: optionally, the jobmanager to be used when submitting worker job using the provider specified in field 2. @@ -60,10 +59,10 @@ ---- The url parameter should be a pseudo-URI formed with the URI scheme -being the name of the provider to use to submit the coaster head job, +being the name of the provider to use to submit the coaster pilot job, and the hostname portion being the hostname to be used to execute the -coaster head job. Note that this provider and hostname will be used for -execution of a coaster head job, not for file transfer; so for example, +coaster pilot job. Note that this provider and hostname will be used for +execution of a coaster pilot job, not for file transfer; so for example, a GRAM endpoint should be specified here rather than a GridFTP endpoint. Coasters are affected by the following profile settings, which are Modified: branches/faster/docs/userguide/commands =================================================================== --- branches/faster/docs/userguide/commands 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/userguide/commands 2013-07-08 06:01:39 UTC (rev 6613) @@ -8,15 +8,15 @@ swift ~~~~~ The swift command is the main command line tool for executing -SwiftScript programs. +Swift scripts. Command-line Syntax ^^^^^^^^^^^^^^^^^^^ The swift command is invoked as follows: swift [options] -SwiftScript-program [SwiftScript-arguments]* with options taken from the -following list, and SwiftScript-arguments made available to the -SwiftScript program through the @arg function. +Swifti script [Swift-arguments]* with options taken from the +following list, and Swift script arguments made available to the +Swift script through the @arg function. Swift command-line options @@ -26,11 +26,11 @@ -typecheck - Does a typecheck of a SwiftScript program, instead of executing it. + Does a typecheck of a Swift script, instead of executing it. -dryrun - Runs the SwiftScript program without submitting any jobs (can be + Runs the Swift script without submitting any jobs (can be used to get a graph) -monitor Modified: branches/faster/docs/userguide/configuration_properties =================================================================== --- branches/faster/docs/userguide/configuration_properties 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/userguide/configuration_properties 2013-07-08 06:01:39 UTC (rev 6613) @@ -173,12 +173,12 @@ value of this property. If set to false, Swift will report the first error encountered and immediately stop execution. If set to true, Swift will attempt to run as much as possible from a - SwiftScript program before stopping execution and reporting all + Swift script before stopping execution and reporting all errors encountered. - When developing SwiftScript programs, using the default value of + When developing Swift scripts, using the default value of false can make the program easier to debug. However in production - runs, using true will allow more of a SwiftScript program to be + runs, using true will allow more of a Swift script to be run before Swift aborts execution. pgraph @@ -188,7 +188,7 @@ Default value: false Swift can generate a Graphviz file - representing the structure of the SwiftScript program it has run. If + representing the structure of the Swift script it has run. If this property is set to true, Swift will save the provenance graph in a file named by concatenating the program name and the instance ID (e.g. helloworld-ht0adgi315l61.dot). Modified: branches/faster/docs/userguide/language =================================================================== --- branches/faster/docs/userguide/language 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/userguide/language 2013-07-08 06:01:39 UTC (rev 6613) @@ -1,5 +1,5 @@ -The SwiftScript Language ------------------------- +The Swift scripting Language +---------------------------- Language basics ~~~~~~~~~~~~~~~ @@ -64,15 +64,15 @@ The examples above have used the type image without any definition of that type. We can declare it as a marker type which has no structure -exposed to SwiftScript: +exposed to Swift script: ---- type image; ---- This does not indicate that the data is unstructured; but it indicates -that the structure of the data is not exposed to SwiftScript. Instead, -SwiftScript will treat variables of this type as individual opaque files. +that the structure of the data is not exposed to Swift. Instead, +Swift will treat variables of this type as individual opaque files. With mechanisms to declare types, map variables to data files, and declare and invoke procedures, we can build a complete (albeit simple) @@ -172,7 +172,7 @@ z=q(y); ---- -Arrays in SwiftScript are more monotonic - a generalisation of being +Arrays in Swift are more monotonic - a generalisation of being assignment. Knowledge about the content of an array increases during execution, but cannot otherwise change. Each element of the array is itself single assignment or monotonic (depending on its type). During a @@ -208,9 +208,9 @@ ~~~~~~~~~~~~~~~~~~~ As with many other programming languages, procedures consisting of -SwiftScript code can be defined. These differ from the previously +Swift script can be defined. These differ from the previously mentioned procedures declared with the app keyword, as they invoke -other SwiftScript procedures rather than a component program. +other Swift procedures rather than a component program. ---- (file output) process (file input) { @@ -249,13 +249,13 @@ More about types ~~~~~~~~~~~~~~~~ -Each variable and procedure parameter in SwiftScript is strongly typed. +Each variable and procedure parameter in Swift script is strongly typed. Types are used to structure data, to aid in debugging and checking program correctness and to influence how Swift interacts with data. The image type declared in previous examples is a marker type. Marker types indicate that data for a variable is stored in a single -file with no further structure exposed at the SwiftScript level. +file with no further structure exposed at the Swift script level. Arrays have been mentioned above, in the arrays section. A code block may be applied to each element of an array using foreach; or Modified: branches/faster/docs/userguide/log-processing =================================================================== --- branches/faster/docs/userguide/log-processing 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/userguide/log-processing 2013-07-08 06:01:39 UTC (rev 6613) @@ -3,71 +3,24 @@ -------------- To properly generate log plots, you must enable VDL/Karajan logging. -TODO:How? +This can be done by putting the following lines in log4j.properties file found in the /etc directory of Swift installation: -You should check the scripts that you intend to use to determine -what log lines they require and ensure that you are generating -those lines via log4j.properties - -Make sure log4.properties contains: -------------------------------------- log4j.logger.swift=DEBUG log4j.logger.org.globus.cog.abstraction.coaster.service.job.manager.Cpu=DEBUG log4j.logger.org.globus.cog.abstraction.coaster.service.job.manager.Block=DEBUG -------------------------------------- -TODO: Does it work for coasters-based runs only? -Meaning and interpretation of Swift log messages -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +All the executables, zsh and perl scripts mentioned in the following steps are +available in the libexec/log-processing directory of your Swift installation. -A Swift log file is typically a text file with the name of the Swift run and -its timestamp in the filename and an extension ".log". In addition, a ".rlog" -file is Swift's resume log which is used by Swift when a run is resumed using -the "-resume" option. The .rlog file is only for Swift's internal purpose and -not to be interpreted by the user. - -Each line in the log file is typically made up of three parts. The first part -is the timestamp, the second is the type of log message and the third is the -message itself. The types of log messages follows the java log4j standard types -of TRACE, DEBUG, INFO, WARN, ERROR and FATAL. This section lists the various -Swift log messages and explains the meaning and likely interpretation of those -messages. Please note that the list is not comprehensive at this time. Also -note that we will ignore the timestamps here. - -. _DEBUG Loader arguments: [-sites.file, sites.xml, -config, cf, -tc.file, tc, postproc-gridftp.swift]_ -. _DEBUG Loader Max heap: 5592449024_ -. _DEBUG textfiles BEGIN_ -. _DEBUG Loader kmlversion is_ -. _DEBUG VDL2ExecutionContext Stack dump_ -. _INFO SetFieldValue Set_ -. _INFO get__site STARTCOMPOUND thread=0-8 name=get__site_ -. _INFO vdl:execute START thread=0-8-0 tr=_ -. _INFO GlobalSubmitQueue No global submit throttle set. Using default (1024)_ -. _DEBUG vdl:execute2 THREAD_ASSOCIATION jobid=getsite-ymj72ook thread=0-8-0-1 host=localhost replicationGroup=xmj72ook_ -. _DEBUG vdl:execute2 JOB_START jobid=getsite-ymj72ook tr=getsite arguments=[644] tmpdir=postproc-gridftp-20120319-0942-adf1o1u2/jobs/y/getsite-ymj72ook host=localhost_ -. _INFO GridExec TASK_DEFINITION_ -. _WARN RemoteConfiguration Find: http://140.221.8.62:38260_ -. _INFO AbstractStreamKarajanChannel$Multiplexer Multiplexer 0 started_ -. _INFO AbstractStreamKarajanChannel$Multiplexer (0) Scheduling SC-null for addition_ -. _INFO AbstractStreamKarajanChannel Channel configured_ -. _INFO MetaChannel MetaChannel: 651528505[1478354072: {}] -> null.bind -> SC-null_ -. _INFO ReadBuffer Will ask for 1 buffers for a size of 6070_ -. _INFO ThrottleManager O maxBuffers=512, crtBuffers=0, allowedTransfers=256, active=0, suspended=0_ -. _INFO ThrottleManager mem=113.54 MB, heap=482.88 MB, maxHeap=5.21 GB_ -. _INFO ThrottleManager I maxBuffers=512, crtBuffers=0, allowedTransfers=256, active=0, suspended=0_ -. _INFO PerformanceDiagnosticInputStream [MEM] Heap total: 482.88 MB, Heap used: 118.58 MB_ -. _INFO vdl:execute END_SUCCESS thread=0-8-0 tr=getsite_ -. _INFO WeightedHostScoreScheduler CONTACT_SELECTED host=localhost, score=99.854_ -. _ - - Log plotting ~~~~~~~~~~~~ Normalize event times in the log to the run start time ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -* Generate the log, assuming the log is titled +swift-run.log+ +* Generate the normalized log, assuming the log is titled +swift-run.log+ ------------------------------------------ ./normalize-log.pl file.contains.start.time swift-run.log > swift-run.norm @@ -148,3 +101,48 @@ ------------------------------------------ swift_plotter.zsh -s buckets.cfg buckets.eps buckets.data ------------------------------------------ + + +Meaning and interpretation of Swift log messages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A Swift log file is typically a text file with the name of the Swift run and +its timestamp in the filename and an extension ".log". In addition, a ".rlog" +file is Swift's resume log which is used by Swift when a run is resumed using +the "-resume" option. The .rlog file is only for Swift's internal purpose and +not to be interpreted by the user. + +Each line in the log file is typically made up of three parts. The first part +is the timestamp, the second is the type of log message and the third is the +message itself. The types of log messages follows the java log4j standard types +of TRACE, DEBUG, INFO, WARN, ERROR and FATAL. This section lists the various +Swift log messages and explains the meaning and likely interpretation of those +messages. Please note that the list is not comprehensive at this time. Also +note that we will ignore the timestamps here. + +. _DEBUG Loader arguments: [-sites.file, sites.xml, -config, cf, -tc.file, tc, postproc-gridftp.swift]_ +. _DEBUG Loader Max heap: 5592449024_ +. _DEBUG textfiles BEGIN_ +. _DEBUG Loader kmlversion is_ +. _DEBUG VDL2ExecutionContext Stack dump_ +. _INFO SetFieldValue Set_ +. _INFO get__site STARTCOMPOUND thread=0-8 name=get__site_ +. _INFO vdl:execute START thread=0-8-0 tr=_ +. _INFO GlobalSubmitQueue No global submit throttle set. Using default (1024)_ +. _DEBUG vdl:execute2 THREAD_ASSOCIATION jobid=getsite-ymj72ook thread=0-8-0-1 host=localhost replicationGroup=xmj72ook_ +. _DEBUG vdl:execute2 JOB_START jobid=getsite-ymj72ook tr=getsite arguments=[644] tmpdir=postproc-gridftp-20120319-0942-adf1o1u2/jobs/y/getsite-ymj72ook host=localhost_ +. _INFO GridExec TASK_DEFINITION_ +. _WARN RemoteConfiguration Find: http://140.221.8.62:38260_ +. _INFO AbstractStreamKarajanChannel$Multiplexer Multiplexer 0 started_ +. _INFO AbstractStreamKarajanChannel$Multiplexer (0) Scheduling SC-null for addition_ +. _INFO AbstractStreamKarajanChannel Channel configured_ +. _INFO MetaChannel MetaChannel: 651528505[1478354072: {}] -> null.bind -> SC-null_ +. _INFO ReadBuffer Will ask for 1 buffers for a size of 6070_ +. _INFO ThrottleManager O maxBuffers=512, crtBuffers=0, allowedTransfers=256, active=0, suspended=0_ +. _INFO ThrottleManager mem=113.54 MB, heap=482.88 MB, maxHeap=5.21 GB_ +. _INFO ThrottleManager I maxBuffers=512, crtBuffers=0, allowedTransfers=256, active=0, suspended=0_ +. _INFO PerformanceDiagnosticInputStream [MEM] Heap total: 482.88 MB, Heap used: 118.58 MB_ +. _INFO vdl:execute END_SUCCESS thread=0-8-0 tr=getsite_ +. _INFO WeightedHostScoreScheduler CONTACT_SELECTED host=localhost, score=99.854_ +. _ + Modified: branches/faster/docs/userguide/mappers =================================================================== --- branches/faster/docs/userguide/mappers 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/userguide/mappers 2013-07-08 06:01:39 UTC (rev 6613) @@ -24,7 +24,7 @@ The above example declares a dataset called f1, which uses a single file mapper to map a file from a specific location. -SwiftScript has a simplified syntax for this case, since +Swift has a simplified syntax for this case, since single_file_mapper is frequently used: ---- @@ -35,20 +35,20 @@ patterns. These are documented in the mappers section of this guide. -More technical details about SwiftScript -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The syntax of SwiftScript has a superficial resemblance to C and Java. +More technical details about Swift script +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The syntax of Swift script has a superficial resemblance to C and Java. For example, { and } characters are used to enclose blocks of statements. -A SwiftScript program consists of a number of statements. Statements may +A Swift script consists of a number of statements. Statements may declare types, procedures and variables, assign values to variables, and express operations over arrays. Variables ^^^^^^^^^ -Variables in SwiftScript are declared to be of a specific type. -Assignments to those variables must be data of that type. SwiftScript +Variables in Swift scripts are declared to be of a specific type. +Assignments to those variables must be data of that type. Swift script variables are single-assignment - a value may be assigned to a variable at most once. This assignment can happen at declaration time or later on in execution. When an attempt to read from a variable that has not yet @@ -98,10 +98,10 @@ ~~~~~~~~~~ There are two kinds of procedure: An atomic procedure, which describes how an external program can be executed; and compound procedures which -consist of a sequence of SwiftScript statements. +consist of a sequence of Swift script statements. A procedure declaration defines the name of a procedure and its input -and output parameters. SwiftScript procedures can take multiple inputs +and output parameters. Swift script procedures can take multiple inputs and produce multiple outputs. Inputs are specified to the right of the function name, and outputs are specified to the left. For example: @@ -155,7 +155,7 @@ Compound procedures ^^^^^^^^^^^^^^^^^^^ -A compound procedure contains a set of SwiftScript statements: +A compound procedure contains a set of Swift script statements: ---- (type2 b) foo_bar (type1 a) { @@ -167,7 +167,7 @@ Control Constructs ~~~~~~~~~~~~~~~~~~ -SwiftScript provides if, switch, foreach, and iterate +Swift script provides if, switch, foreach, and iterate constructs, with syntax and semantics similar to comparable constructs in other high-level languages. @@ -265,7 +265,7 @@ Operators ~~~~~~~~~ -The following infix operators are available for use in SwiftScript +The following infix operators are available for use in Swift script expressions. [options="header, autowidth"] @@ -286,7 +286,7 @@ Global constants ~~~~~~~~~~~~~~~~ -At the top level of a SwiftScript program, the global modified may be +At the top level of a Swift script program, the global modified may be added to a declaration so that it is visible throughout the program, rather than only at the top level of the program. This allows global constants (of any type) to be defined. (since Swift 0.10) @@ -295,9 +295,9 @@ Imports ~~~~~~~ The import directive can be used to import definitions from another -SwiftScript file. (since Swift 0.10) +Swift file. -For example, a SwiftScript program might contain this: +For example, a Swift script might contain this: ---- import "defs"; @@ -337,7 +337,7 @@ is imported multiple times, for example in different files, then Swift will only process the imports once. -Imports may contain anything that is valid in a SwiftScript program, +Imports may contain anything that is valid in a Swift script, including the code that causes remote execution. Mappers @@ -754,9 +754,11 @@ The output (stdout) of the executable should consist of two columns of data, separated by a space. The first column should be the path of the mapped -variable, in SwiftScript syntax (for example [2] means the 2nd element -of an array) or the symbol $ to represent the root of the mapped -variable. The following table shows the symbols that should appear in the first column corresponding to the mapping of different types of swift constructs such as scalars, arrays and structs. +variable, in Swift script syntax (for example [2] means the 2nd element of an +array) or the symbol $ to represent the root of the mapped variable. The +following table shows the symbols that should appear in the first column +corresponding to the mapping of different types of swift constructs such as +scalars, arrays and structs. [option="header, autowidth"] |============= @@ -793,7 +795,12 @@ |stus[2]|qux |=========== -Advanced Example: The following mapper.sh is an advanced example of an external mapper that maps a two-dimensional array to a directory of files. The files in the said directory are identified by their names appended by a number between 000 and 099. The first index of the array maps to the first part of the filename while the second index of the array maps to the second part of the filename. +Advanced Example: The following mapper.sh is an advanced example of an external +mapper that maps a two-dimensional array to a directory of files. The files in +the said directory are identified by their names appended by a number between +000 and 099. The first index of the array maps to the first part of the +filename while the second index of the array maps to the second part of the +filename. ---- #!/bin/sh @@ -837,7 +844,9 @@ ---- -Assuming there are 4 files with name aaa, bbb, ccc, ddd and a mod_index of 10, we will have 4x10=40 files mapped to a two-dimensional array in the following pattern: +Assuming there are 4 files with name aaa, bbb, ccc, ddd and a mod_index of 10, +we will have 4x10=40 files mapped to a two-dimensional array in the following +pattern: [options="header, autowidth"] |============ Modified: branches/faster/docs/userguide/overview =================================================================== --- branches/faster/docs/userguide/overview 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/userguide/overview 2013-07-08 06:01:39 UTC (rev 6613) @@ -1,6 +1,6 @@ Overview -------- -This manual provides reference material for Swift: the SwiftScript +This manual provides reference material for Swift: the Swift language and the Swift runtime system. For introductory material, consult the Swift tutorial . @@ -10,9 +10,9 @@ and procedural composition. Swift programs (or workflows) are written in a language called -SwiftScript. +Swift scripts. -SwiftScript programs are dataflow oriented - they are primarily +Swift scripts are dataflow oriented - they are primarily concerned with processing (possibly large) collections of data files, by invoking programs to do that processing. Swift handles execution of such programs on remote sites by choosing sites, handling the staging of Modified: branches/faster/docs/userguide/reliability_mechanisms =================================================================== --- branches/faster/docs/userguide/reliability_mechanisms 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/userguide/reliability_mechanisms 2013-07-08 06:01:39 UTC (rev 6613) @@ -26,7 +26,7 @@ using the unique job ID and a .rlog extension. This restart log can then be passed to a subsequent Swift invocation using the -resume parameter. Swift will resume execution, avoiding execution of -invocations that have previously completed successfully. The SwiftScript +invocations that have previously completed successfully. The Swift source file and input data files should not be modified between runs. Every run creates a restart log file with a named composed of the file @@ -38,7 +38,7 @@ fails, swift can use the restart log file to continue execution from a point before the failure occurred. In order to restart from a restart log file, the -resume logfile argument can be used after the -SwiftScript program file name. Example: +Swift script file name. Example: ---- $ swift -resume example-ht0adgi315l61.0.rlog example.swift. Modified: branches/faster/docs/userguide/transformation_catalog =================================================================== --- branches/faster/docs/userguide/transformation_catalog 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/userguide/transformation_catalog 2013-07-08 06:01:39 UTC (rev 6613) @@ -22,7 +22,7 @@ The site field should correspond to a site name listed in the sites catalog. The transformation name should correspond to the transformation name -used in a SwiftScript app procedure. +used in a Swift script app procedure. The executable path should specify where the particular executable is located on that site. Modified: branches/faster/docs/utils/gensites.txt =================================================================== --- branches/faster/docs/utils/gensites.txt 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/docs/utils/gensites.txt 2013-07-08 06:01:39 UTC (rev 6613) @@ -51,18 +51,11 @@ ----- 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: +you an idea of what settings you will need to specify. ------ -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. -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 ------------------------------ Modified: branches/faster/libexec/log-processing/README.txt =================================================================== --- branches/faster/libexec/log-processing/README.txt 2013-07-08 05:54:14 UTC (rev 6612) +++ branches/faster/libexec/log-processing/README.txt 2013-07-08 06:01:39 UTC (rev 6613) @@ -30,6 +30,7 @@ ------------------------------------------ ./normalize-log.pl file.contains.start.time swift-run.log > swift-run.norm ------------------------------------------ +Note: This script not available. Make a basic load plot from Coasters Cpu log lines -------------------------------------------------- @@ -40,12 +41,15 @@ ------------------------------------------ ./cpu-job-load.pl < swift-run.norm > load.data ------------------------------------------ +Note: This script not available. + . Plot with the JFreeChart-based plotter in usertools/plotter: + ------------------------------------------ swift_plotter.zsh -s load.cfg load.eps load.data ------------------------------------------ Note: The load.cfg is available from swift/libexec/log-processing/ +Note: This script not available. Make a basic job completion plot from Coasters Cpu log lines @@ -64,6 +68,7 @@ ------------------------------------------ swift_plotter.zsh -s completed.cfg completed.eps completed.data ------------------------------------------ +Note: This script not available. Make a basic Block allocation plot from Coasters Block log lines ---------------------------------------------------------------- @@ -75,12 +80,14 @@ ------------------------------------------ ./block-level.pl < swift-run.norm > blocks.data ------------------------------------------ +Note: This script not available. . Plot with the JFreeChart-based plotter in usertools/plotter: + ------------------------------------------ swift_plotter.zsh -s blocks.{cfg,eps,data} ------------------------------------------ +Note: This script not available. Make a job run time distribution plot from Coasters Cpu log lines ----------------------------------------------------------------- @@ -98,12 +105,14 @@ ------------------------------------------ ./buckets.pl 1 times.data > buckets.data ------------------------------------------ +Note: This script not available. . Plot with the JFreeChart-based plotter in usertools/plotter: + ------------------------------------------ swift_plotter.zsh -s buckets.cfg buckets.eps buckets.data ------------------------------------------ +Note: This script not available. == Utilities From hategan at ci.uchicago.edu Mon Jul 8 01:15:21 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 01:15:21 -0500 (CDT) Subject: [Swift-commit] r6614 - in branches/faster: . src src/org/griphyn/vdl/engine tests/language-behaviour/arrays Message-ID: <20130708061521.792619CCB1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 01:15:10 -0500 (Mon, 08 Jul 2013) New Revision: 6614 Added: branches/faster/tests/language-behaviour/arrays/210-closing-if-full-xor-partial.swift Modified: branches/faster/ branches/faster/src/ branches/faster/src/org/griphyn/vdl/engine/VariableScope.java Log: merged 6255 from trunk Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241 + /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241,6255 Property changes on: branches/faster/src ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.94/src:6387 /trunk/src:6214 + /branches/release-0.94/src:6387 /trunk/src:6214,6255 Modified: branches/faster/src/org/griphyn/vdl/engine/VariableScope.java =================================================================== --- branches/faster/src/org/griphyn/vdl/engine/VariableScope.java 2013-07-08 06:01:39 UTC (rev 6613) +++ branches/faster/src/org/griphyn/vdl/engine/VariableScope.java 2013-07-08 06:15:10 UTC (rev 6614) @@ -654,6 +654,9 @@ } private void setPreClose(String name, int count) { + if (inhibitClosing != null && inhibitClosing.contains(name)) { + return; + } setCount("preClose", name, count, new RefCountSetter() { @Override @@ -1039,7 +1042,8 @@ } presentStatementPostStatements.clear(); outputs.clear(); - inhibitClosing = null; + // Cannot set inhibitClosing to null here, since + // it may break then/else linked closing. See bug 927 } private String join(List l) { Copied: branches/faster/tests/language-behaviour/arrays/210-closing-if-full-xor-partial.swift (from rev 6255, trunk/tests/language-behaviour/arrays/210-closing-if-full-xor-partial.swift) =================================================================== --- branches/faster/tests/language-behaviour/arrays/210-closing-if-full-xor-partial.swift (rev 0) +++ branches/faster/tests/language-behaviour/arrays/210-closing-if-full-xor-partial.swift 2013-07-08 06:15:10 UTC (rev 6614) @@ -0,0 +1,22 @@ +type file; + +app (file o) echo () +{ + echo "foo.txt" stdout=@o; +} + +(file fileList[]) createFileArray() { + foreach i in [1:5] { + fileList[i]=echo(); + } +} + +file myFileArray[]; + + + + if (1 == 1) { + myFileArray = createFileArray(); + } else { + myFileArray[0] = echo(); +} \ No newline at end of file From hategan at ci.uchicago.edu Mon Jul 8 01:17:52 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 01:17:52 -0500 (CDT) Subject: [Swift-commit] r6615 - in branches/faster: . docs/cookbook docs/userguide Message-ID: <20130708061752.51A6E9CCB1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 01:17:51 -0500 (Mon, 08 Jul 2013) New Revision: 6615 Modified: branches/faster/ branches/faster/docs/cookbook/coasters branches/faster/docs/userguide/app_procedures branches/faster/docs/userguide/language Log: merged 6256-6258 from trunk Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241,6255 + /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241,6255-6258 Modified: branches/faster/docs/cookbook/coasters =================================================================== --- branches/faster/docs/cookbook/coasters 2013-07-08 06:15:10 UTC (rev 6614) +++ branches/faster/docs/cookbook/coasters 2013-07-08 06:17:51 UTC (rev 6615) @@ -1,8 +1,8 @@ Coasters -------- Coasters were introduced in Swift v0.6 as an experimental feature. In many -applications, Swift performance can be greatly enhanced by the use of CoG -coasters. CoG coasters provide a low-overhead job submission and file transfer +applications, Swift performance can be greatly enhanced by the use of +coasters. Coasters provide a low-overhead job submission and file transfer mechanism suited for the execution of short jobs (on the order of a few seconds). A detailed information on coasters can be found at http://www.ci.uchicago.edu/swift/guides/userguide.php#coasters. //**Include neat diagrams.** Modified: branches/faster/docs/userguide/app_procedures =================================================================== --- branches/faster/docs/userguide/app_procedures 2013-07-08 06:15:10 UTC (rev 6614) +++ branches/faster/docs/userguide/app_procedures 2013-07-08 06:17:51 UTC (rev 6615) @@ -432,27 +432,46 @@ readData ~~~~~~~~ -readData will read data from a specified file. +readData will read data from a specified file and assign it to Swift variable. The format of the input file is +controlled by the type of the return value. For scalar return types, such as +int, the specified file should contain a single value of that type. For arrays +of scalars, the specified file should contain one value per line. For complex types +of scalars, the file should contain two rows. The first row should be structure +member names separated by whitespace. The second row should be the +corresponding values for each structure member, separated by whitespace, in the +same order as the header row. For arrays of structs, the file should contain a +heading row listing structure member names separated by whitespace. There +should be one row for each element of the array, with structure member elements +listed in the same order as the header row and separated by whitespace. The following example shows how readData() can be used to populate an array of Swift struct-like complex type: -The format of the input file is controlled by the type of the return value. +---- +type Employee{ + string name; + int id; + string loc; +} -For scalar return types, such as int, the specified file should contain -a single value of that type. +Employee emps[] = readData("emps.txt"); +---- -For arrays of scalars, the specified file should contain one value per -line. +Where the contents of the "emps.txt" file are: -For structs of scalars, the file should contain two rows. The first row -should be structure member names separated by whitespace. The second row -should be the corresponding values for each structure member, separated -by whitespace, in the same order as the header row. +---- +name id address +Thomas 2222 Chicago +Gina 3333 Boston +Anne 4444 Houston +---- -For arrays of structs, the file should contain a heading row listing -structure member names separated by whitespace. There should be one row -for each element of the array, with structure member elements listed in -the same order as the header row and separated by whitespace. (since -Swift 0.4) +This will result in the array "emps" with 3 members. This can be processed within a Swift script using the foreach construct as follows: +---- +foreach emp in emps{ + tracef("Employee %s lives in %s and has id %d", emp.name, emp.loc, emp.id); +} +---- + + readStructured ~~~~~~~~~~~~~~ readStructured will read data from a specified file, like readdata, but Modified: branches/faster/docs/userguide/language =================================================================== --- branches/faster/docs/userguide/language 2013-07-08 06:15:10 UTC (rev 6614) +++ branches/faster/docs/userguide/language 2013-07-08 06:17:51 UTC (rev 6615) @@ -11,20 +11,52 @@ variables. The syntax superficially resembles C and Java. For example, { and } characters are used to enclose blocks of statements. -Types in Swift can be atomic or composite. An atomic type can be -either a primitive type or a mapped type. Swift provides a fixed set -of primitive types, such as integer and string. A mapped type -indicates that the actual data does not reside in CPU addressable memory -(as it would in conventional programming languages), but in POSIX-like -files. Composite types are further subdivided into structures and -arrays. Structures are similar in most respects to structure types in -other languages. Arrays use numeric indices, but are sparse. They can -contain elements of any type, including other array types, but all -elements in an array must be of the same type. We often refer to +Types in Swift can be atomic or composite. An atomic type can be either a +primitive type or a mapped type. Swift provides a fixed set of primitive types, +such as integer and string. A mapped type indicates that the actual data does +not reside in CPU addressable memory (as it would in conventional programming +languages), but in POSIX-like files. Composite types are further subdivided +into structures and arrays. Structures are similar in most respects to +structure types in other languages. In Swift, structures are defined using the +_type_ keyword (there is no struct keyword). Arrays use numeric indices, but +are sparse. They can contain elements of any type, including other array types, +but all elements in an array must be of the same type. We often refer to instances of composites of mapped types as datasets. image:type-hierarchy.png[] +Atomic types such as string, int, float and double work the same way as in +C-like programming languages. A variable of such atomic types can be defined as +follows: + +---- +string astring = "hello"; +---- + +A struct variable is defined using the _type_ keyword as discussed above. +Following is an example of a variable holding employee data: + +---- +type Employee{ + string name; + int id; + string loc; +} +---- + +The members of the structure defined above can be accessed using the dot +notation. An example of a variable of type Employee is as follows: + +---- +Employee emp; +emp.name="Thomas"; +emp.id=2222; +emp.loc="Chicago"; +---- + +Arrays of structures are allowed in Swift. A convenient way of populating +structures and arrays of structures is to use the _readData()_ function. + Mapped type and composite type variable declarations can be annotated with a mapping descriptor indicating the file(s) that make up that dataset. For example, the following line declares a variable named @@ -114,8 +146,14 @@ Arrays and Parallel Execution ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Arrays of values can be declared using the [] suffix. An array be -mapped to a collection of files, one element per file, by using a +Arrays of values can be declared using the [] suffix. Following is an example +of an array of strings: + +---- +string pets[] = ["shane", "noddy", "leo"]; +---- + +An array may be mapped to a collection of files, one element per file, by using a different form of mapping expression. For example, the filesys_mapper maps all files matching a particular unix glob pattern into an array: From hategan at ci.uchicago.edu Mon Jul 8 01:19:24 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 01:19:24 -0500 (CDT) Subject: [Swift-commit] r6616 - in branches/faster: . docs/userguide Message-ID: <20130708061924.810789CCB1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 01:19:24 -0500 (Mon, 08 Jul 2013) New Revision: 6616 Modified: branches/faster/ branches/faster/docs/userguide/app_procedures Log: merged 6263 from trunk Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241,6255-6258 + /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241,6255-6258,6263 Modified: branches/faster/docs/userguide/app_procedures =================================================================== --- branches/faster/docs/userguide/app_procedures 2013-07-08 06:17:51 UTC (rev 6615) +++ branches/faster/docs/userguide/app_procedures 2013-07-08 06:19:24 UTC (rev 6616) @@ -91,9 +91,10 @@ procedure call must exist. Files will be mapped in the same way as for input files. - (? Is it defined that output subdirectories will be precreated - before execution or should app executables expect to make them? - That's probably determined by the present behaviour of wrapper.sh) + * The output subdirectories will be precreated + before execution by Swift if defined within a Swift script such as the + location attribute of a mapper. App executables expect to make them if + they are referred to in the wrapper scripts. * Output produced by running the application executable on some inputs should be the same no matter how many times, when or where @@ -104,19 +105,19 @@ Things to not assume: - * anything about the path of the application workspace directory + * Anything about the path of the application workspace directory - * that either the application workspace directory will be deleted or + * That either the application workspace directory will be deleted or will continue to exist or will remain unmodified after execution has finished - * that files can be passed(?def) between application procedure + * That files can be passed between application procedure invocations through any mechanism except through files known to Swift through the mapping mechanism (there is some exception here for external datasets - there are a separate set of assertions that hold for external datasets) - * that application executables will run on any particular site of + * That application executables will run on any particular site of those available, or than any combination of applications will run on the same or different sites. From hategan at ci.uchicago.edu Mon Jul 8 01:22:19 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 01:22:19 -0500 (CDT) Subject: [Swift-commit] r6617 - in branches/faster: . etc/sites Message-ID: <20130708062219.C586F9CCB1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 01:22:15 -0500 (Mon, 08 Jul 2013) New Revision: 6617 Added: branches/faster/etc/sites/beagle branches/faster/etc/sites/beagle-ssh Modified: branches/faster/ Log: merged 6272, 6275 from trunk Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241,6255-6258,6263 + /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241,6255-6258,6263,6272,6275 Copied: branches/faster/etc/sites/beagle (from rev 6272, trunk/etc/sites/beagle) =================================================================== --- branches/faster/etc/sites/beagle (rev 0) +++ branches/faster/etc/sites/beagle 2013-07-08 06:22:15 UTC (rev 6617) @@ -0,0 +1,14 @@ + + + 24 + 100 + 100 + pbs.aprun;pbs.mpp;depth=24 + _WALLTIME_ + 50 + 1 + 12.00 + 10000 + + /lustre/beagle/{env.USER}/swiftwork + Copied: branches/faster/etc/sites/beagle-ssh (from rev 6275, trunk/etc/sites/beagle-ssh) =================================================================== --- branches/faster/etc/sites/beagle-ssh (rev 0) +++ branches/faster/etc/sites/beagle-ssh 2013-07-08 06:22:15 UTC (rev 6617) @@ -0,0 +1,15 @@ + + + 24 + 100 + 100 + pbs.aprun;pbs.mpp;depth=24 + _WALLTIME_ + /lustre/beagle/{env.USER}/swiftwork + 50 + 1 + 12.00 + 10000 + + /lustre/beagle/{env.USER}/swiftwork + From hategan at ci.uchicago.edu Mon Jul 8 01:24:47 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 01:24:47 -0500 (CDT) Subject: [Swift-commit] r6618 - in branches/faster: . docs docs/cookbook docs/userguide Message-ID: <20130708062447.A268F9CCB1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 01:24:47 -0500 (Mon, 08 Jul 2013) New Revision: 6618 Added: branches/faster/docs/merged/ Removed: branches/faster/docs/cookbook/coasters Modified: branches/faster/ branches/faster/docs/cookbook/cookbook.txt branches/faster/docs/userguide/commands Log: merged 6274 from trunk Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241,6255-6258,6263,6272,6275 + /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241,6255-6258,6263,6272,6274-6275 Deleted: branches/faster/docs/cookbook/coasters =================================================================== --- branches/faster/docs/cookbook/coasters 2013-07-08 06:22:15 UTC (rev 6617) +++ branches/faster/docs/cookbook/coasters 2013-07-08 06:24:47 UTC (rev 6618) @@ -1,110 +0,0 @@ -Coasters --------- -Coasters were introduced in Swift v0.6 as an experimental feature. In many -applications, Swift performance can be greatly enhanced by the use of -coasters. Coasters provide a low-overhead job submission and file transfer -mechanism suited for the execution of short jobs (on the order of a few -seconds). A detailed information on coasters can be found at http://www.ci.uchicago.edu/swift/guides/userguide.php#coasters. -//**Include neat diagrams.** - -Following is a coasters setup case-study for a PBS underlying provider where sites.xml coaster settings were: - -[xml] -source~~~~ - -CI-CCR000013 - - - - - - -pbs.aprun -pbs.mpp=true - - -24 -100000 - -100 -100 - -20 -5 -5 -20.00 -10000 -source~~~~ - -The following table briefly describes the elements on the coasters setup: -[width="70%", cols="^3,10", options="header"] -|============================================================================================= -|profile key | brief description -|slots | How many maximum LRM jobs/worker blocks are allowed -|workersPerNode | How many coaster workers to run per execution node -|nodeGranularity | Each worker block uses a number of nodes that is a multiple of this number -|lowOverallocation | How many times larger than the job walltime should a block's walltime be if all jobs are 1s long -|highOverallocation | How many times larger than the job walltime should a block's walltime be if all jobs are infinitely long -|workersPerNode | How many coaster workers to run per execution node reserve How many seconds to reserve in a block's walltime for starting/shutdown operations -|maxnodes | The maximum number of nodes allowed in a block -|maxtime | The maximum number of walltime allowed for a block coaster service -|jobThrottle |the number of concurrent jobs allowed on a site -|============================================================================================== - -// -//For Beginners -//~~~~~~~~~~~~~~ -//Coasters for beginners. Usage of existing, prebuilt templates. -// -//For Intermediate Users -//~~~~~~~~~~~~~~~~~~~~~~~ -//Coasters for intermediate users. -// -//Using gensites -//^^^^^^^^^^^^^^^ -//Usage of gensites to generate your own sites -//configurations. -// -// -// - -For Advanced Users -~~~~~~~~~~~~~~~~~~ - -//Coasters for advanced users. Getting your hands dirty. - -One of the main reason that one would initially deviate from coaster -defaults into more complex pool entries is to force jobs to fit into some -site-imposed constraint. For instance a typical submission to the experimental -queue requires a user to request upto 3 nodes for under 1 hour. This setup -could be achieved with a careful tuning of coaters parameters. - -//How to run Swift under different Coasters configurations -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// -//Manual -//^^^^^^^ -//Todo -// -//Passive -//^^^^^^^^ -//Todo -// -//Persistent -//^^^^^^^^^^^ -//Todo -// -//Summary of Differences Between different Coaster types -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -//A tabular representations of highlights of different coaster setups -// -// -//Data Management -// - -Coaster providers: local, ssh, pbs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Settings and examples for different coaster providers mechanisms. - Modified: branches/faster/docs/cookbook/cookbook.txt =================================================================== --- branches/faster/docs/cookbook/cookbook.txt 2013-07-08 06:22:15 UTC (rev 6617) +++ branches/faster/docs/cookbook/cookbook.txt 2013-07-08 06:24:47 UTC (rev 6618) @@ -11,8 +11,6 @@ include::swift_basics[] -include::coasters[] - include::infrastructures[] include::debugging[] Modified: branches/faster/docs/userguide/commands =================================================================== --- branches/faster/docs/userguide/commands 2013-07-08 06:22:15 UTC (rev 6617) +++ branches/faster/docs/userguide/commands 2013-07-08 06:24:47 UTC (rev 6618) @@ -39,7 +39,7 @@ -resume file - Resumes the execution using a log file + Resumes the execution using a resume-log file .rlog -config file From hategan at ci.uchicago.edu Mon Jul 8 14:12:23 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 14:12:23 -0500 (CDT) Subject: [Swift-commit] r6620 - in branches/faster: . bin docs docs/quickstart docs/siteguide docs/userguide etc/sites lib libexec src src/org/griphyn/vdl/engine src/org/griphyn/vdl/karajan src/org/griphyn/vdl/karajan/lib src/org/griphyn/vdl/mapping tests tests/groups tests/language-behaviour/IO tests/sites tests/stress tests/stress/persistent-coasters/mcs/10x10 tests/stress/persistent-coasters/mcs/500x10 Message-ID: <20130708191223.2B52C9CC45@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 14:12:22 -0500 (Mon, 08 Jul 2013) New Revision: 6620 Added: branches/faster/docs/releasenotes/ branches/faster/docs/siteguide/geyser branches/faster/docs/siteguide/ssh branches/faster/etc/sites/fusion branches/faster/etc/sites/raven branches/faster/src/org/griphyn/vdl/mapping/MappingException.java branches/faster/tests/groups/group-stress-heavy.sh branches/faster/tests/groups/group-stress-midway.sh branches/faster/tests/language-behaviour/IO/readData3.out.expected branches/faster/tests/language-behaviour/IO/readData3.swift branches/faster/tests/language-behaviour/IO/readStructured.in branches/faster/tests/language-behaviour/IO/readStructured01.swift branches/faster/tests/language-behaviour/IO/readStructured02.swift branches/faster/tests/language-behaviour/IO/readStructured02.timeout branches/faster/tests/language-behaviour/IO/readStructured03.swift branches/faster/tests/language-behaviour/IO/readStructured3.in branches/faster/tests/language-behaviour/IO/title.txt branches/faster/tests/stress/IO/ branches/faster/tests/stress/apps/ branches/faster/tests/stress/internals/ branches/faster/tests/stress/long_runs/ branches/faster/tests/stress/remote_sanity/ branches/faster/tests/stress/user_profile/ Removed: branches/faster/lib/log4j-1.2.16.jar branches/faster/tests/sites/pads/ branches/faster/tests/sites/queenbee/ branches/faster/tests/sites/ranger/ Modified: branches/faster/ branches/faster/bin/stop-coaster-service branches/faster/docs/quickstart/quickstart.txt branches/faster/docs/siteguide/mcs branches/faster/docs/siteguide/siteguide.txt branches/faster/docs/userguide/app_procedures branches/faster/docs/userguide/coasters branches/faster/docs/userguide/howto_tips branches/faster/docs/userguide/language branches/faster/docs/userguide/mappers branches/faster/libexec/_swiftwrap.vbs branches/faster/libexec/_swiftwrap.wrapperstaging branches/faster/libexec/swift-int-staging.k branches/faster/src/ branches/faster/src/org/griphyn/vdl/engine/VariableScope.java branches/faster/src/org/griphyn/vdl/karajan/Loader.java branches/faster/src/org/griphyn/vdl/karajan/lib/AppStageins.java branches/faster/src/org/griphyn/vdl/karajan/lib/AppStageouts.java branches/faster/src/org/griphyn/vdl/karajan/lib/SetWaitCount.java branches/faster/src/org/griphyn/vdl/mapping/AbsFile.java branches/faster/src/org/griphyn/vdl/mapping/DataDependentException.java branches/faster/src/org/griphyn/vdl/mapping/DependentException.java branches/faster/src/org/griphyn/vdl/mapping/MappingDependentException.java branches/faster/src/org/griphyn/vdl/mapping/RootArrayDataNode.java branches/faster/src/org/griphyn/vdl/mapping/RootDataNode.java branches/faster/tests/stress/persistent-coasters/mcs/10x10/coaster-service.conf branches/faster/tests/stress/persistent-coasters/mcs/500x10/coaster-service.conf branches/faster/tests/suite.sh Log: merged changes from 0.94 Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241,6255-6258,6263,6272,6274-6618 + /branches/release-0.93:4761-5122 /branches/release-0.94:6283-6619 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241,6255-6258,6263,6272,6274-6618 Modified: branches/faster/bin/stop-coaster-service =================================================================== --- branches/faster/bin/stop-coaster-service 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/bin/stop-coaster-service 2013-07-08 19:12:22 UTC (rev 6620) @@ -86,7 +86,7 @@ if [ -n "$WORKER_RELAY_HOST" ]; then ssh $WORKER_USERNAME@$WORKER_RELAY_HOST "condor_rm $WORKER_USERNAME" else - condor_rm $CONDOR_USERNAME + condor_rm $WORKER_USERNAME fi fi Modified: branches/faster/docs/quickstart/quickstart.txt =================================================================== --- branches/faster/docs/quickstart/quickstart.txt 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/docs/quickstart/quickstart.txt 2013-07-08 19:12:22 UTC (rev 6620) @@ -46,13 +46,13 @@ 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: +To download and build Swift 0.94, 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 +$ mkdir swift-0.94 +$ cd swift-0.94 +$ svn co https://svn.code.sf.net/p/cogkit/svn/branches/4.1.10/src/cog $ cd cog/modules -$ svn co https://svn.ci.uchicago.edu/svn/vdl2/branches/release-0.93 swift +$ svn co https://svn.ci.uchicago.edu/svn/vdl2/branches/release-0.94 swift $ cd swift $ ant redist ----- @@ -62,7 +62,7 @@ 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 +be in the swift-0.94/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-/cog/modules/swift/dist/swift-svn/bin. Copied: branches/faster/docs/siteguide/geyser (from rev 6619, branches/release-0.94/docs/siteguide/geyser) =================================================================== --- branches/faster/docs/siteguide/geyser (rev 0) +++ branches/faster/docs/siteguide/geyser 2013-07-08 19:12:22 UTC (rev 6620) @@ -0,0 +1,37 @@ +Geyser and Caldera (x86 clusters) +--------------------------------- +The Geyser and Caldera clusters are specialized data analysis and +visualization resources at NCAR (National Center for Atmospheric +Research). + +More information about these clusters can be found at +http://www2.cisl.ucar.edu/resources/geyser_caldera. + +Example sites.xml +~~~~~~~~~~~~~~~~~ +The following sites.xml has the basic definitions for how to run a job using +the LSF scheduler. + +----- + + + + + 1 + 3600 + 00:05 + 100 + 100 + 1 + 1 + P93300606 + small + 4 + 10000 + /glade/scratch/davkelly + + +----- + +The values for workdirectory, queue, and project will likely need to be +adjusted based on the requirements of your project. Modified: branches/faster/docs/siteguide/mcs =================================================================== --- branches/faster/docs/siteguide/mcs 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/docs/siteguide/mcs 2013-07-08 19:12:22 UTC (rev 6620) @@ -2,8 +2,12 @@ ------------------------------------- This sections describes how to use the general use compute servers for -the MCS division of Argonne National Laboratory. +the MCS division of Argonne National Laboratory. Swift is available as a soft package on mcs machines. Add +swift to your .soft and run resoft command. +---- +$ resoft +---- + Create a coaster-service.conf ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To begin, copy the text below and paste it into your Swift distribution's etc Modified: branches/faster/docs/siteguide/siteguide.txt =================================================================== --- branches/faster/docs/siteguide/siteguide.txt 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/docs/siteguide/siteguide.txt 2013-07-08 19:12:22 UTC (rev 6620) @@ -16,6 +16,8 @@ include::futuregrid[] +include::geyser[] + include::grid[] include::intrepid[] @@ -24,6 +26,10 @@ include::midway[] +include::ssh[] + +include::stampede[] + include::uc3[] include::stampede[] Copied: branches/faster/docs/siteguide/ssh (from rev 6619, branches/release-0.94/docs/siteguide/ssh) =================================================================== --- branches/faster/docs/siteguide/ssh (rev 0) +++ branches/faster/docs/siteguide/ssh 2013-07-08 19:12:22 UTC (rev 6620) @@ -0,0 +1,91 @@ +SSH +--- +This section describes how to use the SSH provider to connect to remote sites +and to handle data transfer. + +Generate a unique SSH key +~~~~~~~~~~~~~~~~~~~~~~~~~ +It is recommended that you create a new SSH key exclusively for this purpose. +In order to avoid being prompted for passwords/passphrases, your SSH passphrase +will be stored in a read protected file. Run this command on the machine +where you will be running Swift: + +----- +ssh-keygen -t dsa -f $HOME/.ssh/id_dsa-swift +----- + +You will be prompted to create a passphrase. This will create two files: +$HOME/.ssh/id_dsa-swift and $HOME/.ssh/id_dsa-swift.pub. + +Add your public key to the remote host +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +On the remote host where you will be running, edit or create the file +$HOME/.ssh/authorized_keys. Paste in the contents of the newly created +$HOME/.ssh/id_dsa-swift.pub from the previous step to the end of the file. + +Verify your new key works +~~~~~~~~~~~~~~~~~~~~~~~~~ +From the host where you will be running Swift, run the following +command to verify your keys are working: + +----- +$ ssh -o IdentitiesOnly=true -i $HOME/.ssh/id_dsa-swift user at login.remotehost.edu +----- + +You should be prompted for your new passphrase and be able to connect. + +Create auth.defaults +~~~~~~~~~~~~~~~~~~~~ +Create a file called $HOME/.ssh/auth.defaults on the host where you are running Swift. +Use the following commands to create this file: + +----- +$ touch $HOME/.ssh/auth.defaults +$ chmod 600 $HOME/.ssh/auth.defaults +----- + +Next, edit $HOME/.ssh/auth.defaults and add the following lines: +------ +login.remotehost.edu.type=key +login.remotehost.edu.username=your_remote_username +login.remotehost.edu.key=/your/home/.ssh/id_dsa-swift +login.remotehost.edu.passphrase=your_passphrase +----- + +Replace login.remotehost.edu with the hostname you want to use, replace the +values for "your_remote_username", "your_passphrase", and set the correct path +of private key you generated. + +Create a sites.xml file +~~~~~~~~~~~~~~~~~~~~~~~ +Here is an example sites.xml file that will allow you to connect and transfer +data to a remote host: + +----- + + + + + 0 + 10000 + /path/to/remote/workdirectory + + +----- + +NOTE: This example will run work directly on login.remotehost.edu. In many +cases you will not want to do this. You'll like want to modify your sites.xml +to use a remote scheduler, by setting jobmanager to ssh:pbs or ssh:slurm, for +example. This usually requires also setting things like queues and walltimes. +This example is provided for simplicity and testing. + +Setting your properties +~~~~~~~~~~~~~~~~~~~~~~~ +Since you want to data transfer via ssh, you'll want to verify that you're not +using any other file transfer mechanisms. Make sure you have the following +swift properties defined in your configuration file: + +----- +use.provider.staging=false +use.wrapper.staging=false +----- Modified: branches/faster/docs/userguide/app_procedures =================================================================== --- branches/faster/docs/userguide/app_procedures 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/docs/userguide/app_procedures 2013-07-08 19:12:22 UTC (rev 6620) @@ -423,10 +423,9 @@ floating point numbers. @toString -~~~~~~~~ - at toString(input) will parse its input into a string. This can be -used with @arg to pass input parameters to a Swift script as -strings. +~~~~~~~~~ + at toString(input) will parse its input into a string. Input can be an int, float, string, +or boolean. @length ~~~~~~ Modified: branches/faster/docs/userguide/coasters =================================================================== --- branches/faster/docs/userguide/coasters 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/docs/userguide/coasters 2013-07-08 19:12:22 UTC (rev 6620) @@ -91,4 +91,35 @@ the coaster service |================== +Coaster config parameters and Job Quantities +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This section presents information on coaster configuration parameters and their effect on application and scheduler jobs submitted by Swift. In order to achieve optimal performance, the number of application tasks must correspond to the total number of coaster workers. Coaster configuration parameters influence both application tasks and the LRM (Local Resource Manager) jobs that are submitted by Swift. Specifically, the following quantities are influenced by coasters configuration parameters: + +* Number of application tasks Swift will pack in one "wave" to be executed in parallel depends on the +foreach.max.threads+ and the +throttle+ parameters. Furthermore, the number of +foreach+ loops in a Swift script influences the aggregate +foreach.max.threads+. The relation between application tasks and the above mentioned quantities could be explained as follows: +---- +app_tasks = min{nforeach X foreach.max.threads), (throttle X 100 +1)} +---- + +Where +nforeach+ is the number of independent foreach loops appearing in a Swift script. + +* Number of jobs Swift will submit via the LRM interface is determined by the +slots+ configuration parameter in sites file. + +---- +LRM jobs = slots +---- + +* Size of each LRM job in terms of number of compute nodes per job is determined by the +maxnodes+ and +nodegranularity+ parameters. LRM jobs submitted by Swift will be of size spread between +nodegranularity+ and +maxnodes+ values. + +---- +nodegranularity <= LRM job size <= maxnodes +---- + +* Number of coaster workers to be run per LRM job on a target cluster is determined by the +jobspernode+ parameter. + +Considering the above factors, the following paramter expressions must match in order for a Swift run to be optimal: + +---- +min{nforeach X foreach.max.threads), (throttle X 100 +1)} ~= + slots X avg(nodegranularity,maxnodes) X jobspernode +---- Modified: branches/faster/docs/userguide/howto_tips =================================================================== --- branches/faster/docs/userguide/howto_tips 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/docs/userguide/howto_tips 2013-07-08 19:12:22 UTC (rev 6620) @@ -28,53 +28,72 @@ Launching MPI jobs from Swift ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -There are several ways to run MPI jobs under Swift. -The simplest is to simply launch the desired +mpiexec+ command line -locally by using the local provider. Two additional use cases are -noted here. +There are several ways to run MPI jobs under Swift. Two will be discussed here - +calling mpiexec from a wrapper script, and using the MPICH/coasters interface. -==== Submission of MPI jobs to remote queues +Calling mpiexec +^^^^^^^^^^^^^^^ +In this example, a single MPI program will run across two nodes. For this to +happen, sites.xml must be configured to allocate two nodes but only run a +single job on them. A wrapper script must then be used to call mpiexec. -// TODO: This seems to require appropriate PBS profile settings +sites.xml ++++++++++ +First, we need to make sure that Swift will allocate exactly two nodes. This +can be done with the maxnodes and nodegranularity settings. -This use case allows the user to submit an MPI job to a remote queue. +----- +2 +2 +----- -Swift makes an invocation that does not look any different -from any other invocation. In the code below, we do not have any input -files, and have two output files on stdout and stderr: +Next, we want to make sure that the MPI program is called only once on those +nodes. There are two settings we must set to get this behavior: +----- +1 +single +----- ----- -type file; +tc.data ++++++++ +The app defined in tc.data should be a shell script wrapper to the actual +program that is being called. Let's assume in this example that the MPI program +we are using is called "mpitest", and the wrapper script will be called +"mpitest.sh". The tc.data will look like this then: -(file o, file e) p() { - app { - mpi stdout=@filename(o) stderr=@filename(e); - } -} +----- +host mpitest /path/to/mpitest.sh +----- -file mpiout <"mpi.out">; -file mpierr <"mpi.err">; +Wrapper script +++++++++++++++ +The wrapper script in this example, mpitest.sh, will call mpiexec and launch +the real MPI program. Here is an example: -(mpiout, mpierr) = p(); ----- +----- +#!/bin/bash -Now we define how 'mpi' will run in tc.data: +mpiexec /path/to/mpitest "$@" +----- + +Swift then makes an invocation that does not look any different from any other +invocation. In the code below, we pass one input file and get back one output +file. + ---- -tguc mpi /home/benc/mpi/mpi.sh INSTALLED INTEL32::LINUX GLOBUS::host_xcount=3 ----- +type file; -mpi.sh is a wrapper script that launches the MPI program. It must be -installed on the remote site: +app (file output_file) mpitest (file input_file) +{ + mpitest @input_file @output_file; +} +file input <"input.txt">; +file output <"output.txt">; + +output = mpitest(input); ---- -#!/bin/bash -mpirun -np 3 -machinefile $PBS_NODEFILE /home/benc/mpi/a.out ----- -Because of the way that Swift runs its server side code, -provider-specific MPI modes (such as GRAM jobType=mpi) should not be -used. Instead, the mpirun command should be explicitly invoked. - ==== MPICH/Coasters In this case, the user desires to launch many MPI jobs within a single Modified: branches/faster/docs/userguide/language =================================================================== --- branches/faster/docs/userguide/language 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/docs/userguide/language 2013-07-08 19:12:22 UTC (rev 6620) @@ -182,6 +182,64 @@ some initial condition, and then repeatedly run the simulate procedure, using each execution's outputs as input to the next step. +Associative Arrays +~~~~~~~~~~~~~~~~~~ + +By default, array keys are integers. However, other primitive types are also +allowed as array keys. The syntax for declaring an array with a key type different +than the default is: + +---- +[] array; +---- + +For example, the following code declares and assigns items to an array with string +keys and float values: + +---- +float[string] a; +a["one"] = 0.2; +a["two"] = 0.4; +---- + +In addition to primitive types, a special type named *auto* can be used to +declare an array for which an additional *append* operation is available: + +---- +int[auto] array; + +foreach i in [1:100] { + append(array, i * 2); +} + +foreach v in array { + trace(v); +} +---- + +Items in an array with *auto* keys cannot be accessed directly using a primitive +type. The following example results in a compile-time error: + +---- +int[auto] array; +array[0] = 1; +---- + +However, it is possible to use *auto* key values from one array to access another: + +---- +int[auto] a; +int[auto] b; + +append(a, 1); +append(a, 2); + +foreach v, k in a { + b[k] = a[k] * 2; +} +---- + + Ordering of execution ~~~~~~~~~~~~~~~~~~~~~ Non-array variables are single-assignment, which means that they must Modified: branches/faster/docs/userguide/mappers =================================================================== --- branches/faster/docs/userguide/mappers 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/docs/userguide/mappers 2013-07-08 19:12:22 UTC (rev 6620) @@ -265,8 +265,7 @@ iterate ^^^^^^^ iterate expressions allow a block of code to be evaluated repeatedly, -with an integer parameter sweeping upwards from 0 until a termination -condition holds. +with an iteration variable being incremented after each iteration. The general form is: @@ -276,18 +275,30 @@ } until (terminationExpression); ---- -with the variable var starting at 0 and increasing by one in each -iteration. That variable is in scope in the statements block and when -evaluating the termination expression. +Here _var_ is the iteration variable. Its initial value is 0. After each iteration, +but before _terminationExpression_ is evaluated, the iteration variable is incremented. +This means that if the termination expression is a function of only the iteration variable, +the body will never be executed while the termination expression is true. -For example, the following block will iterate over the +months+ variable 12 times: +Example: ---- -iterate month { - tracef("%i\n", month); - } until (month==12); +iterate i { + trace(i); // will print 0, 1, and 2 +} until (i == 3); ---- +Variables declared inside the body of _iterate_ can be used in the termination expression. +However, their values will reflect the values calculated as part of the last invocation +of the body, and may not reflect the incremented value of the iteration variable: + +---- +iterate i { + trace(i); + int j = i; // will print 0, 1, 2, and 3 +} until (j == 3); +---- + Operators ~~~~~~~~~ The following infix operators are available for use in Swift script Copied: branches/faster/etc/sites/fusion (from rev 6386, branches/release-0.94/etc/sites/fusion) =================================================================== --- branches/faster/etc/sites/fusion (rev 0) +++ branches/faster/etc/sites/fusion 2013-07-08 19:12:22 UTC (rev 6620) @@ -0,0 +1,15 @@ + + + + 3600 + 8 + shared + 1 + 1 + 1 + 1.0 + 100 + 100 + 100 + /home/{env.USER}/swiftwork + Copied: branches/faster/etc/sites/raven (from rev 6386, branches/release-0.94/etc/sites/raven) =================================================================== --- branches/faster/etc/sites/raven (rev 0) +++ branches/faster/etc/sites/raven 2013-07-08 19:12:22 UTC (rev 6620) @@ -0,0 +1,16 @@ + + + + _PROJECT_ + 24 + pbs.aprun;pbs.mpp;depth=24 + 13800 + 03:00:00 + 50 + 4 + 4 + 60.99 + 10000 + + /lus/scratch/{env.USER}/swiftwork + Deleted: branches/faster/lib/log4j-1.2.16.jar =================================================================== --- branches/faster/lib/log4j-1.2.16.jar 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/lib/log4j-1.2.16.jar 2013-07-08 19:12:22 UTC (rev 6620) @@ -1 +0,0 @@ -link ../../../lib/log4j-1.2.16.jar \ No newline at end of file Modified: branches/faster/libexec/_swiftwrap.vbs =================================================================== --- branches/faster/libexec/_swiftwrap.vbs 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/libexec/_swiftwrap.vbs 2013-07-08 19:12:22 UTC (rev 6620) @@ -187,6 +187,10 @@ expectArg("k") KICKSTART=getOptArg() +expectArg("cdmfile") +'ignored, but read if specified +CDMFILE=getOptArg() + expectArg("status") STATUSMODE=getArgVal(MandatoryArg, "status") Modified: branches/faster/libexec/_swiftwrap.wrapperstaging =================================================================== --- branches/faster/libexec/_swiftwrap.wrapperstaging 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/libexec/_swiftwrap.wrapperstaging 2013-07-08 19:12:22 UTC (rev 6620) @@ -56,12 +56,12 @@ } localPath() { - # remove protocol:// - PATH="${1#*://}" + # remove protocol:// + PATH="${1#*://}" # Remove hostname PATH="${PATH#*/}" - # remove leading "/" if present - PATH="${PATH#/}" + # remove leading "/" if present + PATH="${PATH#/}" log "Transformed $1 to $PATH" echo $PATH } @@ -86,8 +86,24 @@ if [ ! -f $SRC ]; then fail 254 "Cannot stage in $SRC. File not found." fi - dd if=$SRC of=$DST bs=16M 2>&1 >& "$INFO" + ln -s $SRC $DST 2>&1 >& "$INFO" ;; + stage://*) + SRC=${SRC#stage://} + log "Copying $SRC to $DST" + if [ ! -f $SRC ]; then + fail 254 "Cannot stage in $SRC. File not found." + fi + dd if=$SRC of=$DST bs=10M 2>&1 >& "$INFO" + ;; + direct://*) + SRC=${SRC#direct://} + log "Linking $SRC to $DST" + if [ ! -f $SRC ]; then + fail 245 "Cannot stage in $SRC. File not found." + fi + ln -s $SRC $DST 2>&1 >& "$INFO" + ;; http://*) log "Fetching $SRC using wget" wget $SRC -O $DST 2>&1 >& "$INFO" @@ -275,7 +291,6 @@ } COMMANDLINE=$@ - PARAMFILE= openinfo "wrapper.log" Modified: branches/faster/libexec/swift-int-staging.k =================================================================== --- branches/faster/libexec/swift-int-staging.k 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/libexec/swift-int-staging.k 2013-07-08 19:12:22 UTC (rev 6620) @@ -126,7 +126,7 @@ stageIn("{loc}{SWIFT:HOME}/libexec/cdm_lib.sh", "cdm_lib.sh") } - appStageins(jobid, stagein, ".", stagingMethod) + appStageins(jobid, stagein, stagingMethod) stageOut("wrapper.log", "{stagingMethod}://localhost/{ddir}/{jobid}.info", mode = WRAPPER_TRANSFER_MODE) @@ -136,7 +136,7 @@ } stageOut("wrapper.error", "{stagingMethod}://localhost/{ddir}/{jobid}.error", mode = STAGING_MODE:IF_PRESENT) - appStageouts(jobid, stageout, ".", stagingMethod) + appStageouts(jobid, stageout, stagingMethod) task:cleanUp(".") ) Property changes on: branches/faster/src ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.94/src:6387 /trunk/src:6214,6255,6275-6618 + /branches/release-0.94/src:6283-6619 /trunk/src:6214,6255,6275-6618 Modified: branches/faster/src/org/griphyn/vdl/engine/VariableScope.java =================================================================== --- branches/faster/src/org/griphyn/vdl/engine/VariableScope.java 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/src/org/griphyn/vdl/engine/VariableScope.java 2013-07-08 19:12:22 UTC (rev 6620) @@ -654,7 +654,7 @@ } private void setPreClose(String name, int count) { - if (inhibitClosing != null && inhibitClosing.contains(name)) { + if (inhibitClosing != null && inhibitClosing.contains(name) && count != 0) { return; } setCount("preClose", name, count, Modified: branches/faster/src/org/griphyn/vdl/karajan/Loader.java =================================================================== --- branches/faster/src/org/griphyn/vdl/karajan/Loader.java 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/src/org/griphyn/vdl/karajan/Loader.java 2013-07-08 19:12:22 UTC (rev 6620) @@ -642,7 +642,7 @@ } else { try { - Thread.sleep(1000); + Thread.sleep(1); } catch (InterruptedException e) { } Modified: branches/faster/src/org/griphyn/vdl/karajan/lib/AppStageins.java =================================================================== --- branches/faster/src/org/griphyn/vdl/karajan/lib/AppStageins.java 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/src/org/griphyn/vdl/karajan/lib/AppStageins.java 2013-07-08 19:12:22 UTC (rev 6620) @@ -39,25 +39,32 @@ public class AppStageins extends InternalFunction { private ArgRef jobid; private ArgRef> files; - private ArgRef dir; private ArgRef stagingMethod; private ChannelRef> cr_stagein; + + private VarRef cwd; static Logger logger = Logger.getLogger(AppStageins.class); @Override protected Signature getSignature() { - return new Signature(params("jobid", "files", "dir", "stagingMethod"), returns(channel("stagein"))); + return new Signature(params("jobid", "files", "stagingMethod"), returns(channel("stagein"))); } + + @Override + protected void addLocals(Scope scope) { + super.addLocals(scope); + cwd = scope.getVarRef("CWD"); + } protected void runBody(LWThread thr) { Stack stack = thr.getStack(); List files = this.files.getValue(stack); String stagingMethod = this.stagingMethod.getValue(stack); - String dir = this.dir.getValue(stack); + String cwd = this.cwd.getValue(stack); for (Object f : files) { AbsFile file = new AbsFile(TypeUtil.toString(f)); Policy policy = Director.lookup(file.toString()); @@ -70,19 +77,31 @@ if (protocol.equals("file")) { protocol = stagingMethod; } - String path = file.getDir().equals("") ? file.getName() : file - .getDir() - + "/" + file.getName(); + String path = file.getDir().equals("") ? + file.getName() : file.getDir() + "/" + file.getName(); String relpath = path.startsWith("/") ? path.substring(1) : path; if (logger.isDebugEnabled()) { logger.debug("will stage in: " + relpath + " via: " + protocol); } cr_stagein.append(stack, - makeList(protocol + "://" + file.getHost() + "/" + path, - dir + "/" + relpath)); + makeList(localPath(cwd, protocol, path, file), relpath)); } } + protected static String localPath(String cwd, String protocol, String path, AbsFile file) { + StringBuilder sb = new StringBuilder(); + sb.append(protocol); + sb.append("://"); + sb.append(file.getHost()); + sb.append('/'); + if (!file.isAbsolute()) { + sb.append(cwd); + sb.append('/'); + } + sb.append(path); + return sb.toString(); + } + private List makeList(String s1, String s2) { List l = new LinkedList(); l.add(s1); Modified: branches/faster/src/org/griphyn/vdl/karajan/lib/AppStageouts.java =================================================================== --- branches/faster/src/org/griphyn/vdl/karajan/lib/AppStageouts.java 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/src/org/griphyn/vdl/karajan/lib/AppStageouts.java 2013-07-08 19:12:22 UTC (rev 6620) @@ -39,22 +39,31 @@ public class AppStageouts extends InternalFunction { private ArgRef jobid; private ArgRef>> files; - private ArgRef dir; private ArgRef stagingMethod; private ChannelRef> cr_stageout; + private VarRef cwd; + + @Override protected Signature getSignature() { - return new Signature(params("jobid", "files", "dir", "stagingMethod"), returns(channel("stageout"))); + return new Signature(params("jobid", "files", "stagingMethod"), returns(channel("stageout"))); } + + @Override + protected void addLocals(Scope scope) { + super.addLocals(scope); + cwd = scope.getVarRef("CWD"); + } protected void runBody(LWThread thr) { try { Stack stack = thr.getStack(); List> files = this.files.getValue(stack); String stagingMethod = this.stagingMethod.getValue(stack); - String dir = this.dir.getValue(stack); + String cwd = this.cwd.getValue(stack); + for (List pv : files) { Path p = (Path) pv.get(0); DSHandle handle = (DSHandle) pv.get(1); @@ -67,8 +76,8 @@ + "/" + file.getName(); String relpath = path.startsWith("/") ? path.substring(1) : path; cr_stageout.append(stack, - makeList(dir + "/" + relpath, - protocol + "://" + file.getHost() + "/" + path)); + makeList(relpath, + AppStageins.localPath(cwd, protocol, path, file))); } } catch (Exception e) { Modified: branches/faster/src/org/griphyn/vdl/karajan/lib/SetWaitCount.java =================================================================== --- branches/faster/src/org/griphyn/vdl/karajan/lib/SetWaitCount.java 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/src/org/griphyn/vdl/karajan/lib/SetWaitCount.java 2013-07-08 19:12:22 UTC (rev 6620) @@ -41,7 +41,16 @@ DSHandle var = this.var.getValue(stack); if (var.isClosed()) { - throw new ExecutionException("Attempted to set a wait count for a closed variable " + var); + // Static mappers will close the array sizes during initialization. + // Such an array passed to a function assigning to elements + // of that array in a loop will attempt to increase the + // wait count. That is a legit situation to have. + if (var.getMapper().isStatic()) { + // ignore + } + else { + throw new ExecutionException("Attempted to set a wait count for a closed variable " + var); + } } int count = this.count.getValue(stack).intValue(); Modified: branches/faster/src/org/griphyn/vdl/mapping/AbsFile.java =================================================================== --- branches/faster/src/org/griphyn/vdl/mapping/AbsFile.java 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/src/org/griphyn/vdl/mapping/AbsFile.java 2013-07-08 19:12:22 UTC (rev 6620) @@ -199,6 +199,10 @@ return path; } + public boolean isAbsolute() { + return !path.isEmpty() && path.startsWith("/"); + } + public String getType() { return "file"; } Modified: branches/faster/src/org/griphyn/vdl/mapping/DataDependentException.java =================================================================== --- branches/faster/src/org/griphyn/vdl/mapping/DataDependentException.java 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/src/org/griphyn/vdl/mapping/DataDependentException.java 2013-07-08 19:12:22 UTC (rev 6620) @@ -35,7 +35,6 @@ } public String getMessage() { - return getHandle() + " not derived due to errors in data dependencies"; + return getVariableInfo() + " not derived due to errors in data dependencies"; } - } Modified: branches/faster/src/org/griphyn/vdl/mapping/DependentException.java =================================================================== --- branches/faster/src/org/griphyn/vdl/mapping/DependentException.java 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/src/org/griphyn/vdl/mapping/DependentException.java 2013-07-08 19:12:22 UTC (rev 6620) @@ -41,6 +41,16 @@ public DSHandle getHandle() { return handle; } + + public String getVariableInfo() { + if (handle instanceof AbstractDataNode) { + AbstractDataNode n = (AbstractDataNode) handle; + return n.getDisplayableName() + ", line " + n.getDeclarationLine(); + } + else { + return handle.toString(); + } + } public String toString() { return getMessage(); Modified: branches/faster/src/org/griphyn/vdl/mapping/MappingDependentException.java =================================================================== --- branches/faster/src/org/griphyn/vdl/mapping/MappingDependentException.java 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/src/org/griphyn/vdl/mapping/MappingDependentException.java 2013-07-08 19:12:22 UTC (rev 6620) @@ -35,6 +35,6 @@ } public String getMessage() { - return getHandle() + " not mapped due to error in mapping dependencies"; + return getVariableInfo() + " not mapped due to error in mapping dependencies"; } } Copied: branches/faster/src/org/griphyn/vdl/mapping/MappingException.java (from rev 6386, branches/release-0.94/src/org/griphyn/vdl/mapping/MappingException.java) =================================================================== --- branches/faster/src/org/griphyn/vdl/mapping/MappingException.java (rev 0) +++ branches/faster/src/org/griphyn/vdl/mapping/MappingException.java 2013-07-08 19:12:22 UTC (rev 6620) @@ -0,0 +1,27 @@ +//---------------------------------------------------------------------- +//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 16, 2013 + */ +package org.griphyn.vdl.mapping; + +public class MappingException extends DependentException { + + public MappingException(DSHandle handle, Exception prev) { + super(handle, prev); + } + + public MappingException(DSHandle handle) { + super(handle); + } + + @Override + public String getMessage() { + return getVariableInfo() + " had mapping errors"; + } + +} Modified: branches/faster/src/org/griphyn/vdl/mapping/RootArrayDataNode.java =================================================================== --- branches/faster/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2013-07-08 19:12:22 UTC (rev 6620) @@ -105,7 +105,6 @@ } catch (DependentException e) { setValue(new MappingDependentException(this, e)); - closeShallow(); } } @@ -116,9 +115,9 @@ catch (OOBYield e) { throw e.wrapped(); } - catch (HandleOpenException e) { - e.printStackTrace(); - } + catch (Exception e) { + this.setValue(new MappingException(this, e)); + } } public String getParam(MappingParam p) { Modified: branches/faster/src/org/griphyn/vdl/mapping/RootDataNode.java =================================================================== --- branches/faster/src/org/griphyn/vdl/mapping/RootDataNode.java 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/src/org/griphyn/vdl/mapping/RootDataNode.java 2013-07-08 19:12:22 UTC (rev 6620) @@ -110,8 +110,6 @@ } catch (DependentException e) { setValue(new MappingDependentException(this, e)); - closeShallow(); - return; } } @@ -122,8 +120,8 @@ catch (OOBYield e) { throw e.wrapped(); } - catch (HandleOpenException e) { - e.printStackTrace(); + catch (Exception e) { + this.setValue(new MappingException(this, e)); } } Copied: branches/faster/tests/groups/group-stress-heavy.sh (from rev 6619, branches/release-0.94/tests/groups/group-stress-heavy.sh) =================================================================== --- branches/faster/tests/groups/group-stress-heavy.sh (rev 0) +++ branches/faster/tests/groups/group-stress-heavy.sh 2013-07-08 19:12:22 UTC (rev 6620) @@ -0,0 +1,8 @@ +# GROUPLIST definition to run all local tests \ + +GROUPLIST=( + $TESTDIR/stress/IO \ + $TESTDIR/stress/internals \ + ) + +checkvars WORK \ No newline at end of file Copied: branches/faster/tests/groups/group-stress-midway.sh (from rev 6619, branches/release-0.94/tests/groups/group-stress-midway.sh) =================================================================== --- branches/faster/tests/groups/group-stress-midway.sh (rev 0) +++ branches/faster/tests/groups/group-stress-midway.sh 2013-07-08 19:12:22 UTC (rev 6620) @@ -0,0 +1,11 @@ +# GROUPLIST definition to run all local tests \ + +GROUPLIST=( + $TESTDIR/stress/apps/modis_local \ + $TESTDIR/stress/apps/modis_midway \ + $TESTDIR/stress/apps/modis_beagle \ + $TESTDIR/stress/apps/modis_uc3 \ + $TESTDIR/stress/apps/modis_multiple \ + ) + +checkvars WORK \ No newline at end of file Copied: branches/faster/tests/language-behaviour/IO/readData3.out.expected (from rev 6619, branches/release-0.94/tests/language-behaviour/IO/readData3.out.expected) =================================================================== --- branches/faster/tests/language-behaviour/IO/readData3.out.expected (rev 0) +++ branches/faster/tests/language-behaviour/IO/readData3.out.expected 2013-07-08 19:12:22 UTC (rev 6620) @@ -0,0 +1 @@ +9 \ No newline at end of file Copied: branches/faster/tests/language-behaviour/IO/readData3.swift (from rev 6619, branches/release-0.94/tests/language-behaviour/IO/readData3.swift) =================================================================== --- branches/faster/tests/language-behaviour/IO/readData3.swift (rev 0) +++ branches/faster/tests/language-behaviour/IO/readData3.swift 2013-07-08 19:12:22 UTC (rev 6620) @@ -0,0 +1,23 @@ +type file; + +/* + Test case added to confirm Bug 1028 - readData in a foreach loop fails to compile. + https://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=1028 + + This test is expected to fail to compile till bug is resolved. +*/ + +app (file o) mysim (int i) +{ + echo i stdout=@filename(o); +} + +int nums[]; +foreach i in [0:9] { + file f ; + f = mysim(i); + nums[i] = readData(f); +} + +file result <"readData3.out">; +result = mysim(nums[i]); \ No newline at end of file Copied: branches/faster/tests/language-behaviour/IO/readStructured.in (from rev 6619, branches/release-0.94/tests/language-behaviour/IO/readStructured.in) =================================================================== --- branches/faster/tests/language-behaviour/IO/readStructured.in (rev 0) +++ branches/faster/tests/language-behaviour/IO/readStructured.in 2013-07-08 19:12:22 UTC (rev 6620) @@ -0,0 +1,2 @@ +rows[0] = "hello" +rows[1] = "World!" Copied: branches/faster/tests/language-behaviour/IO/readStructured01.swift (from rev 6619, branches/release-0.94/tests/language-behaviour/IO/readStructured01.swift) =================================================================== --- branches/faster/tests/language-behaviour/IO/readStructured01.swift (rev 0) +++ branches/faster/tests/language-behaviour/IO/readStructured01.swift 2013-07-08 19:12:22 UTC (rev 6620) @@ -0,0 +1,7 @@ +type matrix { + string rows[]; +} + +matrix m; +m = readStructured("readStructured.in"); + Copied: branches/faster/tests/language-behaviour/IO/readStructured02.swift (from rev 6619, branches/release-0.94/tests/language-behaviour/IO/readStructured02.swift) =================================================================== --- branches/faster/tests/language-behaviour/IO/readStructured02.swift (rev 0) +++ branches/faster/tests/language-behaviour/IO/readStructured02.swift 2013-07-08 19:12:22 UTC (rev 6620) @@ -0,0 +1,10 @@ +type matrix { + string rows[]; +} + +matrix m; +m = readStructured("readStructured.in"); + +foreach item,index in m.rows { + tracef("Row[%i] : %s \n", index, item); +} \ No newline at end of file Copied: branches/faster/tests/language-behaviour/IO/readStructured02.timeout (from rev 6619, branches/release-0.94/tests/language-behaviour/IO/readStructured02.timeout) =================================================================== --- branches/faster/tests/language-behaviour/IO/readStructured02.timeout (rev 0) +++ branches/faster/tests/language-behaviour/IO/readStructured02.timeout 2013-07-08 19:12:22 UTC (rev 6620) @@ -0,0 +1 @@ +120 Copied: branches/faster/tests/language-behaviour/IO/readStructured03.swift (from rev 6619, branches/release-0.94/tests/language-behaviour/IO/readStructured03.swift) =================================================================== --- branches/faster/tests/language-behaviour/IO/readStructured03.swift (rev 0) +++ branches/faster/tests/language-behaviour/IO/readStructured03.swift 2013-07-08 19:12:22 UTC (rev 6620) @@ -0,0 +1,9 @@ +type vector { + int columns[]; +} +type matrix { + vector rows[]; +} + +matrix m; +m = readStructured("readStructured3.in"); Copied: branches/faster/tests/language-behaviour/IO/readStructured3.in (from rev 6619, branches/release-0.94/tests/language-behaviour/IO/readStructured3.in) =================================================================== --- branches/faster/tests/language-behaviour/IO/readStructured3.in (rev 0) +++ branches/faster/tests/language-behaviour/IO/readStructured3.in 2013-07-08 19:12:22 UTC (rev 6620) @@ -0,0 +1,6 @@ +rows[0].columns[0] = 0 +rows[0].columns[1] = 2 +rows[0].columns[2] = 4 +rows[1].columns[0] = 1 +rows[1].columns[1] = 3 +rows[1].columns[2] = 5 \ No newline at end of file Copied: branches/faster/tests/language-behaviour/IO/title.txt (from rev 6619, branches/release-0.94/tests/language-behaviour/IO/title.txt) =================================================================== --- branches/faster/tests/language-behaviour/IO/title.txt (rev 0) +++ branches/faster/tests/language-behaviour/IO/title.txt 2013-07-08 19:12:22 UTC (rev 6620) @@ -0,0 +1 @@ +Language Behavior tests : Subgroup local IO Modified: branches/faster/tests/stress/persistent-coasters/mcs/10x10/coaster-service.conf =================================================================== --- branches/faster/tests/stress/persistent-coasters/mcs/10x10/coaster-service.conf 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/tests/stress/persistent-coasters/mcs/10x10/coaster-service.conf 2013-07-08 19:12:22 UTC (rev 6620) @@ -5,7 +5,7 @@ export SWIFT= # Where to place/launch worker.pl on the remote machine -export WORKER_WORK=/nfs/proj-davidk/swiftwork +export WORKER_LOCATION=/home/$USER # How to launch workers: local, ssh, futuregrid, or cobalt export WORKER_MODE=ssh @@ -28,7 +28,7 @@ export IPADDR= # Gensites values -export WORK=$HOME/work +export WORK=/sandbox/$USER # If SHARED_FILESYSTEM is set to no, provider staging will be turned on export SHARED_FILESYSTEM=no @@ -37,7 +37,9 @@ # export WORKER_RELAY_HOST="login.mcs.anl.gov" export WORKER_LOGGING_LEVEL=DEBUG -export WORKER_LOG_DIR="/nfs/proj-davidk/logs" +export WORKER_LOG_DIR="/home/$USER/logs" +export JOBSPERNODE="4" +export JOBTHROTTLE=100 # Set applications here #app cat=/bin/cat Modified: branches/faster/tests/stress/persistent-coasters/mcs/500x10/coaster-service.conf =================================================================== --- branches/faster/tests/stress/persistent-coasters/mcs/500x10/coaster-service.conf 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/tests/stress/persistent-coasters/mcs/500x10/coaster-service.conf 2013-07-08 19:12:22 UTC (rev 6620) @@ -5,7 +5,7 @@ export SWIFT= # Where to place/launch worker.pl on the remote machine -export WORKER_WORK=/nfs/proj-davidk/swiftwork +export WORKER_LOCATION=/home/$USER # How to launch workers: local, ssh, futuregrid, or cobalt export WORKER_MODE=ssh @@ -28,7 +28,7 @@ export IPADDR= # Gensites values -export WORK=$HOME/work +export WORK=/sandbox/$USER # If SHARED_FILESYSTEM is set to no, provider staging will be turned on export SHARED_FILESYSTEM=no @@ -37,7 +37,9 @@ # export WORKER_RELAY_HOST="login.mcs.anl.gov" export WORKER_LOGGING_LEVEL=DEBUG -export WORKER_LOG_DIR="/nfs/proj-davidk/logs" +export WORKER_LOG_DIR="/home/$USER/logs" +export JOBSPERNODE="4" +export JOBTHROTTLE=100 # Set applications here #app cat=/bin/cat Modified: branches/faster/tests/suite.sh =================================================================== --- branches/faster/tests/suite.sh 2013-07-08 08:19:11 UTC (rev 6619) +++ branches/faster/tests/suite.sh 2013-07-08 19:12:22 UTC (rev 6620) @@ -16,6 +16,7 @@ printf "\t -t Tree mode (alias: -a,-c,-g,-p,-s) \n" printf "\t -x Do not continue after a failure \n" printf "\t -v Verbose (set -x, HTML comments) \n" + printf "\t -l Stress level < 1/ 2/ 3/ 4> \n" printf "\t -o output Location for cog and output \n" printf "\t GROUP argument \n" } @@ -24,6 +25,7 @@ TEXTREPORT=0 DEFAULT_TIMEOUT=30 # seconds RUN_ANT=1 +STRESS=2 # If true, run "ant clean" CLEAN=1 SKIP_TESTS=0 @@ -81,6 +83,9 @@ -x) ALWAYS_EXITONFAILURE=1 shift;; + -l) + STRESS=$2 + shift 2;; -v) VERBOSE=1 shift;; @@ -110,7 +115,7 @@ GRAY="" fi - +export STRESS="S$STRESS" # Iterations per test (may want to run each test multiple times?) ITERS_LOCAL=1 @@ -777,6 +782,7 @@ return 0 fi + SOURCESCRIPT=$NAME.source.sh SETUPSCRIPT=$NAME.setup.sh CHECKSCRIPT=$NAME.check.sh CLEANSCRIPT=$NAME.clean.sh @@ -785,6 +791,13 @@ TEST_SHOULD_FAIL=0 OUTPUT=$NAME.setup.stdout + + if [ -x "$GROUP/$SOURCESCRIPT" ]; then + cp "$GROUP/$SOURCESCRIPT" . + source ./$SOURCESCRIPT + fi + echo "GLOBUS_HOSTNAME : $GLOBUS_HOSTNAME" + if [ -x "$GROUP/$SETUPSCRIPT" ]; then cp "$GROUP/$SETUPSCRIPT" . script_exec ./$SETUPSCRIPT "S" @@ -794,7 +807,10 @@ ARGS="" if [ -f $GROUP/$ARGSFILE ]; then - ARGS=`cat $GROUP/$ARGSFILE` + cp "$GROUP/$ARGSFILE" . + ARGS=`cat $GROUP/$ARGSFILE` + elif [ -f $ARGSFILE ]; then + ARGS=`cat $ARGSFILE` fi CDM= From hategan at ci.uchicago.edu Mon Jul 8 14:21:48 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 14:21:48 -0500 (CDT) Subject: [Swift-commit] r6621 - branches/faster/src/org/griphyn/vdl/karajan/lib Message-ID: <20130708192148.CEED09CC45@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 14:21:48 -0500 (Mon, 08 Jul 2013) New Revision: 6621 Modified: branches/faster/src/org/griphyn/vdl/karajan/lib/AppStageins.java branches/faster/src/org/griphyn/vdl/karajan/lib/AppStageouts.java branches/faster/src/org/griphyn/vdl/karajan/lib/PathUtils.java Log: fixed small problems caused by the merge Modified: branches/faster/src/org/griphyn/vdl/karajan/lib/AppStageins.java =================================================================== --- branches/faster/src/org/griphyn/vdl/karajan/lib/AppStageins.java 2013-07-08 19:12:22 UTC (rev 6620) +++ branches/faster/src/org/griphyn/vdl/karajan/lib/AppStageins.java 2013-07-08 19:21:48 UTC (rev 6621) @@ -29,7 +29,9 @@ import org.apache.log4j.Logger; import org.globus.cog.karajan.analyzer.ArgRef; import org.globus.cog.karajan.analyzer.ChannelRef; +import org.globus.cog.karajan.analyzer.Scope; import org.globus.cog.karajan.analyzer.Signature; +import org.globus.cog.karajan.analyzer.VarRef; import org.globus.cog.karajan.compiled.nodes.InternalFunction; import org.globus.cog.karajan.util.TypeUtil; import org.globus.swift.data.Director; Modified: branches/faster/src/org/griphyn/vdl/karajan/lib/AppStageouts.java =================================================================== --- branches/faster/src/org/griphyn/vdl/karajan/lib/AppStageouts.java 2013-07-08 19:12:22 UTC (rev 6620) +++ branches/faster/src/org/griphyn/vdl/karajan/lib/AppStageouts.java 2013-07-08 19:21:48 UTC (rev 6621) @@ -20,7 +20,6 @@ */ package org.griphyn.vdl.karajan.lib; -import java.util.LinkedList; import java.util.List; import k.rt.ExecutionException; @@ -29,7 +28,9 @@ import org.globus.cog.karajan.analyzer.ArgRef; import org.globus.cog.karajan.analyzer.ChannelRef; +import org.globus.cog.karajan.analyzer.Scope; import org.globus.cog.karajan.analyzer.Signature; +import org.globus.cog.karajan.analyzer.VarRef; import org.globus.cog.karajan.compiled.nodes.InternalFunction; import org.griphyn.vdl.karajan.Pair; import org.griphyn.vdl.mapping.AbsFile; Modified: branches/faster/src/org/griphyn/vdl/karajan/lib/PathUtils.java =================================================================== --- branches/faster/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2013-07-08 19:12:22 UTC (rev 6620) +++ branches/faster/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2013-07-08 19:21:48 UTC (rev 6621) @@ -68,6 +68,7 @@ public static String remotePathName(String dir) { if (dir.length() == 0) { return dir; + } StringBuilder sb = null; // parse it by hand to avoid creating too much string object garbage From swift at ci.uchicago.edu Mon Jul 8 14:40:03 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Mon, 8 Jul 2013 14:40:03 -0500 (CDT) Subject: [Swift-commit] cog r3706 Message-ID: <20130708194003.B3A4F8D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3706 | michaelwilde | 2013-07-08 14:39:16 -0500 (Mon, 08 Jul 2013) | 1 line Force SGE qsub to use -S /bin/bash so that submit script is properly interpreted even if the SGE scheduler's default shell is not bash (e.g. on orthros cluster the default SGE shell was tcsh, which caused job submission to fail). ------------------------------------------------------------------------ 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 3705) +++ modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/SGEExecutor.java (working copy) @@ -42,7 +42,7 @@ 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 final String[] QSUB_PARAMS = new String[] {"-S","/bin/bash"}; private static int unique = 0; private static NumberFormat IDF = new DecimalFormat("000000"); From wilde at ci.uchicago.edu Mon Jul 8 15:17:32 2013 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 8 Jul 2013 15:17:32 -0500 (CDT) Subject: [Swift-commit] r6622 - SwiftApps Message-ID: <20130708201732.0F5A69CC45@svn.ci.uchicago.edu> Author: wilde Date: 2013-07-08 15:17:31 -0500 (Mon, 08 Jul 2013) New Revision: 6622 Added: SwiftApps/Scattering/ Log: Initial dir. From wilde at ci.uchicago.edu Mon Jul 8 15:19:32 2013 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 8 Jul 2013 15:19:32 -0500 (CDT) Subject: [Swift-commit] r6623 - in SwiftApps: . Scattering Message-ID: <20130708201932.0CA189CC45@svn.ci.uchicago.edu> Author: wilde Date: 2013-07-08 15:19:31 -0500 (Mon, 08 Jul 2013) New Revision: 6623 Added: SwiftApps/Scattering/strains/ Removed: SwiftApps/strains/ Log: Reorganizing. From wilde at ci.uchicago.edu Mon Jul 8 15:20:03 2013 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 8 Jul 2013 15:20:03 -0500 (CDT) Subject: [Swift-commit] r6624 - SwiftApps/Scattering Message-ID: <20130708202003.1EB979CC45@svn.ci.uchicago.edu> Author: wilde Date: 2013-07-08 15:20:02 -0500 (Mon, 08 Jul 2013) New Revision: 6624 Added: SwiftApps/Scattering/paintgrid/ Log: Initial dir. From wilde at ci.uchicago.edu Mon Jul 8 15:48:48 2013 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Mon, 8 Jul 2013 15:48:48 -0500 (CDT) Subject: [Swift-commit] r6625 - SwiftApps/Scattering/paintgrid Message-ID: <20130708204848.C14D69CCB1@svn.ci.uchicago.edu> Author: wilde Date: 2013-07-08 15:48:48 -0500 (Mon, 08 Jul 2013) New Revision: 6625 Added: SwiftApps/Scattering/paintgrid/README SwiftApps/Scattering/paintgrid/apps SwiftApps/Scattering/paintgrid/apps.multisite SwiftApps/Scattering/paintgrid/genpoints.params SwiftApps/Scattering/paintgrid/genpoints.py SwiftApps/Scattering/paintgrid/multisites.xml SwiftApps/Scattering/paintgrid/paintgrid.swift SwiftApps/Scattering/paintgrid/processpoints.py SwiftApps/Scattering/paintgrid/sites.xml Log: Initial revision of paintgrid demo code. Added: SwiftApps/Scattering/paintgrid/README =================================================================== --- SwiftApps/Scattering/paintgrid/README (rev 0) +++ SwiftApps/Scattering/paintgrid/README 2013-07-08 20:48:48 UTC (rev 6625) @@ -0,0 +1,29 @@ +Demo / tutorial application to mimic the needs of the PaintGrid application + +Execution scenarios: + + run.local.sh + + run.beagle.sh + + run.midway.sh + + run.midway+beagle.sh + + run.blues.sh + + run.orthros.sh + + +Data transfer models: + +- provider staging without caching + +- provider staging with ad-hoc caching of big common files + +- gridftp staging + +- ssh (scp) staging + +- wrapper staging with scp and caching + Added: SwiftApps/Scattering/paintgrid/apps =================================================================== --- SwiftApps/Scattering/paintgrid/apps (rev 0) +++ SwiftApps/Scattering/paintgrid/apps 2013-07-08 20:48:48 UTC (rev 6625) @@ -0,0 +1,2 @@ +localhost local_python python +westmere python python Added: SwiftApps/Scattering/paintgrid/apps.multisite =================================================================== --- SwiftApps/Scattering/paintgrid/apps.multisite (rev 0) +++ SwiftApps/Scattering/paintgrid/apps.multisite 2013-07-08 20:48:48 UTC (rev 6625) @@ -0,0 +1,4 @@ +uc3 perl /usr/bin/perl null null null +beagle perl /usr/bin/perl null null null +#sandy perl /usr/bin/perl null null null +westmere perl /usr/bin/perl null null null Added: SwiftApps/Scattering/paintgrid/genpoints.params =================================================================== --- SwiftApps/Scattering/paintgrid/genpoints.params (rev 0) +++ SwiftApps/Scattering/paintgrid/genpoints.params 2013-07-08 20:48:48 UTC (rev 6625) @@ -0,0 +1,10 @@ +minx=0.0 +maxx=171.0 +miny=0.0 +maxy=171.0 +minz=0.0 +maxz=171.0 +incr=1.0 +tuplesPerFile=10000 +filePrefix="seq" +outDir="out/seq" Added: SwiftApps/Scattering/paintgrid/genpoints.py =================================================================== --- SwiftApps/Scattering/paintgrid/genpoints.py (rev 0) +++ SwiftApps/Scattering/paintgrid/genpoints.py 2013-07-08 20:48:48 UTC (rev 6625) @@ -0,0 +1,54 @@ +#! /usr/bin/env python + +import sys +import os + +x = y = z = 0 +n = filenum = 0 + +# default param values, may be overridden by .params file (argv[1]) : + +minx = 0.0 +maxx = 5.0 +miny = 0.0 +maxy = 5.0 +minz = 0.0 +maxz = 5.0 +incr = 1.0 +tuplesPerFile = 25 +filePrefix = "seq" +outDir = "out" +maxFiles = 100000 + +# xrange function for floats + +def xfrange(start, stop, step): + while start < stop: + yield start + start += step + +# read in user params if specified + +if len(sys.argv) > 1: + execfile(sys.argv[1]) in globals() + +if len(sys.argv) > 2: + runDir = sys.argv[2] +else: + runDir = "missingRunDir"; + +# Generate sequences of point values in the parameter space + +os.chdir(runDir) +os.system("mkdir -p " + outDir) + +for x in xfrange(minx,maxx,incr): + for y in xfrange(miny,maxy,incr): + for z in xfrange(minz,maxz,incr): + if n % tuplesPerFile == 0 : + filename = str.format(outDir + "/" + filePrefix + ".{0!s:0>5}",filenum) + print filename + of = file(filename,"w") + filenum += 1 + print >> of, x, y, z + n += 1 Property changes on: SwiftApps/Scattering/paintgrid/genpoints.py ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/Scattering/paintgrid/multisites.xml =================================================================== --- SwiftApps/Scattering/paintgrid/multisites.xml (rev 0) +++ SwiftApps/Scattering/paintgrid/multisites.xml 2013-07-08 20:48:48 UTC (rev 6625) @@ -0,0 +1,71 @@ + + + + + 10.00 + 10000 + 1 + 3600 + 00:05:00 + 100 + 100 + 1000 + 1 + 1 + "group_friends.{env.USER}" + nonshared + + . + + + + + 24 + 100 + 100 + + pbs.aprun;pbs.mpp;depth=24;pbs.resource_list=advres=wilde.1768 + 3600 + 00:05:00 + /lustre/beagle/{env.USER}/swiftwork + 5 + 1 + 1 + 4.80 + 10000 + /tmp/{env.USER}/swiftwork + + + + + sandyb + 16 + 00:05:00 + 3600 + 100 + 100 + 4 + 1 + 1 + .64 + 10000 + /tmp/{env.USER} + + + + + westmere + 12 + 00:05:00 + 3600 + 100 + 100 + 4 + 1 + 1 + .48 + 10000 + /tmp/{env.USER} + + + Added: SwiftApps/Scattering/paintgrid/paintgrid.swift =================================================================== --- SwiftApps/Scattering/paintgrid/paintgrid.swift (rev 0) +++ SwiftApps/Scattering/paintgrid/paintgrid.swift 2013-07-08 20:48:48 UTC (rev 6625) @@ -0,0 +1,40 @@ +type file; + +# External app to generate sets of input data points + +app (file plist) genPoints (file pyscript, file paramFile) +{ + local_python @pyscript @paramFile runDir stdout=@plist; +} + +# External app to process a set of data points (a mockup of paintGrid) + +app (file ofile) processPoints (file pyscript, file imageFile, file points) +{ + python @pyscript @imageFile @points runTime stdout=@ofile; +} + +# The actual python scripts for the app() functions above + +file genPoints_script <"genpoints.py">; +file processPoints_script <"processpoints.py">; + +# Command line args to this script + +file params ; +file image ; +global string runTime = @arg("runTime","0.0"); +global string runDir = @arg("runDir"); + +# Main script: +# Call genPoints to make a set of files, each of which contains a set of data points to process +# The params file specifies the range of points to generate, and how to batch them into files +# (In this example the input points are triples in 3-space) + +string pointSetFileNames[]=readData(genPoints(genPoints_script,params)); +file pointSets[] ; + +foreach pointSet, i in pointSets { + file ofile; + ofile = processPoints(processPoints_script, image, pointSet); +} Added: SwiftApps/Scattering/paintgrid/processpoints.py =================================================================== --- SwiftApps/Scattering/paintgrid/processpoints.py (rev 0) +++ SwiftApps/Scattering/paintgrid/processpoints.py 2013-07-08 20:48:48 UTC (rev 6625) @@ -0,0 +1,37 @@ +#! /usr/bin/env python + +import sys +import time + +dataFileName = sys.argv[1] +pointFileName = sys.argv[2] +runTime = float(sys.argv[3]) + +n = 0; +pixel = []; +with open(dataFileName, "rb") as f: + byte = f.read(1) + while byte != "": + pixel.append(byte) + byte = f.read(1) + +print "Data file has ", len(pixel), " pixels" + +f = open(pointFileName) +lines = f.read().splitlines() +f.close() + +print "Processing ", len(lines), " points in model space" +print "Runtime is ", runTime, " seconds per point" + +for line in lines: + xyz = line.split() + x = float(xyz[0]) * .001 + y = float(xyz[1]) * .001 + z = float(xyz[2]) * .001 + func = 0.0 + for p in pixel: + v=float(ord(p)) + func += v*x + v*x + v*z + time.sleep(runTime) + print " %10f %10f %10f %10f" % (x, y, z, func) Property changes on: SwiftApps/Scattering/paintgrid/processpoints.py ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/Scattering/paintgrid/sites.xml =================================================================== --- SwiftApps/Scattering/paintgrid/sites.xml (rev 0) +++ SwiftApps/Scattering/paintgrid/sites.xml 2013-07-08 20:48:48 UTC (rev 6625) @@ -0,0 +1,39 @@ + + + + + + /scratch/midway/{env.USER}/swiftwork + + + + + + + westmere + 12 + + + + 1 + 1 + 1 + 12 + .11 + + + 00:15:00 + 1800 + + + + /scratch/midway/{env.USER}/swiftwork + + + false + 100 + 100 + 10000 + + + From hategan at ci.uchicago.edu Mon Jul 8 19:26:08 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 19:26:08 -0500 (CDT) Subject: [Swift-commit] r6626 - branches/faster/src/org/griphyn/vdl/util Message-ID: <20130709002608.D396B9CC45@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 19:26:08 -0500 (Mon, 08 Jul 2013) New Revision: 6626 Modified: branches/faster/src/org/griphyn/vdl/util/LazyFileAppender.java Log: fixed logging Modified: branches/faster/src/org/griphyn/vdl/util/LazyFileAppender.java =================================================================== --- branches/faster/src/org/griphyn/vdl/util/LazyFileAppender.java 2013-07-08 20:48:48 UTC (rev 6625) +++ branches/faster/src/org/griphyn/vdl/util/LazyFileAppender.java 2013-07-09 00:26:08 UTC (rev 6626) @@ -27,7 +27,11 @@ public synchronized void setFile(String fileName, boolean append, boolean bufferedIO, int bufferSize) throws IOException { LogLog.debug("setFile called: " + fileName + ", " + append); - + + if (this.qw != null) { + return; + } + // set a stdout writer just in case reset(); Writer fw = createWriter(System.out); @@ -55,6 +59,9 @@ // Save file name since reset() sets it to null String fileName = this.fileName; + + // Set to null to prevent parent class from closing System.out + this.qw = null; reset(); this.fileName = fileName; FileOutputStream ostream = null; From hategan at ci.uchicago.edu Mon Jul 8 20:56:37 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 20:56:37 -0500 (CDT) Subject: [Swift-commit] r6627 - / branches Message-ID: <20130709015637.1C6E49CC45@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 20:56:36 -0500 (Mon, 08 Jul 2013) New Revision: 6627 Added: branches/trunk.old/ Removed: trunk/ Log: moved trunk to branches/trunk.old From hategan at ci.uchicago.edu Mon Jul 8 20:57:29 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 8 Jul 2013 20:57:29 -0500 (CDT) Subject: [Swift-commit] r6628 - / branches Message-ID: <20130709015729.117BE9CC45@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 20:57:28 -0500 (Mon, 08 Jul 2013) New Revision: 6628 Added: trunk/ Removed: branches/faster/ Log: moved faster to trunk From wilde at ci.uchicago.edu Tue Jul 9 17:53:46 2013 From: wilde at ci.uchicago.edu (wilde at ci.uchicago.edu) Date: Tue, 9 Jul 2013 17:53:46 -0500 (CDT) Subject: [Swift-commit] r6629 - SwiftApps/Scattering/paintgrid Message-ID: <20130709225346.579FA9D858@svn.ci.uchicago.edu> Author: wilde Date: 2013-07-09 17:53:46 -0500 (Tue, 09 Jul 2013) New Revision: 6629 Added: SwiftApps/Scattering/paintgrid/swift.properties Modified: SwiftApps/Scattering/paintgrid/README Log: Minor updates. Modified: SwiftApps/Scattering/paintgrid/README =================================================================== --- SwiftApps/Scattering/paintgrid/README 2013-07-09 01:57:28 UTC (rev 6628) +++ SwiftApps/Scattering/paintgrid/README 2013-07-09 22:53:46 UTC (rev 6629) @@ -1,5 +1,26 @@ Demo / tutorial application to mimic the needs of the PaintGrid application + +Setup: + + $ PATH=/clhome/WILDE/swift/rev/swift-0.94.1/bin:$PATH + +Create a test data file: + + $ dd bs=8M count=1 if=/dev/zero of=data.0001.tif + $ dd bs=800 count=1 if=/dev/zero of=data.0001.tiny + +Run the Swift script: + + $ mkdir ~/swift + $ cp swift.properties ~/.swift + + $ swift -tc.file apps -sites.file amd.xml paintgrid.swift -runDir=$PWD -params=genpoints.params -image=data.0001.tiny + + + +TODO: + Execution scenarios: run.local.sh Added: SwiftApps/Scattering/paintgrid/swift.properties =================================================================== --- SwiftApps/Scattering/paintgrid/swift.properties (rev 0) +++ SwiftApps/Scattering/paintgrid/swift.properties 2013-07-09 22:53:46 UTC (rev 6629) @@ -0,0 +1,430 @@ + +sites.file=sites.xml +tc.file=apps + +status.mode=provider +use.provider.staging=true +use.wrapper.staging=false +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +provider.staging.pin.swiftfiles=true +sitedir.keep=true +file.gc.enabled=false +#tcp.port.range=50000,51000 + +########################################################################### +# Throttling options # +########################################################################### +# +# For the throttling parameters, valid values are either a positive integer +# or "off" (without the quotes). +# + +# +# Limits the number of concurrent submissions for a workflow instance. This +# throttle only limits the number of concurrent tasks (jobs) that are being +# sent to sites, not the total number of concurrent jobs that can be run. +# The submission stage in GRAM is one of the most CPU expensive stages (due +# mostly to the mutual authentication and delegation). Having too many +# concurrent submissions can overload either or both the submit host CPU +# and the remote host/head node causing degraded performance. +# +# Default: 4 +# + +throttle.submit=4 +#throttle.submit=off + +# +# Limits the number of concurrent submissions for any of the sites Swift will +# try to send jobs to. In other words it guarantees that no more than the +# value of this throttle jobs sent to any site will be concurrently in a state +# of being submitted. +# +# Default: 2 +# + +### throttle.host.submit=2 +#throttle.host.submit=off + +# +# The Swift scheduler has the ability to limit the number of concurrent jobs +# allowed on a site based on the performance history of that site. Each site +# is assigned a score (initially 1), which can increase or decrease based +# on whether the site yields successful or faulty job runs. The score for a +# site can take values in the (0.1, 100) interval. The number of allowed jobs +# is calculated using the following formula: +# 2 + score*throttle.score.job.factor +# This means a site will always be allowed at least two concurrent jobs and +# at most 2 + 100*throttle.score.job.factor. With a default of 4 this means +# at least 2 jobs and at most 402. +# +# Default: 4 +# + +### throttle.score.job.factor=0.2 +#throttle.score.job.factor=off + + +# +# Limits the total number of concurrent file transfers that can happen at any +# given time. File transfers consume bandwidth. Too many concurrent transfers +# can cause the network to be overloaded preventing various other signalling +# traffic from flowing properly. +# +# Default: 4 +# + +throttle.transfers=1 +#throttle.transfers=off + +# Limits the total number of concurrent file operations that can happen at any +# given time. File operations (like transfers) require an exclusive connection +# to a site. These connections can be expensive to establish. A large number +# of concurrent file operations may cause Swift to attempt to establish many +# such expensive connections to various sites. Limiting the number of concurrent +# file operations causes Swift to use a small number of cached connections and +# achieve better overall performance. +# +# Default: 8 +# + +throttle.file.operations=1 +#throttle.file.operations=off + +# Swift runtime properties for CMTS Cyber Tutorial + +# Get sites and apps lists from these files in cwd: + +sites.file=sites.xml +tc.file=apps + +# Data and status staging modes: + +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +status.mode=provider + +# For better debugging: + +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +sitedir.keep=true +file.gc.enabled=false +file.gc.enabled=false + + +# Swift runtime properties for CMTS Cyber Tutorial + +# Get sites and apps lists from these files in cwd: + +sites.file=sites.xml +tc.file=apps + +# Data and status staging modes: + +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +status.mode=provider + +# For better debugging: + +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +sitedir.keep=true +file.gc.enabled=false +file.gc.enabled=false + + +# Swift runtime properties for CMTS Cyber Tutorial + +# Get sites and apps lists from these files in cwd: + +sites.file=sites.xml +tc.file=apps + +# Data and status staging modes: + +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +status.mode=provider + +# For better debugging: + +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +sitedir.keep=true +file.gc.enabled=false +file.gc.enabled=false + + +# Swift runtime properties for CMTS Cyber Tutorial + +# Get sites and apps lists from these files in cwd: + +sites.file=sites.xml +tc.file=apps + +# Data and status staging modes: + +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +status.mode=provider + +# For better debugging: + +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +sitedir.keep=true +file.gc.enabled=false +file.gc.enabled=false + + +# Swift runtime properties for CMTS Cyber Tutorial + +# Get sites and apps lists from these files in cwd: + +sites.file=sites.xml +tc.file=apps + +# Data and status staging modes: + +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +status.mode=provider + +# For better debugging: + +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +sitedir.keep=true +file.gc.enabled=false +file.gc.enabled=false + + +# Swift runtime properties for CMTS Cyber Tutorial + +# Get sites and apps lists from these files in cwd: + +sites.file=sites.xml +tc.file=apps + +# Data and status staging modes: + +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +status.mode=provider + +# For better debugging: + +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +sitedir.keep=true +file.gc.enabled=false +file.gc.enabled=false + + +# Swift runtime properties for CMTS Cyber Tutorial + +# Get sites and apps lists from these files in cwd: + +sites.file=sites.xml +tc.file=apps + +# Data and status staging modes: + +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +status.mode=provider + +# For better debugging: + +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +sitedir.keep=true +file.gc.enabled=false +file.gc.enabled=false + + +# Swift runtime properties for CMTS Cyber Tutorial + +# Get sites and apps lists from these files in cwd: + +sites.file=sites.xml +tc.file=apps + +# Data and status staging modes: + +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +status.mode=provider + +# For better debugging: + +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +sitedir.keep=true +file.gc.enabled=false +file.gc.enabled=false + + +# Swift runtime properties for CMTS Cyber Tutorial + +# Get sites and apps lists from these files in cwd: + +sites.file=sites.xml +tc.file=apps + +# Data and status staging modes: + +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +status.mode=provider + +# For better debugging: + +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +sitedir.keep=true +file.gc.enabled=false +file.gc.enabled=false + + +# Swift runtime properties for CMTS Cyber Tutorial + +# Get sites and apps lists from these files in cwd: + +sites.file=sites.xml +tc.file=apps + +# Data and status staging modes: + +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +status.mode=provider + +# For better debugging: + +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +sitedir.keep=true +file.gc.enabled=false +file.gc.enabled=false + + +# Swift runtime properties for CMTS Cyber Tutorial + +# Get sites and apps lists from these files in cwd: + +sites.file=sites.xml +tc.file=apps + +# Data and status staging modes: + +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +status.mode=provider + +# For better debugging: + +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +sitedir.keep=true +file.gc.enabled=false +file.gc.enabled=false + + +# Swift runtime properties for CMTS Cyber Tutorial + +# Get sites and apps lists from these files in cwd: + +sites.file=sites.xml +tc.file=apps + +# Data and status staging modes: + +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +status.mode=provider + +# For better debugging: + +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +sitedir.keep=true +file.gc.enabled=false +file.gc.enabled=false + + +# Swift runtime properties for CMTS Cyber Tutorial + +# Get sites and apps lists from these files in cwd: + +sites.file=sites.xml +tc.file=apps + +# Data and status staging modes: + +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +status.mode=provider + +# For better debugging: + +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +sitedir.keep=true +file.gc.enabled=false +file.gc.enabled=false + + +# Swift runtime properties for CMTS Cyber Tutorial + +# Get sites and apps lists from these files in cwd: + +sites.file=sites.xml +tc.file=apps + +# Data and status staging modes: + +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +status.mode=provider + +# For better debugging: + +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +sitedir.keep=true +file.gc.enabled=false +file.gc.enabled=false + From swift at ci.uchicago.edu Wed Jul 10 01:10:03 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Wed, 10 Jul 2013 01:10:03 -0500 (CDT) Subject: [Swift-commit] cog r3714 Message-ID: <20130710061003.B8C908D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3714 | hategan | 2013-07-10 01:07:36 -0500 (Wed, 10 Jul 2013) | 1 line fixed a bug introduced by recent commits that would prevent included files from being run if re-running in the same jvm ------------------------------------------------------------------------ Index: modules/karajan/src/org/globus/cog/karajan/workflow/nodes/Include.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/nodes/Include.java (revision 3713) +++ modules/karajan/src/org/globus/cog/karajan/workflow/nodes/Include.java (working copy) @@ -156,6 +156,7 @@ if (hasProperty("_processed")) { return; } + int childCountBeforeInclude = this.elementCount(); A_FILE.setStatic(this, iname); logger.debug("Importing: " + iname); Reader reader = null; @@ -289,7 +290,7 @@ throw new ExecutionException("Internal error. No reader set"); } } - setProperty("_processed", elementCount()); + setProperty("_processed", childCountBeforeInclude); } public void loadStarted() { From davidk at ci.uchicago.edu Wed Jul 10 13:54:19 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Wed, 10 Jul 2013 13:54:19 -0500 (CDT) Subject: [Swift-commit] r6631 - branches/release-0.94/tests/groups Message-ID: <20130710185419.2E5C4187CC1@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-10 13:54:18 -0500 (Wed, 10 Jul 2013) New Revision: 6631 Removed: branches/release-0.94/tests/groups/group-pads.sh branches/release-0.94/tests/groups/group-queenbee.sh Log: Old groups Deleted: branches/release-0.94/tests/groups/group-pads.sh =================================================================== --- branches/release-0.94/tests/groups/group-pads.sh 2013-07-10 18:45:22 UTC (rev 6630) +++ branches/release-0.94/tests/groups/group-pads.sh 2013-07-10 18:54:18 UTC (rev 6631) @@ -1,8 +0,0 @@ - -# GROUPLIST definition to run pbs tests - -GROUPLIST=( - $TESTDIR/providers/local \ - $TESTDIR/providers/pads/coasters \ - $TESTDIR/providers/pads/pbs \ -) Deleted: branches/release-0.94/tests/groups/group-queenbee.sh =================================================================== --- branches/release-0.94/tests/groups/group-queenbee.sh 2013-07-10 18:45:22 UTC (rev 6630) +++ branches/release-0.94/tests/groups/group-queenbee.sh 2013-07-10 18:54:18 UTC (rev 6631) @@ -1,6 +0,0 @@ -# GROUPLIST definition to run queenbee tests - -GROUPLIST=( - $TESTDIR/providers/local \ - $TESTDIR/providers/queenbee/pbs \ -) From swift at ci.uchicago.edu Wed Jul 10 15:50:02 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Wed, 10 Jul 2013 15:50:02 -0500 (CDT) Subject: [Swift-commit] cog r3716 Message-ID: <20130710205003.1ADB48D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3716 | hategan | 2013-07-10 15:49:08 -0500 (Wed, 10 Jul 2013) | 1 line fixed only-one-batch-of-jobs-works bug in coasters ------------------------------------------------------------------------ Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/TaskNotifier.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/TaskNotifier.java (revision 3715) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/TaskNotifier.java (working copy) @@ -34,7 +34,7 @@ this.task = task; this.channelContext = channelContext; this.task.addStatusListener(this); - NotificationManager.getDefault().registerTask(task.getIdentity().getValue(), task, this); + NotificationManager.getDefault().registerListener(task.getIdentity().getValue(), task, this); } 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 3715) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Cpu.java (working copy) @@ -14,17 +14,16 @@ import org.apache.log4j.Logger; import org.globus.cog.abstraction.coaster.service.CoasterService; -import org.globus.cog.abstraction.impl.common.StatusEvent; +import org.globus.cog.abstraction.impl.execution.coaster.NotificationManager; import org.globus.cog.abstraction.impl.execution.coaster.SubmitJobCommand; import org.globus.cog.abstraction.interfaces.JobSpecification; 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.KarajanChannel; import org.globus.cog.karajan.workflow.service.commands.Command; import org.globus.cog.karajan.workflow.service.commands.Command.Callback; -public class Cpu implements Comparable, Callback, StatusListener { +public class Cpu implements Comparable, Callback, ExtendedStatusListener { public static final Logger logger = Logger.getLogger(Cpu.class); private static PullThread pullThread; @@ -215,7 +214,8 @@ } boolean launchSequential() { - running.getTask().addStatusListener(this); + Task t = running.getTask(); + NotificationManager.getDefault().registerListener(t.getIdentity().getValue(), t, this); idleTime += timeDiff(); timelast = running.getEndTime(); if (timelast == null) { @@ -360,14 +360,13 @@ task.setStatus(Status.SUBMITTED); } - public synchronized void statusChanged(StatusEvent event) { + public synchronized void statusChanged(Status s, String out, String err) { if (logger.isDebugEnabled()) { - logger.debug(event); + logger.debug(s); } - if (event.getStatus().isTerminal()) { - running.getTask().removeStatusListener(this); + if (s.isTerminal()) { running.setEndTime(Time.now()); - if (event.getStatus().getStatusCode() == Status.FAILED) { + if (s.getStatusCode() == Status.FAILED) { failedJobs++; totalFailedJobs++; } Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Mpiexec.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Mpiexec.java (revision 3715) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Mpiexec.java (working copy) @@ -339,7 +339,7 @@ String value = cloneID.getValue() + ":" + i; cloneID.setValue(value); clone.setIdentity(cloneID); - NotificationManager.getDefault().registerTask(value, clone, this); + NotificationManager.getDefault().registerListener(value, clone, this); // Update Task Specification JobSpecification spec = (JobSpecification) clone.getSpecification(); Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/NotificationManager.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/NotificationManager.java (revision 3715) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/NotificationManager.java (working copy) @@ -58,7 +58,7 @@ lastNotificationTime = System.currentTimeMillis(); } - public void registerTask(String id, Task task, ExtendedStatusListener l) { + public void registerListener(String id, Task task, ExtendedStatusListener l) { List p; synchronized (listeners) { listeners.put(id, new TaskListenerPair(task, l)); @@ -74,21 +74,22 @@ public void notificationReceived(String id, Status s, String out, String err) { if (logger.isDebugEnabled()) logger.debug("recvd: for: " + id + " " + s); - TaskListenerPair l; + TaskListenerPair ls; synchronized (listeners) { if (s.isTerminal()) { - l = listeners.remove(id); + ls = listeners.remove(id); } else { - l = listeners.get(id); + ls = listeners.get(id); } lastNotificationTime = System.currentTimeMillis(); - if (l == null) { + if (ls == null) { addPending(id, new ExtendedStatus(s, out, err)); } } - if (l != null) { - l.listener.statusChanged(s, out, err); + if (ls != null) { + for (ExtendedStatusListener l : ls.listeners) + l.statusChanged(s, out, err); } } @@ -165,11 +166,16 @@ private static final class TaskListenerPair { public final Task task; - public final ExtendedStatusListener listener; + public final List listeners; public TaskListenerPair(Task task, ExtendedStatusListener listener) { this.task = task; - this.listener = listener; + this.listeners = new LinkedList(); + this.listeners.add(listener); } + + public void addListener(ExtendedStatusListener l) { + this.listeners.add(l); + } } } 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 3715) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/JobSubmissionTaskHandler.java (working copy) @@ -236,7 +236,7 @@ if (logger.isDebugEnabled()) { logger.debug("Submitted task " + getTask() + ". Job id: " + jobid); } - NotificationManager.getDefault().registerTask(jobid, getTask(), this); + NotificationManager.getDefault().registerListener(jobid, getTask(), this); } } From swift at ci.uchicago.edu Wed Jul 10 19:20:03 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Wed, 10 Jul 2013 19:20:03 -0500 (CDT) Subject: [Swift-commit] cog r3742 Message-ID: <20130711002003.BF0308D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3742 | hategan | 2013-07-10 19:19:18 -0500 (Wed, 10 Jul 2013) | 1 line fixed job notifications not propagating to client ------------------------------------------------------------------------ Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/NotificationManager.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/NotificationManager.java (revision 3741) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/NotificationManager.java (working copy) @@ -61,7 +61,14 @@ public void registerListener(String id, Task task, ExtendedStatusListener l) { List p; synchronized (listeners) { - listeners.put(id, new TaskListenerPair(task, l)); + TaskListenerPair tlp = listeners.get(id); + if (tlp == null) { + tlp = new TaskListenerPair(task, l); + listeners.put(id, tlp); + } + else { + tlp.addListener(l); + } p = pending.remove(id); } if (p != null) { @@ -88,8 +95,9 @@ } } if (ls != null) { - for (ExtendedStatusListener l : ls.listeners) - l.statusChanged(s, out, err); + for (ExtendedStatusListener l : ls.listeners) { + l.statusChanged(s, out, err); + } } } From hategan at ci.uchicago.edu Wed Jul 10 20:35:53 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Wed, 10 Jul 2013 20:35:53 -0500 (CDT) Subject: [Swift-commit] r6636 - trunk/src/org/griphyn/vdl/engine Message-ID: <20130711013554.6C7D7187CC1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-10 20:35:43 -0500 (Wed, 10 Jul 2013) New Revision: 6636 Modified: trunk/src/org/griphyn/vdl/engine/Karajan.java Log: allow widening to float in arithmetic operations Modified: trunk/src/org/griphyn/vdl/engine/Karajan.java =================================================================== --- trunk/src/org/griphyn/vdl/engine/Karajan.java 2013-07-10 20:13:28 UTC (rev 6635) +++ trunk/src/org/griphyn/vdl/engine/Karajan.java 2013-07-11 01:35:43 UTC (rev 6636) @@ -1705,25 +1705,89 @@ void checkTypesInArithmExpr(String op, String left, String right, StringTemplate st) throws CompilationException { - if (left.equals(right)) - st.setAttribute("datatype", left); - else - throw new CompilationException("Arithmetic operation can only be applied to parameters of same type."); - - if (op.equals("+") && !left.equals("int") && !left.equals("float") && !left.equals("string")) - throw new CompilationException("Arithmetic operation + can only be applied to parameters of type int, float and string."); - if ((op.equals("-") || op.equals("*")) && !left.equals("int") && !left.equals("float")) - throw new CompilationException("Arithmetic operation " + op + - " can only be applied to parameters of type int and float."); - if (op.equals("/") && !left.equals("float")) - throw new CompilationException("Arithmetic operation / can only be applied to parameters of type float."); - if (op.equals("%/") && !left.equals("int")) - throw new CompilationException("Arithmetic operation %/ can only be applied to parameters of type int."); - if (op.equals("%%") && !left.equals("int")) - throw new CompilationException("Arithmetic operation %% can only be applied to parameters of type int."); + /* + * +, -, /, * : int, int -> int + * +, -, /, *: float, float -> float + * +, -, /, * : int, float -> float + * +, -, /, * : float, int -> float + * + * + : string, string -> string + * + : string, int -> string + * + : int, string -> string + * + : string, float -> string + * + : float, string -> string + * + * %/ : int, int -> int + * %% : int, int -> int + */ + + switch (op.charAt(0)) { + case '+': + if (left.equals("string")) { + if (!right.equals("string") && !right.equals("int") && !right.equals("float")) { + throw new CompilationException("Operator '+' cannot be applied to 'string' and '" + right + "'"); + } + st.setAttribute("datatype", "string"); + } + else if (right.equals("string")) { + if (!left.equals("string") && !left.equals("int") && !left.equals("float")) { + throw new CompilationException("Operator '+' cannot be applied to '" + left + "' and 'string'"); + } + st.setAttribute("datatype", "string"); + } + else { + checkTypesInType1ArithmExpr(op, left, right, st); + } + break; + case '-': + case '/': + case '*': + checkTypesInType1ArithmExpr(op, left, right, st); + break; + case '%': + checkTypesInType2ArithmExpr(op, left, right, st); + break; + default: + throw new CompilationException("Unknown operator '" + op + "'"); + } } - public String abstractExpressionToRootVariable(XmlObject expression) throws CompilationException { + private void checkTypesInType1ArithmExpr(String op, String left, String right, StringTemplate st) + throws CompilationException { + /* + * int, int -> int + * float, float -> float + * int, float -> float + * float, int -> float + */ + if (left.equals("int")) { + if (right.equals("int")) { + st.setAttribute("datatype", "int"); + return; + } + else if (right.equals("float")) { + st.setAttribute("datatype", "float"); + return; + } + } + else if (left.equals("float")) { + if (right.equals("int") || right.equals("float")) { + st.setAttribute("datatype", "float"); + return; + } + } + throw new CompilationException("Operator '" + op + "' cannot be applied to '" + left + "' and '" + right + "'"); + } + + private void checkTypesInType2ArithmExpr(String op, String left, String right, StringTemplate st) + throws CompilationException { + if (!left.equals("int") || !right.equals("int")) { + throw new CompilationException("Operator '" + op + "' can only be applied to 'int' and 'int'"); + } + st.setAttribute("datatype", "int"); + } + + public String abstractExpressionToRootVariable(XmlObject expression) throws CompilationException { Node expressionDOM = expression.getDomNode(); String namespaceURI = expressionDOM.getNamespaceURI(); String localName = expressionDOM.getLocalName(); From hategan at ci.uchicago.edu Wed Jul 10 20:36:09 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Wed, 10 Jul 2013 20:36:09 -0500 (CDT) Subject: [Swift-commit] r6637 - trunk/src/org/griphyn/vdl/karajan/lib Message-ID: <20130711013609.20230187CC1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-10 20:36:08 -0500 (Wed, 10 Jul 2013) New Revision: 6637 Modified: trunk/src/org/griphyn/vdl/karajan/lib/TCProfile.java Log: fixed potential NPE Modified: trunk/src/org/griphyn/vdl/karajan/lib/TCProfile.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/TCProfile.java 2013-07-11 01:35:43 UTC (rev 6636) +++ trunk/src/org/griphyn/vdl/karajan/lib/TCProfile.java 2013-07-11 01:36:08 UTC (rev 6637) @@ -178,13 +178,15 @@ private void addEnvironment(Stack stack, BoundContact bc) { Map props = bc.getProperties(); - for (Map.Entry e : props.entrySet()) { - String name = e.getKey(); - FQN fqn = new FQN(name); - String value = (String) e.getValue(); - if (Profile.ENV.equalsIgnoreCase(fqn.getNamespace())) { - cr_environment.append(stack, new Entry(fqn.getName(), value)); - } + if (props != null) { + for (Map.Entry e : props.entrySet()) { + String name = e.getKey(); + FQN fqn = new FQN(name); + String value = (String) e.getValue(); + if (Profile.ENV.equalsIgnoreCase(fqn.getNamespace())) { + cr_environment.append(stack, new Entry(fqn.getName(), value)); + } + } } } From hategan at ci.uchicago.edu Wed Jul 10 21:30:21 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Wed, 10 Jul 2013 21:30:21 -0500 (CDT) Subject: [Swift-commit] r6638 - trunk/src/org/griphyn/vdl/karajan/lib Message-ID: <20130711023021.4FD5A187CC1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-10 21:30:21 -0500 (Wed, 10 Jul 2013) New Revision: 6638 Modified: trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java Log: restored max ticker period to 30s Modified: trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java 2013-07-11 01:36:08 UTC (rev 6637) +++ trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java 2013-07-11 02:30:21 UTC (rev 6638) @@ -68,7 +68,7 @@ public static SimpleDateFormat formatter = new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss Z"); public static final int MIN_PERIOD_MS=1000; - public static final int MAX_PERIOD_MS=1000; + public static final int MAX_PERIOD_MS=30000; public static final String[] preferredOutputOrder = { "uninitialized", From davidk at ci.uchicago.edu Fri Jul 12 10:34:52 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Fri, 12 Jul 2013 10:34:52 -0500 (CDT) Subject: [Swift-commit] r6639 - in trunk: . bin Message-ID: <20130712153452.B82F39D857@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-12 10:34:52 -0500 (Fri, 12 Jul 2013) New Revision: 6639 Added: trunk/bin/nswift Removed: trunk/bin/chxml Modified: trunk/bin/swiftrun trunk/build.xml Log: Swiftrun and nswift scripts Deleted: trunk/bin/chxml =================================================================== --- trunk/bin/chxml 2013-07-11 02:30:21 UTC (rev 6638) +++ trunk/bin/chxml 2013-07-12 15:34:52 UTC (rev 6639) @@ -1,99 +0,0 @@ -#!/usr/bin/env python - -# This does not run under python3.2 - -# ensures that that there is a sites file specified and that it contains -# well-formed xml as well as essential attributes for the specified provider - -import xml.parsers.expat,sys,os,commands,pprint -from glob import glob - -class siteProps: - - def __init__(self,argstr): - self.sites_file = "" - self.startTags= [] - self.endTags=[] - self.globusParams = 0 - self.execProvider = "" - - if len(argstr)<2: - print "please specify a sites file" - sys.exit(1) - i = 0 - for o in argstr: - if o == "'-sites.file'": - self.sites_file = argstr[i+1].split("'")[1] - elif o == "'-config'": - try: - config_filename = argstr[i+1].split("'")[1] - config_file = open(config_filename,"r") - except IOError, (errno, strerror): - print strerror - sys.exit("Could not read: " + config_filename) - - for line in config_file.readlines(): - if line.strip().startswith('#'): - continue - if line.find("sites.file")>-1: - self.sites_file = line.split("=")[1].strip() - i = i+1 - if (self.sites_file == ""): - swift_loc = commands.getoutput("which swift") - swift_home = swift_loc.split("bin")[0] - self.sites_file = swift_home+"etc/sites.xml" - print "no sites file specified, setting to default: "+self.sites_file - - - def parsefile(self): - parser = xml.parsers.expat.ParserCreate() - parser.ParseFile(open(self.sites_file, "r")) - - def start_element(self, name, attrs): - self.startTags.append(name) - for x, y in attrs.iteritems(): - if (name=="execution" and x=="provider"): - self.execProvider = y - if (y=="globus"): - self.globusParams = 1 - if (mysite.globusParams == 1 and mysite.execProvider == "local"): - pp = pprint.PrettyPrinter() - print "Warning: "+mysite.sites_file+" contains globus parameters that do not apply to the local execution provider ("+name+" "+pp.pformat(attrs)+")" - sys.exit() - def end_element(self, name): - self.endTags.append(name) - - -#------------------------main---------------------------------- - -mysite = siteProps(sys.argv) - -try: - mysite.parsefile() -except Exception, e: - print "Error: XML parsing error in "+mysite.sites_file - print "%s is %s" % (mysite.sites_file, e) - sys.exit() - -p = xml.parsers.expat.ParserCreate() -p.StartElementHandler = mysite.start_element -p.EndElementHandler = mysite.end_element -p.ParseFile(open(mysite.sites_file,"r")) - -config = 0 -pool = 0 - -for tag in mysite.startTags: - if tag=="config": - config = 1 - else: - if tag=="pool": - pool= 1 - -if (pool<1): - print "Warning: Your sites file, "+mysite.sites_file+" is missing a pool entry" - sys.exit() -if (config<1): - print "Warning: Your site file, "+mysite.sites_file+" is missing a config entry" - sys.exit() - Added: trunk/bin/nswift =================================================================== --- trunk/bin/nswift (rev 0) +++ trunk/bin/nswift 2013-07-12 15:34:52 UTC (rev 6639) @@ -0,0 +1,175 @@ +#!/bin/bash + +# Referenced environment variables (default values): +# SWIFT_ASSERTS +# SWIFT_HEAP_MAX (1024M) +# SWIFT_USAGE_STATS + +EXEC=org.griphyn.vdl.karajan.Loader +OPTIONS="-XX:+HeapDumpOnOutOfMemoryError" + +CYGWIN= +CPDELIM=":" +HEAPMAX=1024M + +if echo `uname` | grep -i "cygwin"; then + CYGWIN="yes" + CPDELIM=";" +fi + +updateOptions() { + + if [ "X$1" != "X" ] ; then + OPTIONS="$OPTIONS -D$2=$1" + fi + +} + +####### MAIN BODY ########## + +if [ ! -d "$SWIFT_HOME" ] ; then + SWIFT_HOME=`dirname $0`"/.." + if [ ! -f "$SWIFT_HOME/lib/cog-swift-svn.jar" ] && [ ! -f "$SWIFT_HOME/lib/cog.jar" ] ; then + MY_PATH=`which $0` + SWIFT_HOME=`dirname $MY_PATH`"/.." + if [ ! -f "$SWIFT_HOME/lib/cog-swift-svn.jar" ] && [ ! -f "$SWIFT_HOME/lib/cog.jar" ] ; then + echo "Error: SWIFT_HOME is not set, and all attempts at guessing it failed" + exit 1 + fi + fi +fi + +OPTIONS="$OPTIONS -Djava.endorsed.dirs=$SWIFT_HOME/lib/endorsed" + +LOCALCLASSPATH=$SWIFT_HOME/etc$CPDELIM$SWIFT_HOME/libexec +for JAR in $SWIFT_HOME/lib/*.jar; do + LOCALCLASSPATH="$LOCALCLASSPATH$CPDELIM$JAR" +done +LOCALCLASSPATH=$LOCALCLASSPATH$CPDELIM$CLASSPATH + +CMDLINE="$@" + +### SETUP OTHER ENV VARIABLES #### + +USERID=`id | awk '{printf("%s\n", substr($1, 5, index($1, "(")-5 ) ) }'` + +if [ "X$GLOBUS_HOSTNAME" = "X" ] && [ "X$HOSTNAME" != "X" ]; then + GLOBUS_HOSTNAME=$HOSTNAME +fi + +updateOptions "$USERID" "UID" +updateOptions "$GLOBUS_INSTALL_PATH" "GLOBUS_INSTALL_PATH" +updateOptions "$GLOBUS_DEPLOY_PATH" "GLOBUS_DEPLOY_PATH" +updateOptions "$GLOBUS_TCP_PORT_RANGE" "GLOBUS_TCP_PORT_RANGE" +updateOptions "$GLOBUS_TCP_SOURCE_PORT_RANGE" "GLOBUS_TCP_SOURCE_PORT_RANGE" +updateOptions "$GLOBUS_UDP_SOURCE_PORT_RANGE" "GLOBUS_UDP_SOURCE_PORT_RANGE" +updateOptions "$GLOBUS_HOSTNAME" "GLOBUS_HOSTNAME" +updateOptions "$X509_USER_CERT" "X509_USER_CERT" +updateOptions "$X509_USER_KEY" "X509_USER_KEY" +updateOptions "$X509_CERT_DIR" "X509_CERT_DIR" +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 +updateOptions "file:///dev/urandom" "java.security.egd" + +if [ "X$SWIFT_HEAP_MAX" != "X" ]; then + HEAPMAX=$SWIFT_HEAP_MAX +fi +if [ "X$HEAPMAX" != "X" ]; then + OPTIONS="-Xmx$HEAPMAX $OPTIONS" +fi + +if [ "X$SWIFT_ASSERTS" != "X" ]; then + OPTIONS="-ea $OPTIONS" +fi + +# Anonymous usage statistics +LISTENER="128.135.125.18" +PORT="9999" + +if [ -z "$SWIFT_USAGE_STATS" ]; then + SWIFT_USAGE_STATS=1 +fi + +# To disable usage statistics, uncomment the line below +#SWIFT_USAGE_STATS=0 + +PATH=$PATH:/sbin +IFCONFIG=`which ifconfig 2>&1` +if [ -x "$IFCONFIG" ]; then + MAC=`$IFCONFIG 2>/dev/null |grep HWaddr` +fi + +# Check if we are running on a mac, if so look for md5 and not md5sum +if [ "`uname`" = "Darwin" ]; then + MD5SUM=`which md5 2>&1` + if [ ! -x "$MD5SUM" ]; then + echo "warning: unable to find md5" + SWIFT_USAGE_STATS=0 + fi +else + MD5SUM=`which md5sum 2>&1` + if [ ! -x "$MD5SUM" ]; then + echo "warning: unable to find md5sum" + SWIFT_USAGE_STATS=0 + fi +fi + +BASH="/bin/bash" +if [ ! -x "$BASH" ]; then + BASH=`which bash 2>&1` + if [ ! -x "$BASH" ]; then + echo "warning: unable to find bash" + SWIFT_USAGE_STATS=0 + fi +fi + +if [ "$SWIFT_USAGE_STATS" = 1 ]; then + for var in "$@" + do + SCRIPT=`echo $var|grep -i .swift` + if [ -e "$SCRIPT" ]; then + SCRIPT=$var + SCRIPTID=`$MD5SUM $SCRIPT|cut -d ' ' -f1` + SCRIPTLENGTH=`wc -l $SCRIPT|cut -d ' ' -f1` + fi + done + HOSTNAME=`hostname` + USERID=`echo $USERID $HOSTNAME $MAC | $MD5SUM |cut -d ' ' -f1` + DATE=`date` + KEY=`echo $USERID $DATE $$ | $MD5SUM | cut -d ' ' -f1` + $BASH -c "echo $KEY $USERID $SCRIPTID $SCRIPTLENGTH -1 0 > /dev/udp/$LISTENER/$PORT" > /dev/null 2>&1 & +fi + +# Swiftrun +CMDLINE="$( swiftrun $CMDLINE )" + +### EXECUTE ############ +# Note: killing Swift may be briefly delayed due to Coasters shutdown +if test -n "$CYGWIN"; then + set CLASSPATHSAVE=$CLASSPATH + export CLASSPATH="$LOCALCLASSPATH" + eval java ${OPTIONS} ${COG_OPTS} ${EXEC} ${CMDLINE} + export CLASSPATH=$CLASSPATHSAVE +else + eval java ${OPTIONS} ${COG_OPTS} -classpath ${LOCALCLASSPATH} ${EXEC} ${CMDLINE} +fi +return_code=$? + +if [ "$SWIFT_USAGE_STATS" = 1 ]; then + $BASH -c "echo $KEY $USERID $SCRIPTID $SCRIPTLENGTH $return_code 1 > /dev/udp/$LISTENER/$PORT" > /dev/null 2>&1 & +fi + +mv *.d/ $( ls -1rtd run*/ |tail -1 ) +rm *.swiftx *.kml +exit $return_code + +# Local Variables: +# tab-width: 4 +# indent-tabs-mode: t +# End: Property changes on: trunk/bin/nswift ___________________________________________________________________ Added: svn:executable + * Modified: trunk/bin/swiftrun =================================================================== --- trunk/bin/swiftrun 2013-07-11 02:30:21 UTC (rev 6638) +++ trunk/bin/swiftrun 2013-07-12 15:34:52 UTC (rev 6639) @@ -1,116 +1,214 @@ -#!/bin/bash +#!/usr/bin/perl -w -# Verify an argument is not null -verify_not_null() -{ - argname=$1; shift - if [ _$1 != _ ]; then - return 0; - else - echo $0: value for $argname can not be null - exit 1 - fi +use strict; +use warnings; +use File::Basename; +use Getopt::Long qw(GetOptionsFromArray); +use Switch; +use Cwd; + +Getopt::Long::Configure("pass_through"); + +my %properties = (); # Hash storing all swift properties +my @property_files = (); # List of swift property files to be read +my $option_tcfile; # Value of -tc.file option +my $option_sitesfile; # Value of -sites.file option +my $option_siteslist; # Value of -sites option, comma separated +my $option_config; # Value of -config option +my @sites; # List of sites from -sites in array +my $run_directory; # Run directory to be created, run.NNNN +my @new_swift_args; # New command line arguments +my @original_swift_args; # Original arguments + +# List of xml shortcuts. Keep in lower case. +my %xml_aliases = ( + 'provider' => 'provider.coaster', + 'jobspernode' => 'globus.jobspernode', + 'maxwalltime' => 'globus.maxwalltime', + 'queue' => 'globus.queue', + 'initialscore' => 'karajan.initialscore', +); + +# Verify a property file exists and add it to the search path +sub add_property_file { + my $property_file = $_[0]; + if( -e "$property_file" ) { + push( @property_files, $property_file ); + } } -# crash: Report a problem and exit -crash() -{ - MSG=$1 - echo ${MSG} >&2 - exit 1 +# Create a string with a single pool entry +sub create_pool_entry { + my $site = $_[0]; + my $pool = "\n\n"; + while( my( $key, $value ) = each( %properties ) ) { + if( $key =~ /^\s*site.$site/ ) { + $pool .= &property_to_xml( $key, $value ); + } + } + $pool .= "\n"; + return $pool; } -# Create .swift structure -create_dotswift() -{ - if [ ! -d "$HOME/.swift" ]; then - mkdir $HOME/.swift || crash "Unable to mkdir $HOME/.swift" - fi +# Given a string in format site.beagle.globus.jobsPerNode=12, convert to xml +sub property_to_xml { + my $key = $_[0]; + my $value = $_[1]; + my ( $site, $sitename, $namespace, $property ) = split(/\./, $key); - if [ ! -d "$HOME/.swift/runs" ]; then - mkdir $HOME/.swift/runs || crash "Unable to mkdir $HOME/.swift/runs" - fi + # In the case of a shortened definition, check for aliases + if ( !defined( $property ) ) { + if ( defined( $xml_aliases{ lc( $namespace )})) { + ( $namespace, $property ) = split(/\./, $xml_aliases{ lc($namespace) }); + } + } + + # Make sure to handle special cases that are not in the namespace=x, key=y, format + switch($namespace) { + case "provider" { return "\n"; } + case "workdirectory" { return "$value\n"; } + case "filesystem" { return "\n"; } + else { return "" . $value . "\n"; } + } +} - if [ ! -d "$HOME/.swift/runs/current" ]; then - mkdir $HOME/.swift/runs/current || crash "Unable to mkdir $HOME/.swift/runs/current" - fi +# Write apps to file in tc.data format +sub write_apps { + my $app_filename = $_[0]; + open( APP_FILE, ">$run_directory/$app_filename" ) || die "Unable to open $run_directory/$app_filename\n"; - if [ ! -d "$HOME/.swift/runs/completed" ]; then - mkdir $HOME/.swift/runs/completed || crash "Unable to mkdir $HOME/.swift/runs/completed" - fi + # Find app definitions + while( my( $key, $value ) = each( %properties ) ) { + if( $key =~ /^\s*app./ ) { + my ( $app, $site, $command ) = split(/\./, $key); + + # Handle wildcards for site names + if ( $site eq "*" ) { + foreach my $nsite( @sites ) { + print APP_FILE "$nsite $command $value\n"; + } + } + + # Handle apps for defined sites + elsif ( grep( /^$site$/, @sites ) ) { + print APP_FILE "$site $command $value\n"; + } + } + } + # Update command line args + push( @new_swift_args, "-tc.file $run_directory/$app_filename" ); } -# Parse command line arguments -args="" -script="" -while [ $# -gt 0 ] -do - case "$1" in - -site|-sites|-s) SITES=$2; verify_not_null sites $SITES; shift ;; - -config|-c) CONFIG=$2; verify_not_null config $CONFIG; shift ;; - *) if [ -z "$script" ] && [[ $1 == *.swift ]]; then script="$1" - else args+="$1 " - fi ;; - esac - shift -done +# Write properties to file +sub write_properties { + my $property_filename = $_[0]; + open( PROPERTY_FILE, ">$run_directory/$property_filename" ) || die "Unable to open $run_directory/$property_filename\n"; + while( my( $key, $value ) = each( %properties ) ) { + # Ignore properties that start with app. or site. + next if $key =~ /^\s*app./; + next if $key =~ /^\s*site./; + print PROPERTY_FILE "$key=$value\n"; + } + push( @new_swift_args, "-config $run_directory/$property_filename" ); +} -# Create run directory -create_dotswift -rundir=$( echo run??? | sed -e 's/^.*run//' | awk '{ printf("run%03d\n", $1+1)}' ) -mkdir $rundir +# Write sites.xml to disk +sub write_sites { + my $filename = $_[0]; + open(SITES, ">$run_directory/$filename") || die "Unable to open $run_directory/$filename\n"; + print SITES "\n"; + print SITES "\n"; -# Link input_files -if [ -d "input_files" ]; then - for input_file in input_files/* - do - ln -s $PWD/$input_file $rundir - done -fi + foreach my $site(@sites) { + print SITES &create_pool_entry($site); + } -# Swift script -if [ -f "$script" ]; then - cp $script $rundir -fi + print SITES "\n\n"; + close(SITES); + push(@new_swift_args, "-sites.file $run_directory/$filename"); +} -# Copy config file if specified -if [ -f "$CONFIG" ]; then - cp $CONFIG $rundir - CONFIG=$( basename $CONFIG ) -fi +# Getopt::Long can't accept dots in arguments, work around to make things easy +foreach my $arg(@ARGV) { + $arg =~ s/sites.file/sitesfile/g; + $arg =~ s/tc.file/tcfile/g; +} -# Create sites.xml -IFS="," -echo "" > $rundir/sites.xml -for site in $SITES -do - # If config is not defined, but there is a config in conf/ that matches, use that - if [ -z "$CONFIG" ] && [ -f "conf/$site.cf" ]; then - cp conf/$site.cf $rundir - config=$site.cf - fi +# Command line arguments we care about + at original_swift_args = @ARGV; +GetOptionsFromArray( + \@original_swift_args, + 'sitesfile=s' => \$option_sitesfile, + 'tcfile=s' => \$option_tcfile, + 'config=s' => \$option_config, + 'site|sites=s' => \$option_siteslist, +); - if [ -f "conf/$config" ]; then - gensites -p conf/$config $site >> $rundir/sites.xml - else - gensites $site >> $rundir/sites.xml - fi +# Set @sites array from comma separated list of sites +if(defined($option_siteslist)) { + @sites = split(',', $option_siteslist); +} -done -echo "" >> $rundir/sites.xml -mv tc.data $rundir -cd $rundir +# Verify Swift is found in PATH +my $swift_etc_directory = dirname(dirname(`which swift`)) . "/etc"; +if( ! -d $swift_etc_directory ) { die "Unable to find a valid Swift installation"; } -if [ -z "$CONFIG" ]; then - CONFIG=$config -fi +# Set the search order for properties +&add_property_file("$swift_etc_directory/swift.properties"); +&add_property_file("$ENV{SWIFT_CONFIG}/swift.properties") if defined($ENV{SWIFT_CONFIG}); +&add_property_file("$ENV{HOME}/.swift/swift.properties"); +&add_property_file("swift.properties"); -# Run -timestamp=$( date +%s ) -ln -s $PWD $HOME/.swift/runs/current/$rundir.$timestamp -if [ -n "$CONFIG" ]; then - eval time swift -sites.file sites.xml -tc.file tc.data -config $CONFIG $( basename $script ) $args 2>&1 | tee swift.out -else - eval time swift -sites.file sites.xml -tc.file tc.data $( basename $script ) $args 2>&1 | tee swift.out -fi -mv $HOME/.swift/runs/current/$rundir.$timestamp $HOME/.swift/runs/completed +# Set property values +foreach my $property_file(@property_files) { + open(PROPERTIES, $property_file) || die "Unable to open $property_file"; + while( ) { + chomp; + next if /^\s*#/ || /^(\s)*$/; # Ignore blank lines and comments + my ($key, $value) = split('=', $_, 2); + $value =~ s/\$(\w+)/$ENV{$1}/g; # Substitute environment variables + $properties{ $key } = $value; + } +} + +# Create/increment run directory +my $run_number = 0; +my @run_directories = ; + +if(@run_directories) { + $run_number = $run_directories[-1]; + $run_number =~ s/run//g; + $run_number++; +} + +$run_directory = getcwd() . "/" . sprintf "run%04s", $run_number; +mkdir($run_directory) || die "Unable to create run directory $run_directory\n"; + +# Write swift configuration files +&write_sites("sites.xml") if defined( $option_siteslist ); +&write_apps("tc.data") if ( !defined( $option_tcfile ) && defined( $option_siteslist )); +&write_properties("cf") if !defined( $option_config ); + +# Repair args with dots +foreach my $arg(@ARGV) { + $arg =~ s/sitesfile/sites.file/g; + $arg =~ s/tcfile/tc.file/g; +} + +# Make sure -sites isn't in the arguments we send back to swift +while( @ARGV ) { + my $option = shift; + switch( $option ) { + case "-site" { shift; } + case "-sites" { shift; } + else { push( @new_swift_args, $option ); } + } +} + +push( @new_swift_args, sprintf( "-logfile $run_directory/run%04s.log", $run_number )); + +foreach my $arg( @new_swift_args ) { + print "$arg "; +} + +print "\n"; Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2013-07-11 02:30:21 UTC (rev 6638) +++ trunk/build.xml 2013-07-12 15:34:52 UTC (rev 6639) @@ -88,6 +88,7 @@ + From davidk at ci.uchicago.edu Fri Jul 12 10:42:05 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Fri, 12 Jul 2013 10:42:05 -0500 (CDT) Subject: [Swift-commit] r6640 - SwiftApps Message-ID: <20130712154205.E55439D857@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-12 10:42:05 -0500 (Fri, 12 Jul 2013) New Revision: 6640 Added: SwiftApps/swiftrun-demo/ Log: Creating a directory for testing with swiftrun scripts From davidk at ci.uchicago.edu Fri Jul 12 11:59:16 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Fri, 12 Jul 2013 11:59:16 -0500 (CDT) Subject: [Swift-commit] r6641 - SwiftApps/swiftrun-demo Message-ID: <20130712165916.4C76A9D854@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-12 11:59:16 -0500 (Fri, 12 Jul 2013) New Revision: 6641 Added: SwiftApps/swiftrun-demo/README SwiftApps/swiftrun-demo/catsn.swift SwiftApps/swiftrun-demo/data.txt SwiftApps/swiftrun-demo/swift.properties Log: Example scripts Added: SwiftApps/swiftrun-demo/README =================================================================== --- SwiftApps/swiftrun-demo/README (rev 0) +++ SwiftApps/swiftrun-demo/README 2013-07-12 16:59:16 UTC (rev 6641) @@ -0,0 +1,77 @@ +* You only need only one configuration file: swift.properties. + +* Configuration becomes easier. No XML. + +* swift.properties file contains information about sites, + apps, and properties. + +* Provides a mechanism for site templates + +* Gives us an easy way to simplify configuration names + +* Goal to be backward compatible with old swift syntax. + +* Run directories are created for each run, named runNNNN and incremented + with every call. + +* Log files and *.d directories go to the runNNNN directory. + + +How to Run +---------- +This has only been tested on Midway at the moment. There are two sites +defined in swift.properties, westmere and sandyb. Check sinfo to see +which queues have available nodes to avoid getting stuck in the queue. + +All the information we need for this run is stored in swift.properties. + +To run: +----- +nswift -site westmere catsn.swift +nswift -site sandyb catsn.swift +nswift -site westmere,sandyb catsn.swift +----- + +How it works +------------ +All configuration information is stored in swift.properties. + +cf values +~~~~~~~~~ +Swift.properties will contain all of your swift configuration values. +For example: + +----- +sitedir.keep=true +----- + +Site definitions +~~~~~~~~~~~~~~~~ +There is no need to use a sites.xml file, because swift.properties can contain +full site definitions. Here is an example defining the "sandyb" site: + +----- +site.sandyb.provider=local:slurm +site.sandyb.jobspernode=16 +site.sandyb.maxWalltime=00:05:00 +site.sandyb.queue=sandyb +site.sandyb.initialScore=10000 +site.sandyb.filesystem=local +site.sandyb.workdirectory=/scratch/midway/$USER/work +----- + +App definitions +~~~~~~~~~~~~~~~ +There is no need to have a tc.data file. Apps can be defined in swift.properties. + +Example: +----- +app.sandyb.echo=/bin/echo +----- + +You can use a wildcard to make an app available for every site that you have defined. +Example: +----- +app.*.echo=/bin/echo +----- + Added: SwiftApps/swiftrun-demo/catsn.swift =================================================================== --- SwiftApps/swiftrun-demo/catsn.swift (rev 0) +++ SwiftApps/swiftrun-demo/catsn.swift 2013-07-12 16:59:16 UTC (rev 6641) @@ -0,0 +1,13 @@ +type file; + +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +file out[]; + +foreach j in [1:toInt(arg("n","1"))] { + file data <"data.txt">; + out[j] = cat(data); +} Added: SwiftApps/swiftrun-demo/data.txt =================================================================== --- SwiftApps/swiftrun-demo/data.txt (rev 0) +++ SwiftApps/swiftrun-demo/data.txt 2013-07-12 16:59:16 UTC (rev 6641) @@ -0,0 +1 @@ +fjdlksafjlsd Added: SwiftApps/swiftrun-demo/swift.properties =================================================================== --- SwiftApps/swiftrun-demo/swift.properties (rev 0) +++ SwiftApps/swiftrun-demo/swift.properties 2013-07-12 16:59:16 UTC (rev 6641) @@ -0,0 +1,22 @@ +site.sandyb.provider=local:slurm +site.sandyb.jobspernode=16 +site.sandyb.maxWalltime=00:05:00 +site.sandyb.queue=sandyb +site.sandyb.initialScore=10000 +site.sandyb.filesystem=local +site.sandyb.workdirectory=/scratch/midway/$USER/work + +site.westmere.provider=local:slurm +site.westmere.jobsPerNode=12 +site.westmere.maxWalltime=00:05:00 +site.westmere.queue=westmere +site.westmere.initialScore=10000 +site.westmere.filesystem=local +site.westmere.workdirectory=/scratch/midway/$USER/work + +app.sandyb.echo=/bin/echo +app.westmere.echo=/bin/echo +app.*.cat=/bin/cat + +sitedir.keep=true +wrapperlog.always.transfer=true From davidk at ci.uchicago.edu Fri Jul 12 12:01:09 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Fri, 12 Jul 2013 12:01:09 -0500 (CDT) Subject: [Swift-commit] r6642 - SwiftApps/swiftrun-demo Message-ID: <20130712170109.7F0799D854@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-12 12:01:09 -0500 (Fri, 12 Jul 2013) New Revision: 6642 Modified: SwiftApps/swiftrun-demo/README Log: Update on env variables Modified: SwiftApps/swiftrun-demo/README =================================================================== --- SwiftApps/swiftrun-demo/README 2013-07-12 16:59:16 UTC (rev 6641) +++ SwiftApps/swiftrun-demo/README 2013-07-12 17:01:09 UTC (rev 6642) @@ -60,6 +60,9 @@ site.sandyb.workdirectory=/scratch/midway/$USER/work ----- +Values may contain environment variables which get interpeted on the system that +is running Swift. + App definitions ~~~~~~~~~~~~~~~ There is no need to have a tc.data file. Apps can be defined in swift.properties. From hategan at ci.uchicago.edu Fri Jul 12 20:34:36 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Fri, 12 Jul 2013 20:34:36 -0500 (CDT) Subject: [Swift-commit] r6643 - trunk/src/org/griphyn/vdl/mapping Message-ID: <20130713013436.91E6A9D857@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-12 20:34:36 -0500 (Fri, 12 Jul 2013) New Revision: 6643 Modified: trunk/src/org/griphyn/vdl/mapping/MissingDataException.java Log: better wording of error message when a file is missing Modified: trunk/src/org/griphyn/vdl/mapping/MissingDataException.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/MissingDataException.java 2013-07-12 17:01:09 UTC (rev 6642) +++ trunk/src/org/griphyn/vdl/mapping/MissingDataException.java 2013-07-13 01:34:36 UTC (rev 6643) @@ -11,6 +11,6 @@ public class MissingDataException extends RuntimeException { public MissingDataException(AbstractDataNode n, PhysicalFormat pf) { - super("Data not found for " + n.getFullName() + ": " + pf); + super("File not found for variable '" + n.getFullName() + "': " + pf); } } From hategan at ci.uchicago.edu Fri Jul 12 20:36:13 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Fri, 12 Jul 2013 20:36:13 -0500 (CDT) Subject: [Swift-commit] r6644 - in trunk: resources src/org/griphyn/vdl/karajan/lib Message-ID: <20130713013613.8BC979D857@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-12 20:36:13 -0500 (Fri, 12 Jul 2013) New Revision: 6644 Modified: trunk/resources/Karajan.stg trunk/src/org/griphyn/vdl/karajan/lib/ThrottledParallelFor.java Log: fixed foreach tracing Modified: trunk/resources/Karajan.stg =================================================================== --- trunk/resources/Karajan.stg 2013-07-13 01:34:36 UTC (rev 6643) +++ trunk/resources/Karajan.stg 2013-07-13 01:36:13 UTC (rev 6644) @@ -205,8 +205,8 @@ } >> -foreach(var, in, indexVar, indexVarType, declarations, statements, line, refs, selfClose, cleanups, trace) ::= << -swift:tParallelFor(\$$if(trace)$, _traceline="$line$"$endif$$if(indexVar)$, _kvar="$indexVar$"$endif$, _vvar="$var$"$if(selfClose)$, selfClose=true$endif$$if(refs)$, refs="$refs;separator=" "$"$endif$, +foreach(var, in, indexVar, indexVarType, declarations, statements, line, refs, selfClose, cleanups) ::= << +swift:tParallelFor(\$, _traceline="$line$"$if(indexVar)$, _kvar="$indexVar$"$endif$, _vvar="$var$"$if(selfClose)$, selfClose=true$endif$$if(refs)$, refs="$refs;separator=" "$"$endif$, $! The iterator !$ getArrayIterator($in$)) { (\$\$, $var$) := each(\$) Modified: trunk/src/org/griphyn/vdl/karajan/lib/ThrottledParallelFor.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/ThrottledParallelFor.java 2013-07-13 01:34:36 UTC (rev 6643) +++ trunk/src/org/griphyn/vdl/karajan/lib/ThrottledParallelFor.java 2013-07-13 01:36:13 UTC (rev 6644) @@ -181,16 +181,22 @@ LWThread ct = thr.fork(new KRunnable() { @Override public void run(LWThread thr2) { + int i = thr2.checkSliceAndPopState(); try { - if (iterationTracer.isEnabled()) { - iterationTracer.trace(thr2, unwrap(value)); - } + switch (i) { + case 0: + if (iterationTracer.isEnabled()) { + iterationTracer.trace(thr2, unwrap(value)); + } - if (CompilerSettings.PERFORMANCE_COUNTERS) { - startCount++; + if (CompilerSettings.PERFORMANCE_COUNTERS) { + startCount++; + } + i++; + case 1: + body.run(thr2); + ts.threadDone(thr2, null); } - body.run(thr2); - ts.threadDone(thr2, null); } catch (ExecutionException e) { thr2.getStack().dropToFrame(fcf); @@ -204,6 +210,10 @@ ts.abortAll(); thr.awake(); } + catch (Yield y) { + y.getState().push(i); + throw y; + } } }); if(ts.add(ct)) { @@ -232,8 +242,8 @@ } protected Object unwrap(Object value) { - if (value instanceof Pair) { - Pair p = (Pair) value; + if (value instanceof List) { + List p = (List) value; if (_kvar.getValue() != null) { return _kvar.getValue() + "=" + p.get(0) + ", " + _vvar.getValue() + "=" + Tracer.unwrapHandle(p.get(1)); } From hategan at ci.uchicago.edu Fri Jul 12 23:16:24 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Fri, 12 Jul 2013 23:16:24 -0500 (CDT) Subject: [Swift-commit] r6645 - in trunk/src/org/griphyn/vdl: karajan/lib mapping Message-ID: <20130713041624.09E4C9D854@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-12 23:16:23 -0500 (Fri, 12 Jul 2013) New Revision: 6645 Added: trunk/src/org/griphyn/vdl/mapping/NotCompositeException.java Modified: trunk/src/org/griphyn/vdl/karajan/lib/New.java trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java trunk/src/org/griphyn/vdl/mapping/RootDataNode.java Log: better error message when mapping multiple files to a non-composite type Modified: trunk/src/org/griphyn/vdl/karajan/lib/New.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/New.java 2013-07-13 01:36:13 UTC (rev 6644) +++ trunk/src/org/griphyn/vdl/karajan/lib/New.java 2013-07-13 04:16:23 UTC (rev 6645) @@ -257,4 +257,9 @@ sb.append(v); } } + + @Override + public String getTextualName() { + return "Variable declaration"; + } } Modified: trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2013-07-13 01:36:13 UTC (rev 6644) +++ trunk/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2013-07-13 04:16:23 UTC (rev 6645) @@ -346,6 +346,10 @@ throw new RuntimeException("Cannot write to closed handle: " + this + " (" + key + ")"); } + if (!getType().isComposite()) { + throw new NotCompositeException(this); + } + return addHandle(key, newNode(getChildField(key))); } Added: trunk/src/org/griphyn/vdl/mapping/NotCompositeException.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/NotCompositeException.java (rev 0) +++ trunk/src/org/griphyn/vdl/mapping/NotCompositeException.java 2013-07-13 04:16:23 UTC (rev 6645) @@ -0,0 +1,27 @@ +//---------------------------------------------------------------------- +//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 12, 2013 + */ +package org.griphyn.vdl.mapping; + +public class NotCompositeException extends RuntimeException { + private AbstractDataNode node; + + public NotCompositeException(AbstractDataNode node) { + this.node = node; + } + + @Override + public String getMessage() { + return "Type '" + node.getType() + "' is not a composite type."; + } + + public AbstractDataNode getDataNode() { + return node; + } +} Modified: trunk/src/org/griphyn/vdl/mapping/RootDataNode.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/RootDataNode.java 2013-07-13 01:36:13 UTC (rev 6644) +++ trunk/src/org/griphyn/vdl/mapping/RootDataNode.java 2013-07-13 04:16:23 UTC (rev 6645) @@ -184,6 +184,11 @@ throw new IllegalStateException("Structure of mapped data is " + "incompatible with the mapped variable type: " + e.getMessage()); } + catch (NotCompositeException e) { + throw new IllegalStateException("Cannot map multiple files to variable '" + + e.getDataNode().getFullName() + "' of non composite type '" + + e.getDataNode().getType() + "'"); + } } root.closeDeep(); if (!any && tracer.isEnabled()) { From hategan at ci.uchicago.edu Sat Jul 13 03:32:59 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 13 Jul 2013 03:32:59 -0500 (CDT) Subject: [Swift-commit] r6646 - in branches/release-0.94/src/org/griphyn/vdl: karajan/lib mapping Message-ID: <20130713083300.88FF69D6D2@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-13 03:32:37 -0500 (Sat, 13 Jul 2013) New Revision: 6646 Added: branches/release-0.94/src/org/griphyn/vdl/mapping/NotCompositeException.java Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/New.java branches/release-0.94/src/org/griphyn/vdl/mapping/AbstractDataNode.java branches/release-0.94/src/org/griphyn/vdl/mapping/RootDataNode.java Log: ported fix for bug 1038 from trunk Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/New.java =================================================================== --- branches/release-0.94/src/org/griphyn/vdl/karajan/lib/New.java 2013-07-13 04:16:23 UTC (rev 6645) +++ branches/release-0.94/src/org/griphyn/vdl/karajan/lib/New.java 2013-07-13 08:32:37 UTC (rev 6646) @@ -231,4 +231,9 @@ sb.append(v); } } + + @Override + public String getTextualName() { + return "Variable declaration"; + } } Modified: branches/release-0.94/src/org/griphyn/vdl/mapping/AbstractDataNode.java =================================================================== --- branches/release-0.94/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2013-07-13 04:16:23 UTC (rev 6645) +++ branches/release-0.94/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2013-07-13 08:32:37 UTC (rev 6646) @@ -332,6 +332,10 @@ throw new RuntimeException("Cannot write to closed handle: " + this + " (" + key + ")"); } + if (!getType().isComposite()) { + throw new NotCompositeException(this); + } + return addHandle(key, newNode(getChildField(key))); } Copied: branches/release-0.94/src/org/griphyn/vdl/mapping/NotCompositeException.java (from rev 6645, trunk/src/org/griphyn/vdl/mapping/NotCompositeException.java) =================================================================== --- branches/release-0.94/src/org/griphyn/vdl/mapping/NotCompositeException.java (rev 0) +++ branches/release-0.94/src/org/griphyn/vdl/mapping/NotCompositeException.java 2013-07-13 08:32:37 UTC (rev 6646) @@ -0,0 +1,27 @@ +//---------------------------------------------------------------------- +//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 12, 2013 + */ +package org.griphyn.vdl.mapping; + +public class NotCompositeException extends RuntimeException { + private AbstractDataNode node; + + public NotCompositeException(AbstractDataNode node) { + this.node = node; + } + + @Override + public String getMessage() { + return "Type '" + node.getType() + "' is not a composite type."; + } + + public AbstractDataNode getDataNode() { + return node; + } +} Modified: branches/release-0.94/src/org/griphyn/vdl/mapping/RootDataNode.java =================================================================== --- branches/release-0.94/src/org/griphyn/vdl/mapping/RootDataNode.java 2013-07-13 04:16:23 UTC (rev 6645) +++ branches/release-0.94/src/org/griphyn/vdl/mapping/RootDataNode.java 2013-07-13 08:32:37 UTC (rev 6646) @@ -179,6 +179,11 @@ throw new IllegalStateException("Structure of mapped data is " + "incompatible with the mapped variable type: " + e.getMessage()); } + catch (NotCompositeException e) { + throw new IllegalStateException("Cannot map multiple files to variable '" + + e.getDataNode().getDisplayableName() + "' of non composite type '" + + e.getDataNode().getType() + "'"); + } } root.closeDeep(); if (!any && tracer.isEnabled()) { From hategan at ci.uchicago.edu Sun Jul 14 17:02:16 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sun, 14 Jul 2013 17:02:16 -0500 (CDT) Subject: [Swift-commit] r6647 - trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui Message-ID: <20130714220216.41F7D9D541@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-14 17:02:15 -0500 (Sun, 14 Jul 2013) New Revision: 6647 Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ScreenBuffer.java Log: removed debuging statement 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 2013-07-13 08:32:37 UTC (rev 6646) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ScreenBuffer.java 2013-07-14 22:02:15 UTC (rev 6647) @@ -159,7 +159,6 @@ } } os.flush(); - System.err.println("Written: " + os.get()); System.arraycopy(buf, 0, actual, 0, buf.length); } From hategan at ci.uchicago.edu Sun Jul 14 17:02:38 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sun, 14 Jul 2013 17:02:38 -0500 (CDT) Subject: [Swift-commit] r6648 - trunk/src/org/griphyn/vdl/engine Message-ID: <20130714220238.4C0669D541@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-14 17:02:38 -0500 (Sun, 14 Jul 2013) New Revision: 6648 Modified: trunk/src/org/griphyn/vdl/engine/Karajan.java Log: fixed function call in top-level assignment Modified: trunk/src/org/griphyn/vdl/engine/Karajan.java =================================================================== --- trunk/src/org/griphyn/vdl/engine/Karajan.java 2013-07-14 22:02:15 UTC (rev 6647) +++ trunk/src/org/griphyn/vdl/engine/Karajan.java 2013-07-14 22:02:38 UTC (rev 6648) @@ -712,9 +712,16 @@ try { // Check is called procedure declared previously String procName = call.getProc().getLocalPart(); - if (proceduresMap.get(procName) == null) - throw new CompilationException - ("Procedure " + procName + " is not declared."); + if (proceduresMap.get(procName) == null) { + if (functionsMap.containsKey(procName)) { + StringTemplate st = functionAsCall(call, scope); + if (!inhibitOutput) { + scope.appendStatement(st); + } + return st; + } + throw new CompilationException("No function or procedure '" + procName + "' found."); + } // Check procedure arguments int noOfOptInArgs = 0; @@ -1262,8 +1269,9 @@ String actualType = datatype(exprST); FormalArgumentSignature fas = funcSignature.getInputArray(i); if (!fas.isAnyType() && !fas.getType().equals(actualType)) - throw new CompilationException("Wrong type for parameter number " + i + - ", expected " + fas.getType() + ", got " + actualType); + throw new CompilationException("Wrong type for parameter " + i + + (fas.getName() == null ? "" : "('" + fas.getName() + "')") + + "; expected " + fas.getType() + ", got " + actualType); } } @@ -1642,11 +1650,7 @@ throw new CompilationException("Function " + name + " is not defined."); } - XmlObject[] params = new XmlObject[c.getInputArray().length]; - for (int i = 0; i < params.length; i++) { - params[i] = c.getInputArray(i).getAbstractExpression(); - } - StringTemplate st = function(c, name, params, scope); + StringTemplate st = function(c, name, getCallParams(c), scope); /* Set function output type */ /* Functions have only one output parameter */ st.setAttribute("datatype", funcSignature.getOutputArray(0).getType()); @@ -1684,7 +1688,60 @@ return st; } + + /** + * Translates a call(output, params) into a output = function(params) form. + */ + private StringTemplate functionAsCall(Call call, VariableScope scope) throws CompilationException { + String name = call.getProc().getLocalPart(); + ProcedureSignature sig = functionsMap.get(name); + if (sig == null) { + throw new CompilationException("Function " + name + " is not defined."); + } + if (call.getOutputArray().length == 0) { + throw new CompilationException("Call to a function that does not return a value"); + } + if (call.getOutputArray().length > 1) { + throw new CompilationException("Cannot assign multiple values with a function invocation"); + } + + StringTemplate value = function(call, name, getCallParams(call), scope); + value.setAttribute("datatype", sig.getOutputArray(0).getType()); + StringTemplate assign = assignFromCallReturn(call, value, scope); + + if (sig.isDeprecated()) { + Warnings.warn(Warnings.Type.DEPRECATION, call, "Function " + name + " is deprecated"); + } + + return assign; + } + private XmlObject[] getCallParams(Call call) { + XmlObject[] params = new XmlObject[call.getInputArray().length]; + for (int i = 0; i < params.length; i++) { + params[i] = call.getInputArray(i).getAbstractExpression(); + } + return params; + } + + private StringTemplate assignFromCallReturn(Call call, StringTemplate valueST, VariableScope scope) + throws CompilationException { + StringTemplate assignST = template("assign"); + XmlObject var = call.getOutputArray(0).getAbstractExpression(); + StringTemplate varST = expressionToKarajan(var, scope, true); + if (! (datatype(varST).equals(datatype(valueST)) || datatype(valueST).equals("java"))) { + throw new CompilationException("You cannot assign value of type " + datatype(valueST) + + " to a variable of type " + datatype(varST)); + } + assignST.setAttribute("var", varST); + assignST.setAttribute("value", valueST); + assignST.setAttribute("line", getLine(call)); + String rootvar = abstractExpressionToRootVariable(var); + scope.addWriter(rootvar, getRootVariableWriteType(var), call, assignST); + return assignST; + } + + void checkTypesInCondExpr(String op, String left, String right, StringTemplate st) throws CompilationException { if (left.equals(right)) From davidk at ci.uchicago.edu Mon Jul 15 14:49:02 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Mon, 15 Jul 2013 14:49:02 -0500 (CDT) Subject: [Swift-commit] r6649 - trunk/bin Message-ID: <20130715194902.9511C9D541@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-15 14:49:02 -0500 (Mon, 15 Jul 2013) New Revision: 6649 Modified: trunk/bin/nswift trunk/bin/swiftrun Log: Handle brackets for grouping in swift.properties Modified: trunk/bin/nswift =================================================================== --- trunk/bin/nswift 2013-07-14 22:02:38 UTC (rev 6648) +++ trunk/bin/nswift 2013-07-15 19:49:02 UTC (rev 6649) @@ -165,8 +165,8 @@ $BASH -c "echo $KEY $USERID $SCRIPTID $SCRIPTLENGTH $return_code 1 > /dev/udp/$LISTENER/$PORT" > /dev/null 2>&1 & fi -mv *.d/ $( ls -1rtd run*/ |tail -1 ) -rm *.swiftx *.kml +mv *.d/ $( ls -1rtd run*/ |tail -1 ) > /dev/null 2>&1 +rm *.swiftx *.kml > /dev/null 2>&1 exit $return_code # Local Variables: Modified: trunk/bin/swiftrun =================================================================== --- trunk/bin/swiftrun 2013-07-14 22:02:38 UTC (rev 6648) +++ trunk/bin/swiftrun 2013-07-15 19:49:02 UTC (rev 6649) @@ -162,12 +162,31 @@ # Set property values foreach my $property_file(@property_files) { open(PROPERTIES, $property_file) || die "Unable to open $property_file"; + while( ) { chomp; next if /^\s*#/ || /^(\s)*$/; # Ignore blank lines and comments - my ($key, $value) = split('=', $_, 2); - $value =~ s/\$(\w+)/$ENV{$1}/g; # Substitute environment variables - $properties{ $key } = $value; + $_ =~ s/^\s+//; # Remove leading whitespace + + # Handle brackets + if( /^site\./ && /{/ ) { + my $prefix = (split /\s+{/)[0]; + while( ) { + chomp; + next if /^\s*#/ || /^(\s)*$/; + $_ =~ s/^\s+//; + if( /^}/ ) { last; } + my ($key, $value) = split('=', ($prefix . ".$_"), 2); + $value =~ s/\$(\w+)/$ENV{$1}/g; + $properties{ $key } = $value; + } + } + + else { + my ($key, $value) = split('=', $_, 2); + $value =~ s/\$(\w+)/$ENV{$1}/g; # Substitute environment variables + $properties{ $key } = $value; + } } } From davidk at ci.uchicago.edu Mon Jul 15 14:50:16 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Mon, 15 Jul 2013 14:50:16 -0500 (CDT) Subject: [Swift-commit] r6650 - SwiftApps/swiftrun-demo Message-ID: <20130715195016.1E65F9D541@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-15 14:50:16 -0500 (Mon, 15 Jul 2013) New Revision: 6650 Modified: SwiftApps/swiftrun-demo/swift.properties Log: Example of a grouped set of site properties Modified: SwiftApps/swiftrun-demo/swift.properties =================================================================== --- SwiftApps/swiftrun-demo/swift.properties 2013-07-15 19:49:02 UTC (rev 6649) +++ SwiftApps/swiftrun-demo/swift.properties 2013-07-15 19:50:16 UTC (rev 6650) @@ -6,13 +6,15 @@ site.sandyb.filesystem=local site.sandyb.workdirectory=/scratch/midway/$USER/work -site.westmere.provider=local:slurm -site.westmere.jobsPerNode=12 -site.westmere.maxWalltime=00:05:00 -site.westmere.queue=westmere -site.westmere.initialScore=10000 -site.westmere.filesystem=local -site.westmere.workdirectory=/scratch/midway/$USER/work +site.westmere { + provider=local:slurm + jobsPerNode=12 + maxWalltime=00:05:00 + queue=westmere + initialScore=10000 + filesystem=local + workdirectory=/scratch/midway/$USER/work +} app.sandyb.echo=/bin/echo app.westmere.echo=/bin/echo From davidk at ci.uchicago.edu Mon Jul 15 15:17:43 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Mon, 15 Jul 2013 15:17:43 -0500 (CDT) Subject: [Swift-commit] r6651 - trunk/bin Message-ID: <20130715201743.F23C49D7F2@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-15 15:17:43 -0500 (Mon, 15 Jul 2013) New Revision: 6651 Modified: trunk/bin/swiftrun Log: Shortened aliases for globus and karajan namespaces Modified: trunk/bin/swiftrun =================================================================== --- trunk/bin/swiftrun 2013-07-15 19:50:16 UTC (rev 6650) +++ trunk/bin/swiftrun 2013-07-15 20:17:43 UTC (rev 6651) @@ -22,11 +22,26 @@ # List of xml shortcuts. Keep in lower case. my %xml_aliases = ( - 'provider' => 'provider.coaster', - 'jobspernode' => 'globus.jobspernode', - 'maxwalltime' => 'globus.maxwalltime', - 'queue' => 'globus.queue', - 'initialscore' => 'karajan.initialscore', + 'allocationstepsize' => 'globus.allocationstepsize', + 'delaybase' => 'karajan.delaybase', + 'highoverallocation' => 'globus.highoverallocation', + 'initialscore' => 'karajan.initialscore', + 'internalhostname' => 'globus.internalhostname', + 'jobspernode' => 'globus.jobspernode', + 'jobthrottle' => 'karajan.jobthrottle', + 'lowoverallocation' => 'globus.lowoverallocation', + 'maxnodes' => 'globus.maxnodes', + 'maxsubmitrate' => 'karajan.maxsubmitrate', + 'maxtime' => 'globus.maxtime', + 'maxwalltime' => 'globus.maxwalltime', + 'nodegranularity' => 'globus.nodegranularity', + 'overallocationdecayfactor' => 'globus.overallocationdecayfactor', + 'provider' => 'provider.coaster', + 'queue' => 'globus.queue', + 'slots' => 'globus.slots', + 'spread' => 'globus.spread', + 'remotemonitorenabled' => 'globus.remotemonitorenabled', + 'reserve' => 'globus.reserve', ); # Verify a property file exists and add it to the search path From hategan at ci.uchicago.edu Tue Jul 16 14:35:54 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Tue, 16 Jul 2013 14:35:54 -0500 (CDT) Subject: [Swift-commit] r6652 - trunk/src/org/griphyn/vdl/karajan/lib/swiftscript Message-ID: <20130716193554.0654C187CC1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-16 14:35:53 -0500 (Tue, 16 Jul 2013) New Revision: 6652 Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadStructured.java Log: close variables after reading (bug 1032) Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadStructured.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadStructured.java 2013-07-15 20:17:43 UTC (rev 6651) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadStructured.java 2013-07-16 19:35:53 UTC (rev 6652) @@ -60,6 +60,7 @@ src.waitFor(this); if (src.getType().equals(Types.STRING)) { readData(dest, (String) src.getValue()); + dest.closeDeep(); } else { PhysicalFormat pf = src.getMapper().map(src.getPathFromRoot()); @@ -69,6 +70,7 @@ throw new ExecutionException("readData2 only supports local files"); } readData(dest, af.getPath()); + dest.closeDeep(); } else { throw new ExecutionException("readData2 only supports reading from files"); From hategan at ci.uchicago.edu Tue Jul 16 14:37:54 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Tue, 16 Jul 2013 14:37:54 -0500 (CDT) Subject: [Swift-commit] r6653 - branches/release-0.94/src/org/griphyn/vdl/karajan/lib/swiftscript Message-ID: <20130716193754.24601187CC1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-16 14:37:53 -0500 (Tue, 16 Jul 2013) New Revision: 6653 Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadStructured.java Log: close variables after reading (bug 1032) Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadStructured.java =================================================================== --- branches/release-0.94/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadStructured.java 2013-07-16 19:35:53 UTC (rev 6652) +++ branches/release-0.94/src/org/griphyn/vdl/karajan/lib/swiftscript/ReadStructured.java 2013-07-16 19:37:53 UTC (rev 6653) @@ -66,6 +66,7 @@ src.waitFor(); if (src.getType().equals(Types.STRING)) { readData(dest, (String) src.getValue()); + dest.closeDeep(); } else { PhysicalFormat pf = src.getMapper().map(src.getPathFromRoot()); @@ -75,6 +76,7 @@ throw new ExecutionException("readData2 only supports local files"); } readData(dest, af.getPath()); + dest.closeDeep(); } else { throw new ExecutionException("readData2 only supports reading from files"); From hategan at ci.uchicago.edu Tue Jul 16 14:46:47 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Tue, 16 Jul 2013 14:46:47 -0500 (CDT) Subject: [Swift-commit] r6654 - trunk/resources Message-ID: <20130716194647.1DA9E187CC1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-16 14:46:46 -0500 (Tue, 16 Jul 2013) New Revision: 6654 Modified: trunk/resources/Karajan.stg Log: fixed partial close in internal call isssue (bug 1028) Modified: trunk/resources/Karajan.stg =================================================================== --- trunk/resources/Karajan.stg 2013-07-16 19:37:53 UTC (rev 6653) +++ trunk/resources/Karajan.stg 2013-07-16 19:46:46 UTC (rev 6654) @@ -229,7 +229,7 @@ // they are not // $outputs:vdl_log_output();separator="\n"$ -callInternal(func, outputs, inputs, line, serialize) ::= << +callInternal(func, outputs, inputs, line, serialize, partialClose) ::= << sequential( swift:unitStart("INTERNALPROC", name="$func$", outputs="$outputs:list();separator=","$") $func$( @@ -238,6 +238,7 @@ $inputs:callInternal_log_input();separator="\n"$ $if(!serialize)$)$endif$ ) + $if(partialClose)$$partialClose$$endif$ swift:unitEnd("INTERNALPROC", name="$func$") ) >> From hategan at ci.uchicago.edu Tue Jul 16 14:52:48 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Tue, 16 Jul 2013 14:52:48 -0500 (CDT) Subject: [Swift-commit] r6655 - branches/release-0.94/resources Message-ID: <20130716195248.9ECAB187CC1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-16 14:52:48 -0500 (Tue, 16 Jul 2013) New Revision: 6655 Modified: branches/release-0.94/resources/Karajan.stg Log: fixed missing attribute in internal proc (bug 1028) Modified: branches/release-0.94/resources/Karajan.stg =================================================================== --- branches/release-0.94/resources/Karajan.stg 2013-07-16 19:46:46 UTC (rev 6654) +++ branches/release-0.94/resources/Karajan.stg 2013-07-16 19:52:48 UTC (rev 6655) @@ -264,7 +264,7 @@ // they are not // $outputs:vdl_log_output();separator="\n"$ -callInternal(func, outputs, inputs, line, serialize) ::= << +callInternal(func, outputs, inputs, line, serialize, partialClose) ::= << $cs()$ @@ -274,6 +274,9 @@ $inputs:callInternal_log_input();separator="\n"$ $if(!serialize)$$endif$ +$if(partialClose)$ +$partialClose$ +$endif$ >> From davidk at ci.uchicago.edu Wed Jul 17 13:22:21 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Wed, 17 Jul 2013 13:22:21 -0500 (CDT) Subject: [Swift-commit] r6658 - trunk/bin Message-ID: <20130717182221.6D8B29D58D@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-17 13:22:21 -0500 (Wed, 17 Jul 2013) New Revision: 6658 Modified: trunk/bin/nswift trunk/bin/swiftrun Log: -listconfig option to list all swift.propeties files being read, and display values Change env variable SWIFT_CONFIG to SWIFT_SITE_CONF Modified: trunk/bin/nswift =================================================================== --- trunk/bin/nswift 2013-07-16 22:32:44 UTC (rev 6657) +++ trunk/bin/nswift 2013-07-17 18:22:21 UTC (rev 6658) @@ -147,7 +147,13 @@ fi # Swiftrun -CMDLINE="$( swiftrun $CMDLINE )" +if [[ "$CMDLINE" == *-listconfig* ]] +then + swiftrun $CMDLINE + exit 0 +else + CMDLINE="$( swiftrun $CMDLINE )" +fi ### EXECUTE ############ # Note: killing Swift may be briefly delayed due to Coasters shutdown Modified: trunk/bin/swiftrun =================================================================== --- trunk/bin/swiftrun 2013-07-16 22:32:44 UTC (rev 6657) +++ trunk/bin/swiftrun 2013-07-17 18:22:21 UTC (rev 6658) @@ -15,6 +15,7 @@ my $option_sitesfile; # Value of -sites.file option my $option_siteslist; # Value of -sites option, comma separated my $option_config; # Value of -config option +my $option_listconfig; # List configuration files used, values, then exit my @sites; # List of sites from -sites in array my $run_directory; # Run directory to be created, run.NNNN my @new_swift_args; # New command line arguments @@ -157,6 +158,7 @@ 'tcfile=s' => \$option_tcfile, 'config=s' => \$option_config, 'site|sites=s' => \$option_siteslist, + 'listconfig' => \$option_listconfig, ); # Set @sites array from comma separated list of sites @@ -170,7 +172,7 @@ # Set the search order for properties &add_property_file("$swift_etc_directory/swift.properties"); -&add_property_file("$ENV{SWIFT_CONFIG}/swift.properties") if defined($ENV{SWIFT_CONFIG}); +&add_property_file("$ENV{SWIFT_SITE_CONF}/swift.properties") if defined($ENV{SWIFT_SITE_CONF}); &add_property_file("$ENV{HOME}/.swift/swift.properties"); &add_property_file("swift.properties"); @@ -205,6 +207,19 @@ } } +# If -listconfig is specified, print values and exit +if( $option_listconfig ) { + print "\n"; + foreach my $site(@property_files) { + print "Reading from: $site\n"; + } + print "\nValues:\n"; + while ( my ($key, $value) = each(%properties) ) { + print "\t$key=$value\n"; + } + exit; +} + # Create/increment run directory my $run_number = 0; my @run_directories = ; From davidk at ci.uchicago.edu Wed Jul 17 16:53:21 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Wed, 17 Jul 2013 16:53:21 -0500 (CDT) Subject: [Swift-commit] r6659 - SwiftApps/Scattering/strains/orthros Message-ID: <20130717215321.482469D851@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-17 16:53:21 -0500 (Wed, 17 Jul 2013) New Revision: 6659 Modified: SwiftApps/Scattering/strains/orthros/sites.xml Log: Default to use SGE rather than local Modified: SwiftApps/Scattering/strains/orthros/sites.xml =================================================================== --- SwiftApps/Scattering/strains/orthros/sites.xml 2013-07-17 18:22:21 UTC (rev 6658) +++ SwiftApps/Scattering/strains/orthros/sites.xml 2013-07-17 21:53:21 UTC (rev 6659) @@ -1,6 +1,6 @@ - + 16 00:20:00 100 @@ -11,6 +11,6 @@ sec1all.q --> sec1_all --> - /clhome/WILDE/strains/swiftwork + /clhome/DKELLY/Scattering/strains/swiftwork From hategan at ci.uchicago.edu Thu Jul 18 14:48:48 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Thu, 18 Jul 2013 14:48:48 -0500 (CDT) Subject: [Swift-commit] r6660 - in trunk/src/org/griphyn/vdl/karajan: . lib Message-ID: <20130718194848.BF5719CCF0@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-18 14:48:48 -0500 (Thu, 18 Jul 2013) New Revision: 6660 Modified: trunk/src/org/griphyn/vdl/karajan/HangChecker.java trunk/src/org/griphyn/vdl/karajan/lib/CurrentThread.java trunk/src/org/griphyn/vdl/karajan/lib/Operators.java trunk/src/org/griphyn/vdl/karajan/lib/Parameterlog.java trunk/src/org/griphyn/vdl/karajan/lib/SwiftFunction.java trunk/src/org/griphyn/vdl/karajan/lib/Tracer.java trunk/src/org/griphyn/vdl/karajan/lib/UnitStart.java Log: use the new qualified thread name accessor method and route all requests for the thread name through SwiftFunction in case it will diverge from the native karajan scheme Modified: trunk/src/org/griphyn/vdl/karajan/HangChecker.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/HangChecker.java 2013-07-17 21:53:21 UTC (rev 6659) +++ trunk/src/org/griphyn/vdl/karajan/HangChecker.java 2013-07-18 19:48:48 UTC (rev 6660) @@ -43,6 +43,7 @@ import org.globus.cog.karajan.compiled.nodes.Node; import org.globus.cog.karajan.compiled.nodes.grid.SchedulerNode; import org.globus.cog.karajan.scheduler.WeightedHostScoreScheduler; +import org.griphyn.vdl.karajan.lib.SwiftFunction; import org.griphyn.vdl.mapping.DSHandle; import org.griphyn.vdl.mapping.MappingParam; import org.griphyn.vdl.mapping.Path; @@ -121,7 +122,7 @@ public static void dumpThread(PrintStream pw, LWThread thr, DSHandle handle) { try { - pw.println("Thread: " + thr.getName() + pw.println("Thread: " + SwiftFunction.getThreadPrefix(thr) + (handle == null ? "" : ", waiting on " + varWithLine(handle))); for (String t : getSwiftTrace(thr)) { Modified: trunk/src/org/griphyn/vdl/karajan/lib/CurrentThread.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/CurrentThread.java 2013-07-17 21:53:21 UTC (rev 6659) +++ trunk/src/org/griphyn/vdl/karajan/lib/CurrentThread.java 2013-07-18 19:48:48 UTC (rev 6660) @@ -25,6 +25,6 @@ @Override public void run(LWThread thr) { - cr_vargs.append(thr.getStack(), thr.getName()); + cr_vargs.append(thr.getStack(), SwiftFunction.getThreadPrefix(thr)); } } Modified: trunk/src/org/griphyn/vdl/karajan/lib/Operators.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Operators.java 2013-07-17 21:53:21 UTC (rev 6659) +++ trunk/src/org/griphyn/vdl/karajan/lib/Operators.java 2013-07-18 19:48:48 UTC (rev 6660) @@ -276,7 +276,7 @@ private static void logBinaryProvenance(String name, DSHandle v1, DSHandle v2, DSHandle result) throws ExecutionException { if (PROVENANCE_ENABLED) { - String thread = LWThread.currentThread().getName(); + String thread = SwiftFunction.getThreadPrefix(); String lhsid = v1.getIdentifier(); String rhsid = v2.getIdentifier(); String rid = result.getIdentifier(); @@ -287,7 +287,7 @@ private static void logUnaryProvenance(String name, DSHandle v, DSHandle r) throws ExecutionException { if (PROVENANCE_ENABLED) { - String thread = LWThread.currentThread().getName(); + String thread = SwiftFunction.getThreadPrefix(); String vid = v.getIdentifier(); String rid = r.getIdentifier(); provenanceLogger.info("UNARYOPERATOR thread=" + thread + " operator=" + name + Modified: trunk/src/org/griphyn/vdl/karajan/lib/Parameterlog.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Parameterlog.java 2013-07-17 21:53:21 UTC (rev 6659) +++ trunk/src/org/griphyn/vdl/karajan/lib/Parameterlog.java 2013-07-18 19:48:48 UTC (rev 6660) @@ -71,7 +71,7 @@ } if (run) { super.run(thr); - logger.info("PARAM thread=" + thr.getName() + " direction=" + logger.info("PARAM thread=" + SwiftFunction.getThreadPrefix(thr) + " direction=" + direction.getValue(stack) + " variable=" + variable.getValue(stack) + " provenanceid=" + id.getValue(stack)); } Modified: trunk/src/org/griphyn/vdl/karajan/lib/SwiftFunction.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/SwiftFunction.java 2013-07-17 21:53:21 UTC (rev 6659) +++ trunk/src/org/griphyn/vdl/karajan/lib/SwiftFunction.java 2013-07-18 19:48:48 UTC (rev 6660) @@ -123,9 +123,13 @@ * depends on the fact that iteration variable is named '$' in this * particular implementation. */ - public static String getThreadPrefix() throws ExecutionException { - return LWThread.currentThread().getName(); + public static String getThreadPrefix() { + return getThreadPrefix(LWThread.currentThread()); } + + public static String getThreadPrefix(LWThread thr) { + return thr.getQualifiedName(); + } // TODO - is this needed any more? its doing some type inferencing and // object creation and dequoting of strings, but the necessary behaviour @@ -141,7 +145,7 @@ // this is only used by VDL new (and really should only be used by // VDL new, and should perhaps move to the VDL new source?) - protected Object internalValue(Type type, Object value) { + protected Object internalValue(Type type, Object value) { if (Types.FLOAT.equals(type)) { return new Double(TypeUtil.toDouble(value)); } Modified: trunk/src/org/griphyn/vdl/karajan/lib/Tracer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Tracer.java 2013-07-17 21:53:21 UTC (rev 6659) +++ trunk/src/org/griphyn/vdl/karajan/lib/Tracer.java 2013-07-18 19:48:48 UTC (rev 6660) @@ -154,7 +154,7 @@ } private String threadName(LWThread thr) throws VariableNotFoundException { - return thr.getName(); + return SwiftFunction.getThreadPrefix(thr); } private static Tracer disabledTracer, enabledTracer; Modified: trunk/src/org/griphyn/vdl/karajan/lib/UnitStart.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/UnitStart.java 2013-07-17 21:53:21 UTC (rev 6659) +++ trunk/src/org/griphyn/vdl/karajan/lib/UnitStart.java 2013-07-18 19:48:48 UTC (rev 6660) @@ -165,40 +165,41 @@ protected static void log(boolean start, String type, LWThread thread, String name, String line) { if (logger.isInfoEnabled()) { + String threadName = SwiftFunction.getThreadPrefix(thread); if (type.equals("COMPOUND")) { logger.info((start ? "START" : "END") + type + " thread=" - + thread.getName() + " name=" + name); + + threadName + " name=" + name); } else { if (logger.isDebugEnabled()) { if (type.equals("PROCEDURE")) { if (start) { logger.debug("PROCEDURE line=" + line + " thread=" - + thread.getName() + " name=" + name); + + threadName + " name=" + name); } else { logger.debug("PROCEDURE_END line=" + line + " thread=" - + thread.getName() + " name=" + name); + + threadName + " name=" + name); } } else if (type.equals("FOREACH_IT")) { logger.debug("FOREACH_IT_" + (start ? "START" : "END") + " line=" + line + " thread=" - + thread.getName()); + + threadName); if (start) { - logger.debug("SCOPE thread=" + thread.getName()); + logger.debug("SCOPE thread=" + threadName); } } else if (type.equals("INTERNALPROC")) { logger.debug("INTERNALPROC_" + (start ? "START" : "END") - + " thread=" + thread.getName() + " name=" + + " thread=" + threadName + " name=" + name); } else if (type.equals("CONDITION_BLOCK")) { if (start) { - logger.debug("SCOPE thread=" + thread.getName()); + logger.debug("SCOPE thread=" + threadName); } } } From hategan at ci.uchicago.edu Thu Jul 18 21:22:37 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Thu, 18 Jul 2013 21:22:37 -0500 (CDT) Subject: [Swift-commit] r6661 - in trunk/src/org/griphyn/vdl/karajan: . lib Message-ID: <20130719022237.4F5859CC92@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-18 21:22:37 -0500 (Thu, 18 Jul 2013) New Revision: 6661 Modified: trunk/src/org/griphyn/vdl/karajan/TCCache.java trunk/src/org/griphyn/vdl/karajan/VDSTaskTransformer.java trunk/src/org/griphyn/vdl/karajan/lib/Executable.java Log: implemented wildcards in tc.data (bug 1018) Modified: trunk/src/org/griphyn/vdl/karajan/TCCache.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/TCCache.java 2013-07-18 19:48:48 UTC (rev 6660) +++ trunk/src/org/griphyn/vdl/karajan/TCCache.java 2013-07-19 02:22:37 UTC (rev 6661) @@ -39,18 +39,48 @@ cache = new HashMap>(); entry = new Entry(); } + + public static final FQN ANY_APP = new FQN("*"); public synchronized List getTCEntries(FQN tr, String host, TCType tctype) throws Exception { + List l; + // try exact entry entry.set(tr, host, tctype); - List l = cache.get(entry); - if (l == null && !cache.containsKey(entry)) { - l = tc.getTCEntries(tr.getNamespace(), tr.getName(), tr.getVersion(), host, tctype); - cache.put(new Entry(tr, host, tctype), l); + l = getTCEntries_(entry); + if (l != null) { + return l; } + + // try host app wildcard on this host + entry.set(ANY_APP, host, tctype); + l = getTCEntries_(entry); + if (l != null) { + return l; + } + // try this app on wildcard host + entry.set(tr, "*", tctype); + l = getTCEntries_(entry); + if (l != null) { + return l; + } + + // finally try app wildcard on wildcard host + entry.set(ANY_APP, "*", tctype); + l = getTCEntries_(entry); return l; } - private class Entry { + private List getTCEntries_(Entry e) throws Exception { + List l = cache.get(e); + if (l == null && !cache.containsKey(e)) { + l = tc.getTCEntries(e.tr.getNamespace(), e.tr.getName(), e.tr.getVersion(), e.host, e.tctype); + cache.put(new Entry(e), l); + } + + return l; + } + + private class Entry { public FQN tr; public String host; public TCType tctype; @@ -61,6 +91,10 @@ public Entry(FQN tr, String host, TCType tctype) { set(tr, host, tctype); } + + public Entry(Entry e) { + set(e.tr, e.host, e.tctype); + } public void set(FQN tr, String host, TCType tctype) { this.tr = tr; Modified: trunk/src/org/griphyn/vdl/karajan/VDSTaskTransformer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/VDSTaskTransformer.java 2013-07-18 19:48:48 UTC (rev 6660) +++ trunk/src/org/griphyn/vdl/karajan/VDSTaskTransformer.java 2013-07-19 02:22:37 UTC (rev 6661) @@ -22,7 +22,6 @@ import java.io.IOException; import java.util.HashSet; -import java.util.LinkedList; import java.util.List; import java.util.Set; @@ -35,9 +34,6 @@ import org.globus.cog.karajan.scheduler.TaskTransformer; import org.globus.cog.karajan.util.BoundContact; import org.globus.cog.karajan.util.Contact; -import org.globus.swift.catalog.TCEntry; -import org.globus.swift.catalog.types.TCType; -import org.griphyn.vdl.util.FQN; import org.griphyn.vdl.util.VDL2Config; public class VDSTaskTransformer implements TaskTransformer { @@ -68,9 +64,9 @@ } } - private static Set opsWithDirInFirstArg = new HashSet(); + private static Set opsWithDirInFirstArg = new HashSet(); static { - Set s = opsWithDirInFirstArg; + Set s = opsWithDirInFirstArg; s.add(FileOperationSpecification.LS); s.add(FileOperationSpecification.MKDIR); s.add(FileOperationSpecification.MKDIRS); @@ -142,19 +138,22 @@ } } } - List l = spec.getArgumentsAsList(); - // perhaps should check for /bin/bash in the executable, or some other way of detecting we need to do a substitution here... or equally could assume that the second parameter always needs to undergo this substitution... - String executable = (String)l.get(0); + List l = spec.getArgumentsAsList(); + // perhaps should check for /bin/bash in the executable, or some + // other way of detecting we need to do a substitution here... + // or equally could assume that the second parameter always needs to + // undergo this substitution... + String executable = l.get(0); try { VDL2Config config = VDL2Config.getConfig(); - if(config.getProperty("wrapper.invocation.mode", bc).equals("absolute") - &&(executable.endsWith("shared/_swiftwrap") - || executable.endsWith("shared/_swiftseq"))) { + if (config.getProperty("wrapper.invocation.mode", bc).equals("absolute") + && (executable.endsWith("shared/_swiftwrap") + || executable.endsWith("shared/_swiftseq"))) { - String s = spec.getDirectory()+"/"+executable; - l.set(0,s); + String s = spec.getDirectory() + "/" + executable; + l.set(0, s); } } catch(IOException ioe) { @@ -167,42 +166,16 @@ public static class TCTransformer extends AbstractTransformer { private TCCache tc; - private Set warnset = new HashSet(); public TCTransformer(TCCache tc) { this.tc = tc; } protected void applyTCEntry(Task task, Contact[] contacts) { - JobSpecification spec = (JobSpecification) task.getSpecification(); - BoundContact bc = (BoundContact) contacts[0]; - - FQN fqn = new FQN(spec.getExecutable()); - List l; - try { - l = tc.getTCEntries(fqn, bc.getHost(), TCType.INSTALLED); - } - catch (Exception e) { - throw new RuntimeException(e); - } - if (l == null || l.isEmpty()) { - return; - } - if (l.size() > 1) { - synchronized (warnset) { - LinkedList wl = new LinkedList(); - wl.add(fqn); - wl.add(bc); - if (!warnset.contains(wl)) { - logger.warn("Multiple entries found for " + fqn + " on " + bc - + ". Using the first one"); - warnset.add(wl); - } - } - } - - TCEntry tce = (TCEntry) l.get(0); - spec.setExecutable(tce.getPhysicalTransformation()); + // this method used to filter the task executable through + // tc.data, but the task executable at this point was + // always set to /bin/bash (or whatever the wrapper interpreter was). + // That was useless. } } } Modified: trunk/src/org/griphyn/vdl/karajan/lib/Executable.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Executable.java 2013-07-18 19:48:48 UTC (rev 6660) +++ trunk/src/org/griphyn/vdl/karajan/lib/Executable.java 2013-07-19 02:22:37 UTC (rev 6661) @@ -50,7 +50,13 @@ return tr; } else { - return tce.getPhysicalTransformation(); + String pt = tce.getPhysicalTransformation(); + if ("*".equals(pt)) { + return tr; + } + else { + return pt; + } } } } From hategan at ci.uchicago.edu Thu Jul 18 21:28:42 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Thu, 18 Jul 2013 21:28:42 -0500 (CDT) Subject: [Swift-commit] r6662 - trunk/src/org/griphyn/vdl/karajan Message-ID: <20130719022842.2B5E39CC92@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-18 21:28:41 -0500 (Thu, 18 Jul 2013) New Revision: 6662 Modified: trunk/src/org/griphyn/vdl/karajan/TCCache.java Log: corrected comment Modified: trunk/src/org/griphyn/vdl/karajan/TCCache.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/TCCache.java 2013-07-19 02:22:37 UTC (rev 6661) +++ trunk/src/org/griphyn/vdl/karajan/TCCache.java 2013-07-19 02:28:41 UTC (rev 6662) @@ -51,7 +51,7 @@ return l; } - // try host app wildcard on this host + // try app wildcard on this host entry.set(ANY_APP, host, tctype); l = getTCEntries_(entry); if (l != null) { From swift at ci.uchicago.edu Mon Jul 22 10:45:03 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Mon, 22 Jul 2013 10:45:03 -0500 (CDT) Subject: [Swift-commit] cog r3745 Message-ID: <20130722154503.E4FA38D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3745 | davidkelly999 | 2013-07-22 10:44:54 -0500 (Mon, 22 Jul 2013) | 2 lines Changes for SGE to work on Orthros (starts one worker per core) ------------------------------------------------------------------------ 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 3744) +++ modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/sge/SGEExecutor.java (working copy) @@ -307,6 +307,32 @@ } } + protected void writeMultiJobPostamble(Writer wr) throws IOException { + wr.write("; echo \\\\\\$? > $ECF.$INDEX \\\" ; done\" &\n"); + wr.write(" INDEX=$((INDEX + 1))\n"); + wr.write("done < $PE_HOSTFILE\n"); + wr.write("wait\n"); + wr.write("EC=\"0\"\n"); + wr.write("INDEX=0\n"); + wr.write("PATH=$PATH:/bin:/usr/bin\n"); + wr.write("for NODE in $NODES; do\n"); + wr.write(" TEC=\"N\"\n"); + wr.write(" while [ \"$TEC\" = \"N\" ]; do\n"); + wr.write(" read TEC < $ECF.$INDEX\n"); + wr.write(" if [ \"$TEC\" = \"N\" ]; then\n"); + wr.write(" sleep 1\n"); + wr.write(" fi\n"); + wr.write(" done\n"); + wr.write(" rm $ECF.$INDEX\n"); + wr.write(" if [ \"$EC\" = \"0\" -a \"$TEC\" != \"0\" ]; then\n"); + wr.write(" EC=$TEC\n"); + wr.write(" echo $EC > $ECF\n"); + wr.write(" fi\n"); + wr.write(" INDEX=$((INDEX + 1))\n"); + wr.write("done\n"); + wr.write("echo $EC > $ECF\n"); + } + /** * writeMultiJobPreamble - Add multiple jobs to a single submit file * @param wr Writer A Writer object representing the submit file @@ -315,12 +341,14 @@ */ protected void writeMultiJobPreamble(Writer wr, String exitcodefile) throws IOException { - wr.write("NODES=`cat $PE_HOSTFILE | awk '{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 \\\" \""); + wr.write("NODES=$( cat $PE_HOSTFILE | awk '{print $1}' )\n"); + wr.write("while read hostinfo\n"); + wr.write("do\n"); + wr.write("HOST=$( echo $hostinfo | cut -d' ' -f1 )\n"); + wr.write("NUMJOBS=$( echo $hostinfo | cut -d' ' -f2 )\n"); + wr.write("ssh -n $HOST \"for t in {1..$NUMJOBS}; do /bin/bash -c \\\""); } From swift at ci.uchicago.edu Mon Jul 22 15:10:03 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Mon, 22 Jul 2013 15:10:03 -0500 (CDT) Subject: [Swift-commit] cog r3746 Message-ID: <20130722201003.E2C2A8D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3746 | hategan | 2013-07-22 15:07:55 -0500 (Mon, 22 Jul 2013) | 1 line made block shutdown delay configurable ------------------------------------------------------------------------ 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 3745) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java (working copy) @@ -442,7 +442,7 @@ for (Block b : sorted.values()) { if (sum >= needed && !b.isSuspended() - && (System.currentTimeMillis() - b.getLastUsed()) > Block.SUSPEND_SHUTDOWN_DELAY) { + && (System.currentTimeMillis() - b.getLastUsed()) > (1000 * settings.getMaxBlockIdleTime())) { b.suspend(); } sum += b.sizeLeft(); 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 3745) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Settings.java (working copy) @@ -50,6 +50,7 @@ "workerLoggingDirectory", "ldLibraryPath", "workerCopies", "directory", "useHashBang", + "maxBlockIdleTime", "parallelism", "coresPerNode"}; @@ -107,6 +108,8 @@ private int maxNodes = Integer.MAX_VALUE / 1024; private int maxtime = Integer.MAX_VALUE; + + private int maxBlockIdleTime = 30; //s private final Set callbackURIs; @@ -289,6 +292,14 @@ this.maxtime = maxtime; } + public int getMaxBlockIdleTime() { + return maxBlockIdleTime; + } + + public void setMaxBlockIdleTime(int maxBlockIdleTime) { + this.maxBlockIdleTime = maxBlockIdleTime; + } + public String getWorkerManager() { return workerManager; } 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 3745) +++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Block.java (working copy) @@ -32,9 +32,6 @@ /** milliseconds */ public static final long SHUTDOWN_WATCHDOG_DELAY = 2 * 60 * 1000; - /** milliseconds */ - public static final long SUSPEND_SHUTDOWN_DELAY = 30 * 1000; - private static BlockTaskSubmitter submitter; private synchronized static BlockTaskSubmitter getSubmitter() { From swift at ci.uchicago.edu Mon Jul 22 15:35:02 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Mon, 22 Jul 2013 15:35:02 -0500 (CDT) Subject: [Swift-commit] cog r3747 Message-ID: <20130722203502.C9DA08D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3747 | michaelwilde | 2013-07-22 15:31:03 -0500 (Mon, 22 Jul 2013) | 1 line Add SWIFT_USERHOME processing to template for coaster-service command. ------------------------------------------------------------------------ Index: etc/unix/launcher-template =================================================================== --- etc/unix/launcher-template (revision 3746) +++ etc/unix/launcher-template (working copy) @@ -78,7 +78,10 @@ updateOptions "$X509_CERT_DIR" "X509_CERT_DIR" updateOptions "$X509_USER_PROXY" "X509_USER_PROXY" updateOptions "$COG_INSTALL_PATH" "COG_INSTALL_PATH" +updateOptions "$SWIFT_USERHOME" "user.home" + + if [ "X$HEAPMAX" != "X" ]; then OPTIONS="-Xmx$HEAPMAX $OPTIONS" fi From wozniak at ci.uchicago.edu Thu Jul 25 11:06:13 2013 From: wozniak at ci.uchicago.edu (wozniak at ci.uchicago.edu) Date: Thu, 25 Jul 2013 11:06:13 -0500 (CDT) Subject: [Swift-commit] r6663 - trunk/docs/userguide Message-ID: <20130725160613.907E6187CC1@svn.ci.uchicago.edu> Author: wozniak Date: 2013-07-25 11:06:13 -0500 (Thu, 25 Jul 2013) New Revision: 6663 Modified: trunk/docs/userguide/commands Log: More info about dryrun use cases Modified: trunk/docs/userguide/commands =================================================================== --- trunk/docs/userguide/commands 2013-07-19 02:28:41 UTC (rev 6662) +++ trunk/docs/userguide/commands 2013-07-25 16:06:13 UTC (rev 6663) @@ -30,8 +30,9 @@ -dryrun - Runs the Swift script without submitting any jobs (can be - used to get a graph) + Runs the Swift script without submitting any jobs. This can be + used to obtain an execution graph in conjunction with the +pgraph+ + options below. -monitor From swift at ci.uchicago.edu Thu Jul 25 11:40:02 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Thu, 25 Jul 2013 11:40:02 -0500 (CDT) Subject: [Swift-commit] cog r3748 Message-ID: <20130725164003.10C9D8D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3748 | hategan | 2013-07-25 11:39:15 -0500 (Thu, 25 Jul 2013) | 1 line synchronize on parent when replacing stuff in it since it may be in bind(), not fully initialized ------------------------------------------------------------------------ Index: modules/karajan/src/org/globus/cog/karajan/workflow/FlowElementWrapper.java =================================================================== --- modules/karajan/src/org/globus/cog/karajan/workflow/FlowElementWrapper.java (revision 3747) +++ modules/karajan/src/org/globus/cog/karajan/workflow/FlowElementWrapper.java (working copy) @@ -290,11 +290,13 @@ private void replaceElement(FlowElement parent, FlowElementWrapper s, FlowElement d) { if (parent != null) { - List l = parent.elements(); - for (int i = 0; i < l.size(); i++) { - if (l.get(i) == s) { - l.set(i, d); - break; + synchronized(parent) { + List l = parent.elements(); + for (int i = 0; i < l.size(); i++) { + if (l.get(i) == s) { + l.set(i, d); + break; + } } } } From davidk at ci.uchicago.edu Thu Jul 25 13:45:06 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Thu, 25 Jul 2013 13:45:06 -0500 (CDT) Subject: [Swift-commit] r6664 - in www: downloads inc Message-ID: <20130725184506.A7F8C187CC1@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-25 13:45:06 -0500 (Thu, 25 Jul 2013) New Revision: 6664 Modified: www/downloads/index.php www/inc/about_sidebar.php Log: Update SVN links to new sourceforge repo Update project team members Modified: www/downloads/index.php =================================================================== --- www/downloads/index.php 2013-07-25 16:06:13 UTC (rev 6663) +++ www/downloads/index.php 2013-07-25 18:45:06 UTC (rev 6664) @@ -66,7 +66,7 @@
$ mkdir swift-0.94 $ cd swift-0.94 - $ svn co https://cogkit.svn.sourceforge.net/svnroot/cogkit/branches/4.1.10/src/cog + $ svn co https://svn.code.sf.net/p/cogkit/svn/branches/4.1.10/src/cog $ cd cog/modules $ svn co https://svn.ci.uchicago.edu/svn/vdl2/branches/release-0.94 swift $ cd swift @@ -87,7 +87,7 @@
$ mkdir swift-devel $ cd swift-devel - $ svn co https://cogkit.svn.sourceforge.net/svnroot/cogkit/trunk/current/src/cog + $ svn co https://svn.code.sf.net/p/cogkit/svn/trunk/src/cog $ cd cog/modules $ svn co https://svn.ci.uchicago.edu/svn/vdl2/trunk swift $ cd swift Modified: www/inc/about_sidebar.php =================================================================== --- www/inc/about_sidebar.php 2013-07-25 16:06:13 UTC (rev 6663) +++ www/inc/about_sidebar.php 2013-07-25 18:45:06 UTC (rev 6664) @@ -7,7 +7,7 @@
  • Dan Katz
  • David Kelly
  • Ketan Maheshwari
  • -
  • Jon Monette
  • +
  • Yadu N Babuji
  • Mike Wilde
  • Justin Wozniak
  • Zhao Zhang
  • @@ -19,6 +19,7 @@
  • Ben Clifford
  • Allan Espinosa
  • Sarah Kenny
  • +
  • Jon Monette
  • Veronika Nefedova
  • Tibi Stef-Praun
  • Yong Zhao
  • From davidk at ci.uchicago.edu Thu Jul 25 14:27:47 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Thu, 25 Jul 2013 14:27:47 -0500 (CDT) Subject: [Swift-commit] r6665 - in branches/release-0.94/tests: . sites Message-ID: <20130725192747.EF72C187CC1@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-25 14:27:47 -0500 (Thu, 25 Jul 2013) New Revision: 6665 Removed: branches/release-0.94/tests/addtests.html branches/release-0.94/tests/array_index.swift branches/release-0.94/tests/meta.sh branches/release-0.94/tests/providers branches/release-0.94/tests/sites/beagle/ branches/release-0.94/tests/sites/crow/ branches/release-0.94/tests/sites/fusion/ branches/release-0.94/tests/sites/ibicluster/ branches/release-0.94/tests/sites/intrepid/ branches/release-0.94/tests/sites/local-coasters/ branches/release-0.94/tests/sites/local/ branches/release-0.94/tests/sites/mcs/ branches/release-0.94/tests/sites/osg/ branches/release-0.94/tests/sites/surveyor/ branches/release-0.94/tests/sites/uc3/ branches/release-0.94/tests/sitetester Modified: branches/release-0.94/tests/USAGENOTES.txt Log: Removing the old site tests to make room for the new automated site tester Modified: branches/release-0.94/tests/USAGENOTES.txt =================================================================== --- branches/release-0.94/tests/USAGENOTES.txt 2013-07-25 18:45:06 UTC (rev 6664) +++ branches/release-0.94/tests/USAGENOTES.txt 2013-07-25 19:27:47 UTC (rev 6665) @@ -252,12 +252,3 @@ - *run-suite.sh*: a. Wrapper for *suite.sh*. b. Env variables set may be customized by user. - -- *meta.sh*: - a. Wrapper for *run-suite.sh*. - b. used to execute _run-suite/suite.sh_ from a remote site using *ssh*. - -.Example usage: -********************************************************************************************* - meta.sh login.pads.ci.uchicago.edu /home/skenny/swift_runs/tests sites/pads-pbs-coasters.sh -********************************************************************************************* Deleted: branches/release-0.94/tests/addtests.html =================================================================== --- branches/release-0.94/tests/addtests.html 2013-07-25 18:45:06 UTC (rev 6664) +++ branches/release-0.94/tests/addtests.html 2013-07-25 19:27:47 UTC (rev 6665) @@ -1,10 +0,0 @@ - - - How to add new tests - - -

    The tests are automatically run from the tests directory in vdsk. -Any file with a .dtm extension in there will be considered a test and executed -on the next run.

    - - Deleted: branches/release-0.94/tests/array_index.swift =================================================================== --- branches/release-0.94/tests/array_index.swift 2013-07-25 18:45:06 UTC (rev 6664) +++ branches/release-0.94/tests/array_index.swift 2013-07-25 19:27:47 UTC (rev 6665) @@ -1,12 +0,0 @@ -type file {} - - -(file t) echo_array (string s[]) { - app { - echo s[0] s[1] s[2] stdout=@filename(t); - } -} - -string greetings[] = ["how","are","you"]; -file hw = echo(greetings); - Deleted: branches/release-0.94/tests/meta.sh =================================================================== --- branches/release-0.94/tests/meta.sh 2013-07-25 18:45:06 UTC (rev 6664) +++ branches/release-0.94/tests/meta.sh 2013-07-25 19:27:47 UTC (rev 6665) @@ -1,18 +0,0 @@ -#!/bin/bash - -# runs run-suite.sh (wrapper for suite.sh) on a given site based on login - -SITE_LOGIN=$1 # e.g. login.pads.ci.uchicago.edu - -DIR=$2 # e.g., /home/skenny/swift_runs/tests - -TEST=$3 # e.g. sites/pads-pbs-coasters.sh - -# run test and retrieve results - -RUNDIR=run-$( date +"%Y-%m-%d" ) - -ssh $SITE_LOGIN $DIR/run-suite.sh $DIR/$TEST -scp -r $SITE_LOGIN:$RUNDIR . - -exit 0 Deleted: branches/release-0.94/tests/providers =================================================================== --- branches/release-0.94/tests/providers 2013-07-25 18:45:06 UTC (rev 6664) +++ branches/release-0.94/tests/providers 2013-07-25 19:27:47 UTC (rev 6665) @@ -1 +0,0 @@ -link sites \ No newline at end of file Deleted: branches/release-0.94/tests/sitetester =================================================================== --- branches/release-0.94/tests/sitetester 2013-07-25 18:45:06 UTC (rev 6664) +++ branches/release-0.94/tests/sitetester 2013-07-25 19:27:47 UTC (rev 6665) @@ -1,59 +0,0 @@ -#!/usr/bin/env python - -import commands -import os - -# the workdir for a given site needs to exist on the site you're testing -# and should contain run-suite & suite.sh -# this script will ssh onto the site, pass run-suite the necesary variables -# for running suite.sh - -class Site: - - def __init__(self,login,logtype,workdir,queue,project): - self.login = login - self.logintype = logtype - self.workdir = workdir - self.queue = queue - self.project = project - - def testSite(self,cogv,swiftv,test_type): - cmdline = self.logintype+" "+self.login+" "+self.workdir+"/run-suite.sh "+self.workdir+"/"+test_type+" "+self.workdir+" "+self.queue+" "+self.project+" "+cogv+" "+swiftv - print "running......"+cmdline - res = commands.getoutput(cmdline) - print res - cmdline2 = "scp -r "+s+":"+rundir+" ." - res2 = commands.getoutput(cmdline) - - - - -#---------------------main-------------------------------------------------------- - -sites = [] - -s_logins = ['skenny at login2.pads.ci.uchicago.edu','login-abe.ncsa.teragrid.org','login1-qb.loni-lsu.teragrid.org'] -logintype = ['ssh','gsissh','gsissh'] -workdirs = ['/home/skenny/swift_runs/tests','/u/ac/skenny/swift_runs/tests','/home/skenny/swift_runs/tests'] -queues = ['short','debug','workq'] -projects = ['CI-IBN000039','TG-DBS080004N','TG-DBS080004N'] - -test_type = "groups/local-pbs-coasters.sh" -cogv = 'branches/4.1.8' -swiftv = 'branches/release-0.92' - -rundir = commands.getoutput('date +\"%Y-%m-%d\"') -rundir = "run-"+rundir - -for idx,s in enumerate(s_logins): - sites.append(Site(s,logintype[idx],workdirs[idx],queues[idx],projects[idx])) - -# loop over all or run single - -sites[1].testSite(cogv,swiftv,test_type) -sites[2].testSite(cogv,swiftv,test_type) - - - - - From davidk at ci.uchicago.edu Thu Jul 25 15:01:32 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Thu, 25 Jul 2013 15:01:32 -0500 (CDT) Subject: [Swift-commit] r6667 - in branches/release-0.94/tests: . groups sites stress/remote_sanity Message-ID: <20130725200132.3230E187CC1@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-25 15:01:31 -0500 (Thu, 25 Jul 2013) New Revision: 6667 Added: branches/release-0.94/tests/groups/group-sites.sh branches/release-0.94/tests/sites/beagle/ branches/release-0.94/tests/sites/mac-frisbee/ branches/release-0.94/tests/sites/mcs/ branches/release-0.94/tests/sites/midway/ branches/release-0.94/tests/sites/uc3/ Removed: branches/release-0.94/tests/groups/group-remote-sanity.sh branches/release-0.94/tests/stress/remote_sanity/beagle/ branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/ branches/release-0.94/tests/stress/remote_sanity/mcs/ branches/release-0.94/tests/stress/remote_sanity/midway/ branches/release-0.94/tests/stress/remote_sanity/uc3/ Modified: branches/release-0.94/tests/README branches/release-0.94/tests/groups/group-daily-remote.sh branches/release-0.94/tests/user_env.sh Log: Adding new site tests from stress/ to sites/ Modified: branches/release-0.94/tests/README =================================================================== --- branches/release-0.94/tests/README 2013-07-25 19:28:59 UTC (rev 6666) +++ branches/release-0.94/tests/README 2013-07-25 20:01:31 UTC (rev 6667) @@ -1,7 +1,7 @@ USAGENOTES contains instructions on how to operate the test suite. It is an asciidoc document, in order to properly build it run the following command: -$ asciidoc -a toc USAGENOTES -It will generate an HTML file called USAGENOTES. +$ asciidoc -a toc USAGENOTES.txt +It will generate an HTML file called USAGENOTES.html. Warning: asciidoc must be installed. Modified: branches/release-0.94/tests/groups/group-daily-remote.sh =================================================================== --- branches/release-0.94/tests/groups/group-daily-remote.sh 2013-07-25 19:28:59 UTC (rev 6666) +++ branches/release-0.94/tests/groups/group-daily-remote.sh 2013-07-25 20:01:31 UTC (rev 6667) @@ -1,13 +1,13 @@ # GROUPLIST definition to run all local tests -GROUPLIST=( # Remote sanity test-group - $TESTDIR/stress/remote_sanity/beagle \ - $TESTDIR/stress/remote_sanity/mcs \ - $TESTDIR/stress/remote_sanity/midway \ - $TESTDIR/stress/remote_sanity/uc3 \ +GROUPLIST=( # Site testing test-group + $TESTDIR/sites/beagle \ + $TESTDIR/sites/mcs \ + $TESTDIR/sites/midway \ + $TESTDIR/sites/uc3 \ # Frisbee will fail due to Bug 1030 - #TESTDIR/stress/remote_sanity/mac-frisbee \ + #TESTDIR/sites/mac-frisbee \ # Remote-cluster IO tests $TESTDIR/stress/IO/beagle \ Deleted: branches/release-0.94/tests/groups/group-remote-sanity.sh =================================================================== --- branches/release-0.94/tests/groups/group-remote-sanity.sh 2013-07-25 19:28:59 UTC (rev 6666) +++ branches/release-0.94/tests/groups/group-remote-sanity.sh 2013-07-25 20:01:31 UTC (rev 6667) @@ -1,12 +0,0 @@ - -# GROUPLIST definition to run all local tests - -GROUPLIST=( - $TESTDIR/stress/remote_sanity/beagle \ - $TESTDIR/stress/remote_sanity/mcs \ - $TESTDIR/stress/remote_sanity/midway \ - $TESTDIR/stress/remote_sanity/uc3 \ - $TESTDIR/stress/remote_sanity/mac-frisbee \ - ) - -checkvars WORK Copied: branches/release-0.94/tests/groups/group-sites.sh (from rev 6664, branches/release-0.94/tests/groups/group-remote-sanity.sh) =================================================================== --- branches/release-0.94/tests/groups/group-sites.sh (rev 0) +++ branches/release-0.94/tests/groups/group-sites.sh 2013-07-25 20:01:31 UTC (rev 6667) @@ -0,0 +1,12 @@ + +# GROUPLIST definition to run all local tests + +GROUPLIST=( + $TESTDIR/sites/beagle \ + $TESTDIR/sites/mcs \ + $TESTDIR/sites/midway \ + $TESTDIR/sites/uc3 \ + $TESTDIR/sites/mac-frisbee \ + ) + +checkvars WORK Modified: branches/release-0.94/tests/user_env.sh =================================================================== --- branches/release-0.94/tests/user_env.sh 2013-07-25 19:28:59 UTC (rev 6666) +++ branches/release-0.94/tests/user_env.sh 2013-07-25 20:01:31 UTC (rev 6667) @@ -3,8 +3,8 @@ export MCS_USERNAME="" export UC3_USERNAME="" -if [ "midway001" == "midway001" ] +if [ $( hostname ) == "midway001" ] then export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu export GLOBUS_TCP_PORT_RANGE=50000,51000 -fi; \ No newline at end of file +fi; From hategan at ci.uchicago.edu Thu Jul 25 18:34:55 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Thu, 25 Jul 2013 18:34:55 -0500 (CDT) Subject: [Swift-commit] r6668 - in trunk/src/org/griphyn/vdl/karajan/monitor: items monitors/swing Message-ID: <20130725233455.C9D19187CC1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-25 18:34:55 -0500 (Thu, 25 Jul 2013) New Revision: 6668 Modified: trunk/src/org/griphyn/vdl/karajan/monitor/items/SummaryItem.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GraphPanel.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GraphsPanel.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GridView.java Log: now with customizable dividers and layout persistence Modified: trunk/src/org/griphyn/vdl/karajan/monitor/items/SummaryItem.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/items/SummaryItem.java 2013-07-25 20:01:31 UTC (rev 6667) +++ trunk/src/org/griphyn/vdl/karajan/monitor/items/SummaryItem.java 2013-07-25 23:34:55 UTC (rev 6668) @@ -63,6 +63,15 @@ public static final State[] STATES = State.values(); + public static State getStateByKey(String key) { + for (State s : STATES) { + if (s.getName().equals(key)) { + return s; + } + } + return null; + } + private Map counts; private int status; Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GraphPanel.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GraphPanel.java 2013-07-25 20:01:31 UTC (rev 6667) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GraphPanel.java 2013-07-25 23:34:55 UTC (rev 6668) @@ -11,6 +11,7 @@ import java.awt.BorderLayout; import java.awt.Color; +import java.awt.Component; import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -18,6 +19,7 @@ import java.util.Date; import java.util.List; import java.util.TimerTask; +import java.util.prefs.Preferences; import javax.swing.JButton; import javax.swing.JColorChooser; @@ -43,13 +45,15 @@ public class GraphPanel extends JPanel { private SystemState state; - private JFreeChart states; + private JFreeChart chart; private final List enabled; private TimeSeriesCollection col; private JPanel legend; + private GraphsPanel gp; - public GraphPanel(SystemState state) { + public GraphPanel(SystemState state, GraphsPanel gp) { this.state = state; + this.gp = gp; this.setLayout(new BorderLayout()); enabled = new ArrayList(); createChart(); @@ -67,9 +71,9 @@ TimeSeries ts = new TimeSeries(s.getName()); col.addSeries(ts); } - states = ChartFactory.createTimeSeriesChart(null, "Time", "Count", col, false, true, false); - ChartPanel cp = new ChartPanel(states); - XYPlot plot = (XYPlot) states.getPlot(); + chart = ChartFactory.createTimeSeriesChart(null, "Time", "Count", col, false, true, false); + ChartPanel cp = new ChartPanel(chart); + XYPlot plot = (XYPlot) chart.getPlot(); plot.setBackgroundPaint(UIManager.getColor("TextField.background")); NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis(); rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); @@ -89,7 +93,7 @@ private void rebuildLegend() { legend.removeAll(); for (int i = 0; i < enabled.size(); i++) { - makeLegendEntry(legend, states, enabled.get(i).getShortName(), i); + makeLegendEntry(legend, chart, enabled.get(i).getShortName(), i); } legend.add(new JLabel()); legend.add(new JLabel()); @@ -102,7 +106,7 @@ } }); - legend.add(newb); + legend.add(newb); } protected void displayAddPopup(JButton src) { @@ -143,6 +147,7 @@ col.removeSeries(series); rebuildLegend(); repaint(); + gp.saveLayout(); } protected void displaySeriesPopup(final JFreeChart chart, final String label, final int series, final ColorButton button) { @@ -173,7 +178,22 @@ Color newColor = JColorChooser.showDialog(this, "Pick a color for " + label, color); button.setColor(newColor); ((XYPlot) chart.getPlot()).getRenderer().setSeriesPaint(series, newColor); + gp.saveLayout(); } + + public void setColor(State s, Color color) { + int series = enabled.indexOf(s); + ((XYPlot) chart.getPlot()).getRenderer().setSeriesPaint(series, color); + int i = 0; + for (Component c : legend.getComponents()) { + if (c instanceof JButton) { + i++; + if (i == series + 1) { + ((ColorButton) c).setColor(color); + } + } + } + } private void update() { SummaryItem summary = (SummaryItem) state.getItemByID(SummaryItem.ID, StatefulItemClass.WORKFLOW); @@ -185,12 +205,50 @@ ts.add(new Second(new Date()), summary.getCount(s)); } } + + public void enable(State s) { + enable(s, true); + } - public void enable(State s) { + public void enable(State s, boolean save) { TimeSeries ts = new TimeSeries(s.getName()); col.addSeries(ts); enabled.add(s); rebuildLegend(); repaint(); + if (save) { + gp.saveLayout(); + } } + + public void store(Preferences p) { + p.putInt("enabledCount", enabled.size()); + for (int i = 0; i < enabled.size(); i++) { + Preferences gp = p.node("series" + i); + gp.put("key", enabled.get(i).getName()); + Color color = (Color) chart.getPlot().getLegendItems().get(i).getLinePaint(); + gp.putInt("color.r", color.getRed()); + gp.putInt("color.g", color.getGreen()); + gp.putInt("color.b", color.getBlue()); + } + } + + public static GraphPanel load(Preferences p, SystemState state, GraphsPanel gps) { + GraphPanel g = new GraphPanel(state, gps); + int ec = p.getInt("enabledCount", 0); + for (int i = 0; i < ec; i++) { + Preferences gp = p.node("series" + i); + String key = gp.get("key", null); + if (key == null) { + throw new RuntimeException("Null series key"); + } + int cr = gp.getInt("color.r", 255); + int cg = gp.getInt("color.g", 0); + int cb = gp.getInt("color.b", 0); + SummaryItem.State s = SummaryItem.getStateByKey(key); + g.enable(s, false); + g.setColor(s, new Color(cr, cg, cb)); + } + return g; + } } Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GraphsPanel.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GraphsPanel.java 2013-07-25 20:01:31 UTC (rev 6667) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GraphsPanel.java 2013-07-25 23:34:55 UTC (rev 6668) @@ -15,8 +15,8 @@ import java.awt.event.ActionListener; import java.awt.image.BufferedImage; import java.net.URL; -import java.util.Deque; import java.util.LinkedList; +import java.util.prefs.Preferences; import javax.imageio.ImageIO; import javax.swing.ImageIcon; @@ -78,15 +78,14 @@ private SystemState state; - private int rows, columns; private JPanel toolBar; private JPopupMenu layoutPopup; - private Deque graphs; + private LinkedList graphs; private GridView grid; public GraphsPanel(SystemState state) { this.state = state; - this.graphs = new LinkedList(); + this.graphs = new LinkedList(); setLayout(new BorderLayout()); toolBar = new JPanel(); @@ -108,12 +107,7 @@ grid = new GridView(); add(grid, BorderLayout.CENTER); - GraphPanel gp = new GraphPanel(state); - gp.enable(SummaryItem.State.ACTIVE); - gp.enable(SummaryItem.State.STAGE_IN); - gp.enable(SummaryItem.State.STAGE_OUT); - graphs.add(gp); - grid.add(gp); + loadLayout(); } private void makeLayoutPopup() { @@ -147,7 +141,7 @@ grid.setLayout(t.copy()); int count = grid.getCellCount(); while (count > graphs.size()) { - GraphPanel gp = new GraphPanel(state); + GraphPanel gp = new GraphPanel(state, this); graphs.add(gp); grid.add(gp); } @@ -155,8 +149,69 @@ JComponent gp = graphs.removeLast(); grid.remove(gp); } + + saveLayout(); } + void saveLayout() { + /* + * Stored are: + * - the layout itself + * - the graph count and what's being graphed in each + * - the graph colors + */ + try { + Preferences prefs = Preferences.userNodeForPackage(GraphsPanel.class); + Preferences layout = prefs.node("layout"); + grid.getTree().store(layout); + prefs.putInt("graphCount", graphs.size()); + for (int i = 0; i < graphs.size(); i++) { + Preferences gp = prefs.node("graph" + i); + graphs.get(i).store(gp); + } + } + catch (Exception e) { + System.err.println("Failed to save layout: " + e); + } + } + + private void loadLayout() { + grid.clear(); + graphs.clear(); + try { + Preferences prefs = Preferences.userNodeForPackage(GraphsPanel.class); + if (prefs.nodeExists("layout")) { + grid.setLayout(GridView.Tree.load(prefs.node("layout"))); + int gc = prefs.getInt("graphCount", 0); + for (int i = 0; i < gc; i++) { + GraphPanel gp = GraphPanel.load(prefs.node("graph" + i), state, this); + graphs.add(gp); + grid.add(gp); + } + } + else { + setDefaultLayout(); + } + } + catch (Exception e) { + System.err.println("Failed to load layout: " + e + ". Using default."); + setDefaultLayout(); + } + } + + private void setDefaultLayout() { + grid.clear(); + graphs.clear(); + grid.setLayout(new Tree()); + GraphPanel gp = new GraphPanel(state, this); + gp.enable(SummaryItem.State.ACTIVE); + gp.enable(SummaryItem.State.STAGE_IN); + gp.enable(SummaryItem.State.STAGE_OUT); + graphs.add(gp); + grid.add(gp); + saveLayout(); + } + protected void displayLayoutPopup(JButton src) { layoutPopup.show(src, 6, 6); } Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GridView.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GridView.java 2013-07-25 20:01:31 UTC (rev 6667) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GridView.java 2013-07-25 23:34:55 UTC (rev 6668) @@ -11,41 +11,84 @@ import java.awt.BasicStroke; import java.awt.Component; +import java.awt.Cursor; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Stroke; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.MouseMotionListener; +import java.util.ArrayList; +import java.util.List; +import java.util.prefs.BackingStoreException; +import java.util.prefs.Preferences; import javax.swing.ImageIcon; +import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.UIManager; public class GridView extends JPanel { public static final int DIVIDER_SIZE = 10; + public static final Cursor H_RESIZE_CURSOR = Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR); + public static final Cursor V_RESIZE_CURSOR = Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR); - private GridView.Tree tree; + public static final Stroke DIVIDER_STROKE = new BasicStroke(1, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_ROUND, 0, + new float[] {5.0f}, 0f); + private Tree tree; + private List dividers; + private int cellCount, dividerIndex; + public GridView() { - tree = new Tree(); + dividers = new ArrayList(); + setLayout(new Tree()); } public void setLayout(Tree t) { this.tree = t; - revalidate(); + cellCount = this.tree.cellCount(); + validate(); + repaint(); } + public void clear() { + tree = null; + removeAll(); + } + + public Tree getTree() { + return tree; + } + public int getCellCount() { - return tree.cellCount(); + return cellCount; } @Override - public void doLayout() { + public synchronized void doLayout() { + dividerIndex = 0; layout(tree, 0, 0, getWidth(), getHeight(), 0); + while (dividers.size() > dividerIndex + 1) { + Divider d = dividers.get(dividers.size() - 1); + dividers.remove(dividers.size() - 1); + remove(d); + } } + + @Override + public synchronized Component add(Component comp) { + // add before dividers + return super.add(comp, getComponentCount() - dividers.size()); + } private int layout(GridView.Tree t, int x, int y, int w, int h, int index) { + if (t == null) { + return index; + } if (t.splitType == Tree.NONE) { - if (getComponentCount() > index) { + if (cellCount > index) { Component c = getComponent(index); c.setSize(w, h); c.setLocation(x, y); @@ -53,52 +96,41 @@ return index + 1; } else if (t.splitType == Tree.V) { - int h1 = (int) (t.splitPosition * h) - DIVIDER_SIZE / 2; - int h2 = h - h1 - DIVIDER_SIZE; - index = layout(t.first, x, y, w, h1, index); - return layout(t.second, x, y + h1 + DIVIDER_SIZE, w, h2, index); + int h1 = (int) (t.splitPosition * h); + int h2 = h - h1; + setDivider(Tree.V, x, y + h1 - DIVIDER_SIZE / 2, w, DIVIDER_SIZE, h, t); + index = layout(t.first, x, y, w, h1 - DIVIDER_SIZE / 2, index); + return layout(t.second, x, y + h1 + DIVIDER_SIZE / 2, w, h2, index); } else if (t.splitType == Tree.H) { - int w1 = (int) (t.splitPosition * w) - DIVIDER_SIZE / 2; - int w2 = w - w1 - DIVIDER_SIZE; - index = layout(t.first, x, y, w1, h, index); - return layout(t.second, x + w1 + DIVIDER_SIZE, y, w2, h, index); + int w1 = (int) (t.splitPosition * w); + int w2 = w - w1; + setDivider(Tree.H, x + w1 - DIVIDER_SIZE / 2, y, DIVIDER_SIZE, h, w, t); + index = layout(t.first, x, y, w1 - DIVIDER_SIZE / 2, h, index); + return layout(t.second, x + w1 + DIVIDER_SIZE / 2, y, w2, h, index); } return index; } - private final Stroke DIVIDER_STROKE = new BasicStroke(1, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_ROUND, 0, - new float[] {5.0f}, 0f); - - - @Override - public void paint(Graphics g) { - super.paint(g); - Graphics2D g2 = (Graphics2D) g; - g2.setColor(UIManager.getColor("Table.gridColor")); - g2.setStroke(DIVIDER_STROKE); - paintDivider(g, tree, 0, 0, getWidth(), getHeight()); - } - - private void paintDivider(Graphics g, Tree t, int x, int y, int w, int h) { - if (t == null || t.splitType == Tree.NONE) { + private void setDivider(int dir, int x, int y, int w, int h, int range, Tree t) { + if (dividers.size() <= dividerIndex) { + Divider d = new Divider(dir, x, y, w, h, range, t); + dividers.add(d); + super.add(d); } - else if (t.splitType == Tree.V) { - int h1 = (int) (t.splitPosition * h); - g.drawLine(x, y + h1, x + w, y + h1); - paintDivider(g, t.first, x, y, w, h1 - DIVIDER_SIZE / 2); - paintDivider(g, t.second, x, y + h1 + DIVIDER_SIZE / 2, w, h1 - DIVIDER_SIZE / 2); + else { + Divider d = dividers.get(dividerIndex); + d.set(dir, x, y, w, h, range, t); + d.validate(); } - else if (t.splitType == Tree.H) { - int w1 = (int) (t.splitPosition * w); - g.drawLine(x + w1, y, x + w1, y + h); - paintDivider(g, t.first, x, y, w1 - DIVIDER_SIZE / 2, h); - paintDivider(g, t.second, x + w1 + DIVIDER_SIZE / 2, y, w1 - DIVIDER_SIZE / 2, h); - } + dividerIndex++; } - - + private void addDivider(Divider divider) { + dividers.add(divider); + this.add(divider); + } + public static class Tree { public static final int NONE = 0; public static final int H = 1; @@ -162,6 +194,30 @@ return t.copy(); } } + + public void store(Preferences p) { + p.putInt("splitType", splitType); + p.putDouble("splitPosition", splitPosition); + if (first != null) { + Preferences p1 = p.node("first"); + first.store(p1); + } + if (second != null) { + Preferences p2 = p.node("second"); + second.store(p2); + } + } + + public static Tree load(Preferences p) throws BackingStoreException { + Tree tree = new Tree(); + tree.splitType = p.getInt("splitType", H); + tree.splitPosition = p.getDouble("splitPosition", 0.5); + if (tree.splitType != NONE) { + tree.first = load(p.node("first")); + tree.second = load(p.node("second")); + } + return tree; + } } private static class TreeIcon extends ImageIcon { @@ -209,4 +265,123 @@ } } } + + private static class Divider extends JComponent implements MouseListener, MouseMotionListener { + private int type, range; + private Tree tree; + private boolean dragging; + private int vd; + + public Divider(int type, int x, int y, int w, int h, int range, Tree tree) { + this.type = type; + this.tree = tree; + this.range = range; + this.setLocation(x, y); + this.setSize(w, h); + if (type == Tree.H) { + this.setCursor(H_RESIZE_CURSOR); + } + else { + this.setCursor(V_RESIZE_CURSOR); + } + addMouseListener(this); + addMouseMotionListener(this); + } + + public void set(int dir, int x, int y, int w, int h, int range, Tree t) { + this.type = dir; + this.tree = t; + this.range = range; + setLocation(x, y); + setSize(w, h); + if (type == Tree.H) { + this.setCursor(H_RESIZE_CURSOR); + } + else { + this.setCursor(V_RESIZE_CURSOR); + } + } + + public void paintComponent(Graphics g) { + Graphics2D g2 = (Graphics2D) g; + + if (dragging) { + g2.setColor(UIManager.getColor("Separator.highlight")); + } + else { + g2.setColor(UIManager.getColor("Separator.foreground")); + } + //g2.setColor(Color.BLACK); + g2.setStroke(DIVIDER_STROKE); + if (type == Tree.H) { + int w2 = getWidth() / 2; + g.drawLine(w2, 0, w2, getHeight()); + } + else { + int h2 = getHeight() / 2; + g.drawLine(0, h2, getWidth(), h2); + } + } + + @Override + public void mouseDragged(MouseEvent e) { + int v; + if (type == Tree.V) { + v = e.getYOnScreen() - vd; + } + else { + v = e.getXOnScreen() - vd; + } + + if (v < 0) { + v = 0; + } + if (v > range) { + v = range; + } + double pos = (double) v / range; + tree.splitPosition = pos; + getParent().revalidate(); + getParent().repaint(); + } + + @Override + public void mouseMoved(MouseEvent e) { + if (dragging) { + mouseDragged(e); + } + } + + @Override + public void mouseClicked(MouseEvent e) { + } + + @Override + public void mousePressed(MouseEvent e) { + dragging = true; + if (type == Tree.H) { + int w2 = getX() + getWidth() / 2; + vd = e.getXOnScreen() - w2; + } + else { + int h2 = getY() + getHeight() / 2; + vd = e.getYOnScreen() - h2; + } + repaint(); + } + + @Override + public void mouseReleased(MouseEvent e) { + dragging = false; + repaint(); + } + + @Override + public void mouseEntered(MouseEvent e) { + } + + @Override + public void mouseExited(MouseEvent e) { + } + } } \ No newline at end of file From yadunandb at ci.uchicago.edu Fri Jul 26 17:33:16 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Fri, 26 Jul 2013 17:33:16 -0500 (CDT) Subject: [Swift-commit] r6669 - branches/release-0.94/tests/stress/IO/bagOnodes Message-ID: <20130726223316.02309187CC1@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-26 17:33:15 -0500 (Fri, 26 Jul 2013) New Revision: 6669 Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.check.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.check.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.check.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.check.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.check.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.check.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.check.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.check.sh Log: Minor changes Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.check.sh 2013-07-25 23:34:55 UTC (rev 6668) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.check.sh 2013-07-26 22:33:15 UTC (rev 6669) @@ -1,4 +1,17 @@ -#!/bin/bash + +#!/bin/bash + echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + for dead in `ps axf -u $USER | grep HeapDumpOnOutOfMemoryError | grep -o ^[0-9]*` + do + kill -9 $dead + done +else + echo "No" +fi + Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.check.sh 2013-07-25 23:34:55 UTC (rev 6668) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.check.sh 2013-07-26 22:33:15 UTC (rev 6669) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +#!/bin/bash +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi + +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.check.sh 2013-07-25 23:34:55 UTC (rev 6668) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.check.sh 2013-07-26 22:33:15 UTC (rev 6669) @@ -1,4 +1,17 @@ -#!/bin/bash + +#!/bin/bash + echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + for dead in `ps axf -u $USER | grep HeapDumpOnOutOfMemoryError | grep -o ^[0-9]*` + do + kill -9 $dead + done +else + echo "No" +fi + Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.check.sh 2013-07-25 23:34:55 UTC (rev 6668) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.check.sh 2013-07-26 22:33:15 UTC (rev 6669) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +#!/bin/bash +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi + +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.check.sh 2013-07-25 23:34:55 UTC (rev 6668) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.check.sh 2013-07-26 22:33:15 UTC (rev 6669) @@ -1,4 +1,17 @@ -#!/bin/bash + +#!/bin/bash + echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + for dead in `ps axf -u $USER | grep HeapDumpOnOutOfMemoryError | grep -o ^[0-9]*` + do + kill -9 $dead + done +else + echo "No" +fi + Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.check.sh 2013-07-25 23:34:55 UTC (rev 6668) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.check.sh 2013-07-26 22:33:15 UTC (rev 6669) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +#!/bin/bash +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi + +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.check.sh 2013-07-25 23:34:55 UTC (rev 6668) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.check.sh 2013-07-26 22:33:15 UTC (rev 6669) @@ -1,4 +1,17 @@ -#!/bin/bash + +#!/bin/bash + echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + for dead in `ps axf -u $USER | grep HeapDumpOnOutOfMemoryError | grep -o ^[0-9]*` + do + kill -9 $dead + done +else + echo "No" +fi + Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.check.sh 2013-07-25 23:34:55 UTC (rev 6668) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.check.sh 2013-07-26 22:33:15 UTC (rev 6669) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +#!/bin/bash +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi + +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + From yadunandb at ci.uchicago.edu Fri Jul 26 17:35:20 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Fri, 26 Jul 2013 17:35:20 -0500 (CDT) Subject: [Swift-commit] r6670 - in branches/release-0.94/tests/stress/IO: beagle multiple uc3 Message-ID: <20130726223520.07879187CC1@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-26 17:35:19 -0500 (Fri, 26 Jul 2013) New Revision: 6670 Removed: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.setup.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.source.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.swift branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.timeout Modified: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.check.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.check.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.check.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.check.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.check.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.check.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.check.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.check.sh Log: Changed the stress levels and remove x3 test series from IO tests Modified: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" +#!/bin/bash + rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" +#!/bin/bash + rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" +#!/bin/bash + rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" +#!/bin/bash + rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" +#!/bin/bash + rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" +#!/bin/bash + rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" +#!/bin/bash + rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" +#!/bin/bash + rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,17 @@ -#!/bin/bash + +#!/bin/bash + echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + for dead in `ps axf -u $USER | grep HeapDumpOnOutOfMemoryError | grep -o ^[0-9]*` + do + kill -9 $dead + done +else + echo "No" +fi + Modified: branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +#!/bin/bash +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi + +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,17 @@ -#!/bin/bash + +#!/bin/bash + echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + for dead in `ps axf -u $USER | grep HeapDumpOnOutOfMemoryError | grep -o ^[0-9]*` + do + kill -9 $dead + done +else + echo "No" +fi + Modified: branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +#!/bin/bash +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi + +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,17 @@ -#!/bin/bash + +#!/bin/bash + echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + for dead in `ps axf -u $USER | grep HeapDumpOnOutOfMemoryError | grep -o ^[0-9]*` + do + kill -9 $dead + done +else + echo "No" +fi + Modified: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +#!/bin/bash +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi + +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Deleted: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.setup.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.setup.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,63 +0,0 @@ -#!/bin/bash - -if [[ -z $MIDWAY_USERNAME ]] -then - echo "Remote username not provided. Skipping sites configs" -else - ls *xml - cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ - sites.xml -fi -if [[ -z $UC3_USERNAME ]] -then - echo "Remote username not provided. Skipping sites configs" -else - ls *xml - cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ -tes.xml -fi -if [[ -z $BEAGLE_USERNAME ]] -then - echo "Remote username not provided. Skipping sites configs" -else - ls *xml - cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ -tmp sites.xml -fi - -ARGS_FILE=${0%.setup.sh}.args - -case $STRESS in - *) - FILES=500 - LOOPS=0 - ;; -esac - - -dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) -echo "-loops=$LOOPS" > $ARGS_FILE - -cat <<'EOF' > wrapper.sh -#!/bin/bash -ARG1=$1 -ls | grep "$1" &> /dev/null -if [ $? == 0 ] -then - echo "Hey this is wrapper and the $1 exists as a file"; - ls -lah; -else - echo "Doinks! the file we need isn't here"; - ls -lah -fi -cat $ARG1 > $ARG1.test -if [ $? == 0 ] -then - echo "The cat worked! "; -else - echo "The cat failed "; -fi - -rm $ARG1 $ARG1.test -echo "Residual files cleaned up" -EOF Deleted: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.source.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.source.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,6 +0,0 @@ -#!/bin/bash -if [ "midway001" == "midway001" ] -then - export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu - export GLOBUS_TCP_PORT_RANGE=50000,51000 -fi; Deleted: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.swift =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.swift 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.swift 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,17 +0,0 @@ -type file; - -file package <"dummy">; -file script <"wrapper.sh">; -int loop = @toInt(@arg("loops","0")); - -app (file out, file err) remote_driver (file run, file tar) -{ - bash @run @filename(tar) stdout=@filename(out) stderr=@filename(err); -} - -file driver_out[] ; -file driver_err[] ; - -foreach item,i in [0:loop] { - (driver_out[i], driver_err[i]) = remote_driver(script, package); -} \ No newline at end of file Deleted: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.timeout 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.timeout 2013-07-26 22:35:19 UTC (rev 6670) @@ -1 +0,0 @@ -600 Modified: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,17 @@ -#!/bin/bash + +#!/bin/bash + echo "Cleaning up" rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + for dead in `ps axf -u $USER | grep HeapDumpOnOutOfMemoryError | grep -o ^[0-9]*` + do + kill -9 $dead + done +else + echo "No" +fi + Modified: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" +#!/bin/bash + rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,17 @@ -#!/bin/bash + +#!/bin/bash + echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + for dead in `ps axf -u $USER | grep HeapDumpOnOutOfMemoryError | grep -o ^[0-9]*` + do + kill -9 $dead + done +else + echo "No" +fi + Modified: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +#!/bin/bash +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi + +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,17 @@ -#!/bin/bash + +#!/bin/bash + echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + for dead in `ps axf -u $USER | grep HeapDumpOnOutOfMemoryError | grep -o ^[0-9]*` + do + kill -9 $dead + done +else + echo "No" +fi + Modified: branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +#!/bin/bash +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi + +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,17 @@ -#!/bin/bash + +#!/bin/bash + echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + for dead in `ps axf -u $USER | grep HeapDumpOnOutOfMemoryError | grep -o ^[0-9]*` + do + kill -9 $dead + done +else + echo "No" +fi + Modified: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +#!/bin/bash +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi + +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + Modified: branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,17 @@ -#!/bin/bash + +#!/bin/bash + echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + for dead in `ps axf -u $USER | grep HeapDumpOnOutOfMemoryError | grep -o ^[0-9]*` + do + kill -9 $dead + done +else + echo "No" +fi + Modified: branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.check.sh 2013-07-26 22:33:15 UTC (rev 6669) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.check.sh 2013-07-26 22:35:19 UTC (rev 6670) @@ -1,4 +1,19 @@ -#!/bin/bash -echo "Cleaning up" -rm -rf "dummy" driver*.out &> /dev/null +#!/bin/bash +rm -rf "dummy" *.out &> /dev/null +if [ "$KILL_JAVA" == "true" ]; +then + echo "Killing Java.." + killall -u $USER java -9 +fi + +IN=`grep "PerformanceDiagnosticInputStream\ \[IN\]" $BASE*log | tail -n 1` +MEM=`grep "PerformanceDiagnosticInputStream\ \[MEM\]" $BASE*log` +OUT=`grep "PerformanceDiagnosticOutputStream\ \[OUT\]" $BASE*log | tail -n 1` + +echo "=====" +echo "IN : $IN" +echo "MEM : $MEM" +echo "OUT : $OUT" +echo "=====" + From hategan at ci.uchicago.edu Fri Jul 26 19:27:09 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Fri, 26 Jul 2013 19:27:09 -0500 (CDT) Subject: [Swift-commit] r6671 - trunk Message-ID: <20130727002709.BF567187CC1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-26 19:27:09 -0500 (Fri, 26 Jul 2013) New Revision: 6671 Modified: trunk/project.properties Log: forgot to add jfreechart jars to library dependencies Modified: trunk/project.properties =================================================================== --- trunk/project.properties 2013-07-26 22:35:19 UTC (rev 6670) +++ trunk/project.properties 2013-07-27 00:27:09 UTC (rev 6671) @@ -8,4 +8,4 @@ # stable branch should be a change of version number) version = svn project = Swift workflow system -lib.deps = antlr*.*, jsr173_1.0_api.*, resolver.*, stringtemplate.*, vdldefinitions.*, xbean.*, xbean_xpath.*, jug*.*, jaxrpc*.*, jline*.jar +lib.deps = antlr*.*, jsr173_1.0_api.*, resolver.*, stringtemplate.*, vdldefinitions.*, xbean.*, xbean_xpath.*, jug*.*, jaxrpc*.*, jline*.jar, jfreechart*.jar, jcommon*.jar From hategan at ci.uchicago.edu Sat Jul 27 13:18:12 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sat, 27 Jul 2013 13:18:12 -0500 (CDT) Subject: [Swift-commit] r6672 - trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing Message-ID: <20130727181812.BB3469D0CA@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-27 13:18:11 -0500 (Sat, 27 Jul 2013) New Revision: 6672 Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/SummaryPanel.java Log: fixed zero counts on summary progress bars Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/SummaryPanel.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/SummaryPanel.java 2013-07-27 00:27:09 UTC (rev 6671) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/SummaryPanel.java 2013-07-27 18:18:11 UTC (rev 6672) @@ -143,7 +143,7 @@ if (summary != null) { Map counts = summary.getCounts(state); for (int i = 0; i < SummaryItem.STATES.length; i++) { - Integer v = counts.get(SummaryItem.STATES[i]); + Integer v = counts.get(SummaryItem.STATES[i].getName()); if (v != null) { if (v > maxCount) { maxCount = v; From hategan at ci.uchicago.edu Sun Jul 28 23:35:49 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Sun, 28 Jul 2013 23:35:49 -0500 (CDT) Subject: [Swift-commit] r6673 - in trunk/src/org/griphyn/vdl: karajan/lib karajan/lib/swiftscript mapping Message-ID: <20130729043549.E225A9CC90@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-28 23:35:49 -0500 (Sun, 28 Jul 2013) New Revision: 6673 Modified: 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/FileCopier.java trunk/src/org/griphyn/vdl/karajan/lib/InFileDirs.java trunk/src/org/griphyn/vdl/karajan/lib/OutFileDirs.java trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java trunk/src/org/griphyn/vdl/mapping/AbsFile.java Log: removed the use of java.net.(URI|URL) for parsing and use a custom based thing in cog since there are problems with URIs and spaces and URLs and path-only strings Modified: trunk/src/org/griphyn/vdl/karajan/lib/AppStageins.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/AppStageins.java 2013-07-27 18:18:11 UTC (rev 6672) +++ trunk/src/org/griphyn/vdl/karajan/lib/AppStageins.java 2013-07-29 04:35:49 UTC (rev 6673) @@ -79,8 +79,8 @@ if (protocol.equals("file")) { protocol = stagingMethod; } - String path = file.getDir().equals("") ? - file.getName() : file.getDir() + "/" + file.getName(); + String path = file.getDirectory() == null ? + file.getName() : file.getDirectory() + "/" + file.getName(); String relpath = path.startsWith("/") ? path.substring(1) : path; if (logger.isDebugEnabled()) { logger.debug("will stage in: " + relpath + " via: " + protocol); Modified: trunk/src/org/griphyn/vdl/karajan/lib/AppStageouts.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/AppStageouts.java 2013-07-27 18:18:11 UTC (rev 6672) +++ trunk/src/org/griphyn/vdl/karajan/lib/AppStageouts.java 2013-07-29 04:35:49 UTC (rev 6673) @@ -73,7 +73,7 @@ if (protocol.equals("file")) { protocol = stagingMethod; } - String path = file.getDir().equals("") ? file.getName() : file.getDir() + String path = file.getDirectory() == null ? file.getName() : file.getDirectory() + "/" + file.getName(); String relpath = path.startsWith("/") ? path.substring(1) : path; cr_stageout.append(stack, Modified: trunk/src/org/griphyn/vdl/karajan/lib/FileCopier.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/FileCopier.java 2013-07-27 18:18:11 UTC (rev 6672) +++ trunk/src/org/griphyn/vdl/karajan/lib/FileCopier.java 2013-07-29 04:35:49 UTC (rev 6673) @@ -50,9 +50,9 @@ AbsFile fsrc = (AbsFile) src; AbsFile fdst = (AbsFile) dst; FileTransferSpecification fts = new FileTransferSpecificationImpl(); - fts.setDestinationDirectory(fdst.getDir()); + fts.setDestinationDirectory(fdst.getDirectory()); fts.setDestinationFile(fdst.getName()); - fts.setSourceDirectory(fsrc.getDir()); + fts.setSourceDirectory(fsrc.getDirectory()); fts.setSourceFile(fsrc.getName()); fts.setThirdPartyIfPossible(true); task = new FileTransferTask(); Modified: trunk/src/org/griphyn/vdl/karajan/lib/InFileDirs.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/InFileDirs.java 2013-07-27 18:18:11 UTC (rev 6672) +++ trunk/src/org/griphyn/vdl/karajan/lib/InFileDirs.java 2013-07-29 04:35:49 UTC (rev 6673) @@ -50,14 +50,16 @@ Channel ret = cr_vargs.get(stack); for (String path : files) { AbsFile af = new AbsFile(path); - String dir = af.getDir(); - if ("file".equals(af.getProtocol())) { - ret.add(PathUtils.remotePathName(dir)); + String dir = af.getDirectory(); + if (dir != null) { + if ("file".equals(af.getProtocol())) { + ret.add(PathUtils.remotePathName(dir)); + } + else { + // also prepend host name to the path + ret.add(af.getHost() + "/" + PathUtils.remotePathName(dir)); + } } - else { - // also prepend host name to the path - ret.add(af.getHost() + "/" + PathUtils.remotePathName(dir)); - } } } } Modified: trunk/src/org/griphyn/vdl/karajan/lib/OutFileDirs.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/OutFileDirs.java 2013-07-27 18:18:11 UTC (rev 6672) +++ trunk/src/org/griphyn/vdl/karajan/lib/OutFileDirs.java 2013-07-29 04:35:49 UTC (rev 6673) @@ -22,6 +22,7 @@ import java.util.List; +import k.rt.Channel; import k.rt.ExecutionException; import k.rt.Stack; @@ -46,6 +47,7 @@ @Override public Object function(Stack stack) { List> files = stageouts.getValue(stack); + Channel ret = cr_vargs.get(stack); try { for (List pv : files) { Path p = parsePath(pv.get(0)); @@ -53,18 +55,15 @@ DSHandle leaf = handle.getField(p); String fname = SwiftFunction.filename(leaf)[0]; AbsFile af = new AbsFile(fname); - if ("file".equals(af.getProtocol())) { - String dir = af.getDir(); - if (dir.startsWith("/") && dir.length() != 1) { - cr_vargs.append(stack, dir.substring(1)); + String dir = af.getDirectory(); + if (dir != null) { + if ("file".equals(af.getProtocol())) { + ret.add(PathUtils.remotePathName(dir)); } - else if (dir.length() != 0) { - cr_vargs.append(stack, dir); + else { + ret.add(af.getHost() + "/" + PathUtils.remotePathName(dir)); } } - else { - cr_vargs.append(stack, af.getHost() + "/" + af.getDir()); - } } } catch (Exception e) { Modified: trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2013-07-27 18:18:11 UTC (rev 6672) +++ trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2013-07-29 04:35:49 UTC (rev 6673) @@ -40,7 +40,7 @@ @Override public Object function(Stack stack) { - return new AbsFile(path.getValue(stack)).getDir(); + return new AbsFile(path.getValue(stack)).getDirectory(); } } @@ -54,8 +54,13 @@ @Override public Object function(Stack stack) { - String dir = new AbsFile(path.getValue(stack)).getDir(); - return remotePathName(dir); + String dir = new AbsFile(path.getValue(stack)).getDirectory(); + if (dir != null) { + return remotePathName(dir); + } + else { + return null; + } } } Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java 2013-07-27 18:18:11 UTC (rev 6672) +++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java 2013-07-29 04:35:49 UTC (rev 6673) @@ -584,8 +584,8 @@ AbstractDataNode dn = file.getValue(stack); String name = SwiftFunction.filename(dn)[0]; - String result = new AbsFile(name).getDir(); - DSHandle handle = new RootDataNode(Types.BOOLEAN, result); + String result = new AbsFile(name).getDirectory(); + DSHandle handle = new RootDataNode(Types.STRING, result); if (PROVENANCE_ENABLED) { int provid = SwiftFunction.nextProvenanceID(); Modified: trunk/src/org/griphyn/vdl/mapping/AbsFile.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/AbsFile.java 2013-07-27 18:18:11 UTC (rev 6672) +++ trunk/src/org/griphyn/vdl/mapping/AbsFile.java 2013-07-29 04:35:49 UTC (rev 6673) @@ -31,78 +31,43 @@ import org.globus.cog.abstraction.impl.file.FileResourceCache; import org.globus.cog.abstraction.interfaces.FileResource; import org.globus.cog.abstraction.interfaces.GridFile; +import org.globus.cog.abstraction.interfaces.RemoteFile; import org.globus.cog.abstraction.interfaces.Service; -public class AbsFile implements GeneralizedFileFormat { - private final String protocol; - private final String host; - private final String path; - private String dir, name; +public class AbsFile extends RemoteFile implements GeneralizedFileFormat { public AbsFile(String url) { - int pi = url.indexOf("://"); - if (pi == -1) { - protocol = "file"; - host = "localhost"; - path = normalize(url); - } - else { - protocol = url.substring(0, pi); - if (protocol.equals("file")) { - host = "localhost"; - String rp = url.substring(pi + 3); - if (rp.startsWith("localhost/")) { - rp = rp.substring("localhost/".length()); - } - path = normalize(rp); - } - else { - int si = url.indexOf('/', pi + 3); - if (si == -1) { - host = url.substring(pi + 3); - path = ""; - } - else { - host = url.substring(pi + 3, si); - path = normalize(url.substring(si + 1)); - } - } - } - initDirAndName(); + super(url); } - private String normalize(String path) { - // there is a slight performance penalty here, but it makes things - // cleaner - return path.replace("/./", "/"); + public AbsFile(String protocol, String host, String path) { + super(protocol, host, path); + } + + public AbsFile(String protocol, String host, int port, String dir, String name) { + super(protocol, host, port, dir, name); } - private void initDirAndName() { - int di = path.lastIndexOf('/'); - if (di == 0) { - dir = "/"; + public AbsFile(String protocol, String host, int port, String path) { + super(protocol, host, port, path); + } + + @Override + protected void parse(String str) { + super.parse(str); + if (getProtocol() == null) { + setProtocol("file"); } - else if (di > 0) { - dir = path.substring(0, di); + if (getHost() == null) { + setHost("localhost"); } - else { - dir = ""; - } - name = path.substring(di + 1); } - public AbsFile(String protocol, String host, String path) { - this.protocol = protocol; - this.host = host; - this.path = path; - initDirAndName(); - } - - protected FileResource getFileResource() throws IOException { + protected FileResource getFileResource() throws IOException { Service s = new ServiceImpl(); - s.setProvider(protocol); + s.setProvider(getProtocol()); s.setType(Service.FILE_OPERATION); - s.setServiceContact(new ServiceContactImpl(host)); + s.setServiceContact(new ServiceContactImpl(getHost(), getPort())); try { return FileResourceCache.getDefault().getResource(s); } @@ -119,7 +84,7 @@ try { FileResource fr = getFileResource(); try { - return fr.exists(path); + return fr.exists(getPath()); } finally { releaseResource(fr); @@ -137,10 +102,16 @@ try { FileResource fr = getFileResource(); try { + String protocol = getProtocol(); + String host = getHost(); + int port = getPort(); + String dir = getPath(); List l = new ArrayList(); - for (GridFile gf : fr.list(path)) { - AbsFile f = new AbsFile(protocol, host, gf.getAbsolutePathName()); - if (gf.isDirectory() && (filter == null || filter.accept(new File(f.getDir()), f.getName()))) { + for (GridFile gf : fr.list(dir)) { + AbsFile f = new AbsFile(protocol, host, port, dir, gf.getName()); + // f.getDirectory() cannot be null since dir cannot be null since getPath() returns + // a non-null string + if (gf.isDirectory() && (filter == null || filter.accept(new File(f.getDirectory()), f.getName()))) { l.add(f); } } @@ -160,10 +131,14 @@ try { FileResource fr = getFileResource(); try { + String protocol = getProtocol(); + String host = getHost(); + int port = getPort(); + String dir = getPath(); List l = new ArrayList(); - for (GridFile gf : fr.list(path)) { - AbsFile f = new AbsFile(protocol, host, gf.getAbsolutePathName()); - if (filter == null || filter.accept(new File(f.getDir()), f.getName())) { + for (GridFile gf : fr.list(dir)) { + AbsFile f = new AbsFile(protocol, host, port, dir, gf.getName()); + if (filter == null || filter.accept(new File(f.getDirectory()), f.getName())) { l.add(f); } } @@ -179,64 +154,16 @@ } } - public String getName() { - return name; - } - - public String getDir() { - return dir; - } - - public String getProtocol() { - return protocol; - } - - public String getHost() { - return host; - } - - public String getPath() { - return path; - } - - public boolean isAbsolute() { - return !path.isEmpty() && path.startsWith("/"); - } - public String getType() { return "file"; } - public String getURIAsString() { - return protocol + "://" + host + '/' + path; - } - - public String toString() { - return getURIAsString(); - } - public void clean() { try { - getFileResource().deleteFile(path); + getFileResource().deleteFile(getPath()); } catch (Exception e) { throw new RuntimeException(e); } } - - @Override - public boolean equals(Object obj) { - if (obj instanceof AbsFile) { - AbsFile a = (AbsFile) obj; - return protocol.equals(a.protocol) && host.equals(a.host) && path.equals(a.path); - } - else { - return false; - } - } - - @Override - public int hashCode() { - return protocol.hashCode() + host.hashCode() + path.hashCode(); - } } From swift at ci.uchicago.edu Mon Jul 29 00:30:03 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Mon, 29 Jul 2013 00:30:03 -0500 (CDT) Subject: [Swift-commit] cog r3750 Message-ID: <20130729053004.09E2D8D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3750 | hategan | 2013-07-29 00:27:54 -0500 (Mon, 29 Jul 2013) | 1 line merged r3749 from trunk ------------------------------------------------------------------------ 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 3749) +++ modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java (working copy) @@ -13,7 +13,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.net.URI; import java.util.ArrayList; import java.util.Collection; import java.util.EnumSet; @@ -41,6 +40,7 @@ import org.globus.cog.abstraction.interfaces.FileLocation; import org.globus.cog.abstraction.interfaces.FileResource; import org.globus.cog.abstraction.interfaces.JobSpecification; +import org.globus.cog.abstraction.interfaces.RemoteFile; import org.globus.cog.abstraction.interfaces.Service; import org.globus.cog.abstraction.interfaces.ServiceContact; import org.globus.cog.abstraction.interfaces.Specification; @@ -341,19 +341,19 @@ private void copy(String src, String dest, File dir, EnumSet mode, boolean jobSucceeded) throws Exception { src = dropCDMPrefix(src); - URI suri = new URI(src); - URI duri = new URI(dest); + RemoteFile srf = new RemoteFile(src); + RemoteFile drf = new RemoteFile(dest); - String srcScheme = defaultToLocal(suri.getScheme()); - String dstScheme = defaultToLocal(duri.getScheme()); + String srcScheme = defaultToLocal(srf.getProtocol()); + String dstScheme = defaultToLocal(drf.getProtocol()); - Service ss = new ServiceImpl(srcScheme, getServiceContact(suri), null); - Service ds = new ServiceImpl(dstScheme, getServiceContact(duri), null); + Service ss = new ServiceImpl(srcScheme, getServiceContact(srf), null); + Service ds = new ServiceImpl(dstScheme, getServiceContact(drf), null); FileResource sres = FileResourceCache.getDefault().getResource(ss); FileResource dres = FileResourceCache.getDefault().getResource(ds); - String srcPath = getPath(suri, dir); + String srcPath = getPath(srf, dir); if (mode.contains(Mode.IF_PRESENT) && !sres.exists(srcPath)) { return; @@ -366,7 +366,7 @@ } InputStream is = sres.openInputStream(srcPath); - OutputStream os = dres.openOutputStream(getPath(duri, dir)); + OutputStream os = dres.openOutputStream(getPath(drf, dir)); byte[] buffer = new byte[BUFFER_SIZE]; int len = is.read(buffer); @@ -379,22 +379,22 @@ FileResourceCache.getDefault().releaseResource(dres); } - private String getPath(URI uri, File dir) { - if (uri.getScheme() == null && !uri.getPath().startsWith("//")) { - return new File(dir, uri.getPath()).getAbsolutePath(); + private String getPath(RemoteFile rf, File dir) { + if (rf.getProtocol() == null && !rf.isAbsolute()) { + return new File(dir, rf.getPath()).getAbsolutePath(); } else { - return uri.getPath().substring(1); + return rf.getPath(); } } - protected ServiceContact getServiceContact(URI uri) { + protected ServiceContact getServiceContact(RemoteFile rf) { ServiceContact sc = new ServiceContactImpl(); - if (uri.getHost() != null) { - sc.setHost(uri.getHost()); + if (rf.getHost() != null) { + sc.setHost(rf.getHost()); } - if (uri.getPort() != -1) { - sc.setPort(uri.getPort()); + if (rf.getPort() != -1) { + sc.setPort(rf.getPort()); } return sc; } Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/CoasterFileRequestHandler.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/CoasterFileRequestHandler.java (revision 3749) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/CoasterFileRequestHandler.java (working copy) @@ -12,6 +12,7 @@ import java.io.File; import org.globus.cog.abstraction.impl.execution.coaster.NotificationManager; +import org.globus.cog.abstraction.interfaces.RemoteFile; import org.globus.cog.karajan.workflow.service.ProtocolException; import org.globus.cog.karajan.workflow.service.handlers.RequestHandler; @@ -19,14 +20,12 @@ // private static final String HOME = System.getProperty("user.home"); private static final String CWD = new File(".").getAbsolutePath(); - public static File normalize(String name) { - File f = new File(name); - - if (f.isAbsolute()) { - return f; + public static File normalize(RemoteFile rf) { + if (rf.isAbsolute()) { + return new File(rf.getPath()); } else { - return new File(CWD, name); + return new File(CWD, rf.getPath()); } } 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 3749) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/ProxyIOProvider.java (working copy) @@ -11,8 +11,6 @@ import java.io.FileNotFoundException; import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; import java.nio.ByteBuffer; import java.util.Arrays; import java.util.LinkedList; @@ -30,6 +28,7 @@ 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.abstraction.interfaces.RemoteFile; 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; @@ -93,8 +92,8 @@ public void setLength(long len) throws IOException { try { - URI uri = new URI(dst); - cmd = new CustomPutFileCmd(src, "file://localhost/" + uri.getPath().substring(1), len, this); + RemoteFile uri = new RemoteFile(dst); + cmd = new CustomPutFileCmd(src, "file://localhost/" + uri.getPath(), len, this); channel = ChannelManager.getManager().reserveChannel("id://" + uri.getHost(), null); cmd.executeAsync(channel, this); cb.info(String.valueOf(cmd.getId())); @@ -264,8 +263,8 @@ } this.cb = cb; this.src = src; - URI uri = newURI(src); - cmd = new CustomGetFileCmd("file://localhost/" + uri.getPath().substring(1), dst, this); + RemoteFile uri = newRemoteFile(src); + cmd = new CustomGetFileCmd("file://localhost/" + uri.getPath(), dst, this); try { channel = ChannelManager.getManager().reserveChannel("id://" + uri.getHost(), null); } @@ -291,12 +290,12 @@ } } - private URI newURI(String src) throws IOException { + private RemoteFile newRemoteFile(String src) throws IOException { try { - return new URI(src); + return new RemoteFile(src); } - catch (URISyntaxException e) { - throw new IOException("Malformed URI: " + e.getMessage()); + catch (Exception e) { + throw new IOException("Invalid file name: " + e.getMessage()); } } 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 3749) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/LocalCopyIOProvider.java (working copy) @@ -15,6 +15,7 @@ import java.net.URISyntaxException; import org.apache.log4j.Logger; +import org.globus.cog.abstraction.interfaces.RemoteFile; /** * Sample indirect provider @@ -65,10 +66,10 @@ protected static String getPath(String suri) throws IOException { try { - URI uri = new URI(suri); - return uri.getPath().substring(1); + RemoteFile rf = new RemoteFile(suri); + return rf.getPath(); } - catch (URISyntaxException e) { + catch (Exception e) { throw new IOException(e.toString()); } } 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 3749) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/providers/LocalIOProvider.java (working copy) @@ -27,6 +27,7 @@ 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; +import org.globus.cog.abstraction.interfaces.RemoteFile; public class LocalIOProvider implements IOProvider { public static final Logger logger = Logger.getLogger(LocalIOProvider.class); @@ -49,12 +50,12 @@ return true; } - private static URI newURI(String src) throws IOException { + private static RemoteFile newRemoteFile(String src) throws IOException { try { - return new URI(src); + return new RemoteFile(src); } - catch (URISyntaxException e) { - throw new IOException("Malformed URI: " + e.getMessage()); + catch (Exception e) { + throw new IOException("Invalid name: " + e.getMessage()); } } @@ -68,8 +69,8 @@ public Writer(String dest, WriteIOCallback cb) throws IOException { this.cb = cb; - URI destURI = newURI(dest); - f = CoasterFileRequestHandler.normalize(destURI.getPath().substring(1)); + RemoteFile destURI = newRemoteFile(dest); + f = CoasterFileRequestHandler.normalize(destURI); } public String toString() { @@ -155,8 +156,8 @@ if (logger.isDebugEnabled()) { logger.debug("LocalIOProvider.Reader " + src); } - URI srcURI = newURI(src); - f = CoasterFileRequestHandler.normalize(srcURI.getPath().substring(1)); + RemoteFile srcURI = newRemoteFile(src); + f = CoasterFileRequestHandler.normalize(srcURI); this.cb = cb; fc = new FileInputStream(f).getChannel(); } Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java (revision 3749) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java (working copy) @@ -12,8 +12,8 @@ import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; +import java.net.MalformedURLException; +import java.net.URL; import java.nio.charset.Charset; import java.util.HashSet; import java.util.Set; @@ -178,16 +178,16 @@ private String absolutize(String file) throws IOException { try { - URI u = new URI(file); - if (ABSOLUTIZE.contains(u.getScheme())) { - return u.getScheme() + "://" + u.getHost() + + URL u = new URL(file); + if (ABSOLUTIZE.contains(u.getProtocol())) { + return u.getProtocol() + "://" + u.getHost() + (u.getPort() != -1 ? ":" + u.getPort() : "") + "/" + new File(u.getPath().substring(1)).getAbsolutePath(); } else { return file; } } - catch (URISyntaxException e) { + catch (MalformedURLException e) { throw new IOException("Invalid file specification: " + file); } } @@ -235,4 +235,17 @@ public void setSimple(boolean simple) { this.simple = simple; } + + public static void main(String[] args) { + try { + URL u = new URL("/some path"); + System.out.println(u.getProtocol()); + System.out.println(u.getHost()); + System.out.println(u.getPort()); + System.out.println(u.getPath()); + } + catch (Exception e) { + e.printStackTrace(); + } + } } Index: modules/abstraction-common/src/org/globus/cog/abstraction/tools/transfer/FileTransfer.java =================================================================== --- modules/abstraction-common/src/org/globus/cog/abstraction/tools/transfer/FileTransfer.java (revision 3749) +++ modules/abstraction-common/src/org/globus/cog/abstraction/tools/transfer/FileTransfer.java (working copy) @@ -6,8 +6,6 @@ package org.globus.cog.abstraction.tools.transfer; -import java.net.URI; - import org.apache.log4j.Logger; import org.globus.cog.abstraction.impl.common.AbstractionFactory; import org.globus.cog.abstraction.impl.common.StatusEvent; @@ -21,6 +19,7 @@ import org.globus.cog.abstraction.impl.common.task.ServiceImpl; import org.globus.cog.abstraction.impl.common.task.TaskSubmissionException; import org.globus.cog.abstraction.interfaces.FileTransferSpecification; +import org.globus.cog.abstraction.interfaces.RemoteFile; import org.globus.cog.abstraction.interfaces.SecurityContext; import org.globus.cog.abstraction.interfaces.Service; import org.globus.cog.abstraction.interfaces.ServiceContact; @@ -39,25 +38,25 @@ static Logger logger = Logger.getLogger(FileTransfer.class); private Task task = null; - private URI sourceURI = null; - private URI destinationURI = null; + private RemoteFile sourceURI = null; + private RemoteFile destinationURI = null; private boolean commandLine = false; private boolean thirdparty = false; public FileTransfer(String name, String sourceURI, String destinationURI) throws Exception { - this.sourceURI = new URI(sourceURI); - this.destinationURI = new URI(destinationURI); + this.sourceURI = new RemoteFile(sourceURI); + this.destinationURI = new RemoteFile(destinationURI); this.task = new FileTransferTask(name); logger.debug("Task Identity: " + this.task.getIdentity().toString()); } public void setSourceURI(String sourceURI) throws Exception { - this.sourceURI = new URI(sourceURI); + this.sourceURI = new RemoteFile(sourceURI); } public void setDestinationURI(String destinationURI) throws Exception { - this.destinationURI = new URI(destinationURI); + this.destinationURI = new RemoteFile(destinationURI); } public String getSourceURI() { @@ -97,9 +96,9 @@ sourceServiceContact.setPort(sourceURI.getPort()); SecurityContext sourceSecurityContext = - AbstractionFactory.getSecurityContext(sourceURI.getScheme(), sourceServiceContact); + AbstractionFactory.getSecurityContext(sourceURI.getProtocol(), sourceServiceContact); - Service sourceService = new ServiceImpl(sourceURI.getScheme(), + Service sourceService = new ServiceImpl(sourceURI.getProtocol(), Service.FILE_TRANSFER, sourceServiceContact, sourceSecurityContext); @@ -108,10 +107,10 @@ destinationServiceContact.setPort(destinationURI.getPort()); SecurityContext destinationSecurityContext = - AbstractionFactory.getSecurityContext(destinationURI.getScheme(), destinationServiceContact); + AbstractionFactory.getSecurityContext(destinationURI.getProtocol(), destinationServiceContact); Service destinationService = new ServiceImpl( - destinationURI.getScheme(), Service.FILE_TRANSFER, + destinationURI.getProtocol(), Service.FILE_TRANSFER, destinationServiceContact, destinationSecurityContext); // add the source service at index 0 Index: modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/FileTransferSpecificationImpl.java =================================================================== --- modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/FileTransferSpecificationImpl.java (revision 3749) +++ modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/FileTransferSpecificationImpl.java (working copy) @@ -54,7 +54,9 @@ } public void setSourceDirectory(String directory) { - this.sourceDirectory = directory.trim(); + if (directory != null) { + this.sourceDirectory = directory.trim(); + } } public String getSourceDirectory() { Index: modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/util/FileTransfer.java =================================================================== --- modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/util/FileTransfer.java (revision 3749) +++ modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/util/FileTransfer.java (working copy) @@ -11,6 +11,7 @@ import org.globus.cog.abstraction.impl.common.task.ServiceContactImpl; import org.globus.cog.abstraction.impl.common.task.ServiceImpl; import org.globus.cog.abstraction.impl.common.task.TaskImpl; +import org.globus.cog.abstraction.interfaces.RemoteFile; import org.globus.cog.abstraction.interfaces.SecurityContext; import org.globus.cog.abstraction.interfaces.Service; import org.globus.cog.abstraction.interfaces.Status; @@ -71,15 +72,18 @@ Service sourceService = new ServiceImpl(); Service destService = new ServiceImpl(); + + RemoteFile src = new RemoteFile(sourceUri); + RemoteFile dst = new RemoteFile(destUri); - configureService(sourceService, sourceUri, sourceCredentials); - configureService(destService, destUri, destCredentials); + configureService(sourceService, src, sourceCredentials); + configureService(destService, dst, destCredentials); - spec.setSourceDirectory(getDirectory(sourceUri)); - spec.setSourceFile(getFile(sourceUri)); + spec.setSourceDirectory(src.getDirectory()); + spec.setSourceFile(src.getName()); - spec.setDestinationDirectory(getDirectory(destUri)); - spec.setDestinationFile(getFile(destUri)); + spec.setDestinationDirectory(dst.getDirectory()); + spec.setDestinationFile(dst.getName()); Task task = getTask(spec, sourceService, destService); @@ -112,10 +116,9 @@ return task; } - void configureService(Service service, String uri, Object credentials) throws Exception { + void configureService(Service service, RemoteFile rf, Object credentials) throws Exception { SecurityContext securityContext = null; - URI u = new URI(uri); - String protocol = u.getScheme(); + String protocol = rf.getProtocol(); if (protocol.equals("file")) { service.setProvider("local"); } @@ -134,22 +137,13 @@ securityContext.setCredentials(credentials); service.setSecurityContext(securityContext); } - String host = u.getHost(); + String host = rf.getHost(); if (host == null) { host = "localhost"; } service.setServiceContact(new ServiceContactImpl(host)); } - String getDirectory(String uri) throws Exception { - String parent = (new File((new URI(uri)).getPath().substring(1))).getParent(); - return (parent == null) ? "" : parent; - } - - String getFile(String uri) throws Exception { - return (new File((new URI(uri)).getPath().substring(1))).getName(); - } - synchronized void setIsComplete(boolean ic) { isComplete = ic; notifyAll(); Index: modules/abstraction-common/src/org/globus/cog/abstraction/interfaces/RemoteFile.java =================================================================== --- modules/abstraction-common/src/org/globus/cog/abstraction/interfaces/RemoteFile.java (revision 0) +++ modules/abstraction-common/src/org/globus/cog/abstraction/interfaces/RemoteFile.java (revision 3751) @@ -0,0 +1,323 @@ +//---------------------------------------------------------------------- +//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 27, 2013 + */ +package org.globus.cog.abstraction.interfaces; + + +/** + * Something to fill the gap between a URI and URL. URIs cannot seem to + * allow spaces in the name and URLs cannot be a path-only. + * + * The accepted syntax is: + * [protocol://host[:port]/]path + * + */ +public class RemoteFile { + private String protocol; + private String host; + private String dir, name; + private int port; + + public RemoteFile(String protocol, String host, int port, String dir, String name) { + this.protocol = protocol; + this.host = host; + this.port = port; + this.dir = dir; + this.name = name; + } + + public RemoteFile(String protocol, String host, int port, String path) { + this.protocol = protocol; + this.host = host; + this.port = port; + this.parseDirAndName(path, 0); + } + + public RemoteFile(String protocol, String host, String path) { + this.protocol = protocol; + this.host = host; + this.port = -1; + this.parseDirAndName(path, 0); + } + + public RemoteFile(String s) { + port = -1; + parse(s); + } + + protected void parse(String str) { + int pp = 0, sp = 0, state = 0; + /* + * state: + * 0000 - nothing found yet; next is either protocol or path + * scan for: + * "://" -> 1000, protocol = str(pp:sp) + * EOL -> path = str + * 1000 - host[:port] part; scan for: + * ":" -> 2000, host = str(pp:sp) + * "/" -> host = str(pp:sp), path = str(sp:) + * EOL -> error (missing host) + * 2000 - port part; scan for: + * "/" -> port = str(pp:sp), path = str(sp + 1:) + * EOL -> error (missing path) + * 3000 - STOP + */ + int len = str.length(); + outer: + while (sp < len) { + char c = str.charAt(sp); + if (c > 255) { + throw new IllegalArgumentException("Illegal character '" + c + "' in path at column " + sp + ": '" + str + "'"); + } + int ms = state + c; + switch (ms) { + case ':': + if (match(str, "//", sp + 1)) { + state = 1000; + protocol = str.substring(pp, sp); + pp = sp + 3; + sp = pp; + } + break; + case 1000 + ':': + host = str.substring(pp, sp); + pp = sp + 1; + state = 2000; + break; + case 1000 + '/': + port = -1; + host = str.substring(pp, sp); + parseDirAndName(str, sp + 1); + state = 3000; + break outer; + case 2000 + '/': + try { + port = Integer.parseInt(str.substring(pp, sp)); + } + catch (NumberFormatException e) { + throw new IllegalArgumentException("Invalid port: '" + str.substring(pp, sp) + "'"); + } + parseDirAndName(str, sp + 1); + state = 3000; + break outer; + } + + sp++; + } + // EOL + switch (state) { + case 0000: + protocol = null; + host = null; + parseDirAndName(str, 0); + port = -1; + break; + case 1000: + throw new IllegalArgumentException("Host not found while scanning '" + str + "'"); + case 2000: + throw new IllegalArgumentException("Path not found while scanning '" + str + "'"); + default: + // STOP + } + } + + private void parseDirAndName(String str, int pos) { + int lastSep = str.lastIndexOf('/'); + if (lastSep < pos) { + dir = null; + name = str.substring(pos); + } + else if (lastSep == pos) { + dir = "/"; + name = str.substring(pos + 1); + } + else { + dir = normalize(str, pos, lastSep); + name = str.substring(lastSep + 1); + } + } + + private boolean match(String str, String sub, int pos) { + if (sub.length() + pos > str.length()) { + return false; + } + for (int i = 0; i < sub.length(); i++) { + if (str.charAt(pos + i) != sub.charAt(i)) { + return false; + } + } + return true; + } + + private String normalize(String path, int start, int end) { + // there is a slight performance penalty here, but it makes things + // cleaner + StringBuilder sb = new StringBuilder(); + while (start < end) { + char c = path.charAt(start); + if (c == '/') { + if (start + 2 < end && match(path, "./", start + 1)) { + start += 2; + } + else if (start + 2 == end && path.charAt(start + 1) == '.') { + break; + } + else if (start + 1 < end && path.charAt(start + 1) == '/') { + start += 1; + } + } + sb.append(c); + + start++; + } + return sb.toString(); + } + + public String getName() { + return name; + } + + public String getDirectory() { + return dir; + } + + protected void setDirectory(String dir) { + this.dir = dir; + } + + public String getProtocol() { + return protocol; + } + + protected void setProtocol(String protocol) { + this.protocol = protocol; + } + + public String getHost() { + return host; + } + + protected void setHost(String host) { + this.host = host; + } + + public int getPort() { + return port; + } + + public String getPath() { + if (dir == null) { + return name; + } + else { + return dir + '/' + name; + } + } + + public boolean isAbsolute() { + return dir != null && dir.startsWith("/"); + } + + public String getURIAsString() { + StringBuilder sb = new StringBuilder(); + sb.append(protocol); + sb.append("://"); + sb.append(host); + if (port != -1) { + sb.append(':'); + sb.append(port); + } + sb.append('/'); + if (dir != null) { + // special case when the dir is just a slash + // (indicating a file in the root dir): there + // is no explicit separator + if (dir.equals("/")) { + sb.append(dir); + } + else { + sb.append(dir); + sb.append('/'); + } + sb.append(name); + } + else { + sb.append(name); + } + return sb.toString(); + } + + public String toString() { + return getURIAsString(); + } + + public String toDebugString() { + return "RemoteFile[protocol: '" + protocol + "', host: '" + host + + "', port: " + port + ", dir: " + (dir == null ? "null" : "'" + dir + "'") + ", name: '" + name + "']"; + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof RemoteFile) { + RemoteFile a = (RemoteFile) obj; + return name.equals(a.name) && (dir == null ? a.dir == null : dir.equals(a.dir)) && + host.equals(a.host) && port == a.port && protocol.equals(a.protocol); + } + else { + return false; + } + } + + @Override + public int hashCode() { + return protocol.hashCode() + host.hashCode() + port + (dir == null ? 0 : dir.hashCode()) + name.hashCode(); + } + + public static void main(String[] args) { + test("http://ll.com/name", "http://ll.com/name", false); + test("http://ll.com:30/name", "http://ll.com:30/name", false); + test("http://ll.com:/name", "http://ll.com:/name", true); + test("http://www.example.com/dir/name", "http://www.example.com/dir/name", false); + test("http://ll.com//name", "http://ll.com//name", false); + test("http://ll.com/dir/./name", "http://ll.com/dir/name", false); + test("http://ll.com/dir1/./dir2/name", "http://ll.com/dir1/dir2/name", false); + } + + private static void test(String s, String e, boolean err) { + RemoteFile rf; + if (err) { + try { + rf = new RemoteFile(s); + System.err.println("Missing error: " + s + " -> " + rf.toDebugString()); + } + catch (Exception ex) { + System.out.println(s); + System.out.println("\tError: " + ex.getMessage()); + return; + } + } + else { + try { + rf = new RemoteFile(s); + } + catch (Exception ex) { + System.err.println(s); + System.err.println("\tError"); + return; + } + } + if (!rf.toString().equals(e)) { + System.out.println("Error: " + e + " -> " + rf.toString() + " -> " + rf.toDebugString()); + } + else { + System.out.println(s); + System.out.println("\t" + rf.toDebugString()); + } + } +} From swift at ci.uchicago.edu Mon Jul 29 00:40:03 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Mon, 29 Jul 2013 00:40:03 -0500 (CDT) Subject: [Swift-commit] cog r3752 Message-ID: <20130729054004.1274C8D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3752 | hategan | 2013-07-29 00:35:50 -0500 (Mon, 29 Jul 2013) | 1 line merged r3751 from trunk ------------------------------------------------------------------------ Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java (revision 3751) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java (working copy) @@ -12,7 +12,6 @@ import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; -import java.net.MalformedURLException; import java.net.URL; import java.nio.charset.Charset; import java.util.HashSet; @@ -27,6 +26,7 @@ import org.globus.cog.abstraction.interfaces.ExecutionService; import org.globus.cog.abstraction.interfaces.FileLocation; import org.globus.cog.abstraction.interfaces.JobSpecification; +import org.globus.cog.abstraction.interfaces.RemoteFile; import org.globus.cog.abstraction.interfaces.Service; import org.globus.cog.abstraction.interfaces.StagingSetEntry; import org.globus.cog.abstraction.interfaces.StagingSetEntry.Mode; @@ -178,16 +178,16 @@ private String absolutize(String file) throws IOException { try { - URL u = new URL(file); + RemoteFile u = new RemoteFile(file); if (ABSOLUTIZE.contains(u.getProtocol())) { return u.getProtocol() + "://" + u.getHost() + - (u.getPort() != -1 ? ":" + u.getPort() : "") + "/" + new File(u.getPath().substring(1)).getAbsolutePath(); + (u.getPort() != -1 ? ":" + u.getPort() : "") + "/" + new File(u.getPath()).getAbsolutePath(); } else { return file; } } - catch (MalformedURLException e) { + catch (Exception e) { throw new IOException("Invalid file specification: " + file); } } From hategan at ci.uchicago.edu Mon Jul 29 00:58:47 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 29 Jul 2013 00:58:47 -0500 (CDT) Subject: [Swift-commit] r6674 - in branches/release-0.94/src/org/griphyn/vdl: karajan/lib karajan/lib/swiftscript mapping Message-ID: <20130729055847.EBC259CC90@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-29 00:58:47 -0500 (Mon, 29 Jul 2013) New Revision: 6674 Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/AppStageins.java branches/release-0.94/src/org/griphyn/vdl/karajan/lib/AppStageouts.java branches/release-0.94/src/org/griphyn/vdl/karajan/lib/FileCopier.java branches/release-0.94/src/org/griphyn/vdl/karajan/lib/InFileDirs.java branches/release-0.94/src/org/griphyn/vdl/karajan/lib/OutFileDirs.java branches/release-0.94/src/org/griphyn/vdl/karajan/lib/PathUtils.java branches/release-0.94/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java branches/release-0.94/src/org/griphyn/vdl/mapping/AbsFile.java Log: merged 6673 from trunk Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/AppStageins.java =================================================================== --- branches/release-0.94/src/org/griphyn/vdl/karajan/lib/AppStageins.java 2013-07-29 04:35:49 UTC (rev 6673) +++ branches/release-0.94/src/org/griphyn/vdl/karajan/lib/AppStageins.java 2013-07-29 05:58:47 UTC (rev 6674) @@ -63,8 +63,8 @@ if (protocol.equals("file")) { protocol = TypeUtil.toString(STAGING_METHOD.getValue(stack)); } - String path = file.getDir().equals("") ? - file.getName() : file.getDir() + "/" + file.getName(); + String path = file.getDirectory() == null ? + file.getName() : file.getDirectory() + "/" + file.getName(); String relpath = path.startsWith("/") ? path.substring(1) : path; if (logger.isDebugEnabled()) { logger.debug("will stage in: " + relpath + " via: " + protocol); Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/AppStageouts.java =================================================================== --- branches/release-0.94/src/org/griphyn/vdl/karajan/lib/AppStageouts.java 2013-07-29 04:35:49 UTC (rev 6673) +++ branches/release-0.94/src/org/griphyn/vdl/karajan/lib/AppStageouts.java 2013-07-29 05:58:47 UTC (rev 6674) @@ -59,7 +59,7 @@ if (protocol.equals("file")) { protocol = TypeUtil.toString(STAGING_METHOD.getValue(stack)); } - String path = file.getDir().equals("") ? file.getName() : file.getDir() + String path = file.getDirectory() == null ? file.getName() : file.getDirectory() + "/" + file.getName(); String relpath = path.startsWith("/") ? path.substring(1) : path; ArgUtil.getChannelReturn(stack, STAGEOUT).append( Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/FileCopier.java =================================================================== --- branches/release-0.94/src/org/griphyn/vdl/karajan/lib/FileCopier.java 2013-07-29 04:35:49 UTC (rev 6673) +++ branches/release-0.94/src/org/griphyn/vdl/karajan/lib/FileCopier.java 2013-07-29 05:58:47 UTC (rev 6674) @@ -57,9 +57,9 @@ AbsFile fsrc = (AbsFile) src; AbsFile fdst = (AbsFile) dst; FileTransferSpecification fts = new FileTransferSpecificationImpl(); - fts.setDestinationDirectory(fdst.getDir()); + fts.setDestinationDirectory(fdst.getDirectory()); fts.setDestinationFile(fdst.getName()); - fts.setSourceDirectory(fsrc.getDir()); + fts.setSourceDirectory(fsrc.getDirectory()); fts.setSourceFile(fsrc.getName()); fts.setThirdPartyIfPossible(true); task = new FileTransferTask(); Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/InFileDirs.java =================================================================== --- branches/release-0.94/src/org/griphyn/vdl/karajan/lib/InFileDirs.java 2013-07-29 04:35:49 UTC (rev 6673) +++ branches/release-0.94/src/org/griphyn/vdl/karajan/lib/InFileDirs.java 2013-07-29 05:58:47 UTC (rev 6674) @@ -45,23 +45,21 @@ for (Object f : files) { String path = (String) f; AbsFile af = new AbsFile(path); - if ("file".equals(af.getProtocol())) { - String dir = af.getDir(); - // there could be a clash here since - // "/a/b/c.txt" would be remotely the same - // as "a/b/c.txt". Perhaps absolute paths - // should have a unique prefix. - if (dir.startsWith("/") && dir.length() != 1) { - ret.append(dir.substring(1)); - } - else if (dir.length() != 0) { - ret.append(dir); - } + String dir = af.getDirectory(); + if (dir != null) { + if ("file".equals(af.getProtocol())) { + if (dir.startsWith("/") && dir.length() != 1) { + ret.append(dir.substring(1)); + } + else { + ret.append(dir); + } + } + else { + // also prepend host name to the path + ret.append(af.getHost() + "/" + dir); + } } - else { - // also prepend host name to the path - ret.append(af.getHost() + "/" + af.getDir()); - } } super.post(stack); } Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/OutFileDirs.java =================================================================== --- branches/release-0.94/src/org/griphyn/vdl/karajan/lib/OutFileDirs.java 2013-07-29 04:35:49 UTC (rev 6673) +++ branches/release-0.94/src/org/griphyn/vdl/karajan/lib/OutFileDirs.java 2013-07-29 05:58:47 UTC (rev 6674) @@ -51,18 +51,20 @@ DSHandle leaf = handle.getField(p); String fname = VDLFunction.filename(leaf)[0]; AbsFile af = new AbsFile(fname); - if ("file".equals(af.getProtocol())) { - String dir = af.getDir(); - if (dir.startsWith("/") && dir.length() != 1) { - ret.append(dir.substring(1)); + String dir = af.getDirectory(); + if (dir != null) { + if ("file".equals(af.getProtocol())) { + if (dir.startsWith("/") && dir.length() != 1) { + ret.append(dir.substring(1)); + } + else { + ret.append(dir); + } } - else if (dir.length() != 0) { - ret.append(dir); + else { + ret.add(af.getHost() + "/" + dir); } } - else { - ret.append(af.getHost() + "/" + af.getDir()); - } } } catch (Exception e) { Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/PathUtils.java =================================================================== --- branches/release-0.94/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2013-07-29 04:35:49 UTC (rev 6673) +++ branches/release-0.94/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2013-07-29 05:58:47 UTC (rev 6674) @@ -39,7 +39,7 @@ public String vdl_dirname(VariableStack stack) throws ExecutionException { String path = TypeUtil.toString(PATH.getValue(stack)); - return new AbsFile(path).getDir(); + return new AbsFile(path).getDirectory(); } static { @@ -48,13 +48,15 @@ public String vdl_reldirname(VariableStack stack) throws ExecutionException { String path = TypeUtil.toString(PATH.getValue(stack)); - String dir = new AbsFile(path).getDir(); - if (dir.startsWith("/")) { - return dir.substring(1); + String dir = new AbsFile(path).getDirectory(); + if (dir != null) { + if (dir.startsWith("/")) { + return dir.substring(1); + } + else { + return dir; + } } - else { - return dir; - } } static { Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java =================================================================== --- branches/release-0.94/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java 2013-07-29 04:35:49 UTC (rev 6673) +++ branches/release-0.94/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java 2013-07-29 05:58:47 UTC (rev 6674) @@ -431,7 +431,7 @@ AbstractDataNode n = (AbstractDataNode) PA_FILE.getRawValue(stack); n.waitFor(); String name = VDLFunction.filename(n)[0]; - String result = new AbsFile(name).getDir(); + String result = new AbsFile(name).getDirectory(); return new RootDataNode(Types.STRING, result); } Modified: branches/release-0.94/src/org/griphyn/vdl/mapping/AbsFile.java =================================================================== --- branches/release-0.94/src/org/griphyn/vdl/mapping/AbsFile.java 2013-07-29 04:35:49 UTC (rev 6673) +++ branches/release-0.94/src/org/griphyn/vdl/mapping/AbsFile.java 2013-07-29 05:58:47 UTC (rev 6674) @@ -31,72 +31,43 @@ import org.globus.cog.abstraction.impl.file.FileResourceCache; import org.globus.cog.abstraction.interfaces.FileResource; import org.globus.cog.abstraction.interfaces.GridFile; +import org.globus.cog.abstraction.interfaces.RemoteFile; import org.globus.cog.abstraction.interfaces.Service; -public class AbsFile implements GeneralizedFileFormat { - private final String protocol; - private final String host; - private final String path; - private String dir, name; +public class AbsFile extends RemoteFile implements GeneralizedFileFormat { public AbsFile(String url) { - int pi = url.indexOf("://"); - if (pi == -1) { - protocol = "file"; - host = "localhost"; - path = url; - } - else { - protocol = url.substring(0, pi); - if (protocol.equals("file")) { - host = "localhost"; - String rp = url.substring(pi + 3); - if (rp.startsWith("localhost/")) { - rp = rp.substring("localhost/".length()); - } - path = rp; - } - else { - int si = url.indexOf('/', pi + 3); - if (si == -1) { - host = url.substring(pi + 3); - path = ""; - } - else { - host = url.substring(pi + 3, si); - path = url.substring(si + 1); - } - } - } - initDirAndName(); + super(url); } - private void initDirAndName() { - int di = path.lastIndexOf('/'); - if (di == 0) { - dir = "/"; + public AbsFile(String protocol, String host, String path) { + super(protocol, host, path); + } + + public AbsFile(String protocol, String host, int port, String dir, String name) { + super(protocol, host, port, dir, name); + } + + public AbsFile(String protocol, String host, int port, String path) { + super(protocol, host, port, path); + } + + @Override + protected void parse(String str) { + super.parse(str); + if (getProtocol() == null) { + setProtocol("file"); } - else if (di > 0) { - dir = path.substring(0, di); + if (getHost() == null) { + setHost("localhost"); } - else { - dir = ""; - } - name = path.substring(di + 1); } - public AbsFile(String protocol, String host, String path) { - this.protocol = protocol; - this.host = host; - this.path = path; - initDirAndName(); - } - - protected FileResource getFileResource() throws IOException { + protected FileResource getFileResource() throws IOException { Service s = new ServiceImpl(); - s.setProvider(protocol); + s.setProvider(getProtocol()); s.setType(Service.FILE_OPERATION); - s.setServiceContact(new ServiceContactImpl(host)); + s.setServiceContact(new ServiceContactImpl(getHost(), getPort())); try { return FileResourceCache.getDefault().getResource(s); } @@ -113,7 +84,7 @@ try { FileResource fr = getFileResource(); try { - return fr.exists(path); + return fr.exists(getPath()); } finally { releaseResource(fr); @@ -126,15 +97,48 @@ } private static final AbsFile[] FILE_ARRAY = new AbsFile[0]; + + public List listDirectories(FilenameFilter filter) { + try { + FileResource fr = getFileResource(); + try { + String protocol = getProtocol(); + String host = getHost(); + int port = getPort(); + String dir = getPath(); + List l = new ArrayList(); + for (GridFile gf : fr.list(dir)) { + AbsFile f = new AbsFile(protocol, host, port, dir, gf.getName()); + // f.getDirectory() cannot be null since dir cannot be null since getPath() returns + // a non-null string + if (gf.isDirectory() && (filter == null || filter.accept(new File(f.getDirectory()), f.getName()))) { + l.add(f); + } + } + return l; + } + finally { + releaseResource(fr); + } + } + catch (Exception e) { + // TODO this should be a proper exception + throw new RuntimeException(e); + } + } public AbsFile[] listFiles(FilenameFilter filter) { try { FileResource fr = getFileResource(); try { + String protocol = getProtocol(); + String host = getHost(); + int port = getPort(); + String dir = getPath(); List l = new ArrayList(); - for (GridFile gf : fr.list(path)) { - AbsFile f = new AbsFile(protocol, host, gf.getAbsolutePathName()); - if (filter == null || filter.accept(new File(f.getDir()), f.getName())) { + for (GridFile gf : fr.list(dir)) { + AbsFile f = new AbsFile(protocol, host, port, dir, gf.getName()); + if (filter == null || filter.accept(new File(f.getDirectory()), f.getName())) { l.add(f); } } @@ -150,64 +154,16 @@ } } - public String getName() { - return name; - } - - public String getDir() { - return dir; - } - - public String getProtocol() { - return protocol; - } - - public String getHost() { - return host; - } - - public String getPath() { - return path; - } - - public boolean isAbsolute() { - return !path.isEmpty() && path.startsWith("/"); - } - public String getType() { return "file"; } - public String getURIAsString() { - return protocol + "://" + host + '/' + path; - } - - public String toString() { - return getURIAsString(); - } - public void clean() { try { - getFileResource().deleteFile(path); + getFileResource().deleteFile(getPath()); } catch (Exception e) { throw new RuntimeException(e); } } - - @Override - public boolean equals(Object obj) { - if (obj instanceof AbsFile) { - AbsFile a = (AbsFile) obj; - return protocol.equals(a.protocol) && host.equals(a.host) && path.equals(a.path); - } - else { - return false; - } - } - - @Override - public int hashCode() { - return protocol.hashCode() + host.hashCode() + path.hashCode(); - } } From hategan at ci.uchicago.edu Mon Jul 29 01:01:01 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 29 Jul 2013 01:01:01 -0500 (CDT) Subject: [Swift-commit] r6675 - branches/release-0.94/src/org/griphyn/vdl/karajan/lib Message-ID: <20130729060101.957F59CC90@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-29 01:01:00 -0500 (Mon, 29 Jul 2013) New Revision: 6675 Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/OutFileDirs.java Log: fixed merge problem Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/OutFileDirs.java =================================================================== --- branches/release-0.94/src/org/griphyn/vdl/karajan/lib/OutFileDirs.java 2013-07-29 05:58:47 UTC (rev 6674) +++ branches/release-0.94/src/org/griphyn/vdl/karajan/lib/OutFileDirs.java 2013-07-29 06:01:00 UTC (rev 6675) @@ -62,7 +62,7 @@ } } else { - ret.add(af.getHost() + "/" + dir); + ret.append(af.getHost() + "/" + dir); } } } From hategan at ci.uchicago.edu Mon Jul 29 01:08:53 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 29 Jul 2013 01:08:53 -0500 (CDT) Subject: [Swift-commit] r6676 - in branches/release-0.94/src: . org/griphyn/vdl/karajan/lib Message-ID: <20130729060853.D533B9CC90@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-29 01:08:45 -0500 (Mon, 29 Jul 2013) New Revision: 6676 Modified: branches/release-0.94/src/ branches/release-0.94/src/org/griphyn/vdl/karajan/lib/PathUtils.java Log: fixed merge problem Property changes on: branches/release-0.94/src ___________________________________________________________________ Added: svn:mergeinfo + /trunk/src:6673 Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/PathUtils.java =================================================================== --- branches/release-0.94/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2013-07-29 06:01:00 UTC (rev 6675) +++ branches/release-0.94/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2013-07-29 06:08:45 UTC (rev 6676) @@ -57,6 +57,7 @@ return dir; } } + return ""; } static { From hategan at ci.uchicago.edu Mon Jul 29 01:13:15 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 29 Jul 2013 01:13:15 -0500 (CDT) Subject: [Swift-commit] r6677 - in trunk/src/org/griphyn/vdl/karajan/monitor/monitors: http swing Message-ID: <20130729061315.ABE829CC90@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-29 01:13:14 -0500 (Mon, 29 Jul 2013) New Revision: 6677 Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/http/HTTPServer.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GridView.java Log: java 6 compatibility Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/http/HTTPServer.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/http/HTTPServer.java 2013-07-29 06:08:45 UTC (rev 6676) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/http/HTTPServer.java 2013-07-29 06:13:14 UTC (rev 6677) @@ -69,7 +69,7 @@ public void start() throws IOException { channel = ServerSocketChannel.open(); - channel.bind(new InetSocketAddress(port)); + channel.socket().bind(new InetSocketAddress(port)); logger.info("HTTPMonitor server created"); Thread t = new Thread(this); t.setDaemon(true); Modified: trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GridView.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GridView.java 2013-07-29 06:08:45 UTC (rev 6676) +++ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GridView.java 2013-07-29 06:13:14 UTC (rev 6677) @@ -341,7 +341,7 @@ } double pos = (double) v / range; tree.splitPosition = pos; - getParent().revalidate(); + getParent().invalidate(); getParent().repaint(); } From hategan at ci.uchicago.edu Mon Jul 29 01:43:39 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 29 Jul 2013 01:43:39 -0500 (CDT) Subject: [Swift-commit] r6678 - branches/release-0.94/src/org/griphyn/vdl/karajan/lib Message-ID: <20130729064339.4D3019CC90@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-29 01:43:38 -0500 (Mon, 29 Jul 2013) New Revision: 6678 Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/PathUtils.java Log: those two need to return non-null, otherwise it is interpreted as nothing to return Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/PathUtils.java =================================================================== --- branches/release-0.94/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2013-07-29 06:13:14 UTC (rev 6677) +++ branches/release-0.94/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2013-07-29 06:43:38 UTC (rev 6678) @@ -39,7 +39,13 @@ public String vdl_dirname(VariableStack stack) throws ExecutionException { String path = TypeUtil.toString(PATH.getValue(stack)); - return new AbsFile(path).getDirectory(); + String dir = new AbsFile(path).getDirectory(); + if (dir == null) { + return ""; + } + else { + return dir; + } } static { @@ -57,7 +63,7 @@ return dir; } } - return ""; + return ""; } static { From davidk at ci.uchicago.edu Mon Jul 29 08:06:53 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Mon, 29 Jul 2013 08:06:53 -0500 (CDT) Subject: [Swift-commit] r6679 - in branches/release-0.94/tests/sites: . local local-coasters Message-ID: <20130729130653.4A0C59CC9E@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-29 08:06:51 -0500 (Mon, 29 Jul 2013) New Revision: 6679 Added: branches/release-0.94/tests/sites/local-coasters/ branches/release-0.94/tests/sites/local-coasters/200-cp.check.sh branches/release-0.94/tests/sites/local-coasters/200-cp.clean.sh branches/release-0.94/tests/sites/local-coasters/200-cp.setup.sh branches/release-0.94/tests/sites/local-coasters/200-cp.swift branches/release-0.94/tests/sites/local-coasters/201-cp.check.sh branches/release-0.94/tests/sites/local-coasters/201-cp.clean.sh branches/release-0.94/tests/sites/local-coasters/201-cp.setup.sh branches/release-0.94/tests/sites/local-coasters/201-cp.swift branches/release-0.94/tests/sites/local-coasters/README.txt branches/release-0.94/tests/sites/local-coasters/sites.template.xml branches/release-0.94/tests/sites/local-coasters/tc.template.data branches/release-0.94/tests/sites/local-coasters/title.txt branches/release-0.94/tests/sites/local/ branches/release-0.94/tests/sites/local/001-catsn-local.check.sh branches/release-0.94/tests/sites/local/001-catsn-local.setup.sh branches/release-0.94/tests/sites/local/001-catsn-local.swift branches/release-0.94/tests/sites/local/001-catsn-local.timeout branches/release-0.94/tests/sites/local/catsn.0001.out.expected branches/release-0.94/tests/sites/local/catsn.0002.out.expected branches/release-0.94/tests/sites/local/catsn.0003.out.expected branches/release-0.94/tests/sites/local/catsn.0004.out.expected branches/release-0.94/tests/sites/local/catsn.0005.out.expected branches/release-0.94/tests/sites/local/catsn.0006.out.expected branches/release-0.94/tests/sites/local/catsn.0007.out.expected branches/release-0.94/tests/sites/local/catsn.0008.out.expected branches/release-0.94/tests/sites/local/catsn.0009.out.expected branches/release-0.94/tests/sites/local/catsn.0010.out.expected branches/release-0.94/tests/sites/local/data.txt branches/release-0.94/tests/sites/local/sites.template.xml branches/release-0.94/tests/sites/local/tc.template.data branches/release-0.94/tests/sites/local/title.txt Log: Local and local-coasters sites Added: branches/release-0.94/tests/sites/local/001-catsn-local.check.sh =================================================================== --- branches/release-0.94/tests/sites/local/001-catsn-local.check.sh (rev 0) +++ branches/release-0.94/tests/sites/local/001-catsn-local.check.sh 2013-07-29 13:06:51 UTC (rev 6679) @@ -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: branches/release-0.94/tests/sites/local/001-catsn-local.check.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/sites/local/001-catsn-local.setup.sh =================================================================== --- branches/release-0.94/tests/sites/local/001-catsn-local.setup.sh (rev 0) +++ branches/release-0.94/tests/sites/local/001-catsn-local.setup.sh 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1,4 @@ +#!/bin/bash + +cp -v $GROUP/data.txt . || exit 1 +cp -v $GROUP/*expected . || exit 1 Property changes on: branches/release-0.94/tests/sites/local/001-catsn-local.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/sites/local/001-catsn-local.swift =================================================================== --- branches/release-0.94/tests/sites/local/001-catsn-local.swift (rev 0) +++ branches/release-0.94/tests/sites/local/001-catsn-local.swift 2013-07-29 13:06:51 UTC (rev 6679) @@ -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); +} Added: branches/release-0.94/tests/sites/local/001-catsn-local.timeout =================================================================== --- branches/release-0.94/tests/sites/local/001-catsn-local.timeout (rev 0) +++ branches/release-0.94/tests/sites/local/001-catsn-local.timeout 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1 @@ +30 Added: branches/release-0.94/tests/sites/local/catsn.0001.out.expected =================================================================== --- branches/release-0.94/tests/sites/local/catsn.0001.out.expected (rev 0) +++ branches/release-0.94/tests/sites/local/catsn.0001.out.expected 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1 @@ +Hello world Added: branches/release-0.94/tests/sites/local/catsn.0002.out.expected =================================================================== --- branches/release-0.94/tests/sites/local/catsn.0002.out.expected (rev 0) +++ branches/release-0.94/tests/sites/local/catsn.0002.out.expected 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1 @@ +Hello world Added: branches/release-0.94/tests/sites/local/catsn.0003.out.expected =================================================================== --- branches/release-0.94/tests/sites/local/catsn.0003.out.expected (rev 0) +++ branches/release-0.94/tests/sites/local/catsn.0003.out.expected 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1 @@ +Hello world Added: branches/release-0.94/tests/sites/local/catsn.0004.out.expected =================================================================== --- branches/release-0.94/tests/sites/local/catsn.0004.out.expected (rev 0) +++ branches/release-0.94/tests/sites/local/catsn.0004.out.expected 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1 @@ +Hello world Added: branches/release-0.94/tests/sites/local/catsn.0005.out.expected =================================================================== --- branches/release-0.94/tests/sites/local/catsn.0005.out.expected (rev 0) +++ branches/release-0.94/tests/sites/local/catsn.0005.out.expected 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1 @@ +Hello world Added: branches/release-0.94/tests/sites/local/catsn.0006.out.expected =================================================================== --- branches/release-0.94/tests/sites/local/catsn.0006.out.expected (rev 0) +++ branches/release-0.94/tests/sites/local/catsn.0006.out.expected 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1 @@ +Hello world Added: branches/release-0.94/tests/sites/local/catsn.0007.out.expected =================================================================== --- branches/release-0.94/tests/sites/local/catsn.0007.out.expected (rev 0) +++ branches/release-0.94/tests/sites/local/catsn.0007.out.expected 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1 @@ +Hello world Added: branches/release-0.94/tests/sites/local/catsn.0008.out.expected =================================================================== --- branches/release-0.94/tests/sites/local/catsn.0008.out.expected (rev 0) +++ branches/release-0.94/tests/sites/local/catsn.0008.out.expected 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1 @@ +Hello world Added: branches/release-0.94/tests/sites/local/catsn.0009.out.expected =================================================================== --- branches/release-0.94/tests/sites/local/catsn.0009.out.expected (rev 0) +++ branches/release-0.94/tests/sites/local/catsn.0009.out.expected 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1 @@ +Hello world Added: branches/release-0.94/tests/sites/local/catsn.0010.out.expected =================================================================== --- branches/release-0.94/tests/sites/local/catsn.0010.out.expected (rev 0) +++ branches/release-0.94/tests/sites/local/catsn.0010.out.expected 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1 @@ +Hello world Added: branches/release-0.94/tests/sites/local/data.txt =================================================================== --- branches/release-0.94/tests/sites/local/data.txt (rev 0) +++ branches/release-0.94/tests/sites/local/data.txt 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1 @@ +Hello world Added: branches/release-0.94/tests/sites/local/sites.template.xml =================================================================== --- branches/release-0.94/tests/sites/local/sites.template.xml (rev 0) +++ branches/release-0.94/tests/sites/local/sites.template.xml 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1,9 @@ + + + + + 10000 + .31 + _WORK_ + + Added: branches/release-0.94/tests/sites/local/tc.template.data =================================================================== --- branches/release-0.94/tests/sites/local/tc.template.data (rev 0) +++ branches/release-0.94/tests/sites/local/tc.template.data 2013-07-29 13:06:51 UTC (rev 6679) @@ -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 + Added: branches/release-0.94/tests/sites/local/title.txt =================================================================== --- branches/release-0.94/tests/sites/local/title.txt (rev 0) +++ branches/release-0.94/tests/sites/local/title.txt 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1 @@ +Local Configuration Test Added: branches/release-0.94/tests/sites/local-coasters/200-cp.check.sh =================================================================== --- branches/release-0.94/tests/sites/local-coasters/200-cp.check.sh (rev 0) +++ branches/release-0.94/tests/sites/local-coasters/200-cp.check.sh 2013-07-29 13:06:51 UTC (rev 6679) @@ -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 Property changes on: branches/release-0.94/tests/sites/local-coasters/200-cp.check.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/sites/local-coasters/200-cp.clean.sh =================================================================== --- branches/release-0.94/tests/sites/local-coasters/200-cp.clean.sh (rev 0) +++ branches/release-0.94/tests/sites/local-coasters/200-cp.clean.sh 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1,7 @@ +#!/bin/sh + +set -x + +rm -rv 200-output.txt || exit 1 + +exit 0 Property changes on: branches/release-0.94/tests/sites/local-coasters/200-cp.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/sites/local-coasters/200-cp.setup.sh =================================================================== --- branches/release-0.94/tests/sites/local-coasters/200-cp.setup.sh (rev 0) +++ branches/release-0.94/tests/sites/local-coasters/200-cp.setup.sh 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1,10 @@ +#!/bin/sh + +set -x + +{ + uname -a + date +} > 200-input.txt + +exit 0 Property changes on: branches/release-0.94/tests/sites/local-coasters/200-cp.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/sites/local-coasters/200-cp.swift =================================================================== --- branches/release-0.94/tests/sites/local-coasters/200-cp.swift (rev 0) +++ branches/release-0.94/tests/sites/local-coasters/200-cp.swift 2013-07-29 13:06:51 UTC (rev 6679) @@ -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); Added: branches/release-0.94/tests/sites/local-coasters/201-cp.check.sh =================================================================== --- branches/release-0.94/tests/sites/local-coasters/201-cp.check.sh (rev 0) +++ branches/release-0.94/tests/sites/local-coasters/201-cp.check.sh 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1,9 @@ +#!/bin/sh + +set -x + +COUNT=$( ls 201-output* | wc -l ) + +[[ $COUNT == 40 ]] || exit 1 + +exit 0 Property changes on: branches/release-0.94/tests/sites/local-coasters/201-cp.check.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/sites/local-coasters/201-cp.clean.sh =================================================================== --- branches/release-0.94/tests/sites/local-coasters/201-cp.clean.sh (rev 0) +++ branches/release-0.94/tests/sites/local-coasters/201-cp.clean.sh 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1,7 @@ +#!/bin/sh + +set -x + +rm -rv 201-output-[12]-*.txt || exit 1 + +exit 0 Property changes on: branches/release-0.94/tests/sites/local-coasters/201-cp.clean.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/sites/local-coasters/201-cp.setup.sh =================================================================== --- branches/release-0.94/tests/sites/local-coasters/201-cp.setup.sh (rev 0) +++ branches/release-0.94/tests/sites/local-coasters/201-cp.setup.sh 2013-07-29 13:06:51 UTC (rev 6679) @@ -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 Property changes on: branches/release-0.94/tests/sites/local-coasters/201-cp.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/sites/local-coasters/201-cp.swift =================================================================== --- branches/release-0.94/tests/sites/local-coasters/201-cp.swift (rev 0) +++ branches/release-0.94/tests/sites/local-coasters/201-cp.swift 2013-07-29 13:06:51 UTC (rev 6679) @@ -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); +} Property changes on: branches/release-0.94/tests/sites/local-coasters/201-cp.swift ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/sites/local-coasters/README.txt =================================================================== --- branches/release-0.94/tests/sites/local-coasters/README.txt (rev 0) +++ branches/release-0.94/tests/sites/local-coasters/README.txt 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1,5 @@ + +Tests for basic Coasters functionality on local machine + +200 series: Simple jobs, simple settings + Added: branches/release-0.94/tests/sites/local-coasters/sites.template.xml =================================================================== --- branches/release-0.94/tests/sites/local-coasters/sites.template.xml (rev 0) +++ branches/release-0.94/tests/sites/local-coasters/sites.template.xml 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1,24 @@ + + + + + + _WORK_ + file + + + + + + _HOST_ + 2.55 + 10000 + 4 + 8 + 1000 + 1 + 4 + _WORK_ + + + Added: branches/release-0.94/tests/sites/local-coasters/tc.template.data =================================================================== --- branches/release-0.94/tests/sites/local-coasters/tc.template.data (rev 0) +++ branches/release-0.94/tests/sites/local-coasters/tc.template.data 2013-07-29 13:06:51 UTC (rev 6679) @@ -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 Added: branches/release-0.94/tests/sites/local-coasters/title.txt =================================================================== --- branches/release-0.94/tests/sites/local-coasters/title.txt (rev 0) +++ branches/release-0.94/tests/sites/local-coasters/title.txt 2013-07-29 13:06:51 UTC (rev 6679) @@ -0,0 +1 @@ +Local coasters From swift at ci.uchicago.edu Mon Jul 29 11:30:02 2013 From: swift at ci.uchicago.edu (swift at ci.uchicago.edu) Date: Mon, 29 Jul 2013 11:30:02 -0500 (CDT) Subject: [Swift-commit] cog r3753 Message-ID: <20130729163002.DA6B08D0009F@bridled.ci.uchicago.edu> ------------------------------------------------------------------------ r3753 | hategan | 2013-07-29 11:27:25 -0500 (Mon, 29 Jul 2013) | 1 line fixed compilation error ------------------------------------------------------------------------ Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/CoasterFileRequestHandler.java =================================================================== --- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/CoasterFileRequestHandler.java (revision 3752) +++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/CoasterFileRequestHandler.java (working copy) @@ -28,6 +28,10 @@ return new File(CWD, rf.getPath()); } } + + public static File normalize(String path) { + return normalize(new RemoteFile(path)); + } protected String getProtocol(String file) { int index = file.indexOf(':'); From davidk at ci.uchicago.edu Mon Jul 29 15:15:16 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Mon, 29 Jul 2013 15:15:16 -0500 (CDT) Subject: [Swift-commit] r6680 - SwiftTutorials Message-ID: <20130729201516.711549CC90@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-29 15:15:16 -0500 (Mon, 29 Jul 2013) New Revision: 6680 Added: SwiftTutorials/UofC_2013-07-29-uc3/ Log: Location for UC3 demo scripts From davidk at ci.uchicago.edu Mon Jul 29 15:22:35 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Mon, 29 Jul 2013 15:22:35 -0500 (CDT) Subject: [Swift-commit] r6681 - in SwiftTutorials/UofC_2013-07-29-uc3: . part01 part02 part03 part04 part05 part06 part07 part08 part09 part10 Message-ID: <20130729202235.D633E9CC90@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-29 15:22:35 -0500 (Mon, 29 Jul 2013) New Revision: 6681 Added: SwiftTutorials/UofC_2013-07-29-uc3/README SwiftTutorials/UofC_2013-07-29-uc3/part01/ SwiftTutorials/UofC_2013-07-29-uc3/part01/README SwiftTutorials/UofC_2013-07-29-uc3/part01/p1.swift SwiftTutorials/UofC_2013-07-29-uc3/part01/tc SwiftTutorials/UofC_2013-07-29-uc3/part02/ SwiftTutorials/UofC_2013-07-29-uc3/part02/README SwiftTutorials/UofC_2013-07-29-uc3/part02/p2.swift SwiftTutorials/UofC_2013-07-29-uc3/part02/p2b.swift SwiftTutorials/UofC_2013-07-29-uc3/part02/tc SwiftTutorials/UofC_2013-07-29-uc3/part03/ SwiftTutorials/UofC_2013-07-29-uc3/part03/README SwiftTutorials/UofC_2013-07-29-uc3/part03/p3.swift SwiftTutorials/UofC_2013-07-29-uc3/part03/tc SwiftTutorials/UofC_2013-07-29-uc3/part04/ SwiftTutorials/UofC_2013-07-29-uc3/part04/README SwiftTutorials/UofC_2013-07-29-uc3/part04/p4.swift SwiftTutorials/UofC_2013-07-29-uc3/part04/tc SwiftTutorials/UofC_2013-07-29-uc3/part05/ SwiftTutorials/UofC_2013-07-29-uc3/part05/README SwiftTutorials/UofC_2013-07-29-uc3/part05/p5.swift SwiftTutorials/UofC_2013-07-29-uc3/part05/tc SwiftTutorials/UofC_2013-07-29-uc3/part06/ SwiftTutorials/UofC_2013-07-29-uc3/part06/README SwiftTutorials/UofC_2013-07-29-uc3/part06/p6.swift SwiftTutorials/UofC_2013-07-29-uc3/part06/tc SwiftTutorials/UofC_2013-07-29-uc3/part07/ SwiftTutorials/UofC_2013-07-29-uc3/part07/README SwiftTutorials/UofC_2013-07-29-uc3/part07/p7.swift SwiftTutorials/UofC_2013-07-29-uc3/part07/sites.xml SwiftTutorials/UofC_2013-07-29-uc3/part07/tc SwiftTutorials/UofC_2013-07-29-uc3/part08/ SwiftTutorials/UofC_2013-07-29-uc3/part08/apps SwiftTutorials/UofC_2013-07-29-uc3/part08/p00.swift SwiftTutorials/UofC_2013-07-29-uc3/part08/sites.xml SwiftTutorials/UofC_2013-07-29-uc3/part09/ SwiftTutorials/UofC_2013-07-29-uc3/part09/apps SwiftTutorials/UofC_2013-07-29-uc3/part09/p01.swift SwiftTutorials/UofC_2013-07-29-uc3/part09/sites.xml SwiftTutorials/UofC_2013-07-29-uc3/part10/ SwiftTutorials/UofC_2013-07-29-uc3/part10/apps SwiftTutorials/UofC_2013-07-29-uc3/part10/p02.swift SwiftTutorials/UofC_2013-07-29-uc3/part10/sites.xml SwiftTutorials/UofC_2013-07-29-uc3/setup.sh SwiftTutorials/UofC_2013-07-29-uc3/simulate.sh SwiftTutorials/UofC_2013-07-29-uc3/stats.sh Log: Initial commit of scripts for uc3 demo Added: SwiftTutorials/UofC_2013-07-29-uc3/README =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/README (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/README 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,51 @@ +UC3 Swift mini-tutorial + +To set up: + + $ source setup.sh # sets swift config files in $HOME/.swift + + $ swift -version # verify that Swift 0.94 is in your $PATH and functional + +There are 3 example Swift scripts, p00.swift, p01.swift, and p02.swift + +To run: + + $ find data/ # Examine the initial data directory + $ swift p00.swift # Runs 10 simulations + $ find data/ # Examine the results in the data directory + + $ swift p01.swift # Simple workflow: Runs simulations, then analyzes results + $ find data/ # Examine the input data directory + + $ swift p02.swift # More complex workflow with more dependencies + $ find data/ # Examine the input data directory + + +To experiment with the command line parameters of these scripts: + + For p01.swift: + + $ swift p00.swift -nsim=100 -range=100000 + + # Note: you must use the -name=value convention! + + Parameters and their default values for p01.swift: + + nsim 10 # number of simulation programs to run + range 100 # range of the generated random numbers + + For p01.swift: + + nsim 10 # number of simulation programs to run + steps 1 # number of "steps" each simulation (==seconds of runtime) + range 100 # range of the generated random numbers + count 10 # number of random numbers generated per simulation + + For p02.swift: + + nsim 10 # number of simulation programs to run + range 100 # range of the generated random numbers + count 10 # number of random numbers generated per simulation + + (steps value is determined dynamically in p02.swift script) + Added: SwiftTutorials/UofC_2013-07-29-uc3/part01/README =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part01/README (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part01/README 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,40 @@ + +TOPIC: First Swift script - run a "simulation" program, random.sh + + +Verify that random.sh is in your path, and that it works: + +$ which random.sh +$ random.sh + +Study the Swift program: + +$ cat p1.swift + +Examine the tool catalog file: + +$ cat tc + +Run the program: + +$ swift -tc.file tc p1.swift + +Look at the output: + +$ cat _concurrent/* + +Look at the other files generated: + +$ ls -l + +We'll talk more about these files later + +$ cleanup + +Then test the sript a few more times. + +$ swift -tc.file tc p1.swift; cat _concurrent/* + +$ swift -tc.file tc p1.swift; cat _concurrent/* + +$ swift -tc.file tc p1.swift; cat _concurrent/* Added: SwiftTutorials/UofC_2013-07-29-uc3/part01/p1.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part01/p1.swift (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part01/p1.swift 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,8 @@ +type file; + +app (file o) mysim () +{ + random stdout=@filename(o); +} + +file f = mysim(); Added: SwiftTutorials/UofC_2013-07-29-uc3/part01/tc =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part01/tc (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part01/tc 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1 @@ +localhost random random.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part02/README =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part02/README (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part02/README 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,33 @@ + +TOPIC: specifying the output filenames + +Study the Swift program: + +$ cat p2.swift + +Examine the tool catalog file: + +$ cat tc + +Run the program: + +$ swift -tc.file tc p2.swift + +Look at the output: + +$ cat sim.out + +Then test the sript a few more times. + +$ swift -tc.file tc p1.swift; cat sim.out + +$ swift -tc.file tc p1.swift; cat sim.out + +$ swift -tc.file tc p1.swift; cat sim.out + +Things to try: + +- change the output filename + +- add a dir component to the output filename + Added: SwiftTutorials/UofC_2013-07-29-uc3/part02/p2.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part02/p2.swift (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part02/p2.swift 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,9 @@ +type file; + +app (file o) mysim () +{ + random stdout=@filename(o); +} + +file f<"sim.out">; +f = mysim(); Added: SwiftTutorials/UofC_2013-07-29-uc3/part02/p2b.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part02/p2b.swift (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part02/p2b.swift 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,9 @@ +type file; + +app (file o) mysim () +{ + random stdout=@filename(o); +} + +file f<"output/sim.out">; +f = mysim(); Added: SwiftTutorials/UofC_2013-07-29-uc3/part02/tc =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part02/tc (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part02/tc 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1 @@ +localhost random random.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part03/README =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part03/README (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part03/README 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,20 @@ + +TOPIC: run many instances of a "simulation" program in a foreach() loop + + +Run the program: + +$ swift -tc.file tc p3.swift + +Look at the output: + +$ cd _concurrent +$ ls -l +$ cat * + +Look at the order in which the files were written: + +$ ls -lt + +We'll come back to this... + Added: SwiftTutorials/UofC_2013-07-29-uc3/part03/p3.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part03/p3.swift (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part03/p3.swift 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,11 @@ +type file; + +app (file o) mysim () +{ + random stdout=@filename(o); +} + +foreach i in [0:9] { + file f = mysim(); +} + Added: SwiftTutorials/UofC_2013-07-29-uc3/part03/tc =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part03/tc (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part03/tc 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1 @@ +localhost random random.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part04/README =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part04/README (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part04/README 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,42 @@ + +TOPIC: run a program in a foreach() loop with explicitly named output files. + + +Study the program: + +- @strcat() is a Swift builtin function (the @name() form is used for many but not all builtins) + +- Note that @strcat() coerces numeric args to strings + +- <"filename"> was a shorthand for but the latter is more flexible. + +Run the program: + +$ swift -tc.file tc p4.swift + +Look at the output: + +$ cd output +$ ls -l +$ cat * + + +Try: + +- Adjust the script to take the number of simulations to do from the command line + + @arg("argname") returns arguments after the .swift script on the swift command line: + + swift -tc.file tc p4.swift -myarg1=value1 ... + + @arg("argname","default") returns "default" if the argname is not given on the command line + + @toInt() converts strings to integers: + + @toInt(@arg("myArg1")) + + +- trace(expr1,...) traces expressions on stdout. + + Try inserting a few traces. But remember: Swift is *very* concurrent! + Added: SwiftTutorials/UofC_2013-07-29-uc3/part04/p4.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part04/p4.swift (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part04/p4.swift 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,12 @@ +type file; + +app (file o) mysim () +{ + random stdout=@filename(o); +} + +foreach i in [0:9] { + file f ; + f = mysim(); +} + Added: SwiftTutorials/UofC_2013-07-29-uc3/part04/tc =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part04/tc (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part04/tc 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1 @@ +localhost random random.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part05/README =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part05/README (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part05/README 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,51 @@ + + +TOPIC: Add a program that "analyzes" the output the parallel simulations + + +Study the program: + +We added a new app to "analyze" all the simulation outputs: + +app (file o) analyze (file s[]) +{ + average @filenames(s) stdout=@filename(o); +} + +Nots that it expects an array of files as its input, and that +it uses @filenames() to place the names of all the files on +the command line to the "average" program. + +Average does: +-------------------- +#! /bin/sh + +awk ' + +{ sum += $1} + +END { print sum/NR } +' $* +------------------- + + +At the end of the script we insert: + +file stats<"output/average.out">; +stats = analyze(sims); + +...which runs the analysis *after* all the simulations complete. + + +Run the program: + +$ swift -tc.file tc p5.swift + +Look at the output: + +$ cd output +$ ls -l +$ cat sim*.out +$ cat average.out + + Added: SwiftTutorials/UofC_2013-07-29-uc3/part05/p5.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part05/p5.swift (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part05/p5.swift 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,24 @@ +type file; + +app (file o) mysim () +{ + random stdout=@filename(o); +} + +app (file o) analyze (file s[]) +{ + average @filenames(s) stdout=@filename(o); +} + +file sims[]; + +int nsim = @toInt(@arg("nsim","10")); + +foreach i in [0:nsim-1] { + file simout ; + simout = mysim(); + sims[i] = simout; +} + +file stats<"output/average.out">; +stats = analyze(sims); Added: SwiftTutorials/UofC_2013-07-29-uc3/part05/tc =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part05/tc (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part05/tc 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,2 @@ +localhost random random.sh +localhost average avg.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part06/README =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part06/README (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part06/README 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,28 @@ + +TOPIC: add arguments to the "simulation" program +(to control number of steps, range of output, and number of output lines) + + +Test new versions of the "simulation" program: + + random.sh # original + random2.sh [runtime] # runtime in seconds; defaults to 1 sec + random3.sh [runtime] [range] # requests random numbers in {0:range-1} + random4.sh [runtime] [range] [count] # requests "count" random numbers in {0:range} + +p6.swift changes to random2 for the simulation program and adds an argument. + +Run the program: + +$ swift -tc.file tc p6.swift -steps=3 # each simulation takes 3 seconds + +Next we need to use the parallel cluster for our simulations! + +Try: + +- change to random3.sh and add the extra argument "range" + +- change to random4.sh and add yet another argument "count" + + + Added: SwiftTutorials/UofC_2013-07-29-uc3/part06/p6.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part06/p6.swift (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part06/p6.swift 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,25 @@ +type file; + +app (file o) mysim2 (int timesteps) +{ + random2 timesteps stdout=@filename(o); +} + +app (file o) analyze (file s[]) +{ + average @filenames(s) stdout=@filename(o); +} + +file sims[]; +int nsim = @toInt(@arg("nsim","10")); + +int steps = @toInt(@arg("steps","1")); + +foreach i in [0:nsim-1] { + file simout ; + simout = mysim2(steps); + sims[i] = simout; +} + +file stats<"output/average.out">; +stats = analyze(sims); Added: SwiftTutorials/UofC_2013-07-29-uc3/part06/tc =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part06/tc (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part06/tc 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,2 @@ +localhost random2 random2.sh +localhost average avg.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part07/README =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part07/README (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part07/README 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,81 @@ + +TOPIC: Run the "simulations" on the parallel cluster + + +Til now we've been running our "simulations" on the local login host. + +Now we'll run them on the parallel cluster. + +The script will be the same as previous, but we change the tool catalog to +indicate that our "simulation app" (random4.sh) should be run on the +"westmere" partition of the Midway cluster using the "slurm" scheduler: + +We changed file "tc" from: + +localhost random4 random4.sh +localhost average avg.sh + +to: + +westmere random4 random4.sh +localhost average avg.sh + +And we added the "sites.xml" file which specifies two "pools" of resources, +the "local host" pool (which we've been using till now) and the "westmere" pool. + +To run, we now add the sites.xml file to the swift command line: + +$ swift -tc.file tc -sites.file sites.xml p7.swift -steps=10 -range=1000 -count=6 -nsim=100 + +Note that we're now asking for 100 simulations to be run, each of which +is to run for 10 steps (ie 10 seconds). + +The sites file looks like this: + + + + + + + /scratch/midway/{env.USER}/swiftwork + + + + + + + westmere + 12 + + + + 1 + 1 + 1 + 12 + .11 + + + 00:15:00 + 1800 + + + + /scratch/midway/{env.USER}/swiftwork + + + false + 100 + 100 + 10000 + + + + +Try: + +- running more app() calls at once: change jobsPerNode and jobThrottle + +- requesting more than 1 slurm job at once: change slots + +- requesting nodes in units greater than 1: change maxnodes and nodeGranularity Added: SwiftTutorials/UofC_2013-07-29-uc3/part07/p7.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part07/p7.swift (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part07/p7.swift 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,27 @@ +type file; + +app (file o) mysim4 (int timesteps, int range, int count) +{ + random4 timesteps range count stdout=@filename(o); +} + +app (file o) analyze (file s[]) +{ + average @filenames(s) stdout=@filename(o); +} + +file sims[]; +int nsim = @toInt(@arg("nsim", "10")); + +int steps = @toInt(@arg("steps", "1")); +int range = @toInt(@arg("range", "100")); +int count = @toInt(@arg("count", "10")); + +foreach i in [0:nsim-1] { + file simout ; + simout = mysim4(steps,range,count); + sims[i] = simout; +} + +file stats<"output/average.out">; +stats = analyze(sims); Added: SwiftTutorials/UofC_2013-07-29-uc3/part07/sites.xml =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part07/sites.xml (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part07/sites.xml 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,39 @@ + + + + + + /scratch/midway/{env.USER}/swiftwork + + + + + + + westmere + 12 + + + + 1 + 1 + 1 + 12 + .11 + + + 00:15:00 + 1800 + + + + /scratch/midway/{env.USER}/swiftwork + + + false + 100 + 100 + 10000 + + + Added: SwiftTutorials/UofC_2013-07-29-uc3/part07/tc =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part07/tc (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part07/tc 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,2 @@ +westmere random4 random4.sh +localhost average avg.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part08/apps =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part08/apps (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part08/apps 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1 @@ +uc3 sh /bin/sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part08/p00.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part08/p00.swift (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part08/p00.swift 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,28 @@ +type file; + +# Application to be called by this script + +file simulation_script <"simulate.sh">; + +# app() functions for application programs to be called: + +app (file out) simulation (file script, int timesteps, int sim_range) +{ + sh @filename(script) timesteps sim_range stdout=@filename(out); +} + +# Command line params to this script: + +int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run +int range = @toInt(@arg("range", "100")); # range of the generated random numbers + +# Main script and data + +int steps=3; + +tracef("\n*** Script parameters: nsim=%i steps=%i range=%i \n\n", nsim, steps, range); + +foreach i in [0:nsim-1] { + file simout ; + simout = simulation(simulation_script, steps, range); +} Added: SwiftTutorials/UofC_2013-07-29-uc3/part08/sites.xml =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part08/sites.xml (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part08/sites.xml 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,24 @@ + + + + 10.00 + 10000 + 1 + 300 + 00:01:00 + 100 + 100 + 20 + 1 + 1 + "group_friends.{env.USER}" + nonshared + + + regexp("uc3-c*", Machine) + + + . + + + Added: SwiftTutorials/UofC_2013-07-29-uc3/part09/apps =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part09/apps (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part09/apps 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1 @@ +uc3 sh /bin/sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part09/p01.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part09/p01.swift (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part09/p01.swift 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,41 @@ +type file; + +# Applications to be called by this script + +file simulation_script <"simulate.sh">; +file analysis_script <"stats.sh">; + +# app() functions for application programs to be called: + +app (file out) simulation (file script, int timesteps, int sim_range, file bias_file, int scale, int sim_count) +{ + sh @filename(script) timesteps sim_range @filename(bias_file) scale sim_count stdout=@filename(out); +} + +app (file out) analyze (file script, file s[]) +{ + sh @script @filenames(s) stdout=@filename(out); +} + +# Command line params to this script: + +int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run +int steps = @toInt(@arg("steps", "1")); # number of "steps" each simulation (==seconds of runtime) +int range = @toInt(@arg("range", "100")); # range of the generated random numbers +int count = @toInt(@arg("count", "10")); # number of random numbers generated per simulation + +# Main script and data + +tracef("\n*** Script parameters: nsim=%i steps=%i range=%i count=%i\n\n", nsim, steps, range, count); + +file sims[]; # Array of files to hold each simulation output +file bias<"data/bias.dat">; # Input data file to "bias" the numbers: + # 1 line: scale offset ( N = n*scale + offset) +foreach i in [0:nsim-1] { + file simout ; + simout = simulation(simulation_script, steps, range, bias, 100000, count); + sims[i] = simout; +} + +file stats<"data/p01_stats.out">; # Final output file: average of all "simulations" +stats = analyze(analysis_script,sims); Added: SwiftTutorials/UofC_2013-07-29-uc3/part09/sites.xml =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part09/sites.xml (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part09/sites.xml 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,24 @@ + + + + 10.00 + 10000 + 1 + 300 + 00:01:00 + 100 + 100 + 20 + 1 + 1 + "group_friends.{env.USER}" + nonshared + + + regexp("uc3-c*", Machine) + + + . + + + Added: SwiftTutorials/UofC_2013-07-29-uc3/part10/apps =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part10/apps (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part10/apps 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1 @@ +uc3 sh /bin/sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part10/p02.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part10/p02.swift (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part10/p02.swift 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,52 @@ +type file; + +# Applications to be called by this script + +file simulation_script <"simulate.sh">; +file analysis_script <"stats.sh">; + +# app() functions for application programs to be called: + +app (file out) genrand (file script, int timesteps, int sim_range) +{ + sh @filename(script) timesteps sim_range stdout=@filename(out); +} + +app (file out) simulation (file script, int timesteps, int sim_range, file bias_file, int scale, int sim_count) +{ + sh @filename(script) timesteps sim_range @filename(bias_file) scale sim_count stdout=@filename(out); +} + +app (file out) analyze (file script, file s[]) +{ + sh @script @filenames(s) stdout=@filename(out); +} + +# Command line params to this script: + +int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run +int range = @toInt(@arg("range", "100")); # range of the generated random numbers +int count = @toInt(@arg("count", "10")); # number of random numbers generated per simulation + +# Main script and data + +tracef("\n*** Script parameters: nsim=%i range=%i count=%i\n\n", nsim, range, count); + +file bias<"data/dynamic_bias.dat">; # Dynamically generated bias for simulation ensemble + +bias = genrand(simulation_script, 1, 1000); + +file sims[]; # Array of files to hold each simulation output + +foreach i in [0:nsim-1] { + + int steps = readData(genrand(simulation_script, 1, 5)); + tracef(" for simulation[%i] steps=%i\n", i, steps+1); + + file simout ; + simout = simulation(simulation_script, steps+1, range, bias, 100000, count); + sims[i] = simout; +} + +file stats<"data/p02_stats.out">; # Final output file: average of all "simulations" +stats = analyze(analysis_script,sims); Added: SwiftTutorials/UofC_2013-07-29-uc3/part10/sites.xml =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part10/sites.xml (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part10/sites.xml 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,24 @@ + + + + 10.00 + 10000 + 1 + 300 + 00:01:00 + 100 + 100 + 20 + 1 + 1 + "group_friends.{env.USER}" + nonshared + + + regexp("uc3-c*", Machine) + + + . + + + Added: SwiftTutorials/UofC_2013-07-29-uc3/setup.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/setup.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/setup.sh 2013-07-29 20:22:35 UTC (rev 6681) @@ -0,0 +1,55 @@ +#export SBATCH_RESERVATION=osg # for Midway + +export SWIFT_HEAP_MAX=4G + +# SWIFTREL=/home/wilde/swift/src/0.94/cog/modules/swift/dist/rc5.1/bin + +if which swift >& /dev/null; then + : +else + echo "Trying to load swift module:" + module load swift + if which swift >& /dev/null; then + Swift loaded from module + else + echo "Cant find a swift to run" + return + fi +fi + +echo -e "\\nUsing swift release from: \\c" +which swift +swift -version + +# export PATHPREFIX="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../bin" && pwd )" +# echo +# echo Setting PATHPREFIX=$PATHPREFIX + +if [ -e $HOME/.swift ]; then + savedotswift=$(mktemp -d $HOME/.swift.save.XXXX) + echo Saving $HOME/.swift in $savedotswift + mv $HOME/.swift/* $savedotswift +else + mkdir -p $HOME/.swift +fi + +cat >>$HOME/.swift/swift.properties < Author: hategan Date: 2013-07-29 15:46:09 -0500 (Mon, 29 Jul 2013) New Revision: 6682 Modified: trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java trunk/src/org/griphyn/vdl/mapping/AbsFile.java Log: fixed problems introduced by last few commits Modified: trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2013-07-29 20:22:35 UTC (rev 6681) +++ trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2013-07-29 20:46:09 UTC (rev 6682) @@ -40,7 +40,13 @@ @Override public Object function(Stack stack) { - return new AbsFile(path.getValue(stack)).getDirectory(); + String dir = new AbsFile(path.getValue(stack)).getDirectory(); + if (dir == null) { + return "."; + } + else { + return dir; + } } } @@ -59,7 +65,7 @@ return remotePathName(dir); } else { - return null; + return ""; } } } Modified: trunk/src/org/griphyn/vdl/mapping/AbsFile.java =================================================================== --- trunk/src/org/griphyn/vdl/mapping/AbsFile.java 2013-07-29 20:22:35 UTC (rev 6681) +++ trunk/src/org/griphyn/vdl/mapping/AbsFile.java 2013-07-29 20:46:09 UTC (rev 6682) @@ -45,7 +45,7 @@ } public AbsFile(String protocol, String host, int port, String dir, String name) { - super(protocol, host, port, dir, name); + super(protocol, host, port, dir, name); } public AbsFile(String protocol, String host, int port, String path) { @@ -62,7 +62,7 @@ setHost("localhost"); } } - + protected FileResource getFileResource() throws IOException { Service s = new ServiceImpl(); s.setProvider(getProtocol()); From davidk at ci.uchicago.edu Mon Jul 29 16:03:07 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Mon, 29 Jul 2013 16:03:07 -0500 (CDT) Subject: [Swift-commit] r6683 - in SwiftTutorials/UofC_2013-07-29-uc3: . part01 part02 part03 part04 part05 part06 part08 Message-ID: <20130729210307.EC6089CC9E@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-29 16:03:07 -0500 (Mon, 29 Jul 2013) New Revision: 6683 Added: SwiftTutorials/UofC_2013-07-29-uc3/part01/apps SwiftTutorials/UofC_2013-07-29-uc3/part01/clean.sh SwiftTutorials/UofC_2013-07-29-uc3/part01/sites.xml SwiftTutorials/UofC_2013-07-29-uc3/part02/apps SwiftTutorials/UofC_2013-07-29-uc3/part02/clean.sh SwiftTutorials/UofC_2013-07-29-uc3/part02/sites.xml SwiftTutorials/UofC_2013-07-29-uc3/part03/apps SwiftTutorials/UofC_2013-07-29-uc3/part03/clean.sh SwiftTutorials/UofC_2013-07-29-uc3/part03/sites.xml SwiftTutorials/UofC_2013-07-29-uc3/part04/apps SwiftTutorials/UofC_2013-07-29-uc3/part04/clean.sh SwiftTutorials/UofC_2013-07-29-uc3/part04/sites.xml SwiftTutorials/UofC_2013-07-29-uc3/part05/apps SwiftTutorials/UofC_2013-07-29-uc3/part05/clean.sh SwiftTutorials/UofC_2013-07-29-uc3/part05/sites.xml SwiftTutorials/UofC_2013-07-29-uc3/part06/apps SwiftTutorials/UofC_2013-07-29-uc3/part06/clean.sh SwiftTutorials/UofC_2013-07-29-uc3/part06/sites.xml SwiftTutorials/UofC_2013-07-29-uc3/part08/p8.swift Removed: SwiftTutorials/UofC_2013-07-29-uc3/part01/tc SwiftTutorials/UofC_2013-07-29-uc3/part02/p2b.swift SwiftTutorials/UofC_2013-07-29-uc3/part02/tc SwiftTutorials/UofC_2013-07-29-uc3/part03/tc SwiftTutorials/UofC_2013-07-29-uc3/part04/tc SwiftTutorials/UofC_2013-07-29-uc3/part05/tc SwiftTutorials/UofC_2013-07-29-uc3/part06/tc SwiftTutorials/UofC_2013-07-29-uc3/part07/ SwiftTutorials/UofC_2013-07-29-uc3/part08/p00.swift Modified: SwiftTutorials/UofC_2013-07-29-uc3/part01/p1.swift SwiftTutorials/UofC_2013-07-29-uc3/part02/p2.swift SwiftTutorials/UofC_2013-07-29-uc3/part03/p3.swift SwiftTutorials/UofC_2013-07-29-uc3/part04/p4.swift SwiftTutorials/UofC_2013-07-29-uc3/part05/p5.swift SwiftTutorials/UofC_2013-07-29-uc3/part06/p6.swift SwiftTutorials/UofC_2013-07-29-uc3/setup.sh Log: Fixes/modifications for parts 01-07 Copied: SwiftTutorials/UofC_2013-07-29-uc3/part01/apps (from rev 6681, SwiftTutorials/UofC_2013-07-29-uc3/part01/tc) =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part01/apps (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part01/apps 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1 @@ +localhost simulate simulate.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part01/clean.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part01/clean.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part01/clean.sh 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1 @@ +rm -rf *.log *.rlog *.d *.kml *.swiftx _concurrent Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part01/clean.sh ___________________________________________________________________ Added: svn:executable + * Modified: SwiftTutorials/UofC_2013-07-29-uc3/part01/p1.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part01/p1.swift 2013-07-29 20:46:09 UTC (rev 6682) +++ SwiftTutorials/UofC_2013-07-29-uc3/part01/p1.swift 2013-07-29 21:03:07 UTC (rev 6683) @@ -2,7 +2,7 @@ app (file o) mysim () { - random stdout=@filename(o); + simulate stdout=@filename(o); } file f = mysim(); Added: SwiftTutorials/UofC_2013-07-29-uc3/part01/sites.xml =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part01/sites.xml (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part01/sites.xml 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1,9 @@ + + + + 0 + 10000 + + {env.HOME}/work + + Deleted: SwiftTutorials/UofC_2013-07-29-uc3/part01/tc =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part01/tc 2013-07-29 20:46:09 UTC (rev 6682) +++ SwiftTutorials/UofC_2013-07-29-uc3/part01/tc 2013-07-29 21:03:07 UTC (rev 6683) @@ -1 +0,0 @@ -localhost random random.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part02/apps =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part02/apps (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part02/apps 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1 @@ +localhost simulate simulate.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part02/clean.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part02/clean.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part02/clean.sh 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1 @@ +rm -rf *.log *.rlog *.d *.kml *.swiftx *.out _concurrent Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part02/clean.sh ___________________________________________________________________ Added: svn:executable + * Modified: SwiftTutorials/UofC_2013-07-29-uc3/part02/p2.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part02/p2.swift 2013-07-29 20:46:09 UTC (rev 6682) +++ SwiftTutorials/UofC_2013-07-29-uc3/part02/p2.swift 2013-07-29 21:03:07 UTC (rev 6683) @@ -2,8 +2,8 @@ app (file o) mysim () { - random stdout=@filename(o); + simulate stdout=@filename(o); } -file f<"sim.out">; +file f <"sim.out">; f = mysim(); Deleted: SwiftTutorials/UofC_2013-07-29-uc3/part02/p2b.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part02/p2b.swift 2013-07-29 20:46:09 UTC (rev 6682) +++ SwiftTutorials/UofC_2013-07-29-uc3/part02/p2b.swift 2013-07-29 21:03:07 UTC (rev 6683) @@ -1,9 +0,0 @@ -type file; - -app (file o) mysim () -{ - random stdout=@filename(o); -} - -file f<"output/sim.out">; -f = mysim(); Added: SwiftTutorials/UofC_2013-07-29-uc3/part02/sites.xml =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part02/sites.xml (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part02/sites.xml 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1,9 @@ + + + + 0 + 10000 + + {env.HOME}/work + + Deleted: SwiftTutorials/UofC_2013-07-29-uc3/part02/tc =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part02/tc 2013-07-29 20:46:09 UTC (rev 6682) +++ SwiftTutorials/UofC_2013-07-29-uc3/part02/tc 2013-07-29 21:03:07 UTC (rev 6683) @@ -1 +0,0 @@ -localhost random random.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part03/apps =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part03/apps (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part03/apps 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1 @@ +localhost simulate simulate.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part03/clean.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part03/clean.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part03/clean.sh 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1 @@ +rm -rf *.log *.rlog *.d *.kml *.swiftx *.out _concurrent Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part03/clean.sh ___________________________________________________________________ Added: svn:executable + * Modified: SwiftTutorials/UofC_2013-07-29-uc3/part03/p3.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part03/p3.swift 2013-07-29 20:46:09 UTC (rev 6682) +++ SwiftTutorials/UofC_2013-07-29-uc3/part03/p3.swift 2013-07-29 21:03:07 UTC (rev 6683) @@ -2,7 +2,7 @@ app (file o) mysim () { - random stdout=@filename(o); + simulate stdout=@filename(o); } foreach i in [0:9] { Added: SwiftTutorials/UofC_2013-07-29-uc3/part03/sites.xml =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part03/sites.xml (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part03/sites.xml 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1,9 @@ + + + + 0 + 10000 + + {env.HOME}/work + + Deleted: SwiftTutorials/UofC_2013-07-29-uc3/part03/tc =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part03/tc 2013-07-29 20:46:09 UTC (rev 6682) +++ SwiftTutorials/UofC_2013-07-29-uc3/part03/tc 2013-07-29 21:03:07 UTC (rev 6683) @@ -1 +0,0 @@ -localhost random random.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part04/apps =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part04/apps (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part04/apps 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1 @@ +localhost simulate simulate.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part04/clean.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part04/clean.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part04/clean.sh 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1 @@ +rm -rf *.log *.rlog *.d *.kml *.swiftx output _concurrent Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part04/clean.sh ___________________________________________________________________ Added: svn:executable + * Modified: SwiftTutorials/UofC_2013-07-29-uc3/part04/p4.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part04/p4.swift 2013-07-29 20:46:09 UTC (rev 6682) +++ SwiftTutorials/UofC_2013-07-29-uc3/part04/p4.swift 2013-07-29 21:03:07 UTC (rev 6683) @@ -2,7 +2,7 @@ app (file o) mysim () { - random stdout=@filename(o); + simulate stdout=@filename(o); } foreach i in [0:9] { Added: SwiftTutorials/UofC_2013-07-29-uc3/part04/sites.xml =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part04/sites.xml (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part04/sites.xml 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1,9 @@ + + + + 0 + 10000 + + {env.HOME}/work + + Deleted: SwiftTutorials/UofC_2013-07-29-uc3/part04/tc =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part04/tc 2013-07-29 20:46:09 UTC (rev 6682) +++ SwiftTutorials/UofC_2013-07-29-uc3/part04/tc 2013-07-29 21:03:07 UTC (rev 6683) @@ -1 +0,0 @@ -localhost random random.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part05/apps =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part05/apps (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part05/apps 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1,2 @@ +localhost simulate simulate.sh +localhost stats stats.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part05/clean.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part05/clean.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part05/clean.sh 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1 @@ +rm -rf *.log *.rlog *.d *.kml *.swiftx output _concurrent Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part05/clean.sh ___________________________________________________________________ Added: svn:executable + * Modified: SwiftTutorials/UofC_2013-07-29-uc3/part05/p5.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part05/p5.swift 2013-07-29 20:46:09 UTC (rev 6682) +++ SwiftTutorials/UofC_2013-07-29-uc3/part05/p5.swift 2013-07-29 21:03:07 UTC (rev 6683) @@ -2,12 +2,12 @@ app (file o) mysim () { - random stdout=@filename(o); + simulate stdout=@filename(o); } app (file o) analyze (file s[]) { - average @filenames(s) stdout=@filename(o); + stats @filenames(s) stdout=@filename(o); } file sims[]; Added: SwiftTutorials/UofC_2013-07-29-uc3/part05/sites.xml =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part05/sites.xml (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part05/sites.xml 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1,9 @@ + + + + 0 + 10000 + + {env.HOME}/work + + Deleted: SwiftTutorials/UofC_2013-07-29-uc3/part05/tc =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part05/tc 2013-07-29 20:46:09 UTC (rev 6682) +++ SwiftTutorials/UofC_2013-07-29-uc3/part05/tc 2013-07-29 21:03:07 UTC (rev 6683) @@ -1,2 +0,0 @@ -localhost random random.sh -localhost average avg.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part06/apps =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part06/apps (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part06/apps 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1,2 @@ +localhost simulate simulate.sh +localhost stats stats.sh Added: SwiftTutorials/UofC_2013-07-29-uc3/part06/clean.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part06/clean.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part06/clean.sh 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1 @@ +rm -rf *.log *.rlog *.d *.kml *.swiftx output _concurrent Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part06/clean.sh ___________________________________________________________________ Added: svn:executable + * Modified: SwiftTutorials/UofC_2013-07-29-uc3/part06/p6.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part06/p6.swift 2013-07-29 20:46:09 UTC (rev 6682) +++ SwiftTutorials/UofC_2013-07-29-uc3/part06/p6.swift 2013-07-29 21:03:07 UTC (rev 6683) @@ -1,23 +1,22 @@ type file; -app (file o) mysim2 (int timesteps) +app (file o) mysim (int timesteps) { - random2 timesteps stdout=@filename(o); + simulate timesteps stdout=@filename(o); } app (file o) analyze (file s[]) { - average @filenames(s) stdout=@filename(o); + stats @filenames(s) stdout=@filename(o); } file sims[]; int nsim = @toInt(@arg("nsim","10")); - int steps = @toInt(@arg("steps","1")); foreach i in [0:nsim-1] { file simout ; - simout = mysim2(steps); + simout = mysim(steps); sims[i] = simout; } Added: SwiftTutorials/UofC_2013-07-29-uc3/part06/sites.xml =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part06/sites.xml (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part06/sites.xml 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1,9 @@ + + + + 0 + 10000 + + {env.HOME}/work + + Deleted: SwiftTutorials/UofC_2013-07-29-uc3/part06/tc =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part06/tc 2013-07-29 20:46:09 UTC (rev 6682) +++ SwiftTutorials/UofC_2013-07-29-uc3/part06/tc 2013-07-29 21:03:07 UTC (rev 6683) @@ -1,2 +0,0 @@ -localhost random2 random2.sh -localhost average avg.sh Deleted: SwiftTutorials/UofC_2013-07-29-uc3/part08/p00.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part08/p00.swift 2013-07-29 20:46:09 UTC (rev 6682) +++ SwiftTutorials/UofC_2013-07-29-uc3/part08/p00.swift 2013-07-29 21:03:07 UTC (rev 6683) @@ -1,28 +0,0 @@ -type file; - -# Application to be called by this script - -file simulation_script <"simulate.sh">; - -# app() functions for application programs to be called: - -app (file out) simulation (file script, int timesteps, int sim_range) -{ - sh @filename(script) timesteps sim_range stdout=@filename(out); -} - -# Command line params to this script: - -int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run -int range = @toInt(@arg("range", "100")); # range of the generated random numbers - -# Main script and data - -int steps=3; - -tracef("\n*** Script parameters: nsim=%i steps=%i range=%i \n\n", nsim, steps, range); - -foreach i in [0:nsim-1] { - file simout ; - simout = simulation(simulation_script, steps, range); -} Copied: SwiftTutorials/UofC_2013-07-29-uc3/part08/p8.swift (from rev 6681, SwiftTutorials/UofC_2013-07-29-uc3/part08/p00.swift) =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part08/p8.swift (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part08/p8.swift 2013-07-29 21:03:07 UTC (rev 6683) @@ -0,0 +1,28 @@ +type file; + +# Application to be called by this script + +file simulation_script <"simulate.sh">; + +# app() functions for application programs to be called: + +app (file out) simulation (file script, int timesteps, int sim_range) +{ + sh @filename(script) timesteps sim_range stdout=@filename(out); +} + +# Command line params to this script: + +int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run +int range = @toInt(@arg("range", "100")); # range of the generated random numbers + +# Main script and data + +int steps=3; + +tracef("\n*** Script parameters: nsim=%i steps=%i range=%i \n\n", nsim, steps, range); + +foreach i in [0:nsim-1] { + file simout ; + simout = simulation(simulation_script, steps, range); +} Modified: SwiftTutorials/UofC_2013-07-29-uc3/setup.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/setup.sh 2013-07-29 20:46:09 UTC (rev 6682) +++ SwiftTutorials/UofC_2013-07-29-uc3/setup.sh 2013-07-29 21:03:07 UTC (rev 6683) @@ -1,9 +1,5 @@ -#export SBATCH_RESERVATION=osg # for Midway - export SWIFT_HEAP_MAX=4G -# SWIFTREL=/home/wilde/swift/src/0.94/cog/modules/swift/dist/rc5.1/bin - if which swift >& /dev/null; then : else @@ -21,9 +17,9 @@ which swift swift -version -# export PATHPREFIX="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../bin" && pwd )" -# echo -# echo Setting PATHPREFIX=$PATHPREFIX +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +echo Adding $DIR to PATH: +PATH=$DIR:$PATH if [ -e $HOME/.swift ]; then savedotswift=$(mktemp -d $HOME/.swift.save.XXXX) @@ -37,8 +33,8 @@ # Properties for Swift Tutorial -sites.file=$HOME/.swift/sites.xml -tc.file=$HOME/.swift/apps +sites.file=sites.xml +tc.file=apps wrapperlog.always.transfer=true sitedir.keep=true From davidk at ci.uchicago.edu Mon Jul 29 16:52:38 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Mon, 29 Jul 2013 16:52:38 -0500 (CDT) Subject: [Swift-commit] r6684 - SwiftTutorials/UofC_2013-07-29-uc3 Message-ID: <20130729215238.E22389CC9E@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-29 16:52:38 -0500 (Mon, 29 Jul 2013) New Revision: 6684 Added: SwiftTutorials/UofC_2013-07-29-uc3/part07/ Log: From davidk at ci.uchicago.edu Mon Jul 29 16:58:55 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Mon, 29 Jul 2013 16:58:55 -0500 (CDT) Subject: [Swift-commit] r6685 - in SwiftTutorials/UofC_2013-07-29-uc3: . part07 part08 part09 Message-ID: <20130729215855.DB4E39CC90@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-29 16:58:55 -0500 (Mon, 29 Jul 2013) New Revision: 6685 Added: SwiftTutorials/UofC_2013-07-29-uc3/part07/apps SwiftTutorials/UofC_2013-07-29-uc3/part07/clean.sh SwiftTutorials/UofC_2013-07-29-uc3/part07/p7.swift SwiftTutorials/UofC_2013-07-29-uc3/part07/simulate.sh SwiftTutorials/UofC_2013-07-29-uc3/part07/sites.xml SwiftTutorials/UofC_2013-07-29-uc3/part07/stats.sh SwiftTutorials/UofC_2013-07-29-uc3/part08/bias.dat SwiftTutorials/UofC_2013-07-29-uc3/part08/clean.sh SwiftTutorials/UofC_2013-07-29-uc3/part08/simulate.sh SwiftTutorials/UofC_2013-07-29-uc3/part08/stats.sh SwiftTutorials/UofC_2013-07-29-uc3/part09/dynamic_bias.dat SwiftTutorials/UofC_2013-07-29-uc3/part09/p9.swift Removed: SwiftTutorials/UofC_2013-07-29-uc3/part10/ Modified: SwiftTutorials/UofC_2013-07-29-uc3/part08/apps SwiftTutorials/UofC_2013-07-29-uc3/part08/p8.swift SwiftTutorials/UofC_2013-07-29-uc3/part09/apps Log: Parts 07-09 Added: SwiftTutorials/UofC_2013-07-29-uc3/part07/apps =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part07/apps (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part07/apps 2013-07-29 21:58:55 UTC (rev 6685) @@ -0,0 +1 @@ +uc3 sh /bin/bash Added: SwiftTutorials/UofC_2013-07-29-uc3/part07/clean.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part07/clean.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part07/clean.sh 2013-07-29 21:58:55 UTC (rev 6685) @@ -0,0 +1 @@ +link ../clean.sh \ No newline at end of file Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part07/clean.sh ___________________________________________________________________ Added: svn:special + * Added: SwiftTutorials/UofC_2013-07-29-uc3/part07/p7.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part07/p7.swift (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part07/p7.swift 2013-07-29 21:58:55 UTC (rev 6685) @@ -0,0 +1,28 @@ +type file; + +# Application to be called by this script + +file simulation_script <"simulate.sh">; + +# app() functions for application programs to be called: + +app (file out) simulation (file script, int timesteps, int sim_range) +{ + bash @filename(script) timesteps sim_range stdout=@filename(out); +} + +# Command line params to this script: + +int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run +int range = @toInt(@arg("range", "100")); # range of the generated random numbers + +# Main script and data + +int steps=3; + +tracef("\n*** Script parameters: nsim=%i steps=%i range=%i \n\n", nsim, steps, range); + +foreach i in [0:nsim-1] { + file simout ; + simout = simulation(simulation_script, steps, range); +} Added: SwiftTutorials/UofC_2013-07-29-uc3/part07/simulate.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part07/simulate.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part07/simulate.sh 2013-07-29 21:58:55 UTC (rev 6685) @@ -0,0 +1 @@ +link ../simulate.sh \ No newline at end of file Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part07/simulate.sh ___________________________________________________________________ Added: svn:special + * Added: SwiftTutorials/UofC_2013-07-29-uc3/part07/sites.xml =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part07/sites.xml (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part07/sites.xml 2013-07-29 21:58:55 UTC (rev 6685) @@ -0,0 +1,24 @@ + + + + 10.00 + 10000 + 1 + 300 + 00:01:00 + 100 + 100 + 20 + 1 + 1 + "group_friends.{env.USER}" + nonshared + + + regexp("uc3-c*", Machine) + + + . + + + Added: SwiftTutorials/UofC_2013-07-29-uc3/part07/stats.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part07/stats.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part07/stats.sh 2013-07-29 21:58:55 UTC (rev 6685) @@ -0,0 +1 @@ +link ../stats.sh \ No newline at end of file Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part07/stats.sh ___________________________________________________________________ Added: svn:special + * Modified: SwiftTutorials/UofC_2013-07-29-uc3/part08/apps =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part08/apps 2013-07-29 21:52:38 UTC (rev 6684) +++ SwiftTutorials/UofC_2013-07-29-uc3/part08/apps 2013-07-29 21:58:55 UTC (rev 6685) @@ -1 +1 @@ -uc3 sh /bin/sh +uc3 sh /bin/bash Added: SwiftTutorials/UofC_2013-07-29-uc3/part08/bias.dat =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part08/bias.dat (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part08/bias.dat 2013-07-29 21:58:55 UTC (rev 6685) @@ -0,0 +1 @@ +123 Added: SwiftTutorials/UofC_2013-07-29-uc3/part08/clean.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part08/clean.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part08/clean.sh 2013-07-29 21:58:55 UTC (rev 6685) @@ -0,0 +1 @@ +link ../clean.sh \ No newline at end of file Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part08/clean.sh ___________________________________________________________________ Added: svn:special + * Modified: SwiftTutorials/UofC_2013-07-29-uc3/part08/p8.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part08/p8.swift 2013-07-29 21:52:38 UTC (rev 6684) +++ SwiftTutorials/UofC_2013-07-29-uc3/part08/p8.swift 2013-07-29 21:58:55 UTC (rev 6685) @@ -1,28 +1,41 @@ type file; -# Application to be called by this script +# Applications to be called by this script file simulation_script <"simulate.sh">; +file analysis_script <"stats.sh">; # app() functions for application programs to be called: -app (file out) simulation (file script, int timesteps, int sim_range) +app (file out) simulation (file script, int timesteps, int sim_range, file bias_file, int scale, int sim_count) { - sh @filename(script) timesteps sim_range stdout=@filename(out); + sh @filename(script) timesteps sim_range @filename(bias_file) scale sim_count stdout=@filename(out); } +app (file out) analyze (file script, file s[]) +{ + sh @script @filenames(s) stdout=@filename(out); +} + # Command line params to this script: int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run +int steps = @toInt(@arg("steps", "1")); # number of "steps" each simulation (==seconds of runtime) int range = @toInt(@arg("range", "100")); # range of the generated random numbers +int count = @toInt(@arg("count", "10")); # number of random numbers generated per simulation # Main script and data -int steps=3; +tracef("\n*** Script parameters: nsim=%i steps=%i range=%i count=%i\n\n", nsim, steps, range, count); -tracef("\n*** Script parameters: nsim=%i steps=%i range=%i \n\n", nsim, steps, range); - +file sims[]; # Array of files to hold each simulation output +file bias<"bias.dat">; # Input data file to "bias" the numbers: + # 1 line: scale offset ( N = n*scale + offset) foreach i in [0:nsim-1] { - file simout ; - simout = simulation(simulation_script, steps, range); + file simout ; + simout = simulation(simulation_script, steps, range, bias, 100000, count); + sims[i] = simout; } + +file stats<"data/p01_stats.out">; # Final output file: average of all "simulations" +stats = analyze(analysis_script,sims); Added: SwiftTutorials/UofC_2013-07-29-uc3/part08/simulate.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part08/simulate.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part08/simulate.sh 2013-07-29 21:58:55 UTC (rev 6685) @@ -0,0 +1 @@ +link ../simulate.sh \ No newline at end of file Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part08/simulate.sh ___________________________________________________________________ Added: svn:special + * Added: SwiftTutorials/UofC_2013-07-29-uc3/part08/stats.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part08/stats.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part08/stats.sh 2013-07-29 21:58:55 UTC (rev 6685) @@ -0,0 +1 @@ +link ../stats.sh \ No newline at end of file Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part08/stats.sh ___________________________________________________________________ Added: svn:special + * Modified: SwiftTutorials/UofC_2013-07-29-uc3/part09/apps =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part09/apps 2013-07-29 21:52:38 UTC (rev 6684) +++ SwiftTutorials/UofC_2013-07-29-uc3/part09/apps 2013-07-29 21:58:55 UTC (rev 6685) @@ -1 +1 @@ -uc3 sh /bin/sh +uc3 sh /bin/bash Added: SwiftTutorials/UofC_2013-07-29-uc3/part09/dynamic_bias.dat =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part09/dynamic_bias.dat (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part09/dynamic_bias.dat 2013-07-29 21:58:55 UTC (rev 6685) @@ -0,0 +1 @@ +342 Added: SwiftTutorials/UofC_2013-07-29-uc3/part09/p9.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part09/p9.swift (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part09/p9.swift 2013-07-29 21:58:55 UTC (rev 6685) @@ -0,0 +1,52 @@ +type file; + +# Applications to be called by this script + +file simulation_script <"simulate.sh">; +file analysis_script <"stats.sh">; + +# app() functions for application programs to be called: + +app (file out) genrand (file script, int timesteps, int sim_range) +{ + sh @filename(script) timesteps sim_range stdout=@filename(out); +} + +app (file out) simulation (file script, int timesteps, int sim_range, file bias_file, int scale, int sim_count) +{ + sh @filename(script) timesteps sim_range @filename(bias_file) scale sim_count stdout=@filename(out); +} + +app (file out) analyze (file script, file s[]) +{ + sh @script @filenames(s) stdout=@filename(out); +} + +# Command line params to this script: + +int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run +int range = @toInt(@arg("range", "100")); # range of the generated random numbers +int count = @toInt(@arg("count", "10")); # number of random numbers generated per simulation + +# Main script and data + +tracef("\n*** Script parameters: nsim=%i range=%i count=%i\n\n", nsim, range, count); + +file bias<"dynamic_bias.dat">; # Dynamically generated bias for simulation ensemble + +bias = genrand(simulation_script, 1, 1000); + +file sims[]; # Array of files to hold each simulation output + +foreach i in [0:nsim-1] { + + int steps = readData(genrand(simulation_script, 1, 5)); + tracef(" for simulation[%i] steps=%i\n", i, steps+1); + + file simout ; + simout = simulation(simulation_script, steps+1, range, bias, 100000, count); + sims[i] = simout; +} + +file stats<"data/p02_stats.out">; # Final output file: average of all "simulations" +stats = analyze(analysis_script,sims); From davidk at ci.uchicago.edu Mon Jul 29 17:39:03 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Mon, 29 Jul 2013 17:39:03 -0500 (CDT) Subject: [Swift-commit] r6686 - in SwiftTutorials/UofC_2013-07-29-uc3: part07 part08 part09 Message-ID: <20130729223903.EC3239CC90@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-29 17:39:03 -0500 (Mon, 29 Jul 2013) New Revision: 6686 Added: SwiftTutorials/UofC_2013-07-29-uc3/part07/clean.sh SwiftTutorials/UofC_2013-07-29-uc3/part09/clean.sh SwiftTutorials/UofC_2013-07-29-uc3/part09/simulate.sh SwiftTutorials/UofC_2013-07-29-uc3/part09/stats.sh Removed: SwiftTutorials/UofC_2013-07-29-uc3/part07/clean.sh SwiftTutorials/UofC_2013-07-29-uc3/part08/clean.sh SwiftTutorials/UofC_2013-07-29-uc3/part09/p01.swift Modified: SwiftTutorials/UofC_2013-07-29-uc3/part07/p7.swift SwiftTutorials/UofC_2013-07-29-uc3/part07/sites.xml SwiftTutorials/UofC_2013-07-29-uc3/part08/p8.swift SwiftTutorials/UofC_2013-07-29-uc3/part08/sites.xml SwiftTutorials/UofC_2013-07-29-uc3/part09/dynamic_bias.dat SwiftTutorials/UofC_2013-07-29-uc3/part09/p9.swift SwiftTutorials/UofC_2013-07-29-uc3/part09/sites.xml Log: Let uc3 flock to osg to get cores more quickly Deleted: SwiftTutorials/UofC_2013-07-29-uc3/part07/clean.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part07/clean.sh 2013-07-29 21:58:55 UTC (rev 6685) +++ SwiftTutorials/UofC_2013-07-29-uc3/part07/clean.sh 2013-07-29 22:39:03 UTC (rev 6686) @@ -1 +0,0 @@ -link ../clean.sh \ No newline at end of file Added: SwiftTutorials/UofC_2013-07-29-uc3/part07/clean.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part07/clean.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part07/clean.sh 2013-07-29 22:39:03 UTC (rev 6686) @@ -0,0 +1 @@ +rm -rf *.log *.rlog *.d *.kml *.swiftx output _concurrent Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part07/clean.sh ___________________________________________________________________ Added: svn:executable + * Modified: SwiftTutorials/UofC_2013-07-29-uc3/part07/p7.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part07/p7.swift 2013-07-29 21:58:55 UTC (rev 6685) +++ SwiftTutorials/UofC_2013-07-29-uc3/part07/p7.swift 2013-07-29 22:39:03 UTC (rev 6686) @@ -8,7 +8,7 @@ app (file out) simulation (file script, int timesteps, int sim_range) { - bash @filename(script) timesteps sim_range stdout=@filename(out); + sh @filename(script) timesteps sim_range stdout=@filename(out); } # Command line params to this script: Modified: SwiftTutorials/UofC_2013-07-29-uc3/part07/sites.xml =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part07/sites.xml 2013-07-29 21:58:55 UTC (rev 6685) +++ SwiftTutorials/UofC_2013-07-29-uc3/part07/sites.xml 2013-07-29 22:39:03 UTC (rev 6686) @@ -15,7 +15,7 @@ nonshared - regexp("uc3-c*", Machine) + . Deleted: SwiftTutorials/UofC_2013-07-29-uc3/part08/clean.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part08/clean.sh 2013-07-29 21:58:55 UTC (rev 6685) +++ SwiftTutorials/UofC_2013-07-29-uc3/part08/clean.sh 2013-07-29 22:39:03 UTC (rev 6686) @@ -1 +0,0 @@ -link ../clean.sh \ No newline at end of file Modified: SwiftTutorials/UofC_2013-07-29-uc3/part08/p8.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part08/p8.swift 2013-07-29 21:58:55 UTC (rev 6685) +++ SwiftTutorials/UofC_2013-07-29-uc3/part08/p8.swift 2013-07-29 22:39:03 UTC (rev 6686) @@ -37,5 +37,5 @@ sims[i] = simout; } -file stats<"data/p01_stats.out">; # Final output file: average of all "simulations" +file stats<"output/stats.out">; # Final output file: average of all "simulations" stats = analyze(analysis_script,sims); Modified: SwiftTutorials/UofC_2013-07-29-uc3/part08/sites.xml =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part08/sites.xml 2013-07-29 21:58:55 UTC (rev 6685) +++ SwiftTutorials/UofC_2013-07-29-uc3/part08/sites.xml 2013-07-29 22:39:03 UTC (rev 6686) @@ -15,7 +15,7 @@ nonshared - regexp("uc3-c*", Machine) + . Added: SwiftTutorials/UofC_2013-07-29-uc3/part09/clean.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part09/clean.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part09/clean.sh 2013-07-29 22:39:03 UTC (rev 6686) @@ -0,0 +1 @@ +rm -rf *.log *.rlog *.d *.kml *.swiftx output _concurrent Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part09/clean.sh ___________________________________________________________________ Added: svn:executable + * Modified: SwiftTutorials/UofC_2013-07-29-uc3/part09/dynamic_bias.dat =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part09/dynamic_bias.dat 2013-07-29 21:58:55 UTC (rev 6685) +++ SwiftTutorials/UofC_2013-07-29-uc3/part09/dynamic_bias.dat 2013-07-29 22:39:03 UTC (rev 6686) @@ -1 +1 @@ -342 +477 Deleted: SwiftTutorials/UofC_2013-07-29-uc3/part09/p01.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part09/p01.swift 2013-07-29 21:58:55 UTC (rev 6685) +++ SwiftTutorials/UofC_2013-07-29-uc3/part09/p01.swift 2013-07-29 22:39:03 UTC (rev 6686) @@ -1,41 +0,0 @@ -type file; - -# Applications to be called by this script - -file simulation_script <"simulate.sh">; -file analysis_script <"stats.sh">; - -# app() functions for application programs to be called: - -app (file out) simulation (file script, int timesteps, int sim_range, file bias_file, int scale, int sim_count) -{ - sh @filename(script) timesteps sim_range @filename(bias_file) scale sim_count stdout=@filename(out); -} - -app (file out) analyze (file script, file s[]) -{ - sh @script @filenames(s) stdout=@filename(out); -} - -# Command line params to this script: - -int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run -int steps = @toInt(@arg("steps", "1")); # number of "steps" each simulation (==seconds of runtime) -int range = @toInt(@arg("range", "100")); # range of the generated random numbers -int count = @toInt(@arg("count", "10")); # number of random numbers generated per simulation - -# Main script and data - -tracef("\n*** Script parameters: nsim=%i steps=%i range=%i count=%i\n\n", nsim, steps, range, count); - -file sims[]; # Array of files to hold each simulation output -file bias<"data/bias.dat">; # Input data file to "bias" the numbers: - # 1 line: scale offset ( N = n*scale + offset) -foreach i in [0:nsim-1] { - file simout ; - simout = simulation(simulation_script, steps, range, bias, 100000, count); - sims[i] = simout; -} - -file stats<"data/p01_stats.out">; # Final output file: average of all "simulations" -stats = analyze(analysis_script,sims); Modified: SwiftTutorials/UofC_2013-07-29-uc3/part09/p9.swift =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part09/p9.swift 2013-07-29 21:58:55 UTC (rev 6685) +++ SwiftTutorials/UofC_2013-07-29-uc3/part09/p9.swift 2013-07-29 22:39:03 UTC (rev 6686) @@ -48,5 +48,5 @@ sims[i] = simout; } -file stats<"data/p02_stats.out">; # Final output file: average of all "simulations" +file stats<"output/stats.out">; # Final output file: average of all "simulations" stats = analyze(analysis_script,sims); Added: SwiftTutorials/UofC_2013-07-29-uc3/part09/simulate.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part09/simulate.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part09/simulate.sh 2013-07-29 22:39:03 UTC (rev 6686) @@ -0,0 +1 @@ +link ../simulate.sh \ No newline at end of file Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part09/simulate.sh ___________________________________________________________________ Added: svn:special + * Modified: SwiftTutorials/UofC_2013-07-29-uc3/part09/sites.xml =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part09/sites.xml 2013-07-29 21:58:55 UTC (rev 6685) +++ SwiftTutorials/UofC_2013-07-29-uc3/part09/sites.xml 2013-07-29 22:39:03 UTC (rev 6686) @@ -15,7 +15,7 @@ nonshared - regexp("uc3-c*", Machine) + . Added: SwiftTutorials/UofC_2013-07-29-uc3/part09/stats.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part09/stats.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part09/stats.sh 2013-07-29 22:39:03 UTC (rev 6686) @@ -0,0 +1 @@ +link ../stats.sh \ No newline at end of file Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part09/stats.sh ___________________________________________________________________ Added: svn:special + * From davidk at ci.uchicago.edu Mon Jul 29 17:45:25 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Mon, 29 Jul 2013 17:45:25 -0500 (CDT) Subject: [Swift-commit] r6687 - in SwiftTutorials/UofC_2013-07-29-uc3: part08 part09 Message-ID: <20130729224525.C41AA9CC90@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-29 17:45:25 -0500 (Mon, 29 Jul 2013) New Revision: 6687 Added: SwiftTutorials/UofC_2013-07-29-uc3/part08/clean.sh Modified: SwiftTutorials/UofC_2013-07-29-uc3/part09/dynamic_bias.dat Log: Add missing cleanup script Added: SwiftTutorials/UofC_2013-07-29-uc3/part08/clean.sh =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part08/clean.sh (rev 0) +++ SwiftTutorials/UofC_2013-07-29-uc3/part08/clean.sh 2013-07-29 22:45:25 UTC (rev 6687) @@ -0,0 +1 @@ +rm -rf *.log *.rlog *.d *.kml *.swiftx output _concurrent Property changes on: SwiftTutorials/UofC_2013-07-29-uc3/part08/clean.sh ___________________________________________________________________ Added: svn:executable + * Modified: SwiftTutorials/UofC_2013-07-29-uc3/part09/dynamic_bias.dat =================================================================== --- SwiftTutorials/UofC_2013-07-29-uc3/part09/dynamic_bias.dat 2013-07-29 22:39:03 UTC (rev 6686) +++ SwiftTutorials/UofC_2013-07-29-uc3/part09/dynamic_bias.dat 2013-07-29 22:45:25 UTC (rev 6687) @@ -1 +1 @@ -477 +362 From davidk at ci.uchicago.edu Tue Jul 30 10:34:39 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Tue, 30 Jul 2013 10:34:39 -0500 (CDT) Subject: [Swift-commit] r6688 - SwiftTutorials Message-ID: <20130730153439.B89D0178884@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-30 10:34:38 -0500 (Tue, 30 Jul 2013) New Revision: 6688 Added: SwiftTutorials/uc3/ Removed: SwiftTutorials/UofC_2013-07-29-uc3/ Log: Renaming From yadunandb at ci.uchicago.edu Tue Jul 30 13:31:15 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Tue, 30 Jul 2013 13:31:15 -0500 (CDT) Subject: [Swift-commit] r6689 - in SwiftTutorials/uc3: . part10 Message-ID: <20130730183115.F374C178884@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-30 13:31:15 -0500 (Tue, 30 Jul 2013) New Revision: 6689 Added: SwiftTutorials/uc3/part10/ SwiftTutorials/uc3/part10/apps SwiftTutorials/uc3/part10/clean.sh SwiftTutorials/uc3/part10/dynamic_bias.dat SwiftTutorials/uc3/part10/find_host.sh SwiftTutorials/uc3/part10/p10.swift SwiftTutorials/uc3/part10/simulate.sh SwiftTutorials/uc3/part10/sites.xml SwiftTutorials/uc3/part10/stats.sh Log: Adding P10 of tutorial - Configuring the sites.file to select specific remote sites. Added: SwiftTutorials/uc3/part10/apps =================================================================== --- SwiftTutorials/uc3/part10/apps (rev 0) +++ SwiftTutorials/uc3/part10/apps 2013-07-30 18:31:15 UTC (rev 6689) @@ -0,0 +1 @@ +uc3 sh /bin/bash Added: SwiftTutorials/uc3/part10/clean.sh =================================================================== --- SwiftTutorials/uc3/part10/clean.sh (rev 0) +++ SwiftTutorials/uc3/part10/clean.sh 2013-07-30 18:31:15 UTC (rev 6689) @@ -0,0 +1 @@ +rm -rf *.log *.rlog *.d *.kml *.swiftx output _concurrent Property changes on: SwiftTutorials/uc3/part10/clean.sh ___________________________________________________________________ Added: svn:executable + * Added: SwiftTutorials/uc3/part10/dynamic_bias.dat =================================================================== --- SwiftTutorials/uc3/part10/dynamic_bias.dat (rev 0) +++ SwiftTutorials/uc3/part10/dynamic_bias.dat 2013-07-30 18:31:15 UTC (rev 6689) @@ -0,0 +1 @@ +781 Added: SwiftTutorials/uc3/part10/find_host.sh =================================================================== --- SwiftTutorials/uc3/part10/find_host.sh (rev 0) +++ SwiftTutorials/uc3/part10/find_host.sh 2013-07-30 18:31:15 UTC (rev 6689) @@ -0,0 +1,20 @@ +#!/bin/bash + + +LAST_LOG=`ls -t | grep p10.*log | head -1` +if [ ! -f "$LAST_LOG" ] +then + echo "No recent logs found" + exit 0 +fi +echo "debug2" +hosts=`grep "host=" $LAST_LOG | grep "Cpu worker started" | grep -oh "host=.*\ " | sort | uniq` + +for host in $hosts +do + echo $host | grep "uc3-c.*" >/dev/null && echo "Cycle seeder : $host" + echo $host | grep "uct2-c.*" >/dev/null && echo "Cycle seeder : $host" + echo $host | grep "iut2-c.*" >/dev/null && echo "Cycle seeder : $host" + echo $host | grep "uct3-c.*" >/dev/null && echo "Cycle seeder : $host" + echo $host | grep "appcloud.*" >/dev/null && echo "Cycle seeder : $host" +done \ No newline at end of file Property changes on: SwiftTutorials/uc3/part10/find_host.sh ___________________________________________________________________ Added: svn:executable + * Added: SwiftTutorials/uc3/part10/p10.swift =================================================================== --- SwiftTutorials/uc3/part10/p10.swift (rev 0) +++ SwiftTutorials/uc3/part10/p10.swift 2013-07-30 18:31:15 UTC (rev 6689) @@ -0,0 +1,52 @@ +type file; + +# Applications to be called by this script + +file simulation_script <"simulate.sh">; +file analysis_script <"stats.sh">; + +# app() functions for application programs to be called: + +app (file out) genrand (file script, int timesteps, int sim_range) +{ + sh @filename(script) timesteps sim_range stdout=@filename(out); +} + +app (file out) simulation (file script, int timesteps, int sim_range, file bias_file, int scale, int sim_count) +{ + sh @filename(script) timesteps sim_range @filename(bias_file) scale sim_count stdout=@filename(out); +} + +app (file out) analyze (file script, file s[]) +{ + sh @script @filenames(s) stdout=@filename(out); +} + +# Command line params to this script: + +int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run +int range = @toInt(@arg("range", "100")); # range of the generated random numbers +int count = @toInt(@arg("count", "10")); # number of random numbers generated per simulation + +# Main script and data + +tracef("\n*** Script parameters: nsim=%i range=%i count=%i\n\n", nsim, range, count); + +file bias<"dynamic_bias.dat">; # Dynamically generated bias for simulation ensemble + +bias = genrand(simulation_script, 1, 1000); + +file sims[]; # Array of files to hold each simulation output + +foreach i in [0:nsim-1] { + + int steps = readData(genrand(simulation_script, 1, 5)); + tracef(" for simulation[%i] steps=%i\n", i, steps+1); + + file simout ; + simout = simulation(simulation_script, steps+1, range, bias, 100000, count); + sims[i] = simout; +} + +file stats<"output/stats.out">; # Final output file: average of all "simulations" +stats = analyze(analysis_script,sims); Added: SwiftTutorials/uc3/part10/simulate.sh =================================================================== --- SwiftTutorials/uc3/part10/simulate.sh (rev 0) +++ SwiftTutorials/uc3/part10/simulate.sh 2013-07-30 18:31:15 UTC (rev 6689) @@ -0,0 +1 @@ +link ../simulate.sh \ No newline at end of file Property changes on: SwiftTutorials/uc3/part10/simulate.sh ___________________________________________________________________ Added: svn:special + * Added: SwiftTutorials/uc3/part10/sites.xml =================================================================== --- SwiftTutorials/uc3/part10/sites.xml (rev 0) +++ SwiftTutorials/uc3/part10/sites.xml 2013-07-30 18:31:15 UTC (rev 6689) @@ -0,0 +1,38 @@ + + + + 10.00 + 10000 + 1 + 300 + 00:01:00 + 100 + 100 + 100 + 1 + 1 + "group_friends.{env.USER}" + nonshared + + + regexp("uc3-c*", Machine) + + + + + + + + + + + + + + + + + . + + + Added: SwiftTutorials/uc3/part10/stats.sh =================================================================== --- SwiftTutorials/uc3/part10/stats.sh (rev 0) +++ SwiftTutorials/uc3/part10/stats.sh 2013-07-30 18:31:15 UTC (rev 6689) @@ -0,0 +1 @@ +link ../stats.sh \ No newline at end of file Property changes on: SwiftTutorials/uc3/part10/stats.sh ___________________________________________________________________ Added: svn:special + * From yadunandb at ci.uchicago.edu Tue Jul 30 13:35:01 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Tue, 30 Jul 2013 13:35:01 -0500 (CDT) Subject: [Swift-commit] r6690 - SwiftTutorials/uc3/part10 Message-ID: <20130730183501.B1E8E178884@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-30 13:35:01 -0500 (Tue, 30 Jul 2013) New Revision: 6690 Modified: SwiftTutorials/uc3/part10/find_host.sh Log: Minor update Modified: SwiftTutorials/uc3/part10/find_host.sh =================================================================== --- SwiftTutorials/uc3/part10/find_host.sh 2013-07-30 18:31:15 UTC (rev 6689) +++ SwiftTutorials/uc3/part10/find_host.sh 2013-07-30 18:35:01 UTC (rev 6690) @@ -7,7 +7,6 @@ echo "No recent logs found" exit 0 fi -echo "debug2" hosts=`grep "host=" $LAST_LOG | grep "Cpu worker started" | grep -oh "host=.*\ " | sort | uniq` for host in $hosts From davidk at ci.uchicago.edu Tue Jul 30 13:38:04 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Tue, 30 Jul 2013 13:38:04 -0500 (CDT) Subject: [Swift-commit] r6691 - in SwiftTutorials/uc3: . part01 part02 part03 part04 part05 part06 part10 Message-ID: <20130730183804.22B77178884@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-30 13:38:04 -0500 (Tue, 30 Jul 2013) New Revision: 6691 Removed: SwiftTutorials/uc3/part01/README SwiftTutorials/uc3/part02/README SwiftTutorials/uc3/part03/README SwiftTutorials/uc3/part04/README SwiftTutorials/uc3/part05/README SwiftTutorials/uc3/part06/README Modified: SwiftTutorials/uc3/README SwiftTutorials/uc3/part10/dynamic_bias.dat Log: Updated README in asciidoc Modified: SwiftTutorials/uc3/README =================================================================== --- SwiftTutorials/uc3/README 2013-07-30 18:35:01 UTC (rev 6690) +++ SwiftTutorials/uc3/README 2013-07-30 18:38:04 UTC (rev 6691) @@ -1,51 +1,439 @@ -UC3 Swift mini-tutorial +Swift UC3 mini-tutorial +======================= -To set up: +Installing UC3 tutorial +----------------------- - $ source setup.sh # sets swift config files in $HOME/.swift +Check out scripts from SVN +~~~~~~~~~~~~~~~~~~~~~~~~~~ +To checkout the most recent UC3 tutorial scripts from SVN, run the following +command: - $ swift -version # verify that Swift 0.94 is in your $PATH and functional +----- +$ svn co https://svn.ci.uchicago.edu/svn/vdl2/SwiftTutorials/uc3 +----- -There are 3 example Swift scripts, p00.swift, p01.swift, and p02.swift +This will create a directory called uc3 which contains all of the scripts +mentioned in this document. +Run setup +~~~~~~~~~ +Once the scripts are checked out, run the following commands to perform +the initial setup. + +----- +$ cd uc3 # change to the newly created uc3 directory +$ source setup.sh # sets swift config files in $HOME/.swift +$ swift -version # verify that Swift 0.94 is in your $PATH and functional +----- + +Overview of the applications +---------------------------- +There are two shell scripts included that act as a mock science application: +simulation.sh and stats.sh + +simulation.sh +~~~~~~~~~~~~~ +The simulation.sh script generates and prints a random number. It optionally +takes the following arguments: + +.simulation.sh arguments +[options="header"] +|======================= +|Argument number|Description +|1 |runtime. Set how long simulation.sh should run, in seconds. +|2 |range. Limit random numbers to a given range. +|3 |biasfile. Look a number contained within this file to set bias. +|4 |scale. Scale random number by this factor. +|5 |n. Generate n number of random numbers. +|======================= + +With no arguments, simulate.sh prints 1 number in the range of 1-100. +----- +$ ./simulate.sh +96 +----- + +stats.sh +~~~~~~~~ +The stats.sh script reads a file containing n numbers and prints the average +of those numbers. + +Overview of the Swift scripts +------------------------------ +Parts 1-6 run locally and serve as examples of the Swift language. +Parts 7-9 submit jobs via Condor to UC3 resources + +part01 +~~~~~~ +The first swift script, p1.swift, runs simulate.sh to generate a single random +number. It writes the number to a file. + +image:p1.png[] + +.p1.swift +----- +type file; + +app (file o) mysim () +{ + simulate stdout=@filename(o); +} + +file f = mysim(); +----- + +To run this script, run the following command: +----- +$ cd part01 +$ swift p1.swift +----- + +The simulate application gets translated to simulate.sh within the 'apps' file. + +NOTE: Since the file you created is not named, swift will generate a random +name for the file in a directory called _concurrent. To view the created +output, run "cat _concurrent/*" + +To cleanup the directory and remove all outputs, run: +----- +$ ./cleanup.sh +------ + +part02 +~~~~~~ +The second swift script shows an example of naming the file. The output is now +in a file called sim.out. + +image:p2.png[] + +.p2.swift +----- +type file; + +app (file o) mysim () +{ + simulate stdout=@filename(o); +} + +file f <"sim.out">; +f = mysim(); +----- + +To run the script: +----- +$ cd part02 +$ swift p2.swift +----- + +part03 +~~~~~~ +The p3.swift script introduces the foreach loop. This script runs many +simulations. Output files are named here by Swift and will get created +in the _concurrent directory. + +image:p3.png[] + +.p3.swift +---- +type file; + +app (file o) mysim () +{ + simulate stdout=@filename(o); +} + +foreach i in [0:9] { + file f = mysim(); +} +---- + To run: +---- +$ cd part03 +$ swift p3.swift +---- - $ find data/ # Examine the initial data directory - $ swift p00.swift # Runs 10 simulations - $ find data/ # Examine the results in the data directory +part04 +~~~~~~ +Part 4 gives an example of naming multiple files within a foreach loop. - $ swift p01.swift # Simple workflow: Runs simulations, then analyzes results - $ find data/ # Examine the input data directory +image:p4.png[] - $ swift p02.swift # More complex workflow with more dependencies - $ find data/ # Examine the input data directory +.p4.swift +---- +type file; +app (file o) mysim () +{ + simulate stdout=@filename(o); +} -To experiment with the command line parameters of these scripts: +foreach i in [0:9] { + file f ; + f = mysim(); +} +---- - For p01.swift: +To run: +---- +$ swift p4.swift +---- - $ swift p00.swift -nsim=100 -range=100000 +Output files will be named output/sim_N.out. - # Note: you must use the -name=value convention! - - Parameters and their default values for p01.swift: +part05 +~~~~~~ +Part 5 introduces a postprocessing step. After many simulations have run, the files +created by simulation.sh will be sent to stats.sh for averaging. - nsim 10 # number of simulation programs to run - range 100 # range of the generated random numbers +image:p5.png[] - For p01.swift: +.p5.swift +---- +type file; - nsim 10 # number of simulation programs to run - steps 1 # number of "steps" each simulation (==seconds of runtime) - range 100 # range of the generated random numbers - count 10 # number of random numbers generated per simulation +app (file o) mysim () +{ + simulate stdout=@filename(o); +} - For p02.swift: +app (file o) analyze (file s[]) +{ + stats @filenames(s) stdout=@filename(o); +} - nsim 10 # number of simulation programs to run - range 100 # range of the generated random numbers - count 10 # number of random numbers generated per simulation +file sims[]; - (steps value is determined dynamically in p02.swift script) +int nsim = @toInt(@arg("nsim","10")); +foreach i in [0:nsim-1] { + file simout ; + simout = mysim(); + sims[i] = simout; +} + +file stats<"output/average.out">; +stats = analyze(sims); +---- + +To run: +---- +$ swift p5.swift +---- + +part06 +~~~~~~ +Part 6 introduces command line arguments. The script sets a variable called +"steps" here, which determines the length of time that the simulation.sh +will run for. It also defines a variable called nsim, which determines the +number of simulations to run. + +image:p6.png[] + +.p6.swift +---- +type file; + +app (file o) mysim (int timesteps) +{ + simulate timesteps stdout=@filename(o); +} + +app (file o) analyze (file s[]) +{ + stats @filenames(s) stdout=@filename(o); +} + +file sims[]; +int nsim = @toInt(@arg("nsim","10")); +int steps = @toInt(@arg("steps","1")); + +foreach i in [0:nsim-1] { + file simout ; + simout = mysim(steps); + sims[i] = simout; +} + +file stats<"output/average.out">; +stats = analyze(sims); +---- + +Use the command below to specify the time for each simulation. +---- +$ cd part06 +$ swift p6.swift -steps=3 # each simulation takes 3 seconds +---- + +part07 +~~~~~~ +Part 7 is the first script that will submit jobs to UC3 via Condor. +It is similar to earlier scripts, with a few minor exceptions. Since +there is not a shared filesystems when using OSG, the application simulate.sh +will get transferred to the worker node by Swift. + +image:p7.png[] + +.p7.swift +----- +type file; + +# Application to be called by this script + +file simulation_script <"simulate.sh">; + +# app() functions for application programs to be called: + +app (file out) simulation (file script, int timesteps, int sim_range) +{ + sh @filename(script) timesteps sim_range stdout=@filename(out); +} + +# Command line params to this script: + +int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run +int range = @toInt(@arg("range", "100")); # range of the generated random numbers + +# Main script and data + +int steps=3; + +tracef("\n*** Script parameters: nsim=%i steps=%i range=%i \n\n", nsim, steps, range); + +foreach i in [0:nsim-1] { + file simout ; + simout = simulation(simulation_script, steps, range); +} +----- + +To run: +---- +$ cd part07 +$ swift p7.swift +---- + +part08 +~~~~~~ +Part 8 will also stage in and run stats.sh to calculate averages. It adds a +trace statement so you can see the order in which things execute. + +image:p8.png[] + +.p8.swift +----- +type file; + +# Applications to be called by this script + +file simulation_script <"simulate.sh">; +file analysis_script <"stats.sh">; + +# app() functions for application programs to be called: + +app (file out) simulation (file script, int timesteps, int sim_range, file bias_file, int scale, int sim_count) +{ + sh @filename(script) timesteps sim_range @filename(bias_file) scale sim_count stdout=@filename(out); +} + +app (file out) analyze (file script, file s[]) +{ + sh @script @filenames(s) stdout=@filename(out); +} + +# Command line params to this script: + +int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run +int steps = @toInt(@arg("steps", "1")); # number of "steps" each simulation (==seconds of runtime) +int range = @toInt(@arg("range", "100")); # range of the generated random numbers +int count = @toInt(@arg("count", "10")); # number of random numbers generated per simulation + +# Main script and data + +tracef("\n*** Script parameters: nsim=%i steps=%i range=%i count=%i\n\n", nsim, steps, range, count); + +file sims[]; # Array of files to hold each simulation output +file bias<"bias.dat">; # Input data file to "bias" the numbers: + # 1 line: scale offset ( N = n*scale + offset) +foreach i in [0:nsim-1] { + file simout ; + simout = simulation(simulation_script, steps, range, bias, 100000, count); + sims[i] = simout; +} + +file stats<"output/stats.out">; # Final output file: average of all "simulations" +stats = analyze(analysis_script,sims); +----- + +To run: +---- +$ cd part08 +$ swift p8.swift +---- + +part09 +~~~~~~ +Part 9 adds another app function called genrand. Genrand will produce a random +number that will be used to determine how long each simulation app will run. + +image:p9.png[] + +.p9.swift +----- +type file; + +# Applications to be called by this script + +file simulation_script <"simulate.sh">; +file analysis_script <"stats.sh">; + +# app() functions for application programs to be called: + +app (file out) genrand (file script, int timesteps, int sim_range) +{ + sh @filename(script) timesteps sim_range stdout=@filename(out); +} + +app (file out) simulation (file script, int timesteps, int sim_range, file bias_file, int scale, int sim_count) +{ + sh @filename(script) timesteps sim_range @filename(bias_file) scale sim_count stdout=@filename(out); +} + +app (file out) analyze (file script, file s[]) +{ + sh @script @filenames(s) stdout=@filename(out); +} + +# Command line params to this script: +int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run +int range = @toInt(@arg("range", "100")); # range of the generated random numbers +int count = @toInt(@arg("count", "10")); # number of random numbers generated per simulation + +# Main script and data + +tracef("\n*** Script parameters: nsim=%i range=%i count=%i\n\n", nsim, range, count); + +file bias<"dynamic_bias.dat">; # Dynamically generated bias for simulation ensemble + +bias = genrand(simulation_script, 1, 1000); + +file sims[]; # Array of files to hold each simulation output + +foreach i in [0:nsim-1] { + + int steps = readData(genrand(simulation_script, 1, 5)); + tracef(" for simulation[%i] steps=%i\n", i, steps+1); + + file simout ; + simout = simulation(simulation_script, steps+1, range, bias, 100000, count); + sims[i] = simout; +} + +file stats<"output/stats.out">; # Final output file: average of all "simulations" +stats = analyze(analysis_script,sims); +----- + +To run: +---- +$ cd part09 +$ swift p9.swift +---- Deleted: SwiftTutorials/uc3/part01/README =================================================================== --- SwiftTutorials/uc3/part01/README 2013-07-30 18:35:01 UTC (rev 6690) +++ SwiftTutorials/uc3/part01/README 2013-07-30 18:38:04 UTC (rev 6691) @@ -1,40 +0,0 @@ - -TOPIC: First Swift script - run a "simulation" program, random.sh - - -Verify that random.sh is in your path, and that it works: - -$ which random.sh -$ random.sh - -Study the Swift program: - -$ cat p1.swift - -Examine the tool catalog file: - -$ cat tc - -Run the program: - -$ swift -tc.file tc p1.swift - -Look at the output: - -$ cat _concurrent/* - -Look at the other files generated: - -$ ls -l - -We'll talk more about these files later - -$ cleanup - -Then test the sript a few more times. - -$ swift -tc.file tc p1.swift; cat _concurrent/* - -$ swift -tc.file tc p1.swift; cat _concurrent/* - -$ swift -tc.file tc p1.swift; cat _concurrent/* Deleted: SwiftTutorials/uc3/part02/README =================================================================== --- SwiftTutorials/uc3/part02/README 2013-07-30 18:35:01 UTC (rev 6690) +++ SwiftTutorials/uc3/part02/README 2013-07-30 18:38:04 UTC (rev 6691) @@ -1,33 +0,0 @@ - -TOPIC: specifying the output filenames - -Study the Swift program: - -$ cat p2.swift - -Examine the tool catalog file: - -$ cat tc - -Run the program: - -$ swift -tc.file tc p2.swift - -Look at the output: - -$ cat sim.out - -Then test the sript a few more times. - -$ swift -tc.file tc p1.swift; cat sim.out - -$ swift -tc.file tc p1.swift; cat sim.out - -$ swift -tc.file tc p1.swift; cat sim.out - -Things to try: - -- change the output filename - -- add a dir component to the output filename - Deleted: SwiftTutorials/uc3/part03/README =================================================================== --- SwiftTutorials/uc3/part03/README 2013-07-30 18:35:01 UTC (rev 6690) +++ SwiftTutorials/uc3/part03/README 2013-07-30 18:38:04 UTC (rev 6691) @@ -1,20 +0,0 @@ - -TOPIC: run many instances of a "simulation" program in a foreach() loop - - -Run the program: - -$ swift -tc.file tc p3.swift - -Look at the output: - -$ cd _concurrent -$ ls -l -$ cat * - -Look at the order in which the files were written: - -$ ls -lt - -We'll come back to this... - Deleted: SwiftTutorials/uc3/part04/README =================================================================== --- SwiftTutorials/uc3/part04/README 2013-07-30 18:35:01 UTC (rev 6690) +++ SwiftTutorials/uc3/part04/README 2013-07-30 18:38:04 UTC (rev 6691) @@ -1,42 +0,0 @@ - -TOPIC: run a program in a foreach() loop with explicitly named output files. - - -Study the program: - -- @strcat() is a Swift builtin function (the @name() form is used for many but not all builtins) - -- Note that @strcat() coerces numeric args to strings - -- <"filename"> was a shorthand for but the latter is more flexible. - -Run the program: - -$ swift -tc.file tc p4.swift - -Look at the output: - -$ cd output -$ ls -l -$ cat * - - -Try: - -- Adjust the script to take the number of simulations to do from the command line - - @arg("argname") returns arguments after the .swift script on the swift command line: - - swift -tc.file tc p4.swift -myarg1=value1 ... - - @arg("argname","default") returns "default" if the argname is not given on the command line - - @toInt() converts strings to integers: - - @toInt(@arg("myArg1")) - - -- trace(expr1,...) traces expressions on stdout. - - Try inserting a few traces. But remember: Swift is *very* concurrent! - Deleted: SwiftTutorials/uc3/part05/README =================================================================== --- SwiftTutorials/uc3/part05/README 2013-07-30 18:35:01 UTC (rev 6690) +++ SwiftTutorials/uc3/part05/README 2013-07-30 18:38:04 UTC (rev 6691) @@ -1,51 +0,0 @@ - - -TOPIC: Add a program that "analyzes" the output the parallel simulations - - -Study the program: - -We added a new app to "analyze" all the simulation outputs: - -app (file o) analyze (file s[]) -{ - average @filenames(s) stdout=@filename(o); -} - -Nots that it expects an array of files as its input, and that -it uses @filenames() to place the names of all the files on -the command line to the "average" program. - -Average does: --------------------- -#! /bin/sh - -awk ' - -{ sum += $1} - -END { print sum/NR } -' $* -------------------- - - -At the end of the script we insert: - -file stats<"output/average.out">; -stats = analyze(sims); - -...which runs the analysis *after* all the simulations complete. - - -Run the program: - -$ swift -tc.file tc p5.swift - -Look at the output: - -$ cd output -$ ls -l -$ cat sim*.out -$ cat average.out - - Deleted: SwiftTutorials/uc3/part06/README =================================================================== --- SwiftTutorials/uc3/part06/README 2013-07-30 18:35:01 UTC (rev 6690) +++ SwiftTutorials/uc3/part06/README 2013-07-30 18:38:04 UTC (rev 6691) @@ -1,28 +0,0 @@ - -TOPIC: add arguments to the "simulation" program -(to control number of steps, range of output, and number of output lines) - - -Test new versions of the "simulation" program: - - random.sh # original - random2.sh [runtime] # runtime in seconds; defaults to 1 sec - random3.sh [runtime] [range] # requests random numbers in {0:range-1} - random4.sh [runtime] [range] [count] # requests "count" random numbers in {0:range} - -p6.swift changes to random2 for the simulation program and adds an argument. - -Run the program: - -$ swift -tc.file tc p6.swift -steps=3 # each simulation takes 3 seconds - -Next we need to use the parallel cluster for our simulations! - -Try: - -- change to random3.sh and add the extra argument "range" - -- change to random4.sh and add yet another argument "count" - - - Modified: SwiftTutorials/uc3/part10/dynamic_bias.dat =================================================================== --- SwiftTutorials/uc3/part10/dynamic_bias.dat 2013-07-30 18:35:01 UTC (rev 6690) +++ SwiftTutorials/uc3/part10/dynamic_bias.dat 2013-07-30 18:38:04 UTC (rev 6691) @@ -1 +1 @@ -781 +208 From davidk at ci.uchicago.edu Tue Jul 30 13:53:17 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Tue, 30 Jul 2013 13:53:17 -0500 (CDT) Subject: [Swift-commit] r6692 - SwiftTutorials/uc3 Message-ID: <20130730185317.9F5A8178884@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-30 13:53:17 -0500 (Tue, 30 Jul 2013) New Revision: 6692 Modified: SwiftTutorials/uc3/README Log: Part 10 doc, note about re-running setup.sh on reconnecting Modified: SwiftTutorials/uc3/README =================================================================== --- SwiftTutorials/uc3/README 2013-07-30 18:38:04 UTC (rev 6691) +++ SwiftTutorials/uc3/README 2013-07-30 18:53:17 UTC (rev 6692) @@ -27,6 +27,8 @@ $ swift -version # verify that Swift 0.94 is in your $PATH and functional ----- +NOTE: If you disconnect from the machine, you will need to re-run source setup.sh. + Overview of the applications ---------------------------- There are two shell scripts included that act as a mock science application: @@ -437,3 +439,34 @@ $ cd part09 $ swift p9.swift ---- + +part10 +~~~~~~ +p10.swift is exactly the same as p9.swift. Instead of the swift script, +take a look at the sites.xml configuration file. +The sites.xml file determines where swift runs its job at. Here the +line with the condor requirement to select nodes from the UC3 seeder +cluster is left un-commented to select that site. + +----- +regexp("uc3-c*", Machine) +----- + +The condor requirements for selecting nodes from UC3 seeder, ITS +Virtualization lab, Open Science Grid and Atlas Midwest Tier 2 (at UC, +IU, UIUC) are present in the sites.xml file. +To choose any of these sites, simply uncomment the requirement line +for the target system and run the swift script as: + +To run: +---- +$ cd part10 +$ swift p10.swift +---- + +Once the script completes, run the script find_host.sh to find where +the jobs were run. + +----- +./find_host.sh +----- From davidk at ci.uchicago.edu Wed Jul 31 14:18:07 2013 From: davidk at ci.uchicago.edu (davidk at ci.uchicago.edu) Date: Wed, 31 Jul 2013 14:18:07 -0500 (CDT) Subject: [Swift-commit] r6693 - SwiftApps/Scattering/paintgrid Message-ID: <20130731191807.B2C81178884@svn.ci.uchicago.edu> Author: davidk Date: 2013-07-31 14:18:06 -0500 (Wed, 31 Jul 2013) New Revision: 6693 Added: SwiftApps/Scattering/paintgrid/cleanup SwiftApps/Scattering/paintgrid/fewpoints.params SwiftApps/Scattering/paintgrid/onepoint.params SwiftApps/Scattering/paintgrid/pecos.xml SwiftApps/Scattering/paintgrid/run-paintgrid SwiftApps/Scattering/paintgrid/run-remote-persist.sh SwiftApps/Scattering/paintgrid/sites-used SwiftApps/Scattering/paintgrid/start-beagle SwiftApps/Scattering/paintgrid/start-tunnels SwiftApps/Scattering/paintgrid/stats SwiftApps/Scattering/paintgrid/stop-beagle SwiftApps/Scattering/paintgrid/tssh Removed: SwiftApps/Scattering/paintgrid/apps.multisite SwiftApps/Scattering/paintgrid/multisites.xml Modified: SwiftApps/Scattering/paintgrid/apps SwiftApps/Scattering/paintgrid/genpoints.py SwiftApps/Scattering/paintgrid/paintgrid.swift SwiftApps/Scattering/paintgrid/processpoints.py SwiftApps/Scattering/paintgrid/sites.xml Log: Various updates to a more recent set of scripts/configs Modified: SwiftApps/Scattering/paintgrid/apps =================================================================== --- SwiftApps/Scattering/paintgrid/apps 2013-07-30 18:53:17 UTC (rev 6692) +++ SwiftApps/Scattering/paintgrid/apps 2013-07-31 19:18:06 UTC (rev 6693) @@ -1,2 +1,4 @@ localhost local_python python -westmere python python +beagle python python +#orthros python python + Deleted: SwiftApps/Scattering/paintgrid/apps.multisite =================================================================== --- SwiftApps/Scattering/paintgrid/apps.multisite 2013-07-30 18:53:17 UTC (rev 6692) +++ SwiftApps/Scattering/paintgrid/apps.multisite 2013-07-31 19:18:06 UTC (rev 6693) @@ -1,4 +0,0 @@ -uc3 perl /usr/bin/perl null null null -beagle perl /usr/bin/perl null null null -#sandy perl /usr/bin/perl null null null -westmere perl /usr/bin/perl null null null Added: SwiftApps/Scattering/paintgrid/cleanup =================================================================== --- SwiftApps/Scattering/paintgrid/cleanup (rev 0) +++ SwiftApps/Scattering/paintgrid/cleanup 2013-07-31 19:18:06 UTC (rev 6693) @@ -0,0 +1,6 @@ +#! /bin/sh + +rm -rf out _concurrent *swiftx *kml *~ paintgrid-* python-* swift.log + + + Property changes on: SwiftApps/Scattering/paintgrid/cleanup ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/Scattering/paintgrid/fewpoints.params =================================================================== --- SwiftApps/Scattering/paintgrid/fewpoints.params (rev 0) +++ SwiftApps/Scattering/paintgrid/fewpoints.params 2013-07-31 19:18:06 UTC (rev 6693) @@ -0,0 +1,10 @@ +minx=0.0 +maxx=10.0 +miny=0.0 +maxy=10.0 +minz=0.0 +maxz=10.0 +incr=1.0 +tuplesPerFile=100 +filePrefix="seq" +outDir="out/seq" Modified: SwiftApps/Scattering/paintgrid/genpoints.py =================================================================== --- SwiftApps/Scattering/paintgrid/genpoints.py 2013-07-30 18:53:17 UTC (rev 6692) +++ SwiftApps/Scattering/paintgrid/genpoints.py 2013-07-31 19:18:06 UTC (rev 6693) @@ -46,7 +46,7 @@ for y in xfrange(miny,maxy,incr): for z in xfrange(minz,maxz,incr): if n % tuplesPerFile == 0 : - filename = str.format(outDir + "/" + filePrefix + ".{0!s:0>5}",filenum) + filename = outDir + "/" + filePrefix + ("%05d" % filenum) print filename of = file(filename,"w") filenum += 1 Deleted: SwiftApps/Scattering/paintgrid/multisites.xml =================================================================== --- SwiftApps/Scattering/paintgrid/multisites.xml 2013-07-30 18:53:17 UTC (rev 6692) +++ SwiftApps/Scattering/paintgrid/multisites.xml 2013-07-31 19:18:06 UTC (rev 6693) @@ -1,71 +0,0 @@ - - - - - 10.00 - 10000 - 1 - 3600 - 00:05:00 - 100 - 100 - 1000 - 1 - 1 - "group_friends.{env.USER}" - nonshared - - . - - - - - 24 - 100 - 100 - - pbs.aprun;pbs.mpp;depth=24;pbs.resource_list=advres=wilde.1768 - 3600 - 00:05:00 - /lustre/beagle/{env.USER}/swiftwork - 5 - 1 - 1 - 4.80 - 10000 - /tmp/{env.USER}/swiftwork - - - - - sandyb - 16 - 00:05:00 - 3600 - 100 - 100 - 4 - 1 - 1 - .64 - 10000 - /tmp/{env.USER} - - - - - westmere - 12 - 00:05:00 - 3600 - 100 - 100 - 4 - 1 - 1 - .48 - 10000 - /tmp/{env.USER} - - - Added: SwiftApps/Scattering/paintgrid/onepoint.params =================================================================== --- SwiftApps/Scattering/paintgrid/onepoint.params (rev 0) +++ SwiftApps/Scattering/paintgrid/onepoint.params 2013-07-31 19:18:06 UTC (rev 6693) @@ -0,0 +1,10 @@ +minx=0.0 +maxx=10.0 +miny=0.0 +maxy=10.0 +minz=0.0 +maxz=10.0 +incr=10.0 +tuplesPerFile=100 +filePrefix="seq" +outDir="out/seq" Modified: SwiftApps/Scattering/paintgrid/paintgrid.swift =================================================================== --- SwiftApps/Scattering/paintgrid/paintgrid.swift 2013-07-30 18:53:17 UTC (rev 6692) +++ SwiftApps/Scattering/paintgrid/paintgrid.swift 2013-07-31 19:18:06 UTC (rev 6693) @@ -24,7 +24,7 @@ file params ; file image ; global string runTime = @arg("runTime","0.0"); -global string runDir = @arg("runDir"); +global string runDir = @java("java.lang.System","getProperty","user.dir"); # Main script: # Call genPoints to make a set of files, each of which contains a set of data points to process Added: SwiftApps/Scattering/paintgrid/pecos.xml =================================================================== --- SwiftApps/Scattering/paintgrid/pecos.xml (rev 0) +++ SwiftApps/Scattering/paintgrid/pecos.xml 2013-07-31 19:18:06 UTC (rev 6693) @@ -0,0 +1,59 @@ + + + + + + /tmp/wilde/swiftwork + local + + + + + + + sec1all.q --> + sec1_all --> + 1 + + + + 1 + 4 + 4 + 64 + 3.20 + + + 00:15:00 + 1800 + + + + /clhome/WILDE/swiftwork + + + + 100 + 100 + 10000 + + + + + + /lustre/beagle/wilde/swift.scripts + 24 + 100 + 100 + pbs.aprun;pbs.mpp;depth=24 + 3600 + 00:05:00 + 5 + 1 + 1 + 4.80 + 10000 + /lustre/beagle/wilde/swiftwork + + + Modified: SwiftApps/Scattering/paintgrid/processpoints.py =================================================================== --- SwiftApps/Scattering/paintgrid/processpoints.py 2013-07-30 18:53:17 UTC (rev 6692) +++ SwiftApps/Scattering/paintgrid/processpoints.py 2013-07-31 19:18:06 UTC (rev 6693) @@ -9,11 +9,12 @@ n = 0; pixel = []; -with open(dataFileName, "rb") as f: +#with open(dataFileName, "rb") as f: +f = open(dataFileName, "rb") +byte = f.read(1) +while byte != "": + pixel.append(byte) byte = f.read(1) - while byte != "": - pixel.append(byte) - byte = f.read(1) print "Data file has ", len(pixel), " pixels" Added: SwiftApps/Scattering/paintgrid/run-paintgrid =================================================================== --- SwiftApps/Scattering/paintgrid/run-paintgrid (rev 0) +++ SwiftApps/Scattering/paintgrid/run-paintgrid 2013-07-31 19:18:06 UTC (rev 6693) @@ -0,0 +1,9 @@ +#! /bin/sh + +PATH=/clhome/WILDE/swift/rev/swift-0.94.1/bin:$PATH + +export GLOBUS_HOSTNAME=localhost +export GLOBUS_TCP_PORT_RANGE=59900,59909 +export GLOBUS_TCP_SOURCE_RANGE=59900,59909 + +swift paintgrid.swift -params=genpoints.params -image=data.0001.tiny -runTime=0.0001 Property changes on: SwiftApps/Scattering/paintgrid/run-paintgrid ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/Scattering/paintgrid/run-remote-persist.sh =================================================================== --- SwiftApps/Scattering/paintgrid/run-remote-persist.sh (rev 0) +++ SwiftApps/Scattering/paintgrid/run-remote-persist.sh 2013-07-31 19:18:06 UTC (rev 6693) @@ -0,0 +1,52 @@ +swift$ cat run-persist.sh +#! /bin/sh + +# Start a persistent swift coaster service, capturing its port # in portfile + +portfile=$(mktemp portfile.XXXX) +coaster-service -portfile $portfile -nosec >& coaster.log & +coasterpid=$! +sleep 5 # Wait for the service to record its port +port=$(cat $portfile) + +# Report the coaster service port and process id + +echo coaster pid: $coasterpid port: $port +echo $coasterpid >coasterpid +echo started coaster service: +ps -p $coasterpid --ppid $coasterpid -H -j # display parent shell and java child processes + +# Create a sites file pointing to the service we just started + +cat >sites.xml < + + + 4 + 16 + 1 + 1 + 1 + 00:01:00 + 600 + 100 + 100 + sandyb + 1.00 + 10000 + single + true + + /scratch/midway/{env.USER}/work + + +END + +# Now run several Swift scripts, one at a time, just like MD_String will do + +NUM_SWIFT_RUNS=$1 +for ((i=0;i<$NUM_SWIFT_RUNS;i++)); do + set -x + swift -sites.file sites.xml -tc.file tc.intelmpi -config cf mpicatnap.swift -n=${2:-1} -t=${3:-2} + set +x +done Added: SwiftApps/Scattering/paintgrid/sites-used =================================================================== --- SwiftApps/Scattering/paintgrid/sites-used (rev 0) +++ SwiftApps/Scattering/paintgrid/sites-used 2013-07-31 19:18:06 UTC (rev 6693) @@ -0,0 +1,3 @@ +#! /bin/sh + +for l in $(/bin/ls -1t paint*.log) ; do echo $l; ./stats $l | grep -v localhost ; done | more Property changes on: SwiftApps/Scattering/paintgrid/sites-used ___________________________________________________________________ Added: svn:executable + * Modified: SwiftApps/Scattering/paintgrid/sites.xml =================================================================== --- SwiftApps/Scattering/paintgrid/sites.xml 2013-07-30 18:53:17 UTC (rev 6692) +++ SwiftApps/Scattering/paintgrid/sites.xml 2013-07-31 19:18:06 UTC (rev 6693) @@ -1,25 +1,27 @@ - + - - /scratch/midway/{env.USER}/swiftwork + + /tmp/wilde/swiftwork + local - - + + - westmere - 12 + sec1all.q --> + sec1_all --> + 1 1 - 1 - 1 - 12 - .11 + 4 + 4 + 64 + 2.56 00:15:00 @@ -27,13 +29,31 @@ - /scratch/midway/{env.USER}/swiftwork + /clhome/WILDE/swiftwork - false + 100 100 10000 + + + + /lustre/beagle/wilde/swift.scripts + 24 + 100 + 100 + pbs.aprun;pbs.mpp;depth=24 + 3600 + 00:05:00 + 5 + 1 + 1 + 1.20 + 10000 + /lustre/beagle/wilde/swiftwork + + Added: SwiftApps/Scattering/paintgrid/start-beagle =================================================================== --- SwiftApps/Scattering/paintgrid/start-beagle (rev 0) +++ SwiftApps/Scattering/paintgrid/start-beagle 2013-07-31 19:18:06 UTC (rev 6693) @@ -0,0 +1,4 @@ +ssh -n login1.beagle.ci.uchicago.edu -L 59900:localhost:59900 \ + 'export SWIFT_USERHOME=/lustre/beagle/wilde/swift.scripts; + PATH=$HOME/swift/rev/swift-0.94.1/bin:$PATH; + coaster-service -nosec -p 59900 1>&2 & echo $!; sleep 99999' 1>beagle-pid 2>beagle-log & Property changes on: SwiftApps/Scattering/paintgrid/start-beagle ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/Scattering/paintgrid/start-tunnels =================================================================== --- SwiftApps/Scattering/paintgrid/start-tunnels (rev 0) +++ SwiftApps/Scattering/paintgrid/start-tunnels 2013-07-31 19:18:06 UTC (rev 6693) @@ -0,0 +1,11 @@ +ssh -n -N login1.beagle.ci.uchicago.edu \ + -R 59900:orthros.xray.aps.anl.gov:59900 \ + -R 59901:orthros.xray.aps.anl.gov:59901 \ + -R 59902:orthros.xray.aps.anl.gov:59902 \ + -R 59903:orthros.xray.aps.anl.gov:59903 \ + -R 59904:orthros.xray.aps.anl.gov:59904 \ + -R 59905:orthros.xray.aps.anl.gov:59905 \ + -R 59906:orthros.xray.aps.anl.gov:59906 \ + -R 59907:orthros.xray.aps.anl.gov:59907 \ + -R 59908:orthros.xray.aps.anl.gov:59908 \ + -R 59909:orthros.xray.aps.anl.gov:59909 Property changes on: SwiftApps/Scattering/paintgrid/start-tunnels ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/Scattering/paintgrid/stats =================================================================== --- SwiftApps/Scattering/paintgrid/stats (rev 0) +++ SwiftApps/Scattering/paintgrid/stats 2013-07-31 19:18:06 UTC (rev 6693) @@ -0,0 +1,3 @@ +#! /bin/sh + +grep "JOB_START" $1 | sed -e 's/^.* host=//'| sort | uniq -c Property changes on: SwiftApps/Scattering/paintgrid/stats ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/Scattering/paintgrid/stop-beagle =================================================================== --- SwiftApps/Scattering/paintgrid/stop-beagle (rev 0) +++ SwiftApps/Scattering/paintgrid/stop-beagle 2013-07-31 19:18:06 UTC (rev 6693) @@ -0,0 +1 @@ +ssh -n login1.beagle.ci.uchicago.edu "echo killing coaster service: ; ps -j $(cat beagle-pid); /bin/kill 15 -\$(ps -j $(cat beagle-pid)| tail -1 | awk '{print \$2}' ) " Property changes on: SwiftApps/Scattering/paintgrid/stop-beagle ___________________________________________________________________ Added: svn:executable + * Added: SwiftApps/Scattering/paintgrid/tssh =================================================================== --- SwiftApps/Scattering/paintgrid/tssh (rev 0) +++ SwiftApps/Scattering/paintgrid/tssh 2013-07-31 19:18:06 UTC (rev 6693) @@ -0,0 +1,3 @@ +# ssh login1.beagle.ci.uchicago.edu -L 59900:localhost:59900 'sleep 1234' + ssh -n login1.beagle.ci.uchicago.edu 'sleep 1234 & echo $!; exit' + Property changes on: SwiftApps/Scattering/paintgrid/tssh ___________________________________________________________________ Added: svn:executable + * From yadunandb at ci.uchicago.edu Tue Jul 2 15:59:02 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Tue, 02 Jul 2013 20:59:02 -0000 Subject: [Swift-commit] r6595 - branches/release-0.94/tests Message-ID: <20130702205901.550F4187CC1@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-02 15:59:01 -0500 (Tue, 02 Jul 2013) New Revision: 6595 Modified: branches/release-0.94/tests/suite.sh Log: Updating suite.sh - Removed the old mechanism with #overrides for GLOBUS_HOSTNAME - Added support for .source.sh files which will affect the namespace of the suite.sh script. Modified: branches/release-0.94/tests/suite.sh =================================================================== --- branches/release-0.94/tests/suite.sh 2013-07-02 18:39:25 UTC (rev 6594) +++ branches/release-0.94/tests/suite.sh 2013-07-02 20:59:01 UTC (rev 6595) @@ -403,20 +403,6 @@ fi } -override_globals() { - FILE=$1; - index=0; - while read line - do - if echo $line | grep -q "#OVERRIDE_" ; then - line=($line) - var_lhs=${line[0]#\#OVERRIDE_} - var_rhs=${line[1]}; - eval export $var_lhs=$var_rhs; - fi - done < $FILE -} - start_group() { G=$1 echo @@ -796,6 +782,7 @@ return 0 fi + SOURCESCRIPT=$NAME.source.sh SETUPSCRIPT=$NAME.setup.sh CHECKSCRIPT=$NAME.check.sh CLEANSCRIPT=$NAME.clean.sh @@ -805,18 +792,15 @@ TEST_SHOULD_FAIL=0 OUTPUT=$NAME.setup.stdout + if [ -x "$GROUP/$SOURCESCRIPT" ]; then + cp "$GROUP/$SOURCESCRIPT" . + source ./$SOURCESCRIPT + fi + echo "GLOBUS_HOSTNAME : $GLOBUS_HOSTNAME" + if [ -x "$GROUP/$SETUPSCRIPT" ]; then cp "$GROUP/$SETUPSCRIPT" . script_exec ./$SETUPSCRIPT "S" - globus_var=`grep "#OVERRIDE_" ./$SETUPSCRIPT`; - echo "Globus_var = $globus_var" - if [ $? == 0 ] - then - globus_var=($globus_var); - lhs_var=${globus_var[0]##OVERRIDE_} # Add check here to confirm if GLOBUS_HOSTNAME - rhs_val=${globus_var[1]} - export GLOBUS_HOSTNAME=$rhs_val - fi else stage_files $GROUP $NAME fi From yadunandb at ci.uchicago.edu Tue Jul 2 16:02:24 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Tue, 02 Jul 2013 21:02:24 -0000 Subject: [Swift-commit] r6596 - in branches/release-0.94/tests/stress/IO: . bagOnodes beagle multiple multiple/temp uc3 uc3/temp Message-ID: <20130702210222.4A654187CC1@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-02 16:02:21 -0500 (Tue, 02 Jul 2013) New Revision: 6596 Added: branches/release-0.94/tests/stress/IO/bagOnodes/ branches/release-0.94/tests/stress/IO/bagOnodes/run branches/release-0.94/tests/stress/IO/bagOnodes/sites.template.xml branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.source.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.swift branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.timeout branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.source.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.swift branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.timeout branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.source.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.swift branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.timeout branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.source.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.swift branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.timeout branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.source.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.swift branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.timeout branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.source.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.swift branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.timeout branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.source.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.swift branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.timeout branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.source.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.swift branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.timeout branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.source.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.swift branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.timeout branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.args branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.source.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.swift branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.timeout branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.source.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.swift branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.timeout branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.source.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.swift branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.timeout branches/release-0.94/tests/stress/IO/bagOnodes/swift.properties branches/release-0.94/tests/stress/IO/bagOnodes/t.sh branches/release-0.94/tests/stress/IO/bagOnodes/tc.template.data branches/release-0.94/tests/stress/IO/bagOnodes/temp.sh branches/release-0.94/tests/stress/IO/bagOnodes/title.txt branches/release-0.94/tests/stress/IO/bagOnodes/wrapper.sh branches/release-0.94/tests/stress/IO/beagle/ branches/release-0.94/tests/stress/IO/beagle/run branches/release-0.94/tests/stress/IO/beagle/sites.template.xml branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.setup.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.source.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.swift branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.timeout branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.setup.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.source.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.swift branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.timeout branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.setup.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.source.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.swift branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.timeout branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.setup.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.source.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.swift branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.timeout branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.setup.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.source.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.swift branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.timeout branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.setup.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.source.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.swift branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.timeout branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.args branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.setup.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.source.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.swift branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.timeout branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.setup.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.source.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.swift branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.timeout branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.setup.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.source.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.swift branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.timeout branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.args branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.setup.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.source.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.swift branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.timeout branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.setup.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.source.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.swift branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.timeout branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.setup.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.source.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.swift branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.timeout branches/release-0.94/tests/stress/IO/beagle/swift.properties branches/release-0.94/tests/stress/IO/beagle/tc.template.data branches/release-0.94/tests/stress/IO/beagle/temp.sh branches/release-0.94/tests/stress/IO/beagle/temp/ branches/release-0.94/tests/stress/IO/beagle/title.txt branches/release-0.94/tests/stress/IO/beagle/wrapper.sh branches/release-0.94/tests/stress/IO/multiple/ branches/release-0.94/tests/stress/IO/multiple/run branches/release-0.94/tests/stress/IO/multiple/sites.template.xml branches/release-0.94/tests/stress/IO/multiple/sites.template.xml.beagle branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.args branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.setup.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.source.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.swift branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.timeout branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.setup.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.source.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.swift branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.timeout branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.setup.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.source.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.swift branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.timeout branches/release-0.94/tests/stress/IO/multiple/swift.properties branches/release-0.94/tests/stress/IO/multiple/tc.template.data branches/release-0.94/tests/stress/IO/multiple/temp/ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x1.setup.sh branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x1.swift branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x1.timeout branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x2.setup.sh branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x2.swift branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x2.timeout branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x3.setup.sh branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x3.swift branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x3.timeout branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx1.setup.sh branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx1.swift branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx1.timeout branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx2.setup.sh branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx2.swift branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx2.timeout branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx3.setup.sh branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx3.swift branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx3.timeout branches/release-0.94/tests/stress/IO/multiple/title.txt branches/release-0.94/tests/stress/IO/multiple/wrapper.sh branches/release-0.94/tests/stress/IO/uc3/ branches/release-0.94/tests/stress/IO/uc3/run branches/release-0.94/tests/stress/IO/uc3/script.args branches/release-0.94/tests/stress/IO/uc3/script.setup.sh branches/release-0.94/tests/stress/IO/uc3/sites.backup.xml branches/release-0.94/tests/stress/IO/uc3/sites.template.xml branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.args branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.setup.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.source.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.swift branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.timeout branches/release-0.94/tests/stress/IO/uc3/swift.properties branches/release-0.94/tests/stress/IO/uc3/tc.template.data branches/release-0.94/tests/stress/IO/uc3/temp/ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.setup.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.source.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.swift branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.timeout branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.setup.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.source.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.swift branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.timeout branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.setup.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.source.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.swift branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.timeout branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.setup.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.source.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.swift branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.timeout branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.setup.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.source.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.swift branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.timeout branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.setup.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.source.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.swift branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.timeout branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.setup.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.source.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.swift branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.timeout branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.setup.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.source.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.swift branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.timeout branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.setup.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.source.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.swift branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.timeout branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.args branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.setup.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.source.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.swift branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.timeout branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.setup.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.source.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.swift branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.timeout branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.setup.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.source.sh branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.swift branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.timeout branches/release-0.94/tests/stress/IO/uc3/title.txt branches/release-0.94/tests/stress/IO/uc3/wrapper.sh Removed: branches/release-0.94/tests/stress/IO/i1/ branches/release-0.94/tests/stress/IO/i2/ Log: Committing all IO stress tests. Needs minor tweaking as to what are reasonable stress levels. Remote sites : Beagle, Midway, UC3, MCS bag-of-nodes, Multiple sites config. Added: branches/release-0.94/tests/stress/IO/bagOnodes/run =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/run (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/run 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,22 @@ +#! /bin/sh + +set -x +export STRESS="S1" + +#./stage_to_remote.setup.sh +#ARGS=`cat stage_to_remote.args` +#swift -config swift.properties -sites.file sites.template.xml -tc.file tc.template.data stage_to_remote.swift $ARGS + + +#./stage_to_remote1.setup.sh +#ARGS=`cat stage_to_remote1.args` +#swift -config swift.properties -sites.file sites.template.xml -tc.file tc.template.data stage_to_remote1.swift $ARGS + + +#./stage_from_remote.setup.sh +#ARGS=`cat stage_from_remote.args` +#swift -config swift.properties -sites.file sites.template.xml -tc.file tc.template.data stage_from_remote.swift $ARGS + +./stage_to_remoteNx1.setup.sh +ARGS=`cat stage_to_remoteNx1.args` +swift -config swift.properties -sites.file sites.template.xml -tc.file tc.template.data stage_to_remoteNx1.swift $ARGS Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/run ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/sites.template.xml =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/sites.template.xml (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/sites.template.xml 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,123 @@ + + + + + 8 + 100 + 100 + 3600 + 00:05:00 + 0.0799 + 10000 + /sandbox/{env.USER}/swiftwork + + + + + 8 + 100 + 100 + 3600 + 00:05:00 + 0.0799 + 10000 + /sandbox/{env.USER}/swiftwork + + + + + 8 + 100 + 100 + 3600 + 00:05:00 + 0.0799 + 10000 + /sandbox/{env.USER}/swiftwork + + + + + 8 + 100 + 100 + 3600 + 00:05:00 + 0.0799 + 10000 + /sandbox/{env.USER}/swiftwork + + + + + 8 + 100 + 100 + 3600 + 00:05:00 + 0.0799 + 10000 + /sandbox/{env.USER}/swiftwork + + + + + 8 + 100 + 100 + 3600 + 00:05:00 + 0.0799 + 10000 + /sandbox/{env.USER}/swiftwork + + + + + 8 + 100 + 100 + 3600 + 00:05:00 + 0.0799 + 10000 + /sandbox/{env.USER}/swiftwork + + + + + 8 + 100 + 100 + 3600 + 00:05:00 + 0.0799 + 10000 + /sandbox/{env.USER}/swiftwork + + + + + 8 + 100 + 100 + 3600 + 00:05:00 + 0.0799 + 10000 + /sandbox/{env.USER}/swiftwork + + + + + 8 + 100 + 100 + 3600 + 00:05:00 + 0.0799 + 10000 + /sandbox/{env.USER}/swiftwork + + + Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,39 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +USERNAME=$MCS_USERNAME + +case $STRESS in + "S1") + SIZE=10 + LOOPS=0 + ;; + "S2") + SIZE=15 + LOOPS=0 + ;; + *) + SIZE=10 + LOOPS=0 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,39 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +USERNAME=$MCS_USERNAME + +case $STRESS in + "S1") + SIZE=100 + LOOPS=0 + ;; + "S2") + SIZE=150 + LOOPS=0 + ;; + *) + SIZE=100 + LOOPS=0 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,40 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +USERNAME=$MCS_USERNAME + +case $STRESS in + "S1") + SIZE=300 + LOOPS=0 + ;; + "S2") + SIZE=500 + LOOPS=0 + ;; + *) + SIZE=300 + LOOPS=0 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi + Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.swift =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x3.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,39 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +USERNAME=$MCS_USERNAME + +case $STRESS in + "S1") + SIZE=20 + LOOPS=10 + ;; + "S2") + SIZE=30 + LOOPS=20 + ;; + *) + SIZE=20 + LOOPS=10 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,39 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +USERNAME=$MCS_USERNAME + +case $STRESS in + "S1") + SIZE=20 + LOOPS=50 + ;; + "S2") + SIZE=50 + LOOPS=50 + ;; + *) + SIZE=20 + LOOPS=50 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,39 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +USERNAME=$MCS_USERNAME + +case $STRESS in + "S1") + SIZE=10 + LOOPS=100 + ;; + "S2") + SIZE=15 + LOOPS=100 + ;; + *) + SIZE=10 + LOOPS=100 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.swift =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx3.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,47 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +USERNAME=$MCS_USERNAME + +case $STRESS in + *) + FILES=50 + LOOPS=0 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @filename(tar) stdout=@filename(out) stderr=@filename(err); +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,47 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +USERNAME=$MCS_USERNAME + +case $STRESS in + *) + FILES=100 + LOOPS=0 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @filename(tar) stdout=@filename(out) stderr=@filename(err); +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,47 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +USERNAME=$MCS_USERNAME + +case $STRESS in + *) + FILES=500 + LOOPS=0 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.swift =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @filename(tar) stdout=@filename(out) stderr=@filename(err); +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x3.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.args =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.args (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.args 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +-loops=10 Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,55 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +USERNAME=$MCS_USERNAME + +case $STRESS in + "S1") + FILES=10 + LOOPS=10 + ;; + "S2") + FILES=10 + LOOPS=50 + ;; + *) + FILES=10 + LOOPS=10 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @tar stdout=@out stderr=@err; +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +1200 Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,55 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +USERNAME=$MCS_USERNAME + +case $STRESS in + "S1") + FILES=50 + LOOPS=100 + ;; + "S2") + FILES=100 + LOOPS=100 + ;; + *) + FILES=50 + LOOPS=100 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @tar stdout=@out stderr=@err; +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +1200 Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,55 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +USERNAME=$MCS_USERNAME + +case $STRESS in + "S1") + FILES=100 + LOOPS=50 + ;; + "S2") + FILES=100 + LOOPS=100 + ;; + *) + FILES=100 + LOOPS=50 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.swift =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @tar stdout=@out stderr=@err; +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx3.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +1200 Added: branches/release-0.94/tests/stress/IO/bagOnodes/swift.properties =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/swift.properties (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/swift.properties 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,8 @@ +use.provider.staging=true +use.wrapper.staging=false +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +provider.staging.pin.swiftfiles=false +sitedir.keep=true +tcp.port.range=50000,51000 \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/bagOnodes/t.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/t.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/t.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,13 @@ +#!/bin/bash + +arr=(crank chrun crush grind steamroller stomp thrash thwomp trounce vanquish); + +for item in ${arr[*]} +do + echo "Host $item.mcs.anl.gov" + echo " Hostname $item.mcs.anl.gov" + echo " User yadunand" + echo " ProxyCommand ssh -A yadunand at login.mcs.anl.gov nc %h %p 2> /dev/null" + echo " ForwardAgent yes" + echo +done \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/t.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/tc.template.data =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/tc.template.data (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/tc.template.data 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,10 @@ +crank bash /bin/bash null null null +churn bash /bin/bash null null null +crush bash /bin/bash null null null +grind bash /bin/bash null null null +steamroller bash /bin/bash null null null +stomp bash /bin/bash null null null +thrash bash /bin/bash null null null +thwomp bash /bin/bash null null null +trounce bash /bin/bash null null null +vanquish bash /bin/bash null null null Added: branches/release-0.94/tests/stress/IO/bagOnodes/temp.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/temp.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/temp.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,19 @@ +#!/bin/bash + +for i in `ls *setup.sh` +do + BASE=${i%.setup.sh}; + echo $BASE + echo "Source file : $BASE.source.sh" + + cat <<'EOF' >> $BASE.setup.sh + +if [[ -n "$BEAGLE_USERNAME" ]] +then + echo "BEAGLE_USERNAME is $BEAGLE_USERNAME"; + sed "s/{env.USER}/$BEAGLE_USERNAME/g" sites.template.xml > sites.backup && mv sites.backup sites.template.xml +fi; + +EOF + +done; \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/temp.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/bagOnodes/title.txt =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/title.txt (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/title.txt 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +IO stress testing at a bag of 10 nodes at MCS, ANL Added: branches/release-0.94/tests/stress/IO/bagOnodes/wrapper.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/wrapper.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/wrapper.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,21 @@ +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" Added: branches/release-0.94/tests/stress/IO/beagle/run =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/run (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/run 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,22 @@ +#! /bin/sh + +set -x +export STRESS="S1" +export COG_OPTS=-Dtcp.channel.log.io.performance=true +#./stage_to_remote.setup.sh +#ARGS=`cat stage_to_remote.args` +#swift -config swift.properties -sites.file sites.template.xml -tc.file tc.template.data stage_to_remote.swift $ARGS + + +#./stage_to_remote1.setup.sh +#ARGS=`cat stage_to_remote1.args` +#swift -config swift.properties -sites.file sites.template.xml -tc.file tc.template.data stage_to_remote1.swift $ARGS + + +#./stage_from_remote.setup.sh +#ARGS=`cat stage_from_remote.args` +#swift -config swift.properties -sites.file sites.template.xml -tc.file tc.template.data stage_from_remote.swift $ARGS + +./stage_to_remote1x1.setup.sh +ARGS=`cat stage_to_remote1x1.args` +swift -config swift.properties -sites.file sites.template.xml -tc.file tc.template.data stage_to_remote1x1.swift $ARGS Property changes on: branches/release-0.94/tests/stress/IO/beagle/run ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/sites.template.xml =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/sites.template.xml (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/sites.template.xml 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,20 @@ + + + + 24 + 100 + 100 + pbs.aprun;pbs.mpp;depth=24 + 3700 + 01:00:00 + /lustre/beagle/{env.USER}/swiftwork + 20 + 10 + 1 + 4.80 + 10000 + trace + + /tmp/{env.USER}/swiftwork + + \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,39 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +BEAGLE_USERNAME=$BEAGLE_USERNAME + +case $STRESS in + "S1") + SIZE=10 + LOOPS=0 + ;; + "S2") + SIZE=15 + LOOPS=0 + ;; + *) + SIZE=10 + LOOPS=0 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF + +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$BEAGLE_USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,10 @@ +#!/bin/bash + +export COG_OPTS=-Dtcp.channel.log.io.performance=true + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,39 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +BEAGLE_USERNAME=$BEAGLE_USERNAME + +case $STRESS in + "S1") + SIZE=100 + LOOPS=0 + ;; + "S2") + SIZE=150 + LOOPS=0 + ;; + *) + SIZE=100 + LOOPS=0 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF + +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$BEAGLE_USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,40 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +BEAGLE_USERNAME=$BEAGLE_USERNAME + +case $STRESS in + "S1") + SIZE=300 + LOOPS=0 + ;; + "S2") + SIZE=500 + LOOPS=0 + ;; + *) + SIZE=300 + LOOPS=0 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF + +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$BEAGLE_USERNAME/" > tmp && mv tmp sites.xml +fi + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.swift =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x3.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,39 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +BEAGLE_USERNAME=$BEAGLE_USERNAME + +case $STRESS in + "S1") + SIZE=20 + LOOPS=10 + ;; + "S2") + SIZE=30 + LOOPS=20 + ;; + *) + SIZE=20 + LOOPS=10 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF + +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$BEAGLE_USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,39 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +BEAGLE_USERNAME=$BEAGLE_USERNAME + +case $STRESS in + "S1") + SIZE=20 + LOOPS=50 + ;; + "S2") + SIZE=50 + LOOPS=50 + ;; + *) + SIZE=20 + LOOPS=50 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF + +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$BEAGLE_USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,39 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +BEAGLE_USERNAME=$BEAGLE_USERNAME + +case $STRESS in + "S1") + SIZE=10 + LOOPS=100 + ;; + "S2") + SIZE=15 + LOOPS=100 + ;; + *) + SIZE=10 + LOOPS=100 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF + +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$BEAGLE_USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.swift =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx3.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.args =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.args (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.args 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +-loops=0 Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,47 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +BEAGLE_USERNAME=$BEAGLE_USERNAME + +case $STRESS in + *) + FILES=50 + LOOPS=0 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF + +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$BEAGLE_USERNAME/" > tmp && mv tmp sites.xml +fi \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @filename(tar) stdout=@filename(out) stderr=@filename(err); +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,47 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +BEAGLE_USERNAME=$BEAGLE_USERNAME + +case $STRESS in + *) + FILES=100 + LOOPS=0 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF + +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$BEAGLE_USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @filename(tar) stdout=@filename(out) stderr=@filename(err); +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,47 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +BEAGLE_USERNAME=$BEAGLE_USERNAME + +case $STRESS in + *) + FILES=500 + LOOPS=0 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF + +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$BEAGLE_USERNAME/" > tmp && mv tmp sites.xml +fi \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.swift =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @filename(tar) stdout=@filename(out) stderr=@filename(err); +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x3.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.args =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.args (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.args 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +-loops=10 Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,55 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +BEAGLE_USERNAME=$BEAGLE_USERNAME + +case $STRESS in + "S1") + FILES=10 + LOOPS=10 + ;; + "S2") + FILES=10 + LOOPS=50 + ;; + *) + FILES=10 + LOOPS=10 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF + +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$BEAGLE_USERNAME/" > tmp && mv tmp sites.xml +fi \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @tar stdout=@out stderr=@err; +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +1200 Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,55 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +BEAGLE_USERNAME=$BEAGLE_USERNAME + +case $STRESS in + "S1") + FILES=50 + LOOPS=100 + ;; + "S2") + FILES=100 + LOOPS=100 + ;; + *) + FILES=50 + LOOPS=100 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF + +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$BEAGLE_USERNAME/" > tmp && mv tmp sites.xml +fi \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @tar stdout=@out stderr=@err; +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +1200 Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,55 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +BEAGLE_USERNAME=$BEAGLE_USERNAME + +case $STRESS in + "S1") + FILES=100 + LOOPS=50 + ;; + "S2") + FILES=100 + LOOPS=100 + ;; + *) + FILES=100 + LOOPS=50 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF + +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$BEAGLE_USERNAME/" > tmp && mv tmp sites.xml +fi \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.swift =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @tar stdout=@out stderr=@err; +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx3.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +1200 Added: branches/release-0.94/tests/stress/IO/beagle/swift.properties =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/swift.properties (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/swift.properties 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,8 @@ +use.provider.staging=true +use.wrapper.staging=false +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +provider.staging.pin.swiftfiles=false +sitedir.keep=true +tcp.port.range=50000,51000 \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/beagle/tc.template.data =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/tc.template.data (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/tc.template.data 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,2 @@ +local perl /usr/bin/perl null null null +beagle bash /bin/bash null null null Added: branches/release-0.94/tests/stress/IO/beagle/temp.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/temp.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/temp.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,20 @@ +#!/bin/bash + +for i in `ls *setup.sh` +do + BASE=${i%.setup.sh}; + echo $BASE + echo "Source file : $BASE.source.sh" + + cat <<'EOF' > $BASE.source.sh +#!/bin/bash + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; + +EOF + +done; \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/beagle/temp.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/title.txt =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/title.txt (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/title.txt 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,3 @@ +IO stress testing. +Local site : ANY +Remote site: Beagle Added: branches/release-0.94/tests/stress/IO/beagle/wrapper.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/wrapper.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/wrapper.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,21 @@ +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" Added: branches/release-0.94/tests/stress/IO/multiple/run =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/run (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/run 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,22 @@ +#! /bin/sh + +set -x +export STRESS="S1" +export COG_OPTS=-Dtcp.channel.log.io.performance=true +#./stage_to_remote.setup.sh +#ARGS=`cat stage_to_remote.args` +#swift -config swift.properties -sites.file sites.template.xml -tc.file tc.template.data stage_to_remote.swift $ARGS + + +#./stage_to_remote1.setup.sh +#ARGS=`cat stage_to_remote1.args` +#swift -config swift.properties -sites.file sites.template.xml -tc.file tc.template.data stage_to_remote1.swift $ARGS + + +#./stage_from_remote.setup.sh +#ARGS=`cat stage_from_remote.args` +#swift -config swift.properties -sites.file sites.template.xml -tc.file tc.template.data stage_from_remote.swift $ARGS + +./stage_to_remote1x1.setup.sh +ARGS=`cat stage_to_remote1x1.args` +swift -config swift.properties -sites.file sites.template.xml -tc.file tc.template.data stage_to_remote1x1.swift $ARGS Property changes on: branches/release-0.94/tests/stress/IO/multiple/run ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/sites.template.xml =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/sites.template.xml (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/sites.template.xml 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,70 @@ + + + + + 10.00 + 10000 + 1 + 3600 + 00:05:00 + 100 + 100 + 1000 + 1 + 1 + "group_friends.{uc3.USER}" + nonshared + + . + + + + + 24 + 100 + 100 + + pbs.aprun;pbs.mpp;depth=24;pbs.resource_list=advres=wilde.1768 + 3600 + 00:05:00 + /lustre/beagle/{beagle.USER}/swiftwork + 5 + 1 + 1 + 4.80 + 10000 + /tmp/{beagle.USER}/swiftwork + + + + + sandyb + 16 + 00:05:00 + 3600 + 100 + 100 + 4 + 1 + 1 + .64 + 10000 + /tmp/{mid.USER} + + + + + westmere + 12 + 00:05:00 + 3600 + 100 + 100 + 4 + 1 + 1 + .48 + 10000 + /tmp/{mid.USER} + + Added: branches/release-0.94/tests/stress/IO/multiple/sites.template.xml.beagle =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/sites.template.xml.beagle (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/sites.template.xml.beagle 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,20 @@ + + + + 24 + 100 + 100 + pbs.aprun;pbs.mpp;depth=24 + 3600 + 00:05:00 + /lustre/beagle/yadunandb/swiftwork + 20 + 1 + 1 + 4.80 + 10000 + trace + + /tmp/yadunandb/swiftwork + + \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.args =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.args (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.args 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +-loops=0 Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,64 @@ +#!/bin/bash + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + *) + FILES=50 + LOOPS=0 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @filename(tar) stdout=@filename(out) stderr=@filename(err); +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,63 @@ +#!/bin/bash + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + *) + FILES=100 + LOOPS=0 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @filename(tar) stdout=@filename(out) stderr=@filename(err); +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,63 @@ +#!/bin/bash + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + *) + FILES=500 + LOOPS=0 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.swift =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @filename(tar) stdout=@filename(out) stderr=@filename(err); +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x3.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/multiple/swift.properties =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/swift.properties (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/swift.properties 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,8 @@ +use.provider.staging=true +use.wrapper.staging=false +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +provider.staging.pin.swiftfiles=false +sitedir.keep=true +tcp.port.range=50000,51000 \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/tc.template.data =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/tc.template.data (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/tc.template.data 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,2 @@ +local perl /usr/bin/perl null null null +beagle bash /bin/bash null null null Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x1.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,60 @@ +#!/bin/bash +#OVERRIDE_GLOBUS_HOST swift.rcc.uchicago.edu +#OVERRIDE_GLOBUS_TCP_PORT_RANGE 50000,51000 +MIDWAY_USERNAME="yadunand" +BEAGLE_USERNAME="yadunandb" +UC3_USERNAME="yadunand" + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=10 + LOOPS=0 + ;; + "S2") + SIZE=15 + LOOPS=0 + ;; + *) + SIZE=10 + LOOPS=0 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x1.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x1.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x2.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,60 @@ +#!/bin/bash +#OVERRIDE_GLOBUS_HOST swift.rcc.uchicago.edu +#OVERRIDE_GLOBUS_TCP_PORT_RANGE 50000,51000 +MIDWAY_USERNAME="yadunand" +BEAGLE_USERNAME="yadunandb" +UC3_USERNAME="yadunand" + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=100 + LOOPS=0 + ;; + "S2") + SIZE=150 + LOOPS=0 + ;; + *) + SIZE=100 + LOOPS=0 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x2.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x2.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x3.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x3.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x3.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,59 @@ +#!/bin/bash + +MIDWAY_USERNAME="yadunand" +BEAGLE_USERNAME="yadunandb" +UC3_USERNAME="yadunand" + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=300 + LOOPS=0 + ;; + "S2") + SIZE=500 + LOOPS=0 + ;; + *) + SIZE=300 + LOOPS=0 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x3.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x3.swift =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x3.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x3.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x3.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x3.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remote1x3.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx1.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,59 @@ +#!/bin/bash + +MIDWAY_USERNAME="yadunand" +BEAGLE_USERNAME="yadunandb" +UC3_USERNAME="yadunand" + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=20 + LOOPS=10 + ;; + "S2") + SIZE=30 + LOOPS=20 + ;; + *) + SIZE=20 + LOOPS=10 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx1.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx1.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx2.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,59 @@ +#!/bin/bash + +MIDWAY_USERNAME="yadunand" +BEAGLE_USERNAME="yadunandb" +UC3_USERNAME="yadunand" + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=20 + LOOPS=50 + ;; + "S2") + SIZE=50 + LOOPS=50 + ;; + *) + SIZE=20 + LOOPS=50 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx2.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx2.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx3.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx3.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx3.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,59 @@ +#!/bin/bash + +MIDWAY_USERNAME="yadunand" +BEAGLE_USERNAME="yadunandb" +UC3_USERNAME="yadunand" + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=10 + LOOPS=100 + ;; + "S2") + SIZE=15 + LOOPS=100 + ;; + *) + SIZE=10 + LOOPS=100 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx3.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx3.swift =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx3.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx3.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx3.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx3.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/temp/stage_from_remoteNx3.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/multiple/title.txt =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/title.txt (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/title.txt 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +IO stress testing on multiple remote sites: Beagle | UC3 | Midway Added: branches/release-0.94/tests/stress/IO/multiple/wrapper.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/wrapper.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/wrapper.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,21 @@ +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" Added: branches/release-0.94/tests/stress/IO/uc3/run =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/run (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/run 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,11 @@ +#! /bin/sh + +set -x +export STRESS="S1" + +export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu +./stage_to_remote1x1.setup.sh +. stage_to_remote1x1.source.sh + +ARGS=`cat stage_to_remote1x1.args` +swift -config cf -sites.file sites.template.xml -tc.file tc.template.data stage_to_remote1x1.swift $ARGS Property changes on: branches/release-0.94/tests/stress/IO/uc3/run ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/script.args =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/script.args (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/script.args 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +-loops=10 Added: branches/release-0.94/tests/stress/IO/uc3/script.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/script.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/script.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,28 @@ +#!/bin/bash + +ARGS_FILE=script.args +case $STRESS in + "S1") + FILES=10 + LOOPS=10 + ;; + "S2") + FILES=100 + LOOPS=10 + ;; + "S3") + FILES=200 + LOOPS=20 + ;; + "S4") + FILES=300 + LOOPS=10 + ;; + *) + FILES=10 + LOOPS=10 + ;; +esac + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/uc3/script.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/sites.backup.xml =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/sites.backup.xml (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/sites.backup.xml 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,19 @@ + + + + .99 + 1000 + 1 + 3600 + 10 + 100 + 100 + 1 + UidDomain == "osg-gk.mwt2.org" + 10 + "group_friends.{env.USER}" + nonshared + + /tmp/workdir + + \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/sites.template.xml =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/sites.template.xml (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/sites.template.xml 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ + + + + 10.00 + 10000 + 1 + 3600 + 00:30:00 + 100 + 100 + 1000 + 1 + 1 + nonshared + . + + \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.args =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.args (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.args 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +-loops=0 Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,38 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + *) + FILES=50 + LOOPS=0 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @filename(tar) stdout=@filename(out) stderr=@filename(err); +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/uc3/swift.properties =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/swift.properties (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/swift.properties 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,8 @@ +use.provider.staging=true +use.wrapper.staging=false +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +provider.staging.pin.swiftfiles=false +sitedir.keep=true +tcp.port.range=50000,51000 \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/tc.template.data =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/tc.template.data (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/tc.template.data 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,2 @@ +beagle bash /bin/bash null null null +uc3 bash /bin/bash null null null Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,13 @@ +#!/bin/bash + +echo "-loops=10 -size=10 -Dtcp.channel.log.io.performance=true" > stage_from_remote.args + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,7 @@ +#!/bin/bash + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,30 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=10 + LOOPS=0 + ;; + "S2") + SIZE=15 + LOOPS=0 + ;; + *) + SIZE=10 + LOOPS=0 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x1.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,30 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=100 + LOOPS=0 + ;; + "S2") + SIZE=150 + LOOPS=0 + ;; + *) + SIZE=100 + LOOPS=0 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x2.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,30 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=300 + LOOPS=0 + ;; + "S2") + SIZE=500 + LOOPS=0 + ;; + *) + SIZE=300 + LOOPS=0 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remote1x3.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,30 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=20 + LOOPS=10 + ;; + "S2") + SIZE=30 + LOOPS=20 + ;; + *) + SIZE=20 + LOOPS=10 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx1.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,30 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=20 + LOOPS=50 + ;; + "S2") + SIZE=50 + LOOPS=50 + ;; + *) + SIZE=20 + LOOPS=50 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx2.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,30 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=10 + LOOPS=100 + ;; + "S2") + SIZE=15 + LOOPS=100 + ;; + *) + SIZE=10 + LOOPS=100 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_from_remoteNx3.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,38 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + *) + FILES=100 + LOOPS=0 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @filename(tar) stdout=@filename(out) stderr=@filename(err); +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x2.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,38 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + *) + FILES=500 + LOOPS=0 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @filename(tar) stdout=@filename(out) stderr=@filename(err); +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remote1x3.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.args =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.args (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.args 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +-loops=10 Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,46 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + FILES=10 + LOOPS=10 + ;; + "S2") + FILES=10 + LOOPS=50 + ;; + *) + FILES=10 + LOOPS=10 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @tar stdout=@out stderr=@err; +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx1.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +1200 Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,46 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + FILES=50 + LOOPS=100 + ;; + "S2") + FILES=100 + LOOPS=100 + ;; + *) + FILES=50 + LOOPS=100 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @tar stdout=@out stderr=@err; +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx2.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +1200 Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,46 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + FILES=100 + LOOPS=50 + ;; + "S2") + FILES=100 + LOOPS=100 + ;; + *) + FILES=100 + LOOPS=50 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.source.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.swift 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @tar stdout=@out stderr=@err; +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/temp/stage_to_remoteNx3.timeout 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +1200 Added: branches/release-0.94/tests/stress/IO/uc3/title.txt =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/title.txt (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/title.txt 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1 @@ +IO stress testing at remote site: UC3 Added: branches/release-0.94/tests/stress/IO/uc3/wrapper.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/wrapper.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/wrapper.sh 2013-07-02 21:02:21 UTC (rev 6596) @@ -0,0 +1,21 @@ +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" Property changes on: branches/release-0.94/tests/stress/IO/uc3/wrapper.sh ___________________________________________________________________ Added: svn:executable + * From yadunandb at ci.uchicago.edu Tue Jul 2 16:04:42 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Tue, 02 Jul 2013 21:04:42 -0000 Subject: [Swift-commit] r6597 - in branches/release-0.94/tests/stress: . apps/modis_beagle apps/modis_local apps/modis_midway apps/modis_multiple apps/modis_uc3 internals long_runs Message-ID: <20130702210442.2CE84187CC1@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-02 16:04:42 -0500 (Tue, 02 Jul 2013) New Revision: 6597 Added: branches/release-0.94/tests/stress/long_runs/ branches/release-0.94/tests/stress/long_runs/.test branches/release-0.94/tests/stress/long_runs/clean.sh branches/release-0.94/tests/stress/long_runs/long_runner0.setup.sh branches/release-0.94/tests/stress/long_runs/long_runner0.source.sh branches/release-0.94/tests/stress/long_runs/long_runner0.swift branches/release-0.94/tests/stress/long_runs/long_runner1.args branches/release-0.94/tests/stress/long_runs/long_runner1.setup.sh branches/release-0.94/tests/stress/long_runs/long_runner1.source.sh branches/release-0.94/tests/stress/long_runs/long_runner1.swift branches/release-0.94/tests/stress/long_runs/run branches/release-0.94/tests/stress/long_runs/sites.new.xml branches/release-0.94/tests/stress/long_runs/sites.template.xml branches/release-0.94/tests/stress/long_runs/swift.properties branches/release-0.94/tests/stress/long_runs/tc.template.data branches/release-0.94/tests/stress/long_runs/temp.sh branches/release-0.94/tests/stress/long_runs/title.txt branches/release-0.94/tests/stress/long_runs/wrapper.sh Modified: branches/release-0.94/tests/stress/apps/modis_beagle/modis.setup.sh branches/release-0.94/tests/stress/apps/modis_beagle/sites.template.xml branches/release-0.94/tests/stress/apps/modis_local/modis.setup.sh branches/release-0.94/tests/stress/apps/modis_midway/modis.setup.sh branches/release-0.94/tests/stress/apps/modis_multiple/modis.setup.sh branches/release-0.94/tests/stress/apps/modis_multiple/sites.template.xml branches/release-0.94/tests/stress/apps/modis_uc3/modis.setup.sh branches/release-0.94/tests/stress/internals/x_sleep.swift Log: Revamped modis tests, now with single user profile for configs Minor changes to x_sleep Added long_runner tests to test long term behavior. Modified: branches/release-0.94/tests/stress/apps/modis_beagle/modis.setup.sh =================================================================== --- branches/release-0.94/tests/stress/apps/modis_beagle/modis.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) +++ branches/release-0.94/tests/stress/apps/modis_beagle/modis.setup.sh 2013-07-02 21:04:42 UTC (rev 6597) @@ -1,5 +1,14 @@ #!/bin/bash +USERNAME=$BEAGLE_USERNAME +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi + case $STRESS in "S1") FILES=10 @@ -18,10 +27,6 @@ ;; esac -export GLOBUS_HOSTNAME="128.135.112.73" -export GLOBUS_TCP_PORT_RANGE=50000,51000 -#OVERRIDE_GLOBUS_HOSTNAME "128.135.112.73" - nfiles=${FILES:-10} rm -rf input Modified: branches/release-0.94/tests/stress/apps/modis_beagle/sites.template.xml =================================================================== --- branches/release-0.94/tests/stress/apps/modis_beagle/sites.template.xml 2013-07-02 21:02:21 UTC (rev 6596) +++ branches/release-0.94/tests/stress/apps/modis_beagle/sites.template.xml 2013-07-02 21:04:42 UTC (rev 6597) @@ -1,35 +1,18 @@ - - - 24 - 100 - 100 - pbs.aprun;pbs.mpp;depth=24 - 3600 - 00:05:00 - - /lustre/beagle/$USER/swiftwork - + /lustre/beagle/{env.USER}/swiftwork 20 - 1 - 1 - 4.80 - 10000 - - /tmp/$USER/swiftwork - + /tmp/{env.USER}/swiftwork - \ No newline at end of file Modified: branches/release-0.94/tests/stress/apps/modis_local/modis.setup.sh =================================================================== --- branches/release-0.94/tests/stress/apps/modis_local/modis.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) +++ branches/release-0.94/tests/stress/apps/modis_local/modis.setup.sh 2013-07-02 21:04:42 UTC (rev 6597) @@ -1,5 +1,13 @@ #!/bin/bash +USERNAME="{env.USER}" +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi case $STRESS in "S1") FILES=100 Modified: branches/release-0.94/tests/stress/apps/modis_midway/modis.setup.sh =================================================================== --- branches/release-0.94/tests/stress/apps/modis_midway/modis.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) +++ branches/release-0.94/tests/stress/apps/modis_midway/modis.setup.sh 2013-07-02 21:04:42 UTC (rev 6597) @@ -1,5 +1,13 @@ #!/bin/bash +USERNAME=$MIDWAY_USERNAME +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi case $STRESS in "S1") FILES=10 Modified: branches/release-0.94/tests/stress/apps/modis_multiple/modis.setup.sh =================================================================== --- branches/release-0.94/tests/stress/apps/modis_multiple/modis.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) +++ branches/release-0.94/tests/stress/apps/modis_multiple/modis.setup.sh 2013-07-02 21:04:42 UTC (rev 6597) @@ -1,5 +1,27 @@ #!/bin/bash +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp sites.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv tmp sites.xml +fi + case $STRESS in "S1") FILES=10 Modified: branches/release-0.94/tests/stress/apps/modis_multiple/sites.template.xml =================================================================== --- branches/release-0.94/tests/stress/apps/modis_multiple/sites.template.xml 2013-07-02 21:02:21 UTC (rev 6596) +++ branches/release-0.94/tests/stress/apps/modis_multiple/sites.template.xml 2013-07-02 21:04:42 UTC (rev 6597) @@ -12,8 +12,8 @@ 1000 1 1 - "group_friends.{env.USER}" - nonshared + "group_friends.{uc3.USER}" + nonsharedl . @@ -27,13 +27,13 @@ pbs.aprun;pbs.mpp;depth=24;pbs.resource_list=advres=wilde.1768 3600 00:05:00 - /lustre/beagle/{env.USER}/swiftwork + /lustre/beagle/{beagle.USER}/swiftwork 5 1 1 4.80 10000 - /tmp/{env.USER}/swiftwork + /tmp/{beagle.USER}/swiftwork @@ -49,7 +49,7 @@ 1 .64 10000 - /tmp/{env.USER} + /tmp/{mid.USER} @@ -65,7 +65,7 @@ 1 .48 10000 - /tmp/{env.USER} + /tmp/{mid.USER} Modified: branches/release-0.94/tests/stress/apps/modis_uc3/modis.setup.sh =================================================================== --- branches/release-0.94/tests/stress/apps/modis_uc3/modis.setup.sh 2013-07-02 21:02:21 UTC (rev 6596) +++ branches/release-0.94/tests/stress/apps/modis_uc3/modis.setup.sh 2013-07-02 21:04:42 UTC (rev 6597) @@ -1,5 +1,15 @@ #!/bin/bash +USERNAME=$UC3_USERNAME + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi + case $STRESS in "S1") FILES=10 Modified: branches/release-0.94/tests/stress/internals/x_sleep.swift =================================================================== --- branches/release-0.94/tests/stress/internals/x_sleep.swift 2013-07-02 21:02:21 UTC (rev 6596) +++ branches/release-0.94/tests/stress/internals/x_sleep.swift 2013-07-02 21:04:42 UTC (rev 6597) @@ -12,13 +12,12 @@ */ int limit = @toint(@arg("loops")); -int range[] = [0:limit:1]; int result[]; app sleep (int seconds){ sleep seconds; } -foreach num in range { +foreach num in [0:limit:1] { sleep(num%%5); } \ No newline at end of file Added: branches/release-0.94/tests/stress/long_runs/.test =================================================================== Added: branches/release-0.94/tests/stress/long_runs/clean.sh =================================================================== --- branches/release-0.94/tests/stress/long_runs/clean.sh (rev 0) +++ branches/release-0.94/tests/stress/long_runs/clean.sh 2013-07-02 21:04:42 UTC (rev 6597) @@ -0,0 +1,6 @@ +#!/bin/bash + +rm -rf *log *d +rm -rf *swiftx *kml +rm -rf *~ +rm *{out,err} \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/long_runs/clean.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/long_runs/long_runner0.setup.sh =================================================================== --- branches/release-0.94/tests/stress/long_runs/long_runner0.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/long_runs/long_runner0.setup.sh 2013-07-02 21:04:42 UTC (rev 6597) @@ -0,0 +1,60 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + *) + DELAY=90 + FILES=10 + LOOPS=10 + TIMEOUT=600 + ;; +esac + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "$TIMEOUT" > ${0%.setup.sh}.timeout +echo "-loops=$LOOPS -delay=$DELAY" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ARG2=$2 + +echo "ARGS : $*" +DEFAULT_SLEEP=60 +VARIANCE=20 # in percent + +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi + +if [ -z $ARG2 ] +then + echo "Switching to default" + ARG2=$DEFAULT_SLEEP +fi + +CHANGE=$(($ARG2*$VARIANCE/100)) +RAND=$(shuf -i 0-$((2*CHANGE)) -n 1) + +echo "sleep $(($ARG2-$CHANGE+$RAND))" +sleep $(($ARG2-$CHANGE+$RAND)) + +cat $ARG1 > $ARG1.test + +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF Property changes on: branches/release-0.94/tests/stress/long_runs/long_runner0.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/long_runs/long_runner0.source.sh =================================================================== --- branches/release-0.94/tests/stress/long_runs/long_runner0.source.sh (rev 0) +++ branches/release-0.94/tests/stress/long_runs/long_runner0.source.sh 2013-07-02 21:04:42 UTC (rev 6597) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/long_runs/long_runner0.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/long_runs/long_runner0.swift =================================================================== --- branches/release-0.94/tests/stress/long_runs/long_runner0.swift (rev 0) +++ branches/release-0.94/tests/stress/long_runs/long_runner0.swift 2013-07-02 21:04:42 UTC (rev 6597) @@ -0,0 +1,18 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); +int delay = @toInt(@arg("delay","60")); + +app (file out, file err) remote_driver (file run, file tar, int delay) +{ + bash @run @filename(tar) delay stdout=@filename(out) stderr=@filename(err); +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package, delay); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/long_runs/long_runner1.args =================================================================== --- branches/release-0.94/tests/stress/long_runs/long_runner1.args (rev 0) +++ branches/release-0.94/tests/stress/long_runs/long_runner1.args 2013-07-02 21:04:42 UTC (rev 6597) @@ -0,0 +1 @@ +-loops=10 -delay=10 Added: branches/release-0.94/tests/stress/long_runs/long_runner1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/long_runs/long_runner1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/long_runs/long_runner1.setup.sh 2013-07-02 21:04:42 UTC (rev 6597) @@ -0,0 +1,60 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + *) + DELAY=10 + FILES=10 + LOOPS=10 + TIMEOUT=600 + ;; +esac + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "$TIMEOUT" > ${0%.setup.sh}.timeout +echo "-loops=$LOOPS -delay=$DELAY" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ARG2=$2 + +echo "ARGS : $*" +DEFAULT_SLEEP=60 +VARIANCE=20 # in percent + +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi + +if [ -z $ARG2 ] +then + echo "Switching to default" + ARG2=$DEFAULT_SLEEP +fi + +CHANGE=$(($ARG2*$VARIANCE/100)) +RAND=$(shuf -i 0-$((2*CHANGE)) -n 1) + +echo "sleep $(($ARG2-$CHANGE+$RAND))" +sleep $(($ARG2-$CHANGE+$RAND)) + +cat $ARG1 > $ARG1.test + +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF Property changes on: branches/release-0.94/tests/stress/long_runs/long_runner1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/long_runs/long_runner1.source.sh =================================================================== --- branches/release-0.94/tests/stress/long_runs/long_runner1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/long_runs/long_runner1.source.sh 2013-07-02 21:04:42 UTC (rev 6597) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/long_runs/long_runner1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/long_runs/long_runner1.swift =================================================================== --- branches/release-0.94/tests/stress/long_runs/long_runner1.swift (rev 0) +++ branches/release-0.94/tests/stress/long_runs/long_runner1.swift 2013-07-02 21:04:42 UTC (rev 6597) @@ -0,0 +1,21 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loops = @toInt(@arg("loops","0")); +int inner = @toInt(@arg("inner", "10")); +int delay = @toInt(@arg("delay","60")); + +app (file out, file err) remote_driver (file run, file tar, int delay) +{ + bash @run @filename(tar) delay stdout=@filename(out) stderr=@filename(err); +} + +file driver_out[][] ; +file driver_err[][] ; + +foreach index,j in [1:loops] { + foreach item,i in [1:inner] { + (driver_out[j][i], driver_err[j][i]) = remote_driver(script, package, delay); + } +} \ No newline at end of file Added: branches/release-0.94/tests/stress/long_runs/run =================================================================== --- branches/release-0.94/tests/stress/long_runs/run (rev 0) +++ branches/release-0.94/tests/stress/long_runs/run 2013-07-02 21:04:42 UTC (rev 6597) @@ -0,0 +1,12 @@ +#! /bin/sh + +set -x +export STRESS="S1" + +#./long_runner0.setup.sh +#ARGS=`cat long_runner0.args` +#swift -config swift.properties -sites.file sites.template.xml -tc.file tc.template.data long_runner0.swift $ARGS + +./long_runner1.setup.sh +ARGS=`cat long_runner1.args` +swift -config swift.properties -sites.file sites.template.xml -tc.file tc.template.data long_runner1.swift $ARGS Property changes on: branches/release-0.94/tests/stress/long_runs/run ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/long_runs/sites.new.xml =================================================================== --- branches/release-0.94/tests/stress/long_runs/sites.new.xml (rev 0) +++ branches/release-0.94/tests/stress/long_runs/sites.new.xml 2013-07-02 21:04:42 UTC (rev 6597) @@ -0,0 +1,20 @@ + + + + 24 + 100 + 100 + pbs.aprun;pbs.mpp;depth=24 + 3600 + 00:05:00 + /lustre/beagle/yadunandb/swiftwork + 20 + 1 + 1 + 4.80 + 10000 + trace + + /tmp/yadunandb/swiftwork + + \ No newline at end of file Added: branches/release-0.94/tests/stress/long_runs/sites.template.xml =================================================================== --- branches/release-0.94/tests/stress/long_runs/sites.template.xml (rev 0) +++ branches/release-0.94/tests/stress/long_runs/sites.template.xml 2013-07-02 21:04:42 UTC (rev 6597) @@ -0,0 +1,20 @@ + + + + 24 + 100 + 100 + pbs.aprun;pbs.mpp;depth=24 + 36000 + 09:00:00 + /lustre/beagle/yadunandb/swiftwork + 20 + 1 + 1 + 4.80 + 10000 + trace + + /tmp/yadunandb/swiftwork + + \ No newline at end of file Added: branches/release-0.94/tests/stress/long_runs/swift.properties =================================================================== --- branches/release-0.94/tests/stress/long_runs/swift.properties (rev 0) +++ branches/release-0.94/tests/stress/long_runs/swift.properties 2013-07-02 21:04:42 UTC (rev 6597) @@ -0,0 +1,8 @@ +use.provider.staging=true +use.wrapper.staging=false +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +provider.staging.pin.swiftfiles=false +sitedir.keep=true +tcp.port.range=50000,51000 \ No newline at end of file Added: branches/release-0.94/tests/stress/long_runs/tc.template.data =================================================================== --- branches/release-0.94/tests/stress/long_runs/tc.template.data (rev 0) +++ branches/release-0.94/tests/stress/long_runs/tc.template.data 2013-07-02 21:04:42 UTC (rev 6597) @@ -0,0 +1,2 @@ +local perl /usr/bin/perl null null null +beagle bash /bin/bash null null null Added: branches/release-0.94/tests/stress/long_runs/temp.sh =================================================================== --- branches/release-0.94/tests/stress/long_runs/temp.sh (rev 0) +++ branches/release-0.94/tests/stress/long_runs/temp.sh 2013-07-02 21:04:42 UTC (rev 6597) @@ -0,0 +1,19 @@ +#!/bin/bash + +for i in `ls *setup.sh` +do + BASE=${i%.setup.sh}; + echo $BASE + echo "Source file : $BASE.source.sh" + + cat <<'EOF' >> $BASE.setup.sh + +if [[ -n "$BEAGLE_USERNAME" ]] +then + echo "BEAGLE_USERNAME is $BEAGLE_USERNAME"; + sed "s/{env.USER}/$BEAGLE_USERNAME/g" sites.template.xml > sites.backup && mv sites.backup sites.template.xml +fi; + +EOF + +done; \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/long_runs/temp.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/long_runs/title.txt =================================================================== --- branches/release-0.94/tests/stress/long_runs/title.txt (rev 0) +++ branches/release-0.94/tests/stress/long_runs/title.txt 2013-07-02 21:04:42 UTC (rev 6597) @@ -0,0 +1,3 @@ +IO stress testing. +Local site : ANY +Remote site: Beagle Added: branches/release-0.94/tests/stress/long_runs/wrapper.sh =================================================================== --- branches/release-0.94/tests/stress/long_runs/wrapper.sh (rev 0) +++ branches/release-0.94/tests/stress/long_runs/wrapper.sh 2013-07-02 21:04:42 UTC (rev 6597) @@ -0,0 +1,41 @@ +#!/bin/bash +ARG1=$1 +ARG2=$2 + +echo "ARGS : $*" +DEFAULT_SLEEP=60 +VARIANCE=20 # in percent + +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi + +if [ -z $ARG2 ] +then + echo "Switching to default" + ARG2=$DEFAULT_SLEEP +fi + +CHANGE=$(($ARG2*$VARIANCE/100)) +RAND=$(shuf -i 0-$((2*CHANGE)) -n 1) + +echo "sleep $(($ARG2-$CHANGE+$RAND))" +sleep $(($ARG2-$CHANGE+$RAND)) + +cat $ARG1 > $ARG1.test + +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" From yadunandb at ci.uchicago.edu Tue Jul 2 16:07:10 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Tue, 02 Jul 2013 21:07:10 -0000 Subject: [Swift-commit] r6598 - in branches/release-0.94/tests/stress: . remote_sanity remote_sanity/beagle remote_sanity/mac-frisbee remote_sanity/mcs remote_sanity/midway remote_sanity/uc3 Message-ID: <20130702210709.CA311187CC1@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-02 16:07:09 -0500 (Tue, 02 Jul 2013) New Revision: 6598 Added: branches/release-0.94/tests/stress/remote_sanity/ branches/release-0.94/tests/stress/remote_sanity/beagle/ branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.setup.sh branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.source.sh branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.swift branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.timeout branches/release-0.94/tests/stress/remote_sanity/beagle/sites.template.xml branches/release-0.94/tests/stress/remote_sanity/beagle/swift.properties branches/release-0.94/tests/stress/remote_sanity/beagle/tc.template.data branches/release-0.94/tests/stress/remote_sanity/beagle/title.txt branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/ branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/run.sh branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.setup.sh branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.source.sh branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.swift branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.timeout branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sites.template.xml branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/swift.properties branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/tc.template.data branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/title.txt branches/release-0.94/tests/stress/remote_sanity/mcs/ branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.setup.sh branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.source.sh branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.swift branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.timeout branches/release-0.94/tests/stress/remote_sanity/mcs/sites.new.xml branches/release-0.94/tests/stress/remote_sanity/mcs/sites.template.xml branches/release-0.94/tests/stress/remote_sanity/mcs/swift.properties branches/release-0.94/tests/stress/remote_sanity/mcs/tc.template.data branches/release-0.94/tests/stress/remote_sanity/mcs/title.txt branches/release-0.94/tests/stress/remote_sanity/midway/ branches/release-0.94/tests/stress/remote_sanity/midway/sanity.setup.sh branches/release-0.94/tests/stress/remote_sanity/midway/sanity.source.sh branches/release-0.94/tests/stress/remote_sanity/midway/sanity.swift branches/release-0.94/tests/stress/remote_sanity/midway/sanity.timeout branches/release-0.94/tests/stress/remote_sanity/midway/sites.new.xml branches/release-0.94/tests/stress/remote_sanity/midway/sites.template.xml branches/release-0.94/tests/stress/remote_sanity/midway/swift.properties branches/release-0.94/tests/stress/remote_sanity/midway/tc.template.data branches/release-0.94/tests/stress/remote_sanity/midway/title.txt branches/release-0.94/tests/stress/remote_sanity/uc3/ branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.setup.sh branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.source.sh branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.swift branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.timeout branches/release-0.94/tests/stress/remote_sanity/uc3/sites.new.xml branches/release-0.94/tests/stress/remote_sanity/uc3/sites.template.xml branches/release-0.94/tests/stress/remote_sanity/uc3/swift.properties branches/release-0.94/tests/stress/remote_sanity/uc3/tc.template.data branches/release-0.94/tests/stress/remote_sanity/uc3/title.txt Log: Top level test to run sanity checks on connectivity from localhost to Beagle, MCS, UC3, Mac machine frisbee, and Midway Added: branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.setup.sh =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.setup.sh 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,11 @@ +#!/bin/bash + +USERNAME=$BEAGLE_USERNAME + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.source.sh =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.source.sh (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.source.sh 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "$HOSTNAME" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.swift =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.swift (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.swift 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,11 @@ +type file; + +app (file out, file err) remote_driver () +{ + date stdout=@filename(out) stderr=@filename(err); +} + +file driver_out ; +file driver_err ; + +(driver_out, driver_err) = remote_driver(); \ No newline at end of file Added: branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.timeout =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.timeout (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.timeout 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1 @@ +300 Added: branches/release-0.94/tests/stress/remote_sanity/beagle/sites.template.xml =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/beagle/sites.template.xml (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/beagle/sites.template.xml 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,20 @@ + + + + 24 + 100 + 100 + pbs.aprun;pbs.mpp;depth=24 + 3700 + 01:00:00 + /lustre/beagle/{env.USER}/swiftwork + 20 + 10 + 1 + 4.80 + 10000 + trace + + /tmp/{env.USER}/swiftwork + + \ No newline at end of file Added: branches/release-0.94/tests/stress/remote_sanity/beagle/swift.properties =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/beagle/swift.properties (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/beagle/swift.properties 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,8 @@ +use.provider.staging=true +use.wrapper.staging=false +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +provider.staging.pin.swiftfiles=false +sitedir.keep=true +tcp.port.range=50000,51000 \ No newline at end of file Added: branches/release-0.94/tests/stress/remote_sanity/beagle/tc.template.data =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/beagle/tc.template.data (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/beagle/tc.template.data 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,5 @@ +local date /bin/date null null null +beagle date /bin/date null null null +uc3 date /bin/date null null null +mcs date /bin/date null null null +midway date /bin/date null null null Added: branches/release-0.94/tests/stress/remote_sanity/beagle/title.txt =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/beagle/title.txt (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/beagle/title.txt 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1 @@ +Beagle remote sanity test Added: branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/run.sh =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/run.sh (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/run.sh 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,8 @@ +#!/bin/bash + +export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + +swift -tc.file tc.template.data \ + -sites.file sites.template.xml \ + -config swift.properties \ + sanity.swift Property changes on: branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/run.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.setup.sh =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.setup.sh 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,11 @@ +#!/bin/bash + +USERNAME=$MIDWAY_USERNAME + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.source.sh =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.source.sh (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.source.sh 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "$HOSTNAME" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.swift =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.swift (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.swift 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,11 @@ +type file; + +app (file out, file err) remote_driver () +{ + date stdout=@filename(out) stderr=@filename(err); +} + +file driver_out ; +file driver_err ; + +(driver_out, driver_err) = remote_driver(); \ No newline at end of file Added: branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.timeout =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.timeout (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.timeout 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1 @@ +300 Added: branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sites.template.xml =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sites.template.xml (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sites.template.xml 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,14 @@ + + + + 8 + 100 + 100 + 3600 + 00:05:00 + 0.0799 + 10000 + + /homes/yadunand/swiftwork + + Added: branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/swift.properties =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/swift.properties (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/swift.properties 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,8 @@ +use.provider.staging=true +use.wrapper.staging=false +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +provider.staging.pin.swiftfiles=false +sitedir.keep=true +tcp.port.range=50000,51000 \ No newline at end of file Added: branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/tc.template.data =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/tc.template.data (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/tc.template.data 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,6 @@ +local date /bin/date null null null +beagle date /bin/date null null null +uc3 date /bin/date null null null +mcs date /bin/date null null null +midway date /bin/date null null null +frisbee date /bin/ls null null null \ No newline at end of file Added: branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/title.txt =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/title.txt (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/title.txt 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1 @@ +MAC-frisbee remote sanity test Added: branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.setup.sh =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.setup.sh 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,11 @@ +#!/bin/bash + +USERNAME=$MCS_USERNAME + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.source.sh =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.source.sh (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.source.sh 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "$HOSTNAME" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.swift =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.swift (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.swift 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,11 @@ +type file; + +app (file out, file err) remote_driver () +{ + date stdout=@filename(out) stderr=@filename(err); +} + +file driver_out ; +file driver_err ; + +(driver_out, driver_err) = remote_driver(); \ No newline at end of file Added: branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.timeout =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.timeout (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mcs/sanity.timeout 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1 @@ +300 Added: branches/release-0.94/tests/stress/remote_sanity/mcs/sites.new.xml =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mcs/sites.new.xml (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mcs/sites.new.xml 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,20 @@ + + + + 24 + 100 + 100 + pbs.aprun;pbs.mpp;depth=24 + 3600 + 00:05:00 + /lustre/beagle/yadunandb/swiftwork + 20 + 1 + 1 + 4.80 + 10000 + trace + + /tmp/yadunandb/swiftwork + + \ No newline at end of file Added: branches/release-0.94/tests/stress/remote_sanity/mcs/sites.template.xml =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mcs/sites.template.xml (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mcs/sites.template.xml 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,13 @@ + + + + 8 + 100 + 100 + 3600 + 00:05:00 + 0.0799 + 10000 + /sandbox/{env.USER}/swiftwork + + Added: branches/release-0.94/tests/stress/remote_sanity/mcs/swift.properties =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mcs/swift.properties (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mcs/swift.properties 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,8 @@ +use.provider.staging=true +use.wrapper.staging=false +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +provider.staging.pin.swiftfiles=false +sitedir.keep=true +tcp.port.range=50000,51000 \ No newline at end of file Added: branches/release-0.94/tests/stress/remote_sanity/mcs/tc.template.data =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mcs/tc.template.data (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mcs/tc.template.data 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,5 @@ +local date /bin/date null null null +beagle date /bin/date null null null +uc3 date /bin/date null null null +crush date /bin/date null null null +midway date /bin/date null null null Added: branches/release-0.94/tests/stress/remote_sanity/mcs/title.txt =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mcs/title.txt (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/mcs/title.txt 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1 @@ +MCS remote sanity test - Running on CRUSH Added: branches/release-0.94/tests/stress/remote_sanity/midway/sanity.setup.sh =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/midway/sanity.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/midway/sanity.setup.sh 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,11 @@ +#!/bin/bash + +USERNAME=$MIDWAY_USERNAME + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/remote_sanity/midway/sanity.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/remote_sanity/midway/sanity.source.sh =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/midway/sanity.source.sh (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/midway/sanity.source.sh 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "$HOSTNAME" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/remote_sanity/midway/sanity.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/remote_sanity/midway/sanity.swift =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/midway/sanity.swift (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/midway/sanity.swift 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,11 @@ +type file; + +app (file out, file err) remote_driver () +{ + date stdout=@filename(out) stderr=@filename(err); +} + +file driver_out ; +file driver_err ; + +(driver_out, driver_err) = remote_driver(); \ No newline at end of file Added: branches/release-0.94/tests/stress/remote_sanity/midway/sanity.timeout =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/midway/sanity.timeout (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/midway/sanity.timeout 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1 @@ +300 Added: branches/release-0.94/tests/stress/remote_sanity/midway/sites.new.xml =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/midway/sites.new.xml (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/midway/sites.new.xml 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,20 @@ + + + + 24 + 100 + 100 + pbs.aprun;pbs.mpp;depth=24 + 3600 + 00:05:00 + /lustre/beagle/yadunandb/swiftwork + 20 + 1 + 1 + 4.80 + 10000 + trace + + /tmp/yadunandb/swiftwork + + \ No newline at end of file Added: branches/release-0.94/tests/stress/remote_sanity/midway/sites.template.xml =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/midway/sites.template.xml (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/midway/sites.template.xml 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,17 @@ + + + + sandyb + 16 + 00:05:00 + 3600 + 100 + 100 + 4 + 1 + 1 + .64 + 10000 + /tmp/{env.USER} + + Added: branches/release-0.94/tests/stress/remote_sanity/midway/swift.properties =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/midway/swift.properties (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/midway/swift.properties 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,8 @@ +use.provider.staging=true +use.wrapper.staging=false +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +provider.staging.pin.swiftfiles=false +sitedir.keep=true +tcp.port.range=50000,51000 \ No newline at end of file Added: branches/release-0.94/tests/stress/remote_sanity/midway/tc.template.data =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/midway/tc.template.data (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/midway/tc.template.data 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,5 @@ +local date /bin/date null null null +beagle date /bin/date null null null +uc3 date /bin/date null null null +mcs date /bin/date null null null +midway date /bin/date null null null Added: branches/release-0.94/tests/stress/remote_sanity/midway/title.txt =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/midway/title.txt (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/midway/title.txt 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1 @@ +Midway remote sanity test Added: branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.setup.sh =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.setup.sh 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,11 @@ +#!/bin/bash + +USERNAME=$UC3_USERNAME + +if [[ -z $USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.source.sh =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.source.sh (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.source.sh 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "$HOSTNAME" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.swift =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.swift (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.swift 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,11 @@ +type file; + +app (file out, file err) remote_driver () +{ + date stdout=@filename(out) stderr=@filename(err); +} + +file driver_out ; +file driver_err ; + +(driver_out, driver_err) = remote_driver(); \ No newline at end of file Added: branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.timeout =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.timeout (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/uc3/sanity.timeout 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1 @@ +300 Added: branches/release-0.94/tests/stress/remote_sanity/uc3/sites.new.xml =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/uc3/sites.new.xml (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/uc3/sites.new.xml 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,20 @@ + + + + 24 + 100 + 100 + pbs.aprun;pbs.mpp;depth=24 + 3600 + 00:05:00 + /lustre/beagle/yadunandb/swiftwork + 20 + 1 + 1 + 4.80 + 10000 + trace + + /tmp/yadunandb/swiftwork + + \ No newline at end of file Added: branches/release-0.94/tests/stress/remote_sanity/uc3/sites.template.xml =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/uc3/sites.template.xml (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/uc3/sites.template.xml 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,17 @@ + + + + 10.00 + 10000 + 1 + 3600 + 00:30:00 + 100 + 100 + 1000 + 1 + 1 + nonshared + . + + \ No newline at end of file Added: branches/release-0.94/tests/stress/remote_sanity/uc3/swift.properties =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/uc3/swift.properties (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/uc3/swift.properties 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,8 @@ +use.provider.staging=true +use.wrapper.staging=false +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=false +provider.staging.pin.swiftfiles=false +sitedir.keep=true +tcp.port.range=50000,51000 \ No newline at end of file Added: branches/release-0.94/tests/stress/remote_sanity/uc3/tc.template.data =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/uc3/tc.template.data (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/uc3/tc.template.data 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1,5 @@ +local date /bin/date null null null +beagle date /bin/date null null null +uc3 date /bin/date null null null +mcs date /bin/date null null null +midway date /bin/date null null null Added: branches/release-0.94/tests/stress/remote_sanity/uc3/title.txt =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/uc3/title.txt (rev 0) +++ branches/release-0.94/tests/stress/remote_sanity/uc3/title.txt 2013-07-02 21:07:09 UTC (rev 6598) @@ -0,0 +1 @@ +UC3 remote sanity test From yadunandb at ci.uchicago.edu Tue Jul 2 16:08:38 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Tue, 02 Jul 2013 21:08:38 -0000 Subject: [Swift-commit] r6599 - in branches/release-0.94/tests/stress: . user_profile Message-ID: <20130702210837.B9829187CC1@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-02 16:08:37 -0500 (Tue, 02 Jul 2013) New Revision: 6599 Added: branches/release-0.94/tests/stress/user_profile/ branches/release-0.94/tests/stress/user_profile/title.txt branches/release-0.94/tests/stress/user_profile/user.source.sh branches/release-0.94/tests/stress/user_profile/user.swift Log: Adding a dummy test to allow sourcing of user configs to the suite.sh top-level test-script. Added: branches/release-0.94/tests/stress/user_profile/title.txt =================================================================== --- branches/release-0.94/tests/stress/user_profile/title.txt (rev 0) +++ branches/release-0.94/tests/stress/user_profile/title.txt 2013-07-02 21:08:37 UTC (rev 6599) @@ -0,0 +1,2 @@ +Loading User profile +| Dummy test to load user profiles for remote site testing Added: branches/release-0.94/tests/stress/user_profile/user.source.sh =================================================================== --- branches/release-0.94/tests/stress/user_profile/user.source.sh (rev 0) +++ branches/release-0.94/tests/stress/user_profile/user.source.sh 2013-07-02 21:08:37 UTC (rev 6599) @@ -0,0 +1,7 @@ +#!/bin/bash + +# Profile for Yadu +export BEAGLE_USERNAME="yadunandb" +export MIDWAY_USERNAME="yadunand" +export MCS_USERNAME="yadunand" +export UC3_USERNAME="yadunand" \ No newline at end of file Added: branches/release-0.94/tests/stress/user_profile/user.swift =================================================================== --- branches/release-0.94/tests/stress/user_profile/user.swift (rev 0) +++ branches/release-0.94/tests/stress/user_profile/user.swift 2013-07-02 21:08:37 UTC (rev 6599) @@ -0,0 +1,2 @@ +type file; + From yadunandb at ci.uchicago.edu Tue Jul 2 16:35:17 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Tue, 02 Jul 2013 21:35:17 -0000 Subject: [Swift-commit] r6600 - branches/release-0.94/tests/stress/remote_sanity/mac-frisbee Message-ID: <20130702213517.09647187CC1@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-02 16:35:16 -0500 (Tue, 02 Jul 2013) New Revision: 6600 Modified: branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.setup.sh branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sites.template.xml branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/tc.template.data Log: Minor fixes to mac-frisbee sanity test Modified: branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.setup.sh =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.setup.sh 2013-07-02 21:08:37 UTC (rev 6599) +++ branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sanity.setup.sh 2013-07-02 21:35:16 UTC (rev 6600) @@ -1,6 +1,6 @@ #!/bin/bash -USERNAME=$MIDWAY_USERNAME +USERNAME=$MCS_USERNAME if [[ -z $USERNAME ]] then Modified: branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sites.template.xml =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sites.template.xml 2013-07-02 21:08:37 UTC (rev 6599) +++ branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/sites.template.xml 2013-07-02 21:35:16 UTC (rev 6600) @@ -8,7 +8,6 @@ 00:05:00 0.0799 10000 - - /homes/yadunand/swiftwork + /scratch/{env.USER}/swiftwork --> Modified: branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/tc.template.data =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/tc.template.data 2013-07-02 21:08:37 UTC (rev 6599) +++ branches/release-0.94/tests/stress/remote_sanity/mac-frisbee/tc.template.data 2013-07-02 21:35:16 UTC (rev 6600) @@ -3,4 +3,4 @@ uc3 date /bin/date null null null mcs date /bin/date null null null midway date /bin/date null null null -frisbee date /bin/ls null null null \ No newline at end of file +frisbee date /bin/date null null null \ No newline at end of file From yadunandb at ci.uchicago.edu Wed Jul 3 15:51:13 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Wed, 03 Jul 2013 20:51:13 -0000 Subject: [Swift-commit] r6602 - branches/release-0.94/tests/language-behaviour/IO Message-ID: <20130703205113.3403A9CF92@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-03 15:51:11 -0500 (Wed, 03 Jul 2013) New Revision: 6602 Added: branches/release-0.94/tests/language-behaviour/IO/readStructured.in branches/release-0.94/tests/language-behaviour/IO/readStructured01.swift branches/release-0.94/tests/language-behaviour/IO/readStructured02.swift branches/release-0.94/tests/language-behaviour/IO/readStructured02.timeout Log: Adding tests for readStructured. Added: branches/release-0.94/tests/language-behaviour/IO/readStructured.in =================================================================== --- branches/release-0.94/tests/language-behaviour/IO/readStructured.in (rev 0) +++ branches/release-0.94/tests/language-behaviour/IO/readStructured.in 2013-07-03 20:51:11 UTC (rev 6602) @@ -0,0 +1,2 @@ +rows[0] = "hello" +rows[1] = "World!" Added: branches/release-0.94/tests/language-behaviour/IO/readStructured01.swift =================================================================== --- branches/release-0.94/tests/language-behaviour/IO/readStructured01.swift (rev 0) +++ branches/release-0.94/tests/language-behaviour/IO/readStructured01.swift 2013-07-03 20:51:11 UTC (rev 6602) @@ -0,0 +1,7 @@ +type matrix { + string rows[]; +} + +matrix m; +m = readStructured("readStructured.in"); + Added: branches/release-0.94/tests/language-behaviour/IO/readStructured02.swift =================================================================== --- branches/release-0.94/tests/language-behaviour/IO/readStructured02.swift (rev 0) +++ branches/release-0.94/tests/language-behaviour/IO/readStructured02.swift 2013-07-03 20:51:11 UTC (rev 6602) @@ -0,0 +1,10 @@ +type matrix { + string rows[]; +} + +matrix m; +m = readStructured("readStructured.in"); + +foreach item,index in m.rows { + tracef("Row[%i] : %s \n", index, item); +} \ No newline at end of file Added: branches/release-0.94/tests/language-behaviour/IO/readStructured02.timeout =================================================================== --- branches/release-0.94/tests/language-behaviour/IO/readStructured02.timeout (rev 0) +++ branches/release-0.94/tests/language-behaviour/IO/readStructured02.timeout 2013-07-03 20:51:11 UTC (rev 6602) @@ -0,0 +1 @@ +120 From yadunandb at ci.uchicago.edu Wed Jul 3 16:44:35 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Wed, 03 Jul 2013 21:44:35 -0000 Subject: [Swift-commit] r6603 - branches/release-0.94/tests/language-behaviour/IO Message-ID: <20130703214435.470349CF92@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-03 16:44:35 -0500 (Wed, 03 Jul 2013) New Revision: 6603 Added: branches/release-0.94/tests/language-behaviour/IO/readStructured03.swift branches/release-0.94/tests/language-behaviour/IO/readStructured3.in Log: Adding test Added: branches/release-0.94/tests/language-behaviour/IO/readStructured03.swift =================================================================== --- branches/release-0.94/tests/language-behaviour/IO/readStructured03.swift (rev 0) +++ branches/release-0.94/tests/language-behaviour/IO/readStructured03.swift 2013-07-03 21:44:35 UTC (rev 6603) @@ -0,0 +1,9 @@ +type vector { + int columns[]; +} +type matrix { + vector rows[]; +} + +matrix m; +m = readStructured("readStructured3.in"); Added: branches/release-0.94/tests/language-behaviour/IO/readStructured3.in =================================================================== --- branches/release-0.94/tests/language-behaviour/IO/readStructured3.in (rev 0) +++ branches/release-0.94/tests/language-behaviour/IO/readStructured3.in 2013-07-03 21:44:35 UTC (rev 6603) @@ -0,0 +1,6 @@ +rows[0].columns[0] = 0 +rows[0].columns[1] = 2 +rows[0].columns[2] = 4 +rows[1].columns[0] = 1 +rows[1].columns[1] = 3 +rows[1].columns[2] = 5 \ No newline at end of file From yadunandb at ci.uchicago.edu Wed Jul 10 13:45:23 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Wed, 10 Jul 2013 18:45:23 -0000 Subject: [Swift-commit] r6630 - in branches/release-0.94/tests: . multi_remote stress/user_profile Message-ID: <20130710184522.86546187CC1@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-10 13:45:22 -0500 (Wed, 10 Jul 2013) New Revision: 6630 Added: branches/release-0.94/tests/multi_remote/ branches/release-0.94/tests/multi_remote/README branches/release-0.94/tests/multi_remote/builder.sh branches/release-0.94/tests/multi_remote/clean.sh branches/release-0.94/tests/multi_remote/cron.sbatch branches/release-0.94/tests/multi_remote/remote_driver.setup.sh branches/release-0.94/tests/multi_remote/remote_driver.source.sh branches/release-0.94/tests/multi_remote/remote_driver.swift branches/release-0.94/tests/multi_remote/remote_driver.timeout branches/release-0.94/tests/multi_remote/run.sh branches/release-0.94/tests/multi_remote/sites.template.xml branches/release-0.94/tests/multi_remote/swift.properties branches/release-0.94/tests/multi_remote/tc.template.data branches/release-0.94/tests/multi_remote/title.txt Modified: branches/release-0.94/tests/stress/user_profile/user.source.sh Log: Committing the swift code for running the test-suite remotely. Added: branches/release-0.94/tests/multi_remote/README =================================================================== --- branches/release-0.94/tests/multi_remote/README (rev 0) +++ branches/release-0.94/tests/multi_remote/README 2013-07-10 18:45:22 UTC (rev 6630) @@ -0,0 +1,52 @@ + + +What +==== + +This test-group multi-remote is recursive call on the test-suite from itself. + + +How +=== +Assuming that the site of execution of the top-level run has sufficient auth +for connecting to all remote sites, the remote-driver.swift script will connect +with several remote sites, and initiate an instance of the test-suite at the +remote login nodes. + +Get started +=========== + +I have made this with the assumption that swift.rcc will be the site from which +the top-level run and hence the multi-remote.swift script will be invoked. Yet, +it should be quite possible to run this anywhere. + +- Setup keys to have passwordless access to the following sites: + Beagle, UC3, MCS, Midway + - For connecting to MCS machines frisbee and crush directly you could add + the following to the .ssh/config file : + Host frisbee.mcs.anl.gov + Hostname frisbee.mcs.anl.gov + ProxyCommand ssh -A @login.mcs.anl.gov nc %h %p 2> /dev/null + ForwardAgent yes + Host crush.mcs.anl.gov + Hostname crush.mcs.anl.gov + ProxyCommand ssh -A @login.mcs.anl.gov nc %h %p 2> /dev/null + ForwardAgent yes + +- Get keychain on the machine for more ease of use. + Add following to ~/.bashrc + # Start keychain and point it to private key + /PATH/TO/KEYCHAIN /PATH/TO/PRIVATE-KEY/id_rsa + # Let the shell know the agent + # The file will be .sh under ~/.keychain + source ~/.keychain/midway001-sh > /dev/null + +- Start a screen session and ensure that an agent is present which will + hold the auth for you. + +- Use cron / script to schedule regular runs of the tests + - On swift.rcc slurm-cron is supposed to work, but I haven't been + able to schedule on midway001 node due to an error when submitting the + cron.sbatch script + + Added: branches/release-0.94/tests/multi_remote/builder.sh =================================================================== --- branches/release-0.94/tests/multi_remote/builder.sh (rev 0) +++ branches/release-0.94/tests/multi_remote/builder.sh 2013-07-10 18:45:22 UTC (rev 6630) @@ -0,0 +1,44 @@ +#!/bin/bash + +COG_URL=https://cogkit.svn.sourceforge.net/svnroot/cogkit/branches/4.1.10/src/cog +SWIFT_URL=https://svn.ci.uchicago.edu/svn/vdl2/branches/release-0.94 +SWIFT_VERSION=0.94 + +BASE=$PWD + +# Make clean checkout if no swift dir is present or +# Clean checkout requested +if [ "$1" == "clean" ] || [ ! -d "swift" ] +then + echo "Cleaning and making fresh checkout" + rm -rf swift &> /dev/null + mkdir swift && cd swift + svn co $COG_URL + cd cog/modules + svn co $SWIFT_URL swift + cd swift +else + echo "Updating Cog sources" + cd swift/ +# svn up * + echo "Updating Swift sources" + cd cog/modules/swift +# svn up * +fi + +echo "$PWD : Starting compile" +ant redist | tee $BASE/compile.log +if [ "$?" != "0" ] +then + echo "Swift compile failed. Cannot proceed" + exit 1 +fi + +cd $BASE +if [ -d "swift" ] +then + tar -cf swift.tar.tmp ./swift && mv swift.tar.tmp swift.tar && echo "Tarred successfully" +else + echo "Could not find swift folder to tar" +fi; +exit 0 \ No newline at end of file Property changes on: branches/release-0.94/tests/multi_remote/builder.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/multi_remote/clean.sh =================================================================== --- branches/release-0.94/tests/multi_remote/clean.sh (rev 0) +++ branches/release-0.94/tests/multi_remote/clean.sh 2013-07-10 18:45:22 UTC (rev 6630) @@ -0,0 +1,7 @@ +#!/bin/bash + +rm -rf *log *d +rm -rf *swiftx *kml +rm -rf *~ +rm -rf driver* +rm -rf Logs_*tar \ No newline at end of file Property changes on: branches/release-0.94/tests/multi_remote/clean.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/multi_remote/cron.sbatch =================================================================== --- branches/release-0.94/tests/multi_remote/cron.sbatch (rev 0) +++ branches/release-0.94/tests/multi_remote/cron.sbatch 2013-07-10 18:45:22 UTC (rev 6630) @@ -0,0 +1,24 @@ +#!/bin/bash + +# specify the time limit for the cron job +#SBATCH --time=00:00:10 + +# use cron.log and append to it +#SBATCH --output=cron.log +#SBATCH --open-mode=append + +# the account, partition, and qos should not be changed +#SBATCH --account=cron-account +#SBATCH --partition=cron +#SBATCH --qos=cron + +# Specify a valid cron string for the schedule +# this is daily at 5:05 AM +SCHEDULE='* * * * *' + +echo hello on $(hostname) at $(date) + +# resubmit this script with --begin set to the next scheduled cron time +# next-cron-time is a script that parses a cron schedule string and returns +# the next execution time +sbatch -w midway001.rcc.uchicago.edu --quiet --begin=$(next-cron-time "$SCHEDULE") cron.sbatch \ No newline at end of file Property changes on: branches/release-0.94/tests/multi_remote/cron.sbatch ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/multi_remote/remote_driver.setup.sh =================================================================== --- branches/release-0.94/tests/multi_remote/remote_driver.setup.sh (rev 0) +++ branches/release-0.94/tests/multi_remote/remote_driver.setup.sh 2013-07-10 18:45:22 UTC (rev 6630) @@ -0,0 +1,143 @@ +#!/bin/bash + +#CLEAN_CHECKOUT="yes" +CLEAN_CHECKOUT="no" + +[ ! -z $COG_URL ] || COG_URL=https://cogkit.svn.sourceforge.net/svnroot/cogkit/branches/4.1.10/src/cog +[ ! -z $SWIFT_URL ] || SWIFT_URL=https://svn.ci.uchicago.edu/svn/vdl2/branches/release-0.94 +[ ! -z $SWIFT_VERSION ] || SWIFT_VERSION=0.94 +[ ! -z $BEAGLE_USERNAME ] || BEAGLE_USERNAME="yadunandb" +[ ! -z $MIDWAY_USERNAME ] || MIDWAY_USERNAME="yadunand" +[ ! -z $UC3_USERNAME ] || UC3_USERNAME="yadunand" +[ ! -z $MCS_USERNAME ] || MCS_USERNAME="yadunand" + + +export GLOBUS_HOSTNAME="swift.rcc.uchicago.edu" + + +SITES="sites.xml" + +cp $SITES $SITES.bak +cat $SITES | sed "s/BEAGLE_USERNAME/$BEAGLE_USERNAME/g" > tmp && mv tmp $SITES +cat $SITES | sed "s/MIDWAY_USERNAME/$MIDWAY_USERNAME/g" > tmp && mv tmp $SITES +cat $SITES | sed "s/UC3_USERNAME/$UC3_USERNAME/g" > tmp && mv tmp $SITES +cat $SITES | sed "s/MCS_USERNAME/$MCS_USERNAME/g" > tmp && mv tmp $SITES + +BASE=$PWD +# Make clean checkout if no swift dir is present or +# Clean checkout requested +cp /home/yadunand/swift/cog/modules/swift/tests/multi_remote/swift.tar ./ +if [ -f "swift.tar" ] +then + echo "Found swift.tar. Extracting.." + tar -xf swift.tar +fi + +if [ "CLEAN_CHECKOUT" == "yes" ] || [ ! -d "swift" ] +then + echo "Cleaning and making fresh checkout" + rm -rf swift &> /dev/null + mkdir swift && cd swift + svn co $COG_URL + cd cog/modules + svn co $SWIFT_URL swift + cd swift +else + echo "Updating Cog sources" + cd swift/ + svn up * + echo "Updating Swift sources" + cd cog/modules/swift + svn up * +fi + +echo "$PWD : Starting compile" +ant redist | tee $BASE/compile.log +if [ "$?" != "0" ] +then + echo "Swift compile failed. Cannot proceed" + exit 1 +fi + +cd $BASE +if [ -d "swift" ] +then + tar -cf swift.tar.tmp ./swift && mv swift.tar.tmp swift.tar && echo "Tarred successfully" +else + echo "Could not find swift folder to tar" +fi; + + +# Wrapper is the script that gets executed on the remote nodes +# The outputs go to the out directory +cat <<'EOF' > wrapper.sh + +#!/bin/bash + +SWIFT_TARBALL=$1 +LOG_TARBALL=$2 +RUN_HOME=$PWD +echo "Wrapper running on : $HOSTNAME " + +if [ -f $SWIFT_TARBALL ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah + exit -1; +fi + +BASENAME="" +if echo $SWIFT_TARBALL | grep "\.tar$" +then + tar -xf $SWIFT_TARBALL + BASENAME=${SWIFT_TARBALL%.tar} +else + echo "BAD.. cannot decipher $SWIFT_TARBALL" + exit -1 +fi; + +cd $BASENAME; +cd cog/modules/swift/ + +#type ant 2>&1 +#if [ "$?" != "0" ] +#then +# echo "Ant not found. Cannot build. Exiting!.." +# exit 0 +#fi + +#ant redist 2>&1 > tee $RUN_HOME/swift_build.log +if [ ! -x "$PWD/dist/swift-svn/bin/swift" ] +then + echo "No executable swift binary... Cannot proceed" + exit 0 +fi + +echo "Found swift executable!" +SWIFT_PATH=$PWD/dist/swift-svn/bin +export PATH=$SWIFT_PATH:$PATH + +T=`which swift` +if [ "$T" == "$SWIFT_PATH/swift" ] +then + swift -version +else + echo "Swift not being pulled from SWIFT_PATH" +fi; + +cd tests/ +#./suite.sh -l 1 -t $PWD/groups/group-stress-heavy.sh 2>&1 | tee $RUN_HOME/TEST.log +./suite.sh -l 1 -t $PWD/groups/group-functions.sh 2>&1 | tee $RUN_HOME/TEST.log +#./suite.sh -l 1 -t $PWD/groups/group-all-local.sh 2>&1 | tee $RUN_HOME/TEST.log + +cd $RUN_HOME +tar -cvf $LOG_TARBALL *log $BASENAME/run*/tests-*{html,log} +rm $BASENAME* -rf +echo "Folder cleaned" +ls -lah +EOF + +exit 0 Property changes on: branches/release-0.94/tests/multi_remote/remote_driver.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/multi_remote/remote_driver.source.sh =================================================================== --- branches/release-0.94/tests/multi_remote/remote_driver.source.sh (rev 0) +++ branches/release-0.94/tests/multi_remote/remote_driver.source.sh 2013-07-10 18:45:22 UTC (rev 6630) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "$HOSTNAME" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/multi_remote/remote_driver.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/multi_remote/remote_driver.swift =================================================================== --- branches/release-0.94/tests/multi_remote/remote_driver.swift (rev 0) +++ branches/release-0.94/tests/multi_remote/remote_driver.swift 2013-07-10 18:45:22 UTC (rev 6630) @@ -0,0 +1,64 @@ +type file; +type script; + +file swift_package <"swift.tar">; +script wrapper <"wrapper.sh">; + +file out[] ; +file err[] ; +file log[] ; + +string sites[] = ["uc3", "beagle", "midway", "crush", "frisbee"]; + +app (file out, file err, file log) remote_uc3 (script run, file tar) +{ + uc3 @run @filename(tar) @log stdout=@filename(out) stderr=@filename(err); +} + +app (file out, file err, file log) remote_beagle (script run, file tar) +{ + bgl @run @filename(tar) @log stdout=@filename(out) stderr=@filename(err); +} + +app (file out, file err, file log) remote_midway (script run, file tar) +{ + mid @run @filename(tar) @log stdout=@filename(out) stderr=@filename(err); +} + +app (file out, file err, file log) remote_crush (script run, file tar) +{ + csh @run @filename(tar) @log stdout=@filename(out) stderr=@filename(err); +} + +app (file out, file err, file log) remote_frisbee (script run, file tar) +{ + fsb @run @filename(tar) @log stdout=@filename(out) stderr=@filename(err); +} + +tracef("Filename of the wraper : %s \n", @filename(wrapper)); +tracef("Filename of the package : %s \n", @filename(swift_package)); + +foreach site, i in sites { + //tracef("Site : %s \n", site); + + switch(i) + { + case 0: + tracef("Calling uc3\n"); + (out[i], err[i], log[i]) = remote_uc3 (wrapper, swift_package); + case 1: + tracef("Calling beagle \n"); + (out[i], err[i], log[i]) = remote_beagle (wrapper, swift_package); + case 2: + tracef("Calling Midway\n"); + (out[i], err[i], log[i]) = remote_midway (wrapper, swift_package); + case 3: + tracef("Skipping Crush on MCS\n"); +// (out[i], err[i], log[i]) = remote_crush(wrapper, swift_package); + case 4: + tracef("Skipping Frisbee on MCS (Will fail due to BUG:1030)\n"); +// (out[i], err[i], log[i]) = remote_frisbee(wrapper, swift_package); + default: + tracef("Fail: Unknown site %s : %i \n", site, i); + } +} Added: branches/release-0.94/tests/multi_remote/remote_driver.timeout =================================================================== --- branches/release-0.94/tests/multi_remote/remote_driver.timeout (rev 0) +++ branches/release-0.94/tests/multi_remote/remote_driver.timeout 2013-07-10 18:45:22 UTC (rev 6630) @@ -0,0 +1 @@ +7200 \ No newline at end of file Added: branches/release-0.94/tests/multi_remote/run.sh =================================================================== --- branches/release-0.94/tests/multi_remote/run.sh (rev 0) +++ branches/release-0.94/tests/multi_remote/run.sh 2013-07-10 18:45:22 UTC (rev 6630) @@ -0,0 +1,16 @@ +#!/bin/bash + +# Start keychain and point it to private key +/home/yadunand/bin/keychain ~/.ssh/id_rsa + +# Let the shell know the agent +source ~/.keychain/midway001-sh > /dev/null + +./remote_driver.setup.sh + +echo "Running remote_driver2.swift" +#swift -tc.file tc.data.2 -config cf -sites.file multiple.xml.bak remote_driver2.swift +#swift -tc.file tc.data.2 -config cf -sites.file multiple.xml remote_driver2.swift +swift -tc.file tc.data -config cf -sites.file $SITES remote_driver.swift | tee root_level.LOG + +rm $SITES \ No newline at end of file Property changes on: branches/release-0.94/tests/multi_remote/run.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/multi_remote/sites.template.xml =================================================================== --- branches/release-0.94/tests/multi_remote/sites.template.xml (rev 0) +++ branches/release-0.94/tests/multi_remote/sites.template.xml 2013-07-10 18:45:22 UTC (rev 6630) @@ -0,0 +1,97 @@ + + + + + 4 + 00:15:00 + 100 + 100 + 1 + 1 + 1 + 0.03 + 10000 + + . + + + + + + 24 + 100 + 100 + pbs.aprun;pbs.mpp;depth=24;pbs.resource_list=advres=wilde.1768 + 36000 + 01:05:00 + /lustre/beagle/BEAGLE_USERNAME/swiftwork + 5 + 1 + 1 + 4.80 + 10000 + /tmp/BEAGLE_USERNAME/swiftwork + + + + + + sandyb + 16 + 36000 + 01:05:00 + 100 + 100 + 4 + 1 + 1 + .64 + 10000 + /tmp/MIDWAY_USERNAME + + + + + + 10.00 + 10000 + 1 + 36000 + 01:05:00 + 100 + 100 + 1000 + 1 + 1 + + nonshared + /home/UC3_USERNAME/swiftwork + + + + + 8 + 100 + 100 + 3600 + 00:05:00 + 0.0799 + 10000 + /sandbox/MCS_USERNAME/swiftwork + + + + + + 8 + 100 + 100 + 3600 + 00:05:00 + 0.0799 + 10000 + /sandbox/MCS_USERNAME/swiftwork + + + + Added: branches/release-0.94/tests/multi_remote/swift.properties =================================================================== --- branches/release-0.94/tests/multi_remote/swift.properties (rev 0) +++ branches/release-0.94/tests/multi_remote/swift.properties 2013-07-10 18:45:22 UTC (rev 6630) @@ -0,0 +1,8 @@ +use.provider.staging=true +use.wrapper.staging=false +wrapperlog.always.transfer=true +execution.retries=0 +lazy.errors=true +provider.staging.pin.swiftfiles=false +sitedir.keep=true +tcp.port.range=50000,51000 \ No newline at end of file Added: branches/release-0.94/tests/multi_remote/tc.template.data =================================================================== --- branches/release-0.94/tests/multi_remote/tc.template.data (rev 0) +++ branches/release-0.94/tests/multi_remote/tc.template.data 2013-07-10 18:45:22 UTC (rev 6630) @@ -0,0 +1,6 @@ +beagle bgl /bin/bash null null null +uc3 uc3 /bin/bash null null null +midway mid /bin/bash null null null +frisbee fsb /bin/bash null null null +crush csh /bin/bash null null null +local l_bash /bin/bash null null null Added: branches/release-0.94/tests/multi_remote/title.txt =================================================================== --- branches/release-0.94/tests/multi_remote/title.txt (rev 0) +++ branches/release-0.94/tests/multi_remote/title.txt 2013-07-10 18:45:22 UTC (rev 6630) @@ -0,0 +1,3 @@ +Recursive Test-run +| This test will connect to several remote login nodes and +| initiate several local, local-cluster, and remote-cluster tests Modified: branches/release-0.94/tests/stress/user_profile/user.source.sh =================================================================== --- branches/release-0.94/tests/stress/user_profile/user.source.sh 2013-07-09 22:53:46 UTC (rev 6629) +++ branches/release-0.94/tests/stress/user_profile/user.source.sh 2013-07-10 18:45:22 UTC (rev 6630) @@ -4,4 +4,10 @@ export BEAGLE_USERNAME="yadunandb" export MIDWAY_USERNAME="yadunand" export MCS_USERNAME="yadunand" -export UC3_USERNAME="yadunand" \ No newline at end of file +export UC3_USERNAME="yadunand" + +if [ "$HOSTNAME" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; \ No newline at end of file From yadunandb at ci.uchicago.edu Wed Jul 10 13:58:39 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Wed, 10 Jul 2013 18:58:39 -0000 Subject: [Swift-commit] r6632 - in branches/release-0.94/tests: groups stress/apps/modis_beagle stress/apps/modis_local stress/apps/modis_midway stress/apps/modis_uc3 Message-ID: <20130710185838.779A8187CC1@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-10 13:58:38 -0500 (Wed, 10 Jul 2013) New Revision: 6632 Added: branches/release-0.94/tests/groups/group-apps.sh branches/release-0.94/tests/groups/group-daily-remote.sh branches/release-0.94/tests/groups/group-multi-remote.sh branches/release-0.94/tests/groups/group-remote-sanity.sh branches/release-0.94/tests/stress/apps/modis_beagle/modis.source.sh branches/release-0.94/tests/stress/apps/modis_local/modis.source.sh branches/release-0.94/tests/stress/apps/modis_midway/modis.source.sh branches/release-0.94/tests/stress/apps/modis_uc3/modis.source.sh Log: Committing groups and minor changes to modis test apps Added: branches/release-0.94/tests/groups/group-apps.sh =================================================================== --- branches/release-0.94/tests/groups/group-apps.sh (rev 0) +++ branches/release-0.94/tests/groups/group-apps.sh 2013-07-10 18:58:38 UTC (rev 6632) @@ -0,0 +1,13 @@ + +# GROUPLIST definition to run all local tests + +GROUPLIST=( + $TESTDIR/stress/user_profile \ + $TESTDIR/stress/apps/modis_beagle \ + $TESTDIR/stress/apps/modis_local \ + $TESTDIR/stress/apps/modis_midway \ + $TESTDIR/stress/apps/modis_uc3 \ + $TESTDIR/stress/apps/modis_multiple\ + ) + +checkvars WORK Added: branches/release-0.94/tests/groups/group-daily-remote.sh =================================================================== --- branches/release-0.94/tests/groups/group-daily-remote.sh (rev 0) +++ branches/release-0.94/tests/groups/group-daily-remote.sh 2013-07-10 18:58:38 UTC (rev 6632) @@ -0,0 +1,31 @@ + +# GROUPLIST definition to run all local tests + +GROUPLIST=( # Remote sanity test-group + $TESTDIR/stress/user_profile \ + $TESTDIR/stress/remote_sanity/beagle \ + $TESTDIR/stress/remote_sanity/mcs \ + $TESTDIR/stress/remote_sanity/midway \ + $TESTDIR/stress/remote_sanity/uc3 \ + # Frisbee will fail due to Bug 1030 + #TESTDIR/stress/remote_sanity/mac-frisbee \ + + # Remote-cluster IO tests + $TESTDIR/stress/IO/beagle \ + $TESTDIR/stress/IO/bagOnodes \ + $TESTDIR/stress/IO/multiple \ + $TESTDIR/stress/IO/uc3 \ + + # Remote-cluster Apps tests - MODIS + $TESTDIR/stress/apps/modis_beagle \ + $TESTDIR/stress/apps/modis_local \ + $TESTDIR/stress/apps/modis_midway \ + $TESTDIR/stress/apps/modis_uc3 \ + $TESTDIR/stress/apps/modis_multiple\ + + # Recursive Test invocation + $TESTDIR/multi-remote + + ) + +checkvars WORK Added: branches/release-0.94/tests/groups/group-multi-remote.sh =================================================================== --- branches/release-0.94/tests/groups/group-multi-remote.sh (rev 0) +++ branches/release-0.94/tests/groups/group-multi-remote.sh 2013-07-10 18:58:38 UTC (rev 6632) @@ -0,0 +1,8 @@ + +# GROUPLIST definition to run all local tests + +GROUPLIST=( $TESTDIR/stress/user_profile \ + $TESTDIR/multi_remote \ + ) + +checkvars WORK Added: branches/release-0.94/tests/groups/group-remote-sanity.sh =================================================================== --- branches/release-0.94/tests/groups/group-remote-sanity.sh (rev 0) +++ branches/release-0.94/tests/groups/group-remote-sanity.sh 2013-07-10 18:58:38 UTC (rev 6632) @@ -0,0 +1,13 @@ + +# GROUPLIST definition to run all local tests + +GROUPLIST=( + $TESTDIR/stress/user_profile \ + $TESTDIR/stress/remote_sanity/beagle \ + $TESTDIR/stress/remote_sanity/mcs \ + $TESTDIR/stress/remote_sanity/midway \ + $TESTDIR/stress/remote_sanity/uc3 \ +# $TESTDIR/stress/remote_sanity/mac-frisbee \ + ) + +checkvars WORK Added: branches/release-0.94/tests/stress/apps/modis_beagle/modis.source.sh =================================================================== --- branches/release-0.94/tests/stress/apps/modis_beagle/modis.source.sh (rev 0) +++ branches/release-0.94/tests/stress/apps/modis_beagle/modis.source.sh 2013-07-10 18:58:38 UTC (rev 6632) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/apps/modis_beagle/modis.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/apps/modis_local/modis.source.sh =================================================================== --- branches/release-0.94/tests/stress/apps/modis_local/modis.source.sh (rev 0) +++ branches/release-0.94/tests/stress/apps/modis_local/modis.source.sh 2013-07-10 18:58:38 UTC (rev 6632) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/apps/modis_local/modis.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/apps/modis_midway/modis.source.sh =================================================================== --- branches/release-0.94/tests/stress/apps/modis_midway/modis.source.sh (rev 0) +++ branches/release-0.94/tests/stress/apps/modis_midway/modis.source.sh 2013-07-10 18:58:38 UTC (rev 6632) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/apps/modis_midway/modis.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/apps/modis_uc3/modis.source.sh =================================================================== --- branches/release-0.94/tests/stress/apps/modis_uc3/modis.source.sh (rev 0) +++ branches/release-0.94/tests/stress/apps/modis_uc3/modis.source.sh 2013-07-10 18:58:38 UTC (rev 6632) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/apps/modis_uc3/modis.source.sh ___________________________________________________________________ Added: svn:executable + * From yadunandb at ci.uchicago.edu Wed Jul 10 15:03:41 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Wed, 10 Jul 2013 20:03:41 -0000 Subject: [Swift-commit] r6633 - branches/release-0.94/tests Message-ID: <20130710200341.0FD41187CC1@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-10 15:03:40 -0500 (Wed, 10 Jul 2013) New Revision: 6633 Modified: branches/release-0.94/tests/suite.sh Log: Updated suite.sh to allow a file to source in environment variable for the entire run Modified: branches/release-0.94/tests/suite.sh =================================================================== --- branches/release-0.94/tests/suite.sh 2013-07-10 18:58:38 UTC (rev 6632) +++ branches/release-0.94/tests/suite.sh 2013-07-10 20:03:40 UTC (rev 6633) @@ -18,6 +18,7 @@ printf "\t -v Verbose (set -x, HTML comments) \n" printf "\t -l Stress level < 1/ 2/ 3/ 4> \n" printf "\t -o output Location for cog and output \n" + printf "\t -z file Set environment for entire run \n" printf "\t GROUP argument \n" } @@ -86,6 +87,9 @@ -l) STRESS=$2 shift 2;; + -z) + ENV_FILE=$2 + shift 2;; -v) VERBOSE=1 shift;; @@ -116,6 +120,13 @@ fi export STRESS="S$STRESS" +if [ -x "$ENV_FILE" ] +then + source $ENV_FILE +else + echo "Could not load $ENV_FILE" +fi + # Iterations per test (may want to run each test multiple times?) ITERS_LOCAL=1 From yadunandb at ci.uchicago.edu Wed Jul 10 15:08:43 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Wed, 10 Jul 2013 20:08:43 -0000 Subject: [Swift-commit] r6634 - branches/release-0.94/tests/groups Message-ID: <20130710200842.B5F19187CC1@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-10 15:08:42 -0500 (Wed, 10 Jul 2013) New Revision: 6634 Modified: branches/release-0.94/tests/groups/group-apps.sh branches/release-0.94/tests/groups/group-daily-remote.sh branches/release-0.94/tests/groups/group-multi-remote.sh branches/release-0.94/tests/groups/group-remote-sanity.sh Log: Removed user_profile method to accommodate newer method for importing environments Modified: branches/release-0.94/tests/groups/group-apps.sh =================================================================== --- branches/release-0.94/tests/groups/group-apps.sh 2013-07-10 20:03:40 UTC (rev 6633) +++ branches/release-0.94/tests/groups/group-apps.sh 2013-07-10 20:08:42 UTC (rev 6634) @@ -1,8 +1,7 @@ # GROUPLIST definition to run all local tests -GROUPLIST=( - $TESTDIR/stress/user_profile \ +GROUPLIST=( $TESTDIR/stress/apps/modis_beagle \ $TESTDIR/stress/apps/modis_local \ $TESTDIR/stress/apps/modis_midway \ Modified: branches/release-0.94/tests/groups/group-daily-remote.sh =================================================================== --- branches/release-0.94/tests/groups/group-daily-remote.sh 2013-07-10 20:03:40 UTC (rev 6633) +++ branches/release-0.94/tests/groups/group-daily-remote.sh 2013-07-10 20:08:42 UTC (rev 6634) @@ -2,7 +2,6 @@ # GROUPLIST definition to run all local tests GROUPLIST=( # Remote sanity test-group - $TESTDIR/stress/user_profile \ $TESTDIR/stress/remote_sanity/beagle \ $TESTDIR/stress/remote_sanity/mcs \ $TESTDIR/stress/remote_sanity/midway \ Modified: branches/release-0.94/tests/groups/group-multi-remote.sh =================================================================== --- branches/release-0.94/tests/groups/group-multi-remote.sh 2013-07-10 20:03:40 UTC (rev 6633) +++ branches/release-0.94/tests/groups/group-multi-remote.sh 2013-07-10 20:08:42 UTC (rev 6634) @@ -1,7 +1,7 @@ # GROUPLIST definition to run all local tests -GROUPLIST=( $TESTDIR/stress/user_profile \ +GROUPLIST=( $TESTDIR/multi_remote \ ) Modified: branches/release-0.94/tests/groups/group-remote-sanity.sh =================================================================== --- branches/release-0.94/tests/groups/group-remote-sanity.sh 2013-07-10 20:03:40 UTC (rev 6633) +++ branches/release-0.94/tests/groups/group-remote-sanity.sh 2013-07-10 20:08:42 UTC (rev 6634) @@ -2,12 +2,11 @@ # GROUPLIST definition to run all local tests GROUPLIST=( - $TESTDIR/stress/user_profile \ $TESTDIR/stress/remote_sanity/beagle \ $TESTDIR/stress/remote_sanity/mcs \ $TESTDIR/stress/remote_sanity/midway \ - $TESTDIR/stress/remote_sanity/uc3 \ -# $TESTDIR/stress/remote_sanity/mac-frisbee \ + $TESTDIR/stress/remote_sanity/uc3 \ + $TESTDIR/stress/remote_sanity/mac-frisbee \ ) checkvars WORK From yadunandb at ci.uchicago.edu Wed Jul 10 15:13:29 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Wed, 10 Jul 2013 20:13:29 -0000 Subject: [Swift-commit] r6635 - in branches/release-0.94/tests: . stress/remote_sanity/beagle Message-ID: <20130710201328.5E488187CC1@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-10 15:13:28 -0500 (Wed, 10 Jul 2013) New Revision: 6635 Added: branches/release-0.94/tests/user_env.sh Modified: branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.setup.sh Log: Committing minor changes Modified: branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.setup.sh =================================================================== --- branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.setup.sh 2013-07-10 20:08:42 UTC (rev 6634) +++ branches/release-0.94/tests/stress/remote_sanity/beagle/sanity.setup.sh 2013-07-10 20:13:28 UTC (rev 6635) @@ -1,5 +1,9 @@ #!/bin/bash +echo "BEAGLE_USERNAME : $BEAGLE_USERNAME" +echo "MIDWAY_USERNAME : $MIDWAY_USERNAME" +echo "MCS_USERNAME : $MCS_USERNAME" +echo "UC3_USERNAME : $UC3_USERNAME" USERNAME=$BEAGLE_USERNAME if [[ -z $USERNAME ]] Added: branches/release-0.94/tests/user_env.sh =================================================================== --- branches/release-0.94/tests/user_env.sh (rev 0) +++ branches/release-0.94/tests/user_env.sh 2013-07-10 20:13:28 UTC (rev 6635) @@ -0,0 +1,10 @@ +export BEAGLE_USERNAME="" +export MIDWAY_USERNAME="" +export MCS_USERNAME="" +export UC3_USERNAME="" + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; \ No newline at end of file Property changes on: branches/release-0.94/tests/user_env.sh ___________________________________________________________________ Added: svn:executable + * From yadunandb at ci.uchicago.edu Tue Jul 16 16:56:53 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Tue, 16 Jul 2013 21:56:53 -0000 Subject: [Swift-commit] r6656 - branches/release-0.94/tests/stress/IO/beagle Message-ID: <20130716215652.8F72F187CC1@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-16 16:56:51 -0500 (Tue, 16 Jul 2013) New Revision: 6656 Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.check.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.check.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.check.sh branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.check.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.check.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.check.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.check.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.check.sh Removed: branches/release-0.94/tests/stress/IO/beagle/temp.sh Modified: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.setup.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.setup.sh branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.setup.sh Log: Added checks to cleanup data files Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.check.sh 2013-07-16 21:56:51 UTC (rev 6656) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" *.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x1.check.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.check.sh 2013-07-16 21:56:51 UTC (rev 6656) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" *.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_from_remote1x2.check.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.check.sh 2013-07-16 21:56:51 UTC (rev 6656) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" *.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx1.check.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.check.sh 2013-07-16 21:56:51 UTC (rev 6656) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" *.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_from_remoteNx2.check.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.check.sh 2013-07-16 21:56:51 UTC (rev 6656) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" *.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.check.sh ___________________________________________________________________ Added: svn:executable + * Modified: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.setup.sh 2013-07-16 19:52:48 UTC (rev 6655) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x1.setup.sh 2013-07-16 21:56:51 UTC (rev 6656) @@ -4,6 +4,15 @@ BEAGLE_USERNAME=$BEAGLE_USERNAME case $STRESS in + "S1") + FILES=50 + LOOPS=0 + ;; + "S2") + FILES=100 + LOOPS=0 + ;; + *) FILES=50 LOOPS=0 Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.check.sh 2013-07-16 21:56:51 UTC (rev 6656) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" *.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.check.sh ___________________________________________________________________ Added: svn:executable + * Modified: branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.setup.sh 2013-07-16 19:52:48 UTC (rev 6655) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remote1x2.setup.sh 2013-07-16 21:56:51 UTC (rev 6656) @@ -4,6 +4,14 @@ BEAGLE_USERNAME=$BEAGLE_USERNAME case $STRESS in + "S1") + FILES=100 + LOOPS=0 + ;; + "S2") + FILES=500 + LOOPS=0 + ;; *) FILES=100 LOOPS=0 Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.check.sh 2013-07-16 21:56:51 UTC (rev 6656) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" *.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx1.check.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.check.sh 2013-07-16 21:56:51 UTC (rev 6656) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" *.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.check.sh ___________________________________________________________________ Added: svn:executable + * Modified: branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.setup.sh 2013-07-16 19:52:48 UTC (rev 6655) +++ branches/release-0.94/tests/stress/IO/beagle/stage_to_remoteNx2.setup.sh 2013-07-16 21:56:51 UTC (rev 6656) @@ -6,7 +6,7 @@ case $STRESS in "S1") FILES=50 - LOOPS=100 + LOOPS=50 ;; "S2") FILES=100 @@ -14,7 +14,7 @@ ;; *) FILES=50 - LOOPS=100 + LOOPS=50 ;; esac Deleted: branches/release-0.94/tests/stress/IO/beagle/temp.sh =================================================================== --- branches/release-0.94/tests/stress/IO/beagle/temp.sh 2013-07-16 19:52:48 UTC (rev 6655) +++ branches/release-0.94/tests/stress/IO/beagle/temp.sh 2013-07-16 21:56:51 UTC (rev 6656) @@ -1,20 +0,0 @@ -#!/bin/bash - -for i in `ls *setup.sh` -do - BASE=${i%.setup.sh}; - echo $BASE - echo "Source file : $BASE.source.sh" - - cat <<'EOF' > $BASE.source.sh -#!/bin/bash - -if [ "midway001" == "midway001" ] -then - export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu - export GLOBUS_TCP_PORT_RANGE=50000,51000 -fi; - -EOF - -done; \ No newline at end of file From yadunandb at ci.uchicago.edu Tue Jul 16 17:32:45 2013 From: yadunandb at ci.uchicago.edu (yadunandb at ci.uchicago.edu) Date: Tue, 16 Jul 2013 22:32:45 -0000 Subject: [Swift-commit] r6657 - in branches/release-0.94/tests/stress/IO: bagOnodes multiple uc3 Message-ID: <20130716223244.7C56A187CC1@svn.ci.uchicago.edu> Author: yadunandb Date: 2013-07-16 17:32:44 -0500 (Tue, 16 Jul 2013) New Revision: 6657 Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.check.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.check.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.check.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.check.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.check.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.check.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.check.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.setup.sh branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.swift branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.timeout branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.setup.sh branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.swift branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.timeout branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.setup.sh branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.setup.sh~ branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.swift branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.timeout branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.setup.sh branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.swift branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.timeout branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.args branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.setup.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.setup.sh~ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.source.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.swift branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.timeout branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.check.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.setup.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.setup.sh~ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.source.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.swift branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.timeout branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.setup.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.source.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.swift branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.timeout branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.setup.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.source.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.swift branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.timeout branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.setup.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.source.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.swift branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.timeout branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.setup.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.source.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.swift branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.timeout branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.setup.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.source.sh branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.swift branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.timeout branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.setup.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.source.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.swift branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.timeout branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.setup.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.source.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.swift branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.timeout branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.check.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.setup.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.source.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.swift branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.timeout Removed: branches/release-0.94/tests/stress/IO/multiple/temp/ branches/release-0.94/tests/stress/IO/uc3/temp/ Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.setup.sh branches/release-0.94/tests/stress/IO/bagOnodes/temp.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.setup.sh branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.setup.sh branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.setup.sh Log: Several changes to IO stress to tests to ensure that disks do not get filled up with useless test artifacts. Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.check.sh ___________________________________________________________________ Added: svn:executable + * Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.setup.sh 2013-07-16 21:56:51 UTC (rev 6656) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x1.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -1,7 +1,7 @@ #!/bin/bash ARGS_FILE=${0%.setup.sh}.args -USERNAME=$MCS_USERNAME +MCS_USERNAME=$MCS_USERNAME case $STRESS in "S1") @@ -30,10 +30,10 @@ EOF -if [[ -z $USERNAME ]] +if [[ -z $MCS_USERNAME ]] then echo "Remote username not provided. Skipping sites configs" else ls *xml - cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml + cat sites.xml | sed "s/{env.USER}/$MCS_USERNAME/" > tmp && mv tmp sites.xml fi Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.check.sh ___________________________________________________________________ Added: svn:executable + * Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.setup.sh 2013-07-16 21:56:51 UTC (rev 6656) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remote1x2.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -1,7 +1,7 @@ #!/bin/bash ARGS_FILE=${0%.setup.sh}.args -USERNAME=$MCS_USERNAME +MCS_USERNAME=$MCS_USERNAME case $STRESS in "S1") @@ -30,10 +30,10 @@ EOF -if [[ -z $USERNAME ]] +if [[ -z $MCS_USERNAME ]] then echo "Remote username not provided. Skipping sites configs" else ls *xml - cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml + cat sites.xml | sed "s/{env.USER}/$MCS_USERNAME/" > tmp && mv tmp sites.xml fi Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.check.sh ___________________________________________________________________ Added: svn:executable + * Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.setup.sh 2013-07-16 21:56:51 UTC (rev 6656) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx1.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -1,7 +1,7 @@ #!/bin/bash ARGS_FILE=${0%.setup.sh}.args -USERNAME=$MCS_USERNAME +MCS_USERNAME=$MCS_USERNAME case $STRESS in "S1") @@ -30,10 +30,10 @@ EOF -if [[ -z $USERNAME ]] +if [[ -z $MCS_USERNAME ]] then echo "Remote username not provided. Skipping sites configs" else ls *xml - cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml + cat sites.xml | sed "s/{env.USER}/$MCS_USERNAME/" > tmp && mv tmp sites.xml fi Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.check.sh ___________________________________________________________________ Added: svn:executable + * Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.setup.sh 2013-07-16 21:56:51 UTC (rev 6656) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_from_remoteNx2.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -1,7 +1,7 @@ #!/bin/bash ARGS_FILE=${0%.setup.sh}.args -USERNAME=$MCS_USERNAME +MCS_USERNAME=$MCS_USERNAME case $STRESS in "S1") @@ -30,10 +30,10 @@ EOF -if [[ -z $USERNAME ]] +if [[ -z $MCS_USERNAME ]] then echo "Remote username not provided. Skipping sites configs" else ls *xml - cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml + cat sites.xml | sed "s/{env.USER}/$MCS_USERNAME/" > tmp && mv tmp sites.xml fi Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.check.sh ___________________________________________________________________ Added: svn:executable + * Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.setup.sh 2013-07-16 21:56:51 UTC (rev 6656) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x1.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -1,9 +1,18 @@ #!/bin/bash ARGS_FILE=${0%.setup.sh}.args -USERNAME=$MCS_USERNAME +MCS_USERNAME=$MCS_USERNAME case $STRESS in + "S1") + FILES=50 + LOOPS=0 + ;; + "S2") + FILES=100 + LOOPS=0 + ;; + *) FILES=50 LOOPS=0 @@ -38,10 +47,10 @@ echo "Residual files cleaned up" EOF -if [[ -z $USERNAME ]] +if [[ -z $MCS_USERNAME ]] then echo "Remote username not provided. Skipping sites configs" else ls *xml - cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml + cat sites.xml | sed "s/{env.USER}/$MCS_USERNAME/" > tmp && mv tmp sites.xml fi \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.check.sh ___________________________________________________________________ Added: svn:executable + * Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.setup.sh 2013-07-16 21:56:51 UTC (rev 6656) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remote1x2.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -1,9 +1,17 @@ #!/bin/bash ARGS_FILE=${0%.setup.sh}.args -USERNAME=$MCS_USERNAME +MCS_USERNAME=$MCS_USERNAME case $STRESS in + "S1") + FILES=100 + LOOPS=0 + ;; + "S2") + FILES=500 + LOOPS=0 + ;; *) FILES=100 LOOPS=0 @@ -38,10 +46,10 @@ echo "Residual files cleaned up" EOF -if [[ -z $USERNAME ]] +if [[ -z $MCS_USERNAME ]] then echo "Remote username not provided. Skipping sites configs" else ls *xml - cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml + cat sites.xml | sed "s/{env.USER}/$MCS_USERNAME/" > tmp && mv tmp sites.xml fi Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.check.sh ___________________________________________________________________ Added: svn:executable + * Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.setup.sh 2013-07-16 21:56:51 UTC (rev 6656) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx1.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -1,7 +1,7 @@ #!/bin/bash ARGS_FILE=${0%.setup.sh}.args -USERNAME=$MCS_USERNAME +MCS_USERNAME=$MCS_USERNAME case $STRESS in "S1") @@ -46,10 +46,10 @@ echo "Residual files cleaned up" EOF -if [[ -z $USERNAME ]] +if [[ -z $MCS_USERNAME ]] then echo "Remote username not provided. Skipping sites configs" else ls *xml - cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml + cat sites.xml | sed "s/{env.USER}/$MCS_USERNAME/" > tmp && mv tmp sites.xml fi \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.check.sh ___________________________________________________________________ Added: svn:executable + * Modified: branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.setup.sh 2013-07-16 21:56:51 UTC (rev 6656) +++ branches/release-0.94/tests/stress/IO/bagOnodes/stage_to_remoteNx2.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -1,12 +1,12 @@ #!/bin/bash ARGS_FILE=${0%.setup.sh}.args -USERNAME=$MCS_USERNAME +MCS_USERNAME=$MCS_USERNAME case $STRESS in "S1") FILES=50 - LOOPS=100 + LOOPS=50 ;; "S2") FILES=100 @@ -14,7 +14,7 @@ ;; *) FILES=50 - LOOPS=100 + LOOPS=50 ;; esac @@ -46,10 +46,10 @@ echo "Residual files cleaned up" EOF -if [[ -z $USERNAME ]] +if [[ -z $MCS_USERNAME ]] then echo "Remote username not provided. Skipping sites configs" else ls *xml - cat sites.xml | sed "s/{env.USER}/$USERNAME/" > tmp && mv tmp sites.xml + cat sites.xml | sed "s/{env.USER}/$MCS_USERNAME/" > tmp && mv tmp sites.xml fi \ No newline at end of file Modified: branches/release-0.94/tests/stress/IO/bagOnodes/temp.sh =================================================================== --- branches/release-0.94/tests/stress/IO/bagOnodes/temp.sh 2013-07-16 21:56:51 UTC (rev 6656) +++ branches/release-0.94/tests/stress/IO/bagOnodes/temp.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -6,14 +6,11 @@ echo $BASE echo "Source file : $BASE.source.sh" - cat <<'EOF' >> $BASE.setup.sh + cat <<'EOF' > $BASE.check.sh +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null -if [[ -n "$BEAGLE_USERNAME" ]] -then - echo "BEAGLE_USERNAME is $BEAGLE_USERNAME"; - sed "s/{env.USER}/$BEAGLE_USERNAME/g" sites.template.xml > sites.backup && mv sites.backup sites.template.xml -fi; - EOF done; \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.check.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,60 @@ +#!/bin/bash +#OVERRIDE_GLOBUS_HOST swift.rcc.uchicago.edu +#OVERRIDE_GLOBUS_TCP_PORT_RANGE 50000,51000 + + + + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=10 + LOOPS=0 + ;; + "S2") + SIZE=15 + LOOPS=0 + ;; + *) + SIZE=10 + LOOPS=0 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.swift 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x1.timeout 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.check.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,60 @@ +#!/bin/bash +#OVERRIDE_GLOBUS_HOST swift.rcc.uchicago.edu +#OVERRIDE_GLOBUS_TCP_PORT_RANGE 50000,51000 + + + + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=100 + LOOPS=0 + ;; + "S2") + SIZE=150 + LOOPS=0 + ;; + *) + SIZE=100 + LOOPS=0 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.swift 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remote1x2.timeout 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.check.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,59 @@ +#!/bin/bash + + + + + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=20 + LOOPS=10 + ;; + "S2") + SIZE=30 + LOOPS=20 + ;; + *) + SIZE=20 + LOOPS=10 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.setup.sh~ =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.setup.sh~ (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.setup.sh~ 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,59 @@ +#!/bin/bash + + +BEAGLE_USERNAME="yadunandb" +UC3_USERNAME="yadunand" + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=20 + LOOPS=10 + ;; + "S2") + SIZE=30 + LOOPS=20 + ;; + *) + SIZE=20 + LOOPS=10 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.setup.sh~ ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.swift 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx1.timeout 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.check.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,59 @@ +#!/bin/bash + + + + + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + SIZE=20 + LOOPS=50 + ;; + "S2") + SIZE=50 + LOOPS=50 + ;; + *) + SIZE=20 + LOOPS=50 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.swift 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_from_remoteNx2.timeout 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.check.sh ___________________________________________________________________ Added: svn:executable + * Modified: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.setup.sh 2013-07-16 21:56:51 UTC (rev 6656) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x1.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -29,6 +29,14 @@ ARGS_FILE=${0%.setup.sh}.args case $STRESS in + "S1") + FILES=50 + LOOPS=0 + ;; + "S2") + FILES=100 + LOOPS=0 + ;; *) FILES=50 LOOPS=0 Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.check.sh ___________________________________________________________________ Added: svn:executable + * Modified: branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.setup.sh 2013-07-16 21:56:51 UTC (rev 6656) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remote1x2.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -28,6 +28,14 @@ ARGS_FILE=${0%.setup.sh}.args case $STRESS in + "S1") + FILES=100 + LOOPS=0 + ;; + "S2") + FILES=500 + LOOPS=0 + ;; *) FILES=100 LOOPS=0 Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.args =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.args (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.args 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1 @@ +-loops=10 Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" *.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.check.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,74 @@ +#!/bin/bash + + + + + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + FILES=10 + LOOPS=10 + ;; + "S2") + FILES=10 + LOOPS=50 + ;; + *) + FILES=10 + LOOPS=10 + ;; +esac + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.setup.sh~ =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.setup.sh~ (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.setup.sh~ 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,55 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +BEAGLE_USERNAME=$BEAGLE_USERNAME + +case $STRESS in + "S1") + FILES=10 + LOOPS=10 + ;; + "S2") + FILES=10 + LOOPS=50 + ;; + *) + FILES=10 + LOOPS=10 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF + +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$BEAGLE_USERNAME/" > tmp && mv tmp sites.xml +fi \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.setup.sh~ ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.source.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; + Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.swift 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @tar stdout=@out stderr=@err; +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx1.timeout 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1 @@ +1200 Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" *.out &> /dev/null + Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.check.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,74 @@ +#!/bin/bash + + + + + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + FILES=50 + LOOPS=50 + ;; + "S2") + FILES=100 + LOOPS=100 + ;; + *) + FILES=50 + LOOPS=50 + ;; +esac + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.setup.sh~ =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.setup.sh~ (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.setup.sh~ 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,74 @@ +#!/bin/bash + + +BEAGLE_USERNAME="yadunandb" +UC3_USERNAME="yadunand" + +if [[ -z $MIDWAY_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{mid.USER}/$MIDWAY_USERNAME/" > tmp && mv tmp\ + sites.xml +fi +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{uc3.USER}/$UC3_USERNAME/" > tmp && mv tmp si\ +tes.xml +fi +if [[ -z $BEAGLE_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{beagle.USER}/$BEAGLE_USERNAME/" > tmp && mv \ +tmp sites.xml +fi + +ARGS_FILE=${0%.setup.sh}.args + +case $STRESS in + "S1") + FILES=10 + LOOPS=10 + ;; + "S2") + FILES=10 + LOOPS=50 + ;; + *) + FILES=10 + LOOPS=10 + ;; +esac + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.setup.sh~ ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.source.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; + Property changes on: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.swift 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @tar stdout=@out stderr=@err; +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/multiple/stage_to_remoteNx2.timeout 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1 @@ +1200 Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,13 @@ +#!/bin/bash + +echo "-loops=10 -size=10 -Dtcp.channel.log.io.performance=true" > stage_from_remote.args + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.source.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,7 @@ +#!/bin/bash + +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.swift 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote.timeout 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,39 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +UC3_USERNAME=$UC3_USERNAME + +case $STRESS in + "S1") + SIZE=10 + LOOPS=0 + ;; + "S2") + SIZE=15 + LOOPS=0 + ;; + *) + SIZE=10 + LOOPS=0 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF + +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$UC3_USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.source.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.swift 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x1.timeout 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,39 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +UC3_USERNAME=$UC3_USERNAME + +case $STRESS in + "S1") + SIZE=100 + LOOPS=0 + ;; + "S2") + SIZE=150 + LOOPS=0 + ;; + *) + SIZE=100 + LOOPS=0 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF + +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$UC3_USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.source.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.swift 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remote1x2.timeout 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,39 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +UC3_USERNAME=$UC3_USERNAME + +case $STRESS in + "S1") + SIZE=20 + LOOPS=10 + ;; + "S2") + SIZE=30 + LOOPS=20 + ;; + *) + SIZE=20 + LOOPS=10 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF + +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$UC3_USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.source.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.swift 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx1.timeout 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,39 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +UC3_USERNAME=$UC3_USERNAME + +case $STRESS in + "S1") + SIZE=20 + LOOPS=50 + ;; + "S2") + SIZE=50 + LOOPS=50 + ;; + *) + SIZE=20 + LOOPS=50 + ;; +esac + +echo "-loops=$LOOPS -size=$SIZE " > $ARGS_FILE + +cat <<'EOF' > filemaker.sh +#!/bin/bash + +echo "From filemaker.sh $1 $2 on Host:$HOSTNAME" +MAXSIZE=$1 +OUT=$2 +dd if=/dev/zero of=$OUT bs=1024 count=0 seek=$((1024*MAXSIZE)) + +EOF + +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$UC3_USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.source.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.swift 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,17 @@ +type file; +file script <"filemaker.sh">; + +app (file out, file log) remote_driver (file run, int size) +{ + bash @run size @out stdout=@filename(log); +} + +file driver_out[] ; +file driver_log[] ; + +int filesize = @toInt(@arg("size","10")); +int loop = @toInt(@arg("loops","0")); + +foreach item,i in [0:loop] { + (driver_out[i], driver_log[i]) = remote_driver(script, filesize); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_from_remoteNx2.timeout 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Modified: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.setup.sh 2013-07-16 21:56:51 UTC (rev 6656) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x1.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -1,8 +1,18 @@ #!/bin/bash ARGS_FILE=${0%.setup.sh}.args +UC3_USERNAME=$UC3_USERNAME case $STRESS in + "S1") + FILES=50 + LOOPS=0 + ;; + "S2") + FILES=100 + LOOPS=0 + ;; + *) FILES=50 LOOPS=0 @@ -36,3 +46,11 @@ rm $ARG1 $ARG1.test echo "Residual files cleaned up" EOF + +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$UC3_USERNAME/" > tmp && mv tmp sites.xml +fi \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,55 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +UC3_USERNAME=$UC3_USERNAME + +case $STRESS in + "S1") + FILES=100 + LOOPS=0 + ;; + "S2") + FILES=500 + LOOPS=0 + ;; + *) + FILES=100 + LOOPS=0 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF + +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$UC3_USERNAME/" > tmp && mv tmp sites.xml +fi Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.source.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.swift 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @filename(tar) stdout=@filename(out) stderr=@filename(err); +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remote1x2.timeout 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1 @@ +600 Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,55 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +UC3_USERNAME=$UC3_USERNAME + +case $STRESS in + "S1") + FILES=10 + LOOPS=10 + ;; + "S2") + FILES=10 + LOOPS=50 + ;; + *) + FILES=10 + LOOPS=10 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF + +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$UC3_USERNAME/" > tmp && mv tmp sites.xml +fi \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.source.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.swift 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @tar stdout=@out stderr=@err; +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx1.timeout 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1 @@ +1200 Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.check.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.check.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.check.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Cleaning up" +rm -rf "dummy" driver*.out &> /dev/null + Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.setup.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.setup.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.setup.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,55 @@ +#!/bin/bash + +ARGS_FILE=${0%.setup.sh}.args +UC3_USERNAME=$UC3_USERNAME + +case $STRESS in + "S1") + FILES=50 + LOOPS=50 + ;; + "S2") + FILES=100 + LOOPS=100 + ;; + *) + FILES=50 + LOOPS=50 + ;; +esac + + +dd if=/dev/zero of=dummy bs=1024 count=0 seek=$((1024*FILES)) +echo "-loops=$LOOPS" > $ARGS_FILE + +cat <<'EOF' > wrapper.sh +#!/bin/bash +ARG1=$1 +ls | grep "$1" &> /dev/null +if [ $? == 0 ] +then + echo "Hey this is wrapper and the $1 exists as a file"; + ls -lah; +else + echo "Doinks! the file we need isn't here"; + ls -lah +fi +cat $ARG1 > $ARG1.test +if [ $? == 0 ] +then + echo "The cat worked! "; +else + echo "The cat failed "; +fi + +rm $ARG1 $ARG1.test +echo "Residual files cleaned up" +EOF + +if [[ -z $UC3_USERNAME ]] +then + echo "Remote username not provided. Skipping sites configs" +else + ls *xml + cat sites.xml | sed "s/{env.USER}/$UC3_USERNAME/" > tmp && mv tmp sites.xml +fi \ No newline at end of file Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.setup.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.source.sh =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.source.sh (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.source.sh 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "midway001" == "midway001" ] +then + export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu + export GLOBUS_TCP_PORT_RANGE=50000,51000 +fi; Property changes on: branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.source.sh ___________________________________________________________________ Added: svn:executable + * Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.swift =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.swift (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.swift 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1,17 @@ +type file; + +file package <"dummy">; +file script <"wrapper.sh">; +int loop = @toInt(@arg("loops","0")); + +app (file out, file err) remote_driver (file run, file tar) +{ + bash @run @tar stdout=@out stderr=@err; +} + +file driver_out[] ; +file driver_err[] ; + +foreach item,i in [0:loop] { + (driver_out[i], driver_err[i]) = remote_driver(script, package); +} \ No newline at end of file Added: branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.timeout =================================================================== --- branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.timeout (rev 0) +++ branches/release-0.94/tests/stress/IO/uc3/stage_to_remoteNx2.timeout 2013-07-16 22:32:44 UTC (rev 6657) @@ -0,0 +1 @@ +1200 From hategan at ci.uchicago.edu Mon Jul 8 03:20:06 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Mon, 08 Jul 2013 08:20:06 -0000 Subject: [Swift-commit] r6619 - in branches/faster: . bin docs docs/cookbook docs/documentation docs/merged docs/merged/refmanual docs/merged/userguide docs/quickstart docs/siteguide docs/tutorial docs/userguide docs/utils etc/sites libexec src src/org/globus/swift/data src/org/griphyn/vdl/engine src/org/griphyn/vdl/karajan src/org/griphyn/vdl/karajan/lib src/org/griphyn/vdl/karajan/lib/swiftscript tests tests/language-behaviour/mappers tests/sites/intrepid tests/sites/mcs Message-ID: <20130708082000.92F2A9CCB1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-08 03:19:11 -0500 (Mon, 08 Jul 2013) New Revision: 6619 Added: branches/faster/docs/designs/ branches/faster/docs/merged/refmanual/build.sh branches/faster/docs/merged/refmanual/grammar branches/faster/docs/merged/refmanual/swift.css branches/faster/docs/merged/refmanual/swiftlang branches/faster/docs/siteguide/ec2 branches/faster/docs/siteguide/midway branches/faster/docs/siteguide/stampede branches/faster/docs/userguide/swift_monitor.png branches/faster/etc/sites/local-coasters branches/faster/etc/sites/stampede branches/faster/etc/sites/stampede-ssh branches/faster/src/org/griphyn/vdl/karajan/lib/swiftscript/ExtractFloat.java branches/faster/tests/language-behaviour/mappers/076-structured-regexp-mapper.b0.out.expected branches/faster/tests/language-behaviour/mappers/076-structured-regexp-mapper.b1.out.expected branches/faster/tests/language-behaviour/mappers/077-regexpmapper-input.in Removed: branches/faster/etc/sites/stampede branches/faster/tests/language-behaviour/mappers/076-structured-regexp-mapper.b.out.expected Modified: branches/faster/ branches/faster/bin/gensites branches/faster/bin/swiftrun branches/faster/docs/build_docs.sh branches/faster/docs/cookbook/cookbook.txt branches/faster/docs/cookbook/log_processing branches/faster/docs/documentation/documentation.txt branches/faster/docs/merged/build_docs.sh branches/faster/docs/merged/userguide/coasters branches/faster/docs/quickstart/quickstart.txt branches/faster/docs/siteguide/beagle branches/faster/docs/siteguide/fusion branches/faster/docs/siteguide/futuregrid branches/faster/docs/siteguide/intrepid branches/faster/docs/siteguide/prereqs branches/faster/docs/siteguide/siteguide.txt branches/faster/docs/tutorial/tutorial.txt branches/faster/docs/userguide/app_procedures branches/faster/docs/userguide/build_options branches/faster/docs/userguide/clustering branches/faster/docs/userguide/coasters branches/faster/docs/userguide/commands branches/faster/docs/userguide/configuration_properties branches/faster/docs/userguide/kickstart branches/faster/docs/userguide/log-processing branches/faster/docs/userguide/mappers branches/faster/docs/userguide/overview branches/faster/docs/userguide/profiles branches/faster/docs/userguide/site_catalog branches/faster/docs/userguide/transformation_catalog branches/faster/docs/userguide/userguide.txt branches/faster/docs/utils/gensites.txt branches/faster/etc/sites/beagle-ssh branches/faster/libexec/_swiftwrap.wrapperstaging branches/faster/libexec/swift-int.k branches/faster/libexec/swift-lib.k branches/faster/src/ branches/faster/src/org/globus/swift/data/Action.java branches/faster/src/org/griphyn/vdl/engine/ProcedureSignature.java branches/faster/src/org/griphyn/vdl/karajan/Loader.java branches/faster/src/org/griphyn/vdl/karajan/VDSTaskTransformer.java branches/faster/src/org/griphyn/vdl/karajan/lib/CacheUnlockFiles.java branches/faster/src/org/griphyn/vdl/karajan/lib/InFileDirs.java branches/faster/src/org/griphyn/vdl/karajan/lib/PathUtils.java branches/faster/src/org/griphyn/vdl/karajan/lib/SwiftFunction.java branches/faster/tests/README branches/faster/tests/USAGENOTES.txt branches/faster/tests/language-behaviour/mappers/076-structured-regexp-mapper.swift branches/faster/tests/language-behaviour/mappers/077-regexp-mapper.swift branches/faster/tests/sites/intrepid/sites.template.xml branches/faster/tests/sites/mcs/coaster-service.conf Log: merged changes from trunk Property changes on: branches/faster ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241,6255-6258,6263,6272,6274-6275 + /branches/release-0.93:4761-5122 /trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241,6255-6258,6263,6272,6274-6618 Modified: branches/faster/bin/gensites =================================================================== --- branches/faster/bin/gensites 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/bin/gensites 2013-07-08 08:19:11 UTC (rev 6619) @@ -123,10 +123,12 @@ if [ ! -f "$TEMPLATE_PATH" ]; then if [ -f "$TEMPLATE" ]; then TEMPLATE_PATH=$TEMPLATE + elif [ -f "$HOME/.swift/sites/$TEMPLATE" ]; then + TEMPLATE_PATH=$HOME/.swift/sites/$TEMPLATE + elif [ -f "$PWD/conf/$TEMPLATE" ]; then + TEMPLATE_PATH=$PWD/conf/$TEMPLATE elif [ -f "$SWIFT_HOME/$TEMPLATE" ]; then TEMPLATE_PATH=$SWIFT_HOME/$TEMPLATE - elif [ -f "$HOME/.swift/sites/$TEMPLATE" ]; then - TEMPLATE_PATH=$HOME/.swift/sites/$TEMPLATE fi if [ ! -f "$TEMPLATE_PATH" ]; then crash "Cannot find template for $TEMPLATE" @@ -151,9 +153,9 @@ # Setup for creating a TC file if [ -f "$PROPERTIES_FILE" ]; then if [ -n "`grep -e app $PROPERTIES_FILE`" ]; then - if [ -f "tc.data" ]; then - mv tc.data tc.data.old - fi + #if [ -f "tc.data" ]; then + # mv tc.data tc.data.old + #fi HOSTS=`grep -i "pool handle" $TEMPLATE_PATH|grep -v "^[[:space:]]*#"|cut -d'"' -f2` fi fi Modified: branches/faster/bin/swiftrun =================================================================== --- branches/faster/bin/swiftrun 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/bin/swiftrun 2013-07-08 08:19:11 UTC (rev 6619) @@ -60,6 +60,14 @@ rundir=$( echo run??? | sed -e 's/^.*run//' | awk '{ printf("run%03d\n", $1+1)}' ) mkdir $rundir +# Link input_files +if [ -d "input_files" ]; then + for input_file in input_files/* + do + ln -s $PWD/$input_file $rundir + done +fi + # Swift script if [ -f "$script" ]; then cp $script $rundir @@ -72,33 +80,37 @@ fi # Create sites.xml -cd $rundir IFS="," -echo "" > sites.xml +echo "" > $rundir/sites.xml for site in $SITES do # If config is not defined, but there is a config in conf/ that matches, use that - if [ -z "$CONFIG" ] && [ -f "../conf/$site.cf" ]; then - cp ../conf/$site.cf . - CONFIG=$site.cf - fi + if [ -z "$CONFIG" ] && [ -f "conf/$site.cf" ]; then + cp conf/$site.cf $rundir + config=$site.cf + fi - if [ -f "$CONFIG" ]; then - gensites -p $CONFIG $site >> sites.xml + if [ -f "conf/$config" ]; then + gensites -p conf/$config $site >> $rundir/sites.xml else - gensites $site >> sites.xml + gensites $site >> $rundir/sites.xml fi done -echo "" >> sites.xml +echo "" >> $rundir/sites.xml +mv tc.data $rundir +cd $rundir +if [ -z "$CONFIG" ]; then + CONFIG=$config +fi # Run timestamp=$( date +%s ) ln -s $PWD $HOME/.swift/runs/current/$rundir.$timestamp if [ -n "$CONFIG" ]; then - eval time swift -sites.file sites.xml -tc.file tc.data -config $CONFIG $script $args 2>&1 | tee swift.out + eval time swift -sites.file sites.xml -tc.file tc.data -config $CONFIG $( basename $script ) $args 2>&1 | tee swift.out else - eval time swift -sites.file sites.xml -tc.file tc.data $script $args 2>&1 | tee swift.out + eval time swift -sites.file sites.xml -tc.file tc.data $( basename $script ) $args 2>&1 | tee swift.out fi mv $HOME/.swift/runs/current/$rundir.$timestamp $HOME/.swift/runs/completed Modified: branches/faster/docs/build_docs.sh =================================================================== --- branches/faster/docs/build_docs.sh 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/build_docs.sh 2013-07-08 08:19:11 UTC (rev 6619) @@ -48,8 +48,6 @@ 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" Modified: branches/faster/docs/cookbook/cookbook.txt =================================================================== --- branches/faster/docs/cookbook/cookbook.txt 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/cookbook/cookbook.txt 2013-07-08 08:19:11 UTC (rev 6619) @@ -16,3 +16,6 @@ include::debugging[] include::log_processing[] + +link:http://www.ci.uchicago.edu/swift/docs/index.php[home] + Modified: branches/faster/docs/cookbook/log_processing =================================================================== --- branches/faster/docs/cookbook/log_processing 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/cookbook/log_processing 2013-07-08 08:19:11 UTC (rev 6619) @@ -84,7 +84,7 @@ Problem Reporting ~~~~~~~~~~~~~~~~~ -When reporting problems to swift-user at ci.uchicago.edu, please attach the +When reporting problems to swift-user at ci.uchicago.edu, attach the following files and information: . tc.data and sites.xml (or whatever you named these files) Modified: branches/faster/docs/documentation/documentation.txt =================================================================== --- branches/faster/docs/documentation/documentation.txt 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/documentation/documentation.txt 2013-07-08 08:19:11 UTC (rev 6619) @@ -9,3 +9,5 @@ include::automation[] +link:http://www.ci.uchicago.edu/swift/docs/index.php[home] + Modified: branches/faster/docs/merged/build_docs.sh =================================================================== --- branches/faster/docs/merged/build_docs.sh 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/merged/build_docs.sh 2013-07-08 08:19:11 UTC (rev 6619) @@ -113,3 +113,4 @@ find $INSTALLATION_DIRECTORY/$VERSION -type f -exec chgrp $GROUP {} \; -exec chmod $CHMOD_FILE_MODE {} \; > /dev/null 2>&1 find $INSTALLATION_DIRECTORY/$VERSION -type d -exec chgrp $GROUP {} \; -exec chmod $CHMOD_DIRECTORY_MODE {} \; > /dev/null 2>&1 + Copied: branches/faster/docs/merged/refmanual/build.sh (from rev 6618, trunk/docs/merged/refmanual/build.sh) =================================================================== --- branches/faster/docs/merged/refmanual/build.sh (rev 0) +++ branches/faster/docs/merged/refmanual/build.sh 2013-07-08 08:19:11 UTC (rev 6619) @@ -0,0 +1,3 @@ +#!/bin/sh + +asciidoc --attribute stylesheet=${PWD}/swift.css refmanual.txt Copied: branches/faster/docs/merged/refmanual/grammar (from rev 6618, trunk/docs/merged/refmanual/grammar) =================================================================== --- branches/faster/docs/merged/refmanual/grammar (rev 0) +++ branches/faster/docs/merged/refmanual/grammar 2013-07-08 08:19:11 UTC (rev 6619) @@ -0,0 +1,1427 @@ +== Swift Language Grammar + +The specification for a SwiftScript program +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +---- +program: + (namespace_dec[code])* + (importStatement[code])* + (topLevelStatement[code])* + EOF + ; +---- + +Namespace Declaration +~~~~~~~~~~~~~~~~~~~~~~ +---- +namespace_dec [StringTemplate code] +{StringTemplate ns=template("nsDef");}: +"namespace" (prefix:ID{ns.setAttribute("prefix", prefix.getText());})? uri:STRING_LITERAL SEMI { + ns.setAttribute("uri", uri.getText()); + code.setAttribute("namespaces", ns); + if (ns.getAttribute("prefix") == null) + code.setAttribute("targetNS", ns.getAttribute("uri")); + } + ; +---- + +The import statement +~~~~~~~~~~~~~~~~~~~~ +---- +importStatement [StringTemplate code] : +"import" name:STRING_LITERAL SEMI { + StringTemplate i = template("import"); + i.setAttribute("target", name.getText()); + code.setAttribute("imports", i); + } + ; +---- + +Type Declaration +~~~~~~~~~~~~~~~~~ +---- +typedecl [StringTemplate code] +{StringTemplate r=template("typeDef"); + StringTemplate t=null;} : + "type" id:ID { + r.setAttribute("name", id.getText()); } + ( + SEMI + | + (t=type + { + r.setAttribute("type", t); + } + SEMI + ) + | structdecl[r] + ) + {code.setAttribute("types", r);} + ; +---- + +Structure declaration +~~~~~~~~~~~~~~~~~~~~~~ +---- +structdecl [StringTemplate code] +{StringTemplate e=null, e1=null, t=null; String thisType = null;} : + LCURLY (t=type id:ID { + thisType = (String) t.getAttribute("name"); + e=template("memberdefinition"); + e.setAttribute("name", id.getText()); + } + (LBRACK RBRACK { thisType = thisType + "[]"; })* { + StringTemplate thisTypeTemplate; + thisTypeTemplate=template("type"); + thisTypeTemplate.setAttribute("name", thisType); + e.setAttribute("type", thisTypeTemplate); + code.setAttribute("members", e); + } + ( COMMA + id1:ID { + thisType = (String) t.getAttribute("name"); + e1=template("memberdefinition"); + e1.setAttribute("name", id1.getText()); + } + (LBRACK RBRACK { thisType = thisType + "[]"; })* { + StringTemplate thisTypeTemplate; + thisTypeTemplate=template("type"); + thisTypeTemplate.setAttribute("name", thisType); + e1.setAttribute("type", thisTypeTemplate); + code.setAttribute("members", e1); + })* + SEMI)* + RCURLY (options { + warnWhenFollowAmbig = false; + } :SEMI)? + ; +---- + +Top level statement +~~~~~~~~~~~~~~~~~~~ +---- +topLevelStatement[StringTemplate code] +{StringTemplate d=null; } : + +// these are ll(1) and easy to predict + + typedecl[code] + | d=ll1statement + { + code.setAttribute("statements",d); + } + +// these are non-declaration assign-like statements + + | (predictAssignStat) => d=assignStat + { + code.setAttribute("statements",d); + } + +// these are non-declaration append-associative array statements + + | (predictAppendStat) => d=appendStat + { + code.setAttribute("statements",d); + } + +// they all begin with (id name) + | (predictDeclaration) => declaration[code] + +// more complicated function invocations +// note that function invocations can happen in above statements too +// this section is just the remaining more specialised invocations + + | (procedurecallCode) => d=procedurecallCode + { + code.setAttribute("statements",d); + } + + | (procedurecallStatAssignManyReturnParam[code]) => procedurecallStatAssignManyReturnParam[code] + +// this is a declaration, but not sorted out the predications yet to +// group it into a decl block + | ("app") => d=appproceduredecl {code.setAttribute("functions",d);} + | (predictProceduredecl) => d=proceduredecl {code.setAttribute("functions", d);} + ; +---- + + +Predict Declaration +~~~~~~~~~~~~~~~~~~~ +---- +predictDeclaration {StringTemplate x,y;} : ("global") | (x=type y=declarator) ; + +declaration [StringTemplate code] +{StringTemplate t=null; + boolean isGlobal = false;} + : ("global" {isGlobal = true;})? + t=type + declpart[code, t, isGlobal] + (COMMA declpart[code, t, isGlobal])* + SEMI + ; +---- + +Declaration part +~~~~~~~~~~~~~~~~ +---- +declpart [StringTemplate code, StringTemplate t, boolean isGlobal] + { + StringTemplate n=null; + StringTemplate thisTypeTemplate=null; + String thisType = (String) t.getAttribute("name"); + StringTemplate variable=null; + StringTemplate m = null; + StringTemplate sTemp = null; + String sType = ""; + } : + n=declarator + (LBRACK + (sTemp=type {sType = (String) sTemp.getAttribute("name") ;} )? + RBRACK {thisType = thisType + "[" + sType + "]" ; sType = ""; } )* + { + thisTypeTemplate=template("type"); + thisTypeTemplate.setAttribute("name", thisType); + variable = template("variable"); + variable.setAttribute("name", n); + variable.setAttribute("type", thisTypeTemplate); + variable.setAttribute("global", ""+isGlobal); + code.setAttribute("statements", variable); + } + + (LT (m=mappingdecl | f:STRING_LITERAL) GT + { + if (m!=null) + variable.setAttribute("mapping", m); + else + variable.setAttribute("lfn", quote(f.getText())); + })? + +// TODO: mapping does here... +// which means construction of the variable template goes here, rather than +// in procedurecallDecl/variableDecl + + ( + (predictProcedurecallDecl) => procedurecallDecl[code, thisTypeTemplate, n, variable] + | variableDecl[code, thisTypeTemplate, n, variable] +// nice to lose this distinction entirely... +// | (predictDatasetdecl) => datasetdecl[code, thisTypeTemplate, n] +// TODO can shorten variableDecl predictor now we dont' need to +// distinguish it from datasetdecl? + ) + ; +---- + +Variable Declarator +~~~~~~~~~~~~~~~~~~~ +---- +variableDecl [StringTemplate code, StringTemplate t, StringTemplate d, StringTemplate v1] +{StringTemplate i1=null, m=null; + +} : + (i1=varInitializer + { + if (i1 != null) { + StringTemplate valueAssignment = template("assign"); + StringTemplate vr = template("variableReference"); + vr.setAttribute("name",d); + valueAssignment.setAttribute("lhs",vr); + valueAssignment.setAttribute("rhs",i1); + code.setAttribute("statements", valueAssignment); + } + })? + ; +---- + +Declarator +~~~~~~~~~~ +---- +declarator returns [StringTemplate code=null] : +id:ID {code=text(id.getText());} + ; +---- + + +Variable initializer +~~~~~~~~~~~~~~~~~~~~ +---- +varInitializer returns [StringTemplate code=null] : +ASSIGN code=expression + ; +---- + +This is an initializer used to set up an array. + currently does not support nested array. +---- +arrayInitializer returns [StringTemplate code=template("arrayInit")] +{StringTemplate e=null,from=null,to=null,step=null;} : +LBRACK + ( + (expression COLON) => + ( + from=expression COLON to=expression (COLON step=expression)? + { + StringTemplate range=template("range"); + range.setAttribute("from", from); + range.setAttribute("to", to); + if (step != null) + range.setAttribute("step", step); + code.setAttribute("range", range); + } + ) + | + ( + e=expression {code.setAttribute("elements", e);} + ( + // CONFLICT: does a COMMA after an initializer start a new + // initializer or start the option ',' at end? + // ANTLR generates proper code by matching + // the comma as soon as possible. + options { + warnWhenFollowAmbig = false; + } : COMMA e=expression {code.setAttribute("elements", e);} + )* + (COMMA)? + ) + )? + RBRACK + ; +---- + +Mapping Declaration +~~~~~~~~~~~~~~~~~~~ +---- +mappingdecl returns [StringTemplate code=template("mapping")] +{StringTemplate p=null, d=null;} + : d=declarator {code.setAttribute("descriptor",d);} SEMI + mapparamdecl[code] + ; +---- + +Mapping parameters declaration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +---- +mapparamdecl [StringTemplate code] +{StringTemplate p=null;} : +( p=mapparam {code.setAttribute("params", p);} + ( COMMA p=mapparam {code.setAttribute("params", p);} )* + )? + ; + +mapparam returns [StringTemplate code=template("mapParam")] +{StringTemplate n=null, v=null;} : +n=declarator ASSIGN v=mappingExpr + { + code.setAttribute("name", n); + code.setAttribute("value", v); + } + ; +---- + +Predict Procedure Declaration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This predicts in two different ways. +The first choice is procedures with no return parameters. For these, +we must predict as far as the opening { in order to distinguish +from procedure calls to procedures with no return parameters. +The second choice is for procedures with return parameters. Here we +predict as far as the bracket after the procedure name. We have to +predict on the return parameters, which means we won't get good +error reporting when there is a syntax error in there. + +---- +predictProceduredecl +{StringTemplate f=null;} : +( id:ID LPAREN + ( f=formalParameter (COMMA f=formalParameter)* )? + RPAREN + LCURLY + ) + | + ( + LPAREN + f=formalParameter + ( COMMA f=formalParameter + )* + RPAREN ID LPAREN + ) + ; +---- + +Procedure declaration +~~~~~~~~~~~~~~~~~~~~~ +---- +proceduredecl returns [StringTemplate code=template("function")] +{StringTemplate f=null;} : +( LPAREN + f=formalParameter + { + f.setAttribute("outlink", "true"); + code.setAttribute("outputs", f); + } + ( COMMA f=formalParameter + { + f.setAttribute("outlink", "true"); + code.setAttribute("outputs", f); + } + )* + RPAREN )? + id:ID {currentFunctionName=id.getText();} LPAREN + ( f=formalParameter + { + code.setAttribute("inputs", f); + } + ( COMMA f=formalParameter + { + code.setAttribute("inputs", f); + } + )* + )? + RPAREN + LCURLY + ( + atomicBody[code] + | + compoundBody[code] + ) + RCURLY + { + code.setAttribute("name", id.getText()); + currentFunctionName=null; + } + ; +---- + +App declaration +~~~~~~~~~~~~~~~~~~~~~~~~~ +---- +appproceduredecl returns [StringTemplate code=template("function")] +{StringTemplate f=null; + StringTemplate app=template("app"); + StringTemplate exec=null; } : + "app" + ( LPAREN + f=formalParameter + { + f.setAttribute("outlink", "true"); + code.setAttribute("outputs", f); + } + ( COMMA f=formalParameter + { + f.setAttribute("outlink", "true"); + code.setAttribute("outputs", f); + } + )* + RPAREN )? + id:ID {currentFunctionName=id.getText();} LPAREN + ( f=formalParameter + { + code.setAttribute("inputs", f); + } + ( COMMA f=formalParameter + { + code.setAttribute("inputs", f); + } + )* + )? + RPAREN + LCURLY + ( appProfile[app] )* + exec=declarator + {app.setAttribute("exec",exec);} + ( appArg[app] )* SEMI + {code.setAttribute("config",app);} + RCURLY + { + code.setAttribute("name", id.getText()); + currentFunctionName=null; + } + ; +---- + +App profile +~~~~~~~~~~~ +---- +appProfile [StringTemplate code] +{ StringTemplate p=null; + StringTemplate k=null; + StringTemplate v=null;} : + "profile" k=expression ASSIGN v=expression SEMI { + p=template("app_profile"); + p.setAttribute("key", k); + p.setAttribute("value", v); + code.setAttribute("profiles", p); + } + ; +---- + +App Formal parameter +~~~~~~~~~~~~~~~~~~~~ + +---- +formalParameter returns [StringTemplate code=template("parameter")] +{StringTemplate t=null,d=null,v=null; String thisType = null; } : +(t=type d=declarator + { + thisType = (String) t.getAttribute("name"); + code.setAttribute("name", d); + } + (LBRACK RBRACK {thisType = thisType + "[]"; })* + (ASSIGN v=constant + { + String value = (String)v.getAttribute("value"); + if (v.getName().equals("sConst")) { + v.removeAttribute("value"); + v.setAttribute("value", quote(value)); + } + code.setAttribute("defaultv", v); + } + )?) { + StringTemplate thisTypeTemplate; + thisTypeTemplate=template("type"); + thisTypeTemplate.setAttribute("name", thisType); + code.setAttribute("type", thisTypeTemplate); + } + ; +---- + +Type declaration +~~~~~~~~~~~~~~~~ +---- +type returns [ StringTemplate code = null ] + { StringBuilder buf = new StringBuilder(); } : + id:ID { + code = template("type"); + buf.append(id.getText()); + } + (typeSubscript[buf]) * { + code.setAttribute("name", buf.toString()); + } +; +---- + +Type Subscript +~~~~~~~~~~~~~~ +---- +typeSubscript[StringBuilder buf] : + LBRACK { buf.append('['); } + (id:ID { buf.append(id.getText()); })? + RBRACK { buf.append(']'); } +; +---- + +Compound Statement +~~~~~~~~~~~~~~~~~~ +---- +compoundStat[StringTemplate code] + : LCURLY + ( innerStatement[code] )* + RCURLY + ; +---- + +Compound body +~~~~~~~~~~~~~ +---- +compoundBody[StringTemplate code] + : ( innerStatement[code] )* + ; + +innerStatement[StringTemplate code] +{StringTemplate s=null;} + : (predictDeclaration) => declaration[code] + | + (( + s=ll1statement + | (procedurecallCode) => s=procedurecallCode + | (predictAssignStat) => s=assignStat + | (predictAppendStat) => s=appendStat + ) + { + code.setAttribute("statements",s); + }) + | (procedurecallStatAssignManyReturnParam[code]) => procedurecallStatAssignManyReturnParam[code] + ; +---- + +Case Inner Statement +~~~~~~~~~~~~~~~~~~~~ +---- +caseInnerStatement [StringTemplate statements] +{ StringTemplate code = null; } + : + ( code=ll1statement + | (procedurecallCode) => code=procedurecallCode + | (predictAssignStat) => code=assignStat + | (predictAppendStat) => code=appendStat + ) {statements.setAttribute("statements",code);} + | (procedurecallStatAssignManyReturnParam[statements]) => procedurecallStatAssignManyReturnParam[statements] + ; +---- + +These are the statements that can be predicted with ll(1) grammer +i.e. with one token of lookahead + +---- +ll1statement returns [StringTemplate code=null] + : + code=ifStat + | code=foreachStat + | code=switchStat + | code=iterateStat + ; +---- + +If statement +~~~~~~~~~~~~ +---- +ifStat returns [StringTemplate code=template("if")] +{ + StringTemplate cond=null; + StringTemplate body=template("statementList"); + StringTemplate els=template("statementList"); +} + : "if" LPAREN cond=expression RPAREN { + code.setAttribute("cond", cond); + } + compoundStat[body] {code.setAttribute("body", body);} + ( + options { + warnWhenFollowAmbig = false; + } + : "else" + compoundStat[els] {code.setAttribute("els", els);} + )? + ; +---- + +Foreach statement +~~~~~~~~~~~~~~~~~ +---- +foreachStat returns [StringTemplate code=template("foreach")] { + StringTemplate ds=null; + StringTemplate body=template("statementList"); +} + : "foreach" id:ID (COMMA indexId:ID)? "in" ds=expression { + code.setAttribute("var", id.getText()); + code.setAttribute("in", ds); + if (indexId != null) { + code.setAttribute("index", indexId.getText()); + } + } + compoundStat[body] {code.setAttribute("body", body);} + ; +---- + +Iterate statement +~~~~~~~~~~~~~~~~~ +---- +iterateStat returns [StringTemplate code=template("iterate")] +{ + StringTemplate cond=null; + StringTemplate body=template("statementList"); +} + : "iterate" id:ID + compoundStat[body] {code.setAttribute("body", body);} + "until" LPAREN cond=expression RPAREN SEMI + { + code.setAttribute("var", id.getText()); + code.setAttribute("cond", cond); + } + ; +---- + +Switch statement +~~~~~~~~~~~~~~~~ + +---- +switchStat returns [StringTemplate code=template("switch")] +{ + StringTemplate cond=null, b=null; +} + : "switch" LPAREN cond=expression RPAREN + {code.setAttribute("cond", cond);} + LCURLY + ( b = casesGroup {code.setAttribute("cases", b);} )* + RCURLY + ; +---- + +Cases Group +~~~~~~~~~~~ +---- +casesGroup returns [StringTemplate code=template("case")] +{StringTemplate b=null;} + : ( // CONFLICT: to which case group do the statements bind? + // ANTLR generates proper code: it groups the + // many "case"/"default" labels together then + // follows them with the statements + options { + greedy = true; + } + : + aCase[code] + ) + caseSList[code] + ; + +aCase [StringTemplate code] +{StringTemplate v=null;} + : ( + "case" v=expression {code.setAttribute("value", v);} + | "default" + ) + COLON + ; +---- + +Case Slist +~~~~~~~~~~ +---- +caseSList [StringTemplate code] +{StringTemplate s=null;} + : ( caseInnerStatement[code] )* + ; +---- + +Predict assignment statement +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +---- +predictAssignStat +{StringTemplate x=null;} + : x=identifier ASSIGN ; +---- + +Predict append statement +~~~~~~~~~~~~~~~~~~~~~~~~ +---- +predictAppendStat +{StringTemplate x=null;} + : x=identifier APPEND ; +---- + +Assignment statement +~~~~~~~~~~~~~~~~~~~~ +---- +assignStat returns [StringTemplate code=null] +{StringTemplate id=null;} + : + id=identifier + ASSIGN + ( + (predictProcedurecallAssign) => code=procedurecallCode + { StringTemplate o = template("returnParam"); + o.setAttribute("name",id); + code.setAttribute("outputs",o); + } + | + code=variableAssign + { + code.setAttribute("lhs",id); + } + ) + ; +---- + +Append statement +~~~~~~~~~~~~~~~~ +---- +appendStat returns [ StringTemplate code = null ] + { StringTemplate id=null; } +: + id=identifier + APPEND + ( + (predictProcedurecallAssign) => code=procedurecallCode { + StringTemplate o = template("returnParam"); + o.setAttribute("name",id); + code.setAttribute("outputs",o); + } + | + code=arrayAppend { + code.setAttribute("array", id); + } + ) +; +---- + +Array append statement +~~~~~~~~~~~~~~~~~~~~~~ +---- +arrayAppend returns [ StringTemplate code = null ] + { StringTemplate a = null, e = null, id = null; } +: + e = expression SEMI { + code = template("append"); + code.setAttribute("value", e); + } +; +---- + +Variable Assign statement +~~~~~~~~~~~~~~~~~~~~~~~~~ +---- +variableAssign returns [StringTemplate code=null] +{StringTemplate a=null, e=null, id=null;} + : + e=expression SEMI { + code=template("assign"); + code.setAttribute("rhs", e); + } + ; +---- + +Procedure call +~~~~~~~~~~~~~~ +---- +procedurecallCode returns [StringTemplate code=template("call")] +{StringTemplate f=null;} + : + procedureInvocation[code] + ; +---- + +procedure invocation +~~~~~~~~~~~~~~~~~~~~ +---- +procedureInvocation [StringTemplate code] + : + procedureInvocationWithoutSemi[code] + SEMI + ; +---- + +procedure invocation without semicolon +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +---- +procedureInvocationWithoutSemi [StringTemplate code] +{StringTemplate f=null;} + : + id:ID {code.setAttribute("func", id.getText());} + LPAREN + ( f=actualParameter { + code.setAttribute("inputs", f); + } + ( COMMA f=actualParameter { + code.setAttribute("inputs", f); + } + )* + )? + RPAREN + ; +---- + +procedure invocation expression +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +---- +procedureInvocationExpr [StringTemplate code] +{StringTemplate f=null;} + : + id:ID {code.setAttribute("func", id.getText());} + LPAREN ( + f=actualParameter { + code.setAttribute("inputs", f); + } + ( + COMMA f=actualParameter { + code.setAttribute("inputs", f); + } + )* + )? + RPAREN + ; +---- + +procedure call expression +~~~~~~~~~~~~~~~~~~~~~~~~~ +---- +procedureCallExpr returns [StringTemplate code=template("call")] +{StringTemplate f=null;} + : + procedureInvocationExpr[code] + ; +---- + +predict procedure call +~~~~~~~~~~~~~~~~~~~~~~ +---- +predictProcedurecallDecl : ASSIGN ID LPAREN ; + +procedurecallDecl [StringTemplate container, StringTemplate type, StringTemplate decl, StringTemplate var] +{ +StringTemplate code=template("call"); +StringTemplate f=template("returnParam"); + +StringTemplate declref=template("variableReference"); +declref.setAttribute("name",decl); +f.setAttribute("name", declref); +code.setAttribute("outputs", f); +container.setAttribute("statements",code); + +} + : + ASSIGN + procedureInvocationWithoutSemi[code] + ; +---- + + +---- +procedurecallStatAssignManyReturnParam [StringTemplate s] +{ StringTemplate code=template("call"); } + : + LPAREN + procedurecallStatAssignManyReturnOutput[s,code] + ( COMMA procedurecallStatAssignManyReturnOutput[s,code] )* + RPAREN + ASSIGN + procedureInvocation[code] + { + s.setAttribute("statements",code); + } + ; +---- + +---- +procedurecallStatAssignManyReturnOutput [StringTemplate s, StringTemplate code] +{StringTemplate var = null, f = null; } + : + f=returnParameter + { + code.setAttribute("outputs", f); + var = template("variable"); + if(f.getAttribute("type") != null) { + StringTemplate nameST = (StringTemplate)f.getAttribute("name"); + var.setAttribute("name",nameST.getAttribute("name")); + var.setAttribute("type",f.getAttribute("type")); + var.setAttribute("global", Boolean.FALSE); + + s.setAttribute("statements",var); + } + } + ; +---- + +---- +returnParameter returns [ StringTemplate code = template("returnParam") ] + { StringTemplate t = null, id = null, d = null; StringBuilder buf = new StringBuilder(); } +: + t = identifier { buf.append(t.getAttribute("name")); } + (typeSubscript[buf])* + ( id = identifier )? + { + if (id == null) { + code.setAttribute("name", t); + } + else { + t = template("type"); + t.setAttribute("name", buf.toString()); + code.setAttribute("name", id); + code.setAttribute("type", t); + } + } + ((ASSIGN declarator) => (ASSIGN d=declarator) { + code.setAttribute("bind", d); + })? +; +---- + +---- +actualParameter returns [StringTemplate code=template("actualParam")] +{StringTemplate d=null, id=null, ai=null;} + : + ( + (declarator ASSIGN)=> (d=declarator ASSIGN) + { + code.setAttribute("bind", d); + } + )? + id=expression { + code.setAttribute("value", id); + } + ; +---- + +Atomic Procedure Body +~~~~~~~~~~~~~~~~~~~~~ +---- +atomicBody [StringTemplate code] +{StringTemplate app=null, svc=null;} + : app=appSpec + {code.setAttribute("config",app);} + ; +---- + +/* This is the deprecated format for app { } blocks */ +---- +appSpec returns [StringTemplate code=template("app")] +{StringTemplate exec=null;} + : "app" LCURLY + exec=declarator + { code.setAttribute("exec", exec);} + ( + appArg[code] + )* + SEMI RCURLY + ; +---- + +App Args +~~~~~~~~ +---- +appArg [StringTemplate code] +{StringTemplate arg=null;} + : arg=mappingExpr + {code.setAttribute("arguments", arg);} + | + stdioArg[code] + ; +---- + +Mapping Expression +~~~~~~~~~~~~~~~~~~ +---- +mappingExpr returns [StringTemplate code=null] +{StringTemplate e=null;} + : + e = expression + { + code=template("mappingExpr"); + code.setAttribute("expr", e); + } + ; +---- + +Function Invocation +~~~~~~~~~~~~~~~~~~~ +---- +functionInvocation returns [StringTemplate code=template("functionInvocation")] +{StringTemplate func=null, e=null;} + : AT ( + (declarator LPAREN) => + (func=declarator + { + code.setAttribute("name", func); + } + LPAREN + ( + functionInvocationArgument[code] + ( + COMMA + functionInvocationArgument[code] + )*)? + RPAREN + ) + | + (e=identifier | (LPAREN e=identifier RPAREN) ) + { + code.setAttribute("name", "filename"); + code.setAttribute("args", e); + }) + ; +---- + +---- +functionInvocationArgument [StringTemplate code] +{StringTemplate e = null;} + : + e=expression + { + code.setAttribute("args", e); + } + ; +---- + +Standard IO Arg +~~~~~~~~~~~~~~~ +---- +stdioArg [StringTemplate code] +{StringTemplate t=null,m=null; String name=null;} + : ("stdin" {t=template("stdin"); name="stdin";} + | + "stdout" {t=template("stdout"); name="stdout";} + | + "stderr" {t=template("stderr"); name="stderr";} + ) + ASSIGN + m=mappingExpr + { + t.setAttribute("content", m); + code.setAttribute(name, t); + } + ; +---- + +Expression +~~~~~~~~~~ +---- +expression returns [StringTemplate code=null] + : code=orExpr + ; +---- + +---- +orExpr returns [StringTemplate code=null] +{StringTemplate a,b;} + : code=andExpr + ( OR b=andExpr + { + a = code; + code=template("or"); + code.setAttribute("left", a); + code.setAttribute("right", b); + } + )* + ; +---- + +---- +andExpr returns [StringTemplate code=null] +{StringTemplate a,b;} + : code=equalExpr + ( AND b=equalExpr + { + a = code; + code=template("and"); + code.setAttribute("left", a); + code.setAttribute("right", b); + } + )* + ; +---- + +---- +equalExpr returns [StringTemplate code=null] +{ +StringTemplate a,b=null; +Token op=null; +} + : code=condExpr + ( + {op=LT(1);} + ( EQ | NE ) b=condExpr + { + a = code; + code=template("cond"); + code.setAttribute("op", escape(op.getText())); + code.setAttribute("left", a); + code.setAttribute("right", b); + } + )? + ; +---- + +Conditional Expression +~~~~~~~~~~~~~~~~~~~~~~ +---- +condExpr returns [StringTemplate code=null] { +StringTemplate a,b=null; +Token op=null; +} : code=additiveExpr + ( + options { + greedy = true; + //warnWhenFollowAmbig = false; + } + : + {op=LT(1);} + ( LT | LE | GT | GE ) b=additiveExpr + { + a = code; + code=template("cond"); + code.setAttribute("op", escape(op.getText())); + code.setAttribute("left", a); + code.setAttribute("right", b); + } + )? + ; +---- + + +---- +additiveExpr returns [StringTemplate code=null] +{ +StringTemplate a,b=null; +Token op=null; +} + : code=multiExpr + ( + options { + greedy = true; + //warnWhenFollowAmbig = false; + } + : + {op=LT(1);} + ( PLUS | MINUS ) b=multiExpr + { + a = code; + code=template("arith"); + code.setAttribute("op", escape(op.getText())); + code.setAttribute("left", a); + code.setAttribute("right", b); + } + )* + ; +---- + +---- +multiExpr returns [StringTemplate code=null] +{ +StringTemplate a,b=null; +Token op=null; +} + : code=unaryExpr + ( + options { + greedy = true; + //warnWhenFollowAmbig = false; + } + : + {op=LT(1);} + ( STAR | IDIV | FDIV | MOD ) b=unaryExpr + { + a = code; + code=template("arith"); + code.setAttribute("op", escape(op.getText())); + code.setAttribute("left", a); + code.setAttribute("right", b); + } + )* + ; +---- + +---- +unaryExpr returns [StringTemplate code=null] +{StringTemplate u=null;} + : MINUS u=unaryExpr + {code=template("unaryNegation"); code.setAttribute("exp", u);} + | PLUS u=unaryExpr // unary plus has no effect + {code=u;} + | NOT u=unaryExpr + {code=template("not"); code.setAttribute("exp", u);} + | code=primExpr + ; +---- + +---- +primExpr returns [StringTemplate code=null] +{StringTemplate id=null, exp=null;} + : (predictProcedureCallExpr) => code=procedureCallExpr + | code=identifier + | LPAREN exp=orExpr RPAREN { code=template("paren"); + code.setAttribute("exp", exp);} + | code=constant + | code=functionInvocation + ; +---- + +---- +predictProcedureCallExpr + : ID LPAREN ; + +---- + +Identifier +~~~~~~~~~~ +---- +identifier returns [StringTemplate code=null] +{ + StringTemplate c=null; + code=template("variableReference"); +} + : + base:ID {code.setAttribute("name",base.getText());} + + ( ( c=arrayIndex { c.setAttribute("array",code); code=c; } ) + | + ( c=memberName {c.setAttribute("structure",code); code=c;} ) + )* + ; +---- + +Array Index +~~~~~~~~~~~ +---- +arrayIndex returns [StringTemplate code=null] +{StringTemplate e=null;} + : + LBRACK + (e=expression | s:STAR) + RBRACK + { + code=template("arraySubscript"); + if(e != null) code.setAttribute("subscript",e); + if(s != null) { + StringTemplate st = template("sConst"); + st.setAttribute("value","*"); + code.setAttribute("subscript",st); + } + } + ; +---- + +Array Member +~~~~~~~~~~~~ +---- +memberName returns [StringTemplate code=null] : + d:DOT (member:ID | s:STAR) { + code=template("memberAccess"); + if(member != null) code.setAttribute("name",member.getText()); + if(s != null) code.setAttribute("name","*"); + } + ; +---- + +Constant +~~~~~~~~ +---- +constant returns [StringTemplate code=null] + : i:INT_LITERAL + { + code=template("iConst"); + code.setAttribute("value",i.getText()); + } + | d:FLOAT_LITERAL + { + code=template("fConst"); + code.setAttribute("value",d.getText()); + } + | s:STRING_LITERAL + { + code=template("sConst"); + code.setAttribute("value",quote(escape(s.getText()))); + } + | t:"true" + { + code=template("bConst"); + code.setAttribute("value", t.getText()); + } + | f:"false" + { + code=template("bConst"); + code.setAttribute("value", f.getText()); + } + | code=arrayInitializer + ; +---- + +Literal Symbols +~~~~~~~~~~~~~~~ + +---- +AT : "@" ; +PLUS : "+" ; +MINUS : '-' ; +FDIV : '/' ; +IDIV : "%/" ; +MOD : "%%" ; +EQ : "==" ; +NE : "!=" ; +LT : '<' ; +LE : "<=" ; +GT : ">" ; +GE : ">="; +APPEND : "<<"; +ASSIGN : '=' ; +AND : "&&"; +OR : "||"; +NOT : "!"; +LBRACK options { paraphrase = "'['"; } : '[' ; +RBRACK options { paraphrase = "']'"; } : ']' ; +LPAREN options { paraphrase = "'('"; } : '(' ; +RPAREN options { paraphrase = "')'"; } : ')' ; +LCURLY options { paraphrase = "'{'"; } : '{' ; +RCURLY options { paraphrase = "'}'"; } : '}' ; +SEMI options { paraphrase = "a semicolon"; } : ';' ; + +---- + +Id + +---- +ID options + { + paraphrase = "an identifier"; + testLiterals = true; + } + : + ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')* + ; +---- + +---- +// string literals +STRING_LITERAL +// : '"'! (~('"'|'\n'|'\r'))* '"'! + : '"'! (escape_sequence|~('"'|'\\'|'\n'|'\r'))* '"'! + ; + +NUMBER + : + ( INTPART {_ttype=INT_LITERAL; } + ('.' FLOATPART {_ttype=FLOAT_LITERAL; })? + (EXPONENT {_ttype=FLOAT_LITERAL; })? + ) + | + ( '.' { _ttype=DOT; } + ((FLOATPART {_ttype=FLOAT_LITERAL; }) + (EXPONENT)?)? + ) + ; + +whitespace : ( ' ' + | '\t' + | '\r' + | '\n' {newline();} + )+ + { $setType(Token.SKIP); } + ; + +//Single line comment C/C++ style +singleline_ccomment: + "//" + (~('\n'|'\r'))* ('\n'|'\r'('\n')?) + {$setType(Token.SKIP); newline();} + ; + +//Single line comment shell style +singleline_scomment: + "#" + (~('\n'|'\r'))* ('\n'|'\r'('\n')?) + {$setType(Token.SKIP); newline();} + ; + +//Multiline comment C style +multiline_comment : + "/*" + ( + options { + generateAmbigWarnings=false; + } + : + { LA(2)!='/' }? '*' + | '\r' '\n' {newline();} + | '\r' {newline();} + | '\n' {newline();} + | ~('*'|'\n'|'\r') + )* + "*/" + {$setType(Token.SKIP);} + ; + +escape_sequence : + '\\' + ( 'n' + | 'r' + | 't' + | 'b' + | 'f' + | '"' + | '\'' + | '\\' + ) + ; + +---- Copied: branches/faster/docs/merged/refmanual/swift.css (from rev 6618, trunk/docs/merged/refmanual/swift.css) =================================================================== --- branches/faster/docs/merged/refmanual/swift.css (rev 0) +++ branches/faster/docs/merged/refmanual/swift.css 2013-07-08 08:19:11 UTC (rev 6619) @@ -0,0 +1,6 @@ + +/* SWIFT/T GUIDE CUSTOMIZATIONS */ + +a:visited { + color: black; +} Copied: branches/faster/docs/merged/refmanual/swiftlang (from rev 6618, trunk/docs/merged/refmanual/swiftlang) =================================================================== --- branches/faster/docs/merged/refmanual/swiftlang (rev 0) +++ branches/faster/docs/merged/refmanual/swiftlang 2013-07-08 08:19:11 UTC (rev 6619) @@ -0,0 +1,486 @@ + +== Swift Language Reference Manual +This reference manual semi-formally outlines the Swift language conventions + +== Support + +An overview of Swift may be found at: + +http://www.ci.uchicago.edu/swift/guides/trunk/userguide/userguide.html + +The Swift user discussion mailing list is found here: + +https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user + +== Usage + +Swift code is conventionally written in +\*.swift+ files. +After writing the Swift program ++program.swift+, run: + +---- +swift -sites.file -config -tc.file +---- + +Swift accepts many commandline arguments. Following are the most frequently used: + ++-config + :: Indicates the Swift configuration file to be used for this +run. Properties in this configuration file will override the default +properties. If individual command line arguments are used for properties, they +will override the contents of this file. + ++-sites.file + :: Points to the location of the sites.xml file + ++-tc.file + :: Points to the location of the tc.data file + ++-resume + :: Resumes the execution using a log file + +== Program Structure + +Swift programs are composed of declaration of and calls to _composite_ +functions. These share syntax with C-like languages. The following is a +complete Swift program: + +---- +tracef("%s: %i\n", "The answer is", 42); +---- + +== Comments + +Swift supports C/C++ comments: + +---- +# This is a comment +// This is a comment +/* This is a +comment */ +/** Also a +comment */ +---- + +== Dataflow Evaluation + +Swift expressions are evaluated in _dataflow_ order: + +---- +int z1,z2; +int y; +int x = f(y); +y = g(2); +z1 = h(x,y,1); +z2 = h(x,y,2); +int output = r(z1,z2); +---- + +This allows code to execute as concurrently as possible, limited +only by data availability. In this example, +g()+ runs first, because it +is dependent only on a literal. When +y+ is set, +f()+ runs, setting ++x+. Then, two invocations of +h()+ execute. Finally, +z1+ and +z2+ +are set, allowing +r()+ to run. + +Variables may be assigned only once. Multiple assignment is typically +detected at compile time, although in some cases it will result in a +run time error. Unassigned variables that are inputs to functions +will lead to a stall in progress. + +== Composite functions + +Swift code is written in composite functions. + +---- +[()] function_name [()] +{ + statement; + statement; + ... +} +---- + +An example of a Swift composite function is shown below: + +---- +(Station _stat) get_site(int _run_id) { + StationFile file<"/tmp/site_tmp">; + file = getsite_file(_run_id); + _stat = readData(file); +} +---- + +== App functions +Swift app functions are used to integrate external apps into Swift and made +callable as Swift functions. App functions have the form: + +---- +[()] app function_name [()] +{ + statement; +} +---- + +An example of an app function definition is as follows: + +---- +(RuptureFile _rup) app getrupture_file(int _run_id) { + getrupture _run_id stdout=@filename(_rup); +} +---- + +Note that an app function may have only one commandline statement while a +composite function may have multiple statements. + +An empty input or output list may be omitted or written as +()+. + +The output list may have more than one entry. Thus, assignments +may be written as: +---- +x1, x2 = f(i1, i2); +// or equivalently: +(x1, x2) = f(i1, i2); +---- + +=== Swift keywords + +Following is a list of Swift keywords: + +---- + app type float int boolean string + global foreach if else iterate + switch case default file while import +---- + +== Types + +Swift provides a similar range of primitive types to many other programming +languages. Files are a primitive type in Swift, unlike in many other languages, +and have a number of special characteristics that merit special mention. Two +basic kinds of data structure are provided: arrays and structs. + +=== Primitive Types + +Swift has the conventional types: + ++string+:: A complete string (not an array of characters). ++int+:: A 64-bit integer. ++float+:: A 64-bit (double-precision) floating point number. ++boolean+:: A boolean (true/false). ++file+:: A file (see Section Files). + +Literals for these types use conventional syntax: + +* +int+ literals are written as decimal numbers, e.g. +-1234+ +* +float+ literals are written as decimal numbers with a decimal point, + e.g +5493.352+ or +1.0+. + The literals +NaN+ and +inf+ may be used. In some contexts +int+ + literals are promoted automatically to +float+. +* +boolean+ literals +* +string+ literals are enclosed in double quotes, with a range of escape + sequences supported: +** \\ for a single backslash +** \" for a quote +** \n for newline +** \t for tab +** \a +** \b +** \f +** \r +** \v +** hexadecimal escape codes, e.g. \xf2 + +The literals +true+ and +false+ may be used for boolean. + +---- +int four = 2+2; +string s = "hello "; +string hw = s + "world"; +---- + +=== Files + +A file is a first-class entity in Swift that in many ways can be treated +as any other variable. The main difference is that a file can be +*mapped* to path in a filesystem. Assigning to a mapped file variable +results in a file being created in the file system at the specified path. +File variables can also be initialized with data from a pre-existing +file using the +input_file+ function. File paths are relative to the +working directory. + +For example, if +/home/user/in.txt+ is a file with some data in it, +the following Swift program will copy the file to +/home/user/out.txt+. +---- + type file; + + app (file o) cp_app(file i){ + cp @i @o; + } + + file x <"/home/user/in.txt">; + file y <"/home/user/out.txt">; + + y = cp_app(x); +---- + +=== Arrays + +Arrays are declared with empty square brackets: + +---- +int A[]; +---- + +Arrays are indexed using square brackets. + +Each array index can only be assigned to once. + +Arrays may be used as inputs or outputs of functions. + +Arrays are part of Swift dataflow semantics. An array is closed +when all possible insertions to it are complete. + +---- +int A[]; + +foreach i in [1:10] { + A[i] = i; + tracef("Element %i is %i\n", i, A[i]); +} +---- + +Array literals may be expressed with list syntax: +---- +int C[] = [4,5,6]; +---- + +=== Structs + +In Swift, structs are defined with the +type+ keyword. They define +a new type. + +---- +type person +{ + string name; + int age; + int events[]; +} +---- + +Structs are accessed with the +.+ syntax: + +---- +person p; +p.name = "Abe"; +p.age = 90; +---- + +=== Defining new types + +New types can be defined with +type+, which creates a new type that is a +specialization of an existing type. That is, it is a distinct type that is not +interchangeable. + +---- +type messagefile; +---- + +== Control structures + +Swift provides control structures that may be placed as statements +inside a composite function. + +=== Conditionals + +==== If statement + +If statements have the form: + +---- +if () +{ + statement; + ... +} +else +{ + statement; + ... +} +---- + +As required by dataflow processing, progress blocks on the availability +of the condition value. + +==== Switch statement + +---- +int a = 20; +switch (a) +{ + case 1: + int c; + c = a + a; + b = a + 1; + case 20: + b = 1; + case 2000: + b = 2; + default: + b = 2102 + 2420; +} +tracef("b: %i\n", b); +---- + +=== Iteration + +Iteration in parallel is performed with the +foreach+ and +iterate+ statement. + +==== Foreach loop + +The +foreach+ loop allows for parallel iteration over an array: + +---- +foreach value[, index] in [expression]{ + statement; + statement; + ... +} +---- + +The +index+ and +value+ variables are automatically declared. The ++index+ variable may be omitted from the syntax. + +A special case of the foreach loop occurs when combined with the +array range operator. This is the idiomatic way to iterate over +a range of integer values in Swift. The Swift compiler has special +handling for this case that avoids constructing an array. + +---- +foreach i in [start:stop:step] { + ... +} +---- + +Examples of +foreach+ loop are as follows: + +---- +string A[]; +foreach value, index in A +{ + tracef("A[%i] = %s\n", index, value); +} +---- + +---- +trace(" First five odd numbers"); +foreach idx in [1:10:2]{ + tracef("%i\n",idx); +} +---- + +==== Iterate loop + +The +iterate+ loop allows for sequential iteration. + +---- +iterate months { + tracef("%i\n", months); + } until (months==12); +---- + +The general form is: +---- +iterate var +{ + statement; + ... +} until (expression); +---- + +*Performance Tip:* use the +foreach+ loop instead of +iterate+ if your +loop iterations are independent and can be executed in parallel. + +== Operators + +The following binary arithmetic operators on numbers are defined: + ++++ (plus), +-+ (minus), +\*+ (times), +/+ (divide), ++%/+ (integer divide), +%%+ (modulus), +**+ (power) + ++&&+ (boolean and), +||+ (boolean or), ++==+ (equals), +!=+ (not equals), +>+ (greater than), +<+ (less than), ++>=+ (greater than or equal to), +<=+ (less than or equal to) + +The following unary operators are defined: + ++-+ (negate), +!+ (boolean not) + +String concatenation is also performed with +++ (plus). ++==+ and +!=+ may also be used on strings. + +== Defining Apps + +In typical Swift applications, the computationally intensive parts of the +application are not written in the Swift language. Rather, +the work is done by _app functions_ that are _composed_ together with +Swift code. The builtin functions mentioned above are implemented as extension +functions in Tcl. + +=== App functions + +App functions are functions that are implemented as command-line +programs. These command-line programs can be brought into a Swift +program as functions with typed inputs and outputs. + +An app function definition comprises: + +* The standard components of a Swift function declaration: input and + output arguments and the function name. Note that the output + variable types are restricted to individual +file+#s#. +* The command line, which comprises an initial string which is the + executable to run, and then a series of arguments which are + the command-line arguments to pass to the program. + +App arguments can be: + +* Literals such as numbers or strings. +* File variables (passed as file paths). +* Other variables, which are converted to string arguments. + Arrays (including multi-dimensional arrays) are expanded to + multiple arguments. +* Arbitrary expressions surrounded by parentheses. + +Standard input, output and error can be redirected to files. + +Join files together: +---- +type file; + +app (file out) cat (file inputs[]) { + "/bin/cat" inputs @stdout=out +} + +main { + file joined <"joined.txt"> = cat(glob("*.txt")); +} +---- + +Sleep an arbitrary amount of time: + +---- +app (void signal) sleep (int secs) { + "/bin/sleep" secs +} + + foreach time in [1:5] { + void signal = sleep(time); + // Wait on output signal so that trace occurs after sleep + wait(signal) { + trace("Slept " + fromint(time)); + } + } +---- + +//// +Local Variables: +mode: doc +End: +//// Modified: branches/faster/docs/merged/userguide/coasters =================================================================== --- branches/faster/docs/merged/userguide/coasters 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/merged/userguide/coasters 2013-07-08 08:19:11 UTC (rev 6619) @@ -3,7 +3,7 @@ Introduction ~~~~~~~~~~~~ -Coasters are the Swift's implementation of _pilot job abstraction_. +Coasters are the Swift's implementation of the _pilot job abstraction_. In many applications, Swift performance can be greatly enhanced by the use of coasters. Coasters provide a low-overhead job submission and file transfer @@ -39,7 +39,7 @@ To use for job execution, specify a sites.xml execution element like this: ---- - + ---- The jobmanager string contains more detail than with other providers. It @@ -55,7 +55,7 @@ To use for file transfer, specify a sites.xml filesystem element like this: ---- - + ---- The url parameter should be a pseudo-URI formed with the URI scheme @@ -93,10 +93,11 @@ Coasters -------- Coasters were introduced in Swift v0.6 as an experimental feature. In many -applications, Swift performance can be greatly enhanced by the use of -coasters. Coasters provide a low-overhead job submission and file transfer -mechanism suited for the execution of short jobs (on the order of a few -seconds). A detailed information on coasters can be found at http://www.ci.uchicago.edu/swift/guides/userguide.php#coasters. +applications, Swift performance can be greatly enhanced by the use of coasters. +Coasters provide a low-overhead job submission and file transfer mechanism +suited for the execution of short jobs (on the order of a few seconds). A +detailed information on coasters can be found at +http://www.ci.uchicago.edu/swift/guides/userguide.php#coasters. //**Include neat diagrams.** Following is a coasters setup case-study for a PBS underlying provider where sites.xml coaster settings were: @@ -129,7 +130,7 @@ 10000 source~~~~ -The following table briefly describes the elements on the coasters setup: +The following table briefly describes the elements of the coasters setup: [width="70%", cols="^3,10", options="header"] |============================================================================================= |profile key | brief description @@ -144,59 +145,22 @@ |jobThrottle |the number of concurrent jobs allowed on a site |============================================================================================== -// -//For Beginners -//~~~~~~~~~~~~~~ -//Coasters for beginners. Usage of existing, prebuilt templates. -// -//For Intermediate Users -//~~~~~~~~~~~~~~~~~~~~~~~ -//Coasters for intermediate users. -// -//Using gensites -//^^^^^^^^^^^^^^^ -//Usage of gensites to generate your own sites -//configurations. -// -// -// +Advanced User-Guide +~~~~~~~~~~~~~~~~~~~ -For Advanced Users -~~~~~~~~~~~~~~~~~~ - //Coasters for advanced users. Getting your hands dirty. -One of the main reason that one would initially deviate from coaster -defaults into more complex pool entries is to force jobs to fit into some -site-imposed constraint. For instance a typical submission to the experimental -queue requires a user to request upto 3 nodes for under 1 hour. This setup -could be achieved with a careful tuning of coaters parameters. +One of the main reason that one would initially deviate from coaster defaults +into more complex pool entries is to force jobs to fit into some site-imposed +constraint. For instance a typical submission to a fast PBS queue requires a +user to request upto 3 nodes for under 1 hour. This setup could be achieved +with a careful tuning of coaters parameters. -//How to run Swift under different Coasters configurations -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// -//Manual -//^^^^^^^ -//Todo -// -//Passive -//^^^^^^^^ -//Todo -// -//Persistent -//^^^^^^^^^^^ -//Todo -// -//Summary of Differences Between different Coaster types -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -//A tabular representations of highlights of different coaster setups -// -// -//Data Management -// +Coasters configurations +~~~~~~~~~~~~~~~~~~~~~~~ -Coaster providers: local, ssh, pbs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Coaster providers +~~~~~~~~~~~~~~~~~ Settings and examples for different coaster providers mechanisms. Modified: branches/faster/docs/quickstart/quickstart.txt =================================================================== --- branches/faster/docs/quickstart/quickstart.txt 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/quickstart/quickstart.txt 2013-07-08 08:19:11 UTC (rev 6619) @@ -14,9 +14,9 @@ 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. +The development version of Swift is aimed at developers and testers. The +development code has the highest chance of containing buggy and/or untested +code. If you need stability, use the latest stable release. Downloading a Swift Distribution -------------------------------- @@ -64,7 +64,7 @@ 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. +will be located in swift-/cog/modules/swift/dist/swift-svn/bin. Add the following line to the bottom of ~/.bashrc: @@ -82,11 +82,11 @@ 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 +distribution. The examples are written in the Swift scripting 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: +Execution of a Swift script is done using the swift command, which +takes the Swift script file name as an argument: ----- cd examples/tutorial @@ -98,4 +98,4 @@ Swift script! More documentation on how to run Swift can be found at -http://www.ci.uchicago.edu/swift/docs/index.php, +http://www.ci.uchicago.edu/swift/docs/index.php Modified: branches/faster/docs/siteguide/beagle =================================================================== --- branches/faster/docs/siteguide/beagle 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/siteguide/beagle 2013-07-08 08:19:11 UTC (rev 6619) @@ -3,24 +3,34 @@ 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 +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 -one at https://www.ci.uchicago.edu/accounts/. This page will give you a list -of resources you can request access to. -You already have an existing CI account, but do not have access to Beagle, + +If you do not already have a Computation Institute (CI) 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. + +If you already have an existing CI account, but do not have access to Beagle, send an email to support at ci.uchicago.edu to request access. Connecting to a login node @@ -32,9 +42,11 @@ ssh yourusername at login.beagle.ci.uchicago.edu ----- +Getting Started with Swift +~~~~~~~~~~~~~~~~~~~~~~~~~~ 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+ +*step 1.* Load the Swift and Sun-java module on Beagle as follows: +module load swift sun-java+ *step 2.* Create and change to a directory where your Swift related work will stay. (say, +mkdir swift-lab+, followed by, +cd swift-lab+) @@ -45,7 +57,7 @@ ----- type file; -/* App definitio */ +/* App definition */ app (file o) cat (file i) { cat @i stdout=@o; @@ -107,7 +119,8 @@ 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. +More about config and tc file options can be found in the swift userguide here: +http://www.ci.uchicago.edu/swift/guides/trunk/userguide/userguide.html#_swift_configuration_properties *step 6.* Run the example using following commandline: @@ -129,9 +142,6 @@ 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. Suitable for small tests. - Larger Runs on Beagle ~~~~~~~~~~~~~~~~~~~~~ A key factor in scaling up Swift runs on Beagle is to setup the sites.xml parameters. @@ -192,8 +202,9 @@ The most likely cause is the module is not loaded. Do the following to load the Swift module: ----- -$ module load swift -Swift version swift-0.93RC5 loaded +$ module load swift sun-java +Swift version swift-0.93 loaded +sun-java version jdk1.7.0_02 loaded ----- * Failed to transfer wrapperlog for job cat-nmobtbkk and/or Job failed with an exit code of 254. Check the element on the sites.xml file. Copied: branches/faster/docs/siteguide/ec2 (from rev 6618, trunk/docs/siteguide/ec2) =================================================================== --- branches/faster/docs/siteguide/ec2 (rev 0) +++ branches/faster/docs/siteguide/ec2 2013-07-08 08:19:11 UTC (rev 6619) @@ -0,0 +1,177 @@ +Amazon EC2 Cloud +---------------- +Amazon EC2 offers virtualized resources on demand from its cloud data centers. +This section describes how to use Swift to run applications on EC2 resources. +More information on EC2 can be found link:https://aws.amazon.com/ec2[here]. + +Getting Access +~~~~~~~~~~~~~~ + +Users with EC2 Allocation +^^^^^^^^^^^^^^^^^^^^^^^^^ + +If you already have an EC2 allocation, you can use either the web console or command-line interface to manage resources. + +Before using EC2 for Swift you must create a security group in order to allow +Swift communicate with EC2 instances via open ports. In order to create a +security group, follow instructions +link:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html#creating-security-group[here]. +Preferably, open ports between 50000 and 51000. + +Paste your credentials from the EC2 web console into AWS_ACCESS_KEY and AWS_SECRET_KEY and export them in your .bashrc as follows: + +---- +export AWS_ACCESS_KEY= +export AWS_SECRET_KEY= +---- + +Command-line tools are pre-installed on +swift.rcc.uchicago.edu+. In order to use them add the following lines to your .bashrc: + +---- +export EC2_HOME=/home/maheshwari/.ec2 +export PATH=$PATH:$EC2_HOME/bin +---- + +A public AMI on EC2 is available to create instance. Everything needed to run +Swift is preinstalled on this image. The id of this AMI is: ami-332e585a. + +Create instances from the above AMI as follows: + +---- +ec2run -k -g -n ami-332e585a +---- + +Users without EC2 Allocation +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Please request access to prepared instances and PKI credentials by mailing: email at mcs.anl.gov. + + +Configuring coaster-service.conf +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To run on EC2, 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 for EC2. + +----- +#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_LOCATION=/root + +# 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_LEVEL=DEBUG + +export SSH_TUNNELING=yes + +# User name to use for all systems +export WORKER_USERNAME=root + +# Worker host names for ssh +# export WORKER_HOSTS="crush thwomp" + +# Directory to keep log files, +#relative to working directory when launching start-coaster-service +export LOG_DIR=logs +export WORKER_LOG_DIR=/root + +# Manually define ports. If not specified, ports will be automatically generated +export LOCAL_PORT=50100 +export SERVICE_PORT=50200 + +# Set shared filesystem to no since work will be done in local /sandbox directory +export SHARED_FILESYSTEM=no + +# Below are various settings to give information about how to create sites.xml +export WORK=/tmp/swift.work +export JOBSPERNODE=4 +export JOBTHROTTLE=$( echo "scale=5; ($JOBS_PER_NODE * $( echo $WORKER_HOSTS|wc -w ))/100 - 0.00001"|bc ) + +# Swift applications +#app cat=/bin/cat +#app bash=/bin/bash +----- +Add a list of any applications you want to run in the format "#app myapp=/path/to/app". + +Starting the Coaster Service Script +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Log in to the +swift.rcc.uchicago.edu+ and copy the swift_cloud directory to your home: + +---- +cp -r ~maheshwari/swift_cloud $HOME/ +---- + +Make sure Swift module is loaded and your credentials are added as follows: + +---- +module load swift +---- + +---- +ssh-add +---- + +Replace the hosts.txt found in +swift_cloud+ directory by adding the address/DNS of instances. + +With the ec2 commandline, the list of ip addresses of running instances can be obtained and added to hosts.txt as follows: + +---- +ec2din | grep running | awk '{print $15}' > hosts.txt +---- + +Now that everything is configured, run this command to start the coaster service: + +----- +source setup +----- + +This command will add the instances to coaster configuration, start the +required processes on the worker nodes, and generate Swift configuration files +for you to use. The configuration files will be generated in your current +directory. These files are sites.xml, tc.data, and cf. + +Running Swift +~~~~~~~~~~~~~ + + + +Now that you have all of your configuration files generated, run the following command: + +----- +$ swift -sites.file sites.xml -tc.file tc.data -config cf catsn.swift +----- + +If you like to create a custom tc and/or cf file for repeated use, rename it to something other +than tc.data/cf to prevent it from being overwritten. The sites.xml however will need to be +regenerated every time you start the coaster service. If you need to repeatedly modify some +sites.xml options, you may edit the template in Swift's etc/sites/persistent-coasters. You +may also create your own custom tc files with the hostname of persistent-coasters. More +information about this can be found in the Swift userguide at +http://www.ci.uchicago.edu/swift/guides/trunk/userguide/userguide.html. + +Stopping the Coaster Service Script +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To stop the coaster service, run the following command: +----- +$ stop-coaster-service +----- + +This will kill the coaster service, kill the worker scripts on remote systems. + +Terminate the virtual machines that were created for this work as follows: + +---- +ec2din|grep running|awk '{print $2}'|xargs ec2kill +---- + +More Help +~~~~~~~~~ +The best place for additional help is the Swift user mailing list. You can subscribe to this list at +http://mail.ci.uchicago.edu/mailman/listinfo/swift-user. When submitting information, send +your sites.xml file, your tc.data, and any error messages you run into. + Modified: branches/faster/docs/siteguide/fusion =================================================================== --- branches/faster/docs/siteguide/fusion 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/siteguide/fusion 2013-07-08 08:19:11 UTC (rev 6619) @@ -1,10 +1,10 @@ Fusion (x86 cluster) ------------------- -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 is a 320-node computing cluster for the Argonne's Laboratory Computing +Resource Center (LCRC). 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. This section will walk you through running a simple Swift script on Fusion. @@ -30,9 +30,10 @@ 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. +SSH keys are required to access fusion. You should see information about this +when you request your account. Check +link:http://wiki.mcs.anl.gov/IT/index.php/SSH_keys[ssh FAQ] or email +support at lcrc.anl.gov for additional help. Connecting to a login node ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -40,17 +41,17 @@ node with the following command: ----- -ssh yourusername at fusion.lcrc.anl.gov +ssh @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 +Swift uses various configuration files to determine how to +run an application. This section will provide a working configuration file which you can copy and paste to get running quickly. The sites.xml file tells Swift how to submit jobs, where working directories are located, and various other configuration information. More -information on sites.xml can be found in the Swift User's Guide. +information on sites.xml can be found in the Swift link:http://www.ci.uchicago.edu/swift/guides/trunk/userguide/userguide.html[user guide]. The first step is to paste the text below into a file named sites.xml. @@ -60,18 +61,19 @@ This file will require one customization. Create a directory called swiftwork. Modify \_WORK_ in sites.xml -to point to this new directory. For example +to point to a new directory. For example + ----- -/home/myhome/swiftwork +/tmp/swiftwork ----- -Creating tc.data -~~~~~~~~~~~~~~~~ -The tc.data configuration file gives information about the applications +Creating tc +~~~~~~~~~~~ +The tc 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. +of tc can be found in the Swift user guide. -Paste the following example into a file named tc.data +Paste the following example into a file named tc ----- include::../../tests/providers/fusion/coasters/tc.template.data[] @@ -79,22 +81,26 @@ 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 -that your sites.xml and tc.data files are located. +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. The script copies input file's content to another file using the +Unix cat utility. Copy this script to the same directory that your sites.xml +and tc.data files are located. ----- $ cp ~/swift/examples/misc/catsn.swift . $ cp ~/swift/examples/misc/data.txt . ----- -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. +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 +$ swift -sites.file sites.xml -tc.file tc catsn.swift ----- You should see 10 new text files get created, named catsn*.out. If @@ -118,7 +124,10 @@ More Help ~~~~~~~~~ -The best place for additional help is the Swift user mailing list. You can subscribe to this list at -https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user. When submitting information, please send your sites.xml file, your tc.data, and any Swift log files that were created during your attempt. +The best place for additional help is the Swift user mailing list. You can +subscribe to this list at +link:https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user[swift-user]. +When submitting information, send your sites.xml file, your tc.data, and +any Swift log files that were created during your attempt. Modified: branches/faster/docs/siteguide/futuregrid =================================================================== --- branches/faster/docs/siteguide/futuregrid 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/siteguide/futuregrid 2013-07-08 08:19:11 UTC (rev 6619) @@ -9,12 +9,12 @@ physical clusters. We use the resources offered by one such cluster via the Nebula middleware. -More information on futuregrid can be found at https://portal.futuregrid.org/. +More information on futuregrid can be found link:https://portal.futuregrid.org/[here]. Requesting Futuregrid Access ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you do not already have a futuregrid account, you can follow the -instructions at https://portal.futuregrid.org/gettingstarted to get started. +instructions link:https://portal.futuregrid.org/gettingstarted[here] to get started. This page provides information on how to create an account, how to join a project, how to set up your SSH keys, and how to create a new project. @@ -31,11 +31,13 @@ Download your Credentials ~~~~~~~~~~~~~~~~~~~~~~~~~ Run the following commands to retrieve your credentials: + ----- $ cd swift-vm-boot $ scp yourusername at hotel.futuregrid.org:nimbus_creds.tar.gz . $ tar xvfz nimbus_creds.tar.gz ----- + When you extract your credential file, look at the file called hotel.conf. Near the bottom of this file will be two settings called vws.repository.s3id and vws.repository.s3key. Copy these @@ -111,8 +113,8 @@ $ swift -sites.file sites.xml -tc.file tc.data -config cf ----- -If you would like to create a custom tc file for repeated use, rename it to something other -than tc.data to prevent it from being overwritten. The sites.xml however will need to be +If you like to create a custom tc and/or cf file for repeated use, rename it to something other +than tc.data/cf to prevent it from being overwritten. The sites.xml however will need to be regenerated every time you start the coaster service. If you need to repeatedly modify some sites.xml options, you may edit the template in Swift's etc/sites/persistent-coasters. You may also create your own custom tc files with the hostname of persistent-coasters. More @@ -132,6 +134,6 @@ More Help ~~~~~~~~~ The best place for additional help is the Swift user mailing list. You can subscribe to this list at -http://mail.ci.uchicago.edu/mailman/listinfo/swift-user. When submitting information, please send +http://mail.ci.uchicago.edu/mailman/listinfo/swift-user. When submitting information, send your sites.xml file, your tc.data, and any error messages you run into. Modified: branches/faster/docs/siteguide/intrepid =================================================================== --- branches/faster/docs/siteguide/intrepid 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/siteguide/intrepid 2013-07-08 08:19:11 UTC (rev 6619) @@ -1,17 +1,16 @@ Intrepid (Blue Gene/P) --------------------- +Intrepid is an IBM Blue Gene/P (BG/p) supercomputer located at the Argonne +Leadership Computing Facility. More information on Intrepid can be found at +http://www.alcf.anl.gov. Surveyor and Challenger are similar, smaller +machines. -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. Surveyor and Challenger are -similar, smaller machines. - Requesting Access ~~~~~~~~~~~~~~~~~ -If you do not already have an account on Intrepid, you can request -one at https://accounts.alcf.anl.gov/accounts/request.php. More information about -this process and requesting allocations for your project can be found at -http://www.alcf.anl.gov/support/gettingstarted/index.php. +If you do not already have an account on Intrepid, you can request one +link:https://accounts.alcf.anl.gov/accounts/request.php[here]. More information +about this process and requesting allocations for your project can be found +link:http://www.alcf.anl.gov/support/gettingstarted/index.php[here]. SSH Keys ~~~~~~~~ @@ -69,6 +68,13 @@ What You Need To Know Before Running Swift ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Note that on Intrepid, the compute nodes can not create or write to a /home filesystem. Consequently, in order for Swift to interface correctly from login node to the compute nodes, Swift must write all internal and intermediate files to /intrepid-fs0, which is writable by the compute nodes. In order to accomplish this, export the environment variable SWIFT_USERHOME as follows: + +---- +export SWIFT_USERHOME=/intrepid-fs0/users/`whoami`/scratch +---- + Before you can create a Swift configuration file, there are some things you will need to know. @@ -80,7 +86,7 @@ ----- /home/username/swiftwork /home/username/work -/tmp +/tmp/swift.work ----- Which project(s) are you a member of? @@ -122,7 +128,7 @@ 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 +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+. @@ -155,7 +161,7 @@ Manually Editing tc.data ~~~~~~~~~~~~~~~~~~~~~~~~ -Below is the tc.data file used by Swift's test suite for running on PADS. +Below is the tc.data file used by Swift's test suite. ----- include::../../tests/providers/intrepid/tc.template.data[] @@ -165,7 +171,10 @@ 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. +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[] @@ -179,13 +188,16 @@ 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! +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! More Help ~~~~~~~~~ -The best place for additional help is the Swift user mailing list. You can subscribe to this list at -https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user. When submitting information, please send your sites.xml file, your tc.data, and any Swift log files that were created during your attempt. +The best place for additional help is the Swift user mailing list. You can +subscribe to this +link:https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user[list]. +When submitting information, send your sites.xml file, your tc.data, and any +Swift log files that were created during your attempt. Copied: branches/faster/docs/siteguide/midway (from rev 6618, trunk/docs/siteguide/midway) =================================================================== --- branches/faster/docs/siteguide/midway (rev 0) +++ branches/faster/docs/siteguide/midway 2013-07-08 08:19:11 UTC (rev 6619) @@ -0,0 +1,92 @@ +Midway (x86 cluster) +-------------------- +Midway is a cluster maintained by the Research Computing Center +at the University of Chicago. Midway uses Slurm to handle job +scheduling. For more details about Midway, and to request +an account, visit http://rcc.uchicago.edu. + +Connecting to a login node +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Once you have access to Midway, connect to +a Midway login node. + +----- +$ ssh userid at midway.rcc.uchicago.edu +----- + +Loading Swift +~~~~~~~~~~~~~ +Swift is available on Midway as a module. To load the +Swift, run: + +----- +$ module load swift +----- + +Example sites.xml +~~~~~~~~~~~~~~~~~ +Below is an example that uses two of the queues available +on Midway, sandyb and westmere. Be sure to adjust walltime, +work directory, and other options as needed. + +----- + + + + 16 + 00:05:00 + 100 + 100 + sandyb + 10000 + + /scratch/midway/{env.USER}/work + + + + + 12 + 00:05:00 + 100 + 100 + westmere + 10000 + + /scratch/midway/{env.USER}/work + + +----- + +Example sites.xml for use with MPI +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Below is an example sites.xml that is suitable for running with MPI. +Jobtype must be set to single. The value you set for ppn +will determine the number of cores/slots your application uses per node. +The value of count will set the number of nodes to request. The example +below requests 2 nodes with 12 slots per node. + +----- + + + + 1 + 12 + _WALLTIME_ + 100 + 100 + westmere + 10000 + single + 2 + + /scratch/midway/{env.USER}/work + + +----- + +Various tips for running MPI jobs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* You'll need to load an MPI module. Run "module load openmpi" to add to your path. +* The app that Swift runs should be a wrapper script that invokes your + MPI application by running "mpiexec /path/to/yourMPIApp" + Modified: branches/faster/docs/siteguide/prereqs =================================================================== --- branches/faster/docs/siteguide/prereqs 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/siteguide/prereqs 2013-07-08 08:19:11 UTC (rev 6619) @@ -4,5 +4,5 @@ This guide assumes that you have already downloaded and installed Swift. It assumes that Swift is in your PATH and that you have a working version of Sun Java 1.5+. For more information on downloading and -installing Swift, please see the +installing Swift, see the http://www.ci.uchicago.edu/swift/guides/release-0.93/quickstart/quickstart.html[Swift Quickstart Guide]. Modified: branches/faster/docs/siteguide/siteguide.txt =================================================================== --- branches/faster/docs/siteguide/siteguide.txt 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/siteguide/siteguide.txt 2013-07-08 08:19:11 UTC (rev 6619) @@ -22,4 +22,13 @@ include::mcs[] +include::midway[] + include::uc3[] + +include::stampede[] + +include::ec2[] + +link:http://www.ci.uchicago.edu/swift/docs/index.php[home] + Copied: branches/faster/docs/siteguide/stampede (from rev 6618, trunk/docs/siteguide/stampede) =================================================================== --- branches/faster/docs/siteguide/stampede (rev 0) +++ branches/faster/docs/siteguide/stampede 2013-07-08 08:19:11 UTC (rev 6619) @@ -0,0 +1,167 @@ +Stampede +--------- + +Stampede is a 10 petaflop supercomputer available as part of XSEDE resources. +It employs a batch-oriented computational model where-in a SLURM 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 Stampede can accomplish the above tasks with least manual +user intervention. In the following sections, we discuss more about specifics of +running Swift on Stampede. 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 Stampede can be found on XSEDE Stampede website here: +https://www.xsede.org/stampede + +Requesting Access +~~~~~~~~~~~~~~~~~ +Initial access to XSEDE resources could be obtained by submitting a startup proposal. Advanced users could submit a proposal for research allocation. An educational allocation is available for teaching and/or training purposes. More on XSEDE allocations can be found here: +https://www.xsede.org/allocations + +Connecting to a login node +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Once you have an account, you should be able to access a Stampede login +node with the following command: + +----- +ssh yourusername at stampede.tacc.utexas.edu +----- + +Follow the steps outlined below to get started with Swift on Stampede: + +*step 1.* Install Swift using one of the installation methods documented on Swift home: http://www.ci.uchicago.edu/swift/downloads/index.php, + +if installing from source, java can be loaded on Stampede using +module load jdk32+ and apache ant could be downloaded from here: http://ant.apache.org + +*step 2.* Create and change to a directory where your Swift related work will +stay. (say, +mkdir swift-work+, followed by, +cd swift-work+) + +*step 3.* To get started with a simple example running the Linux +/bin/cat+ command to read an +input file +data.txt+ and write it to an output file, start with writing a simple Swift source script as follows: + +----- +type file; + +/* App definitio */ +app (file o) cat (file i) +{ + cat @i stdout=@o; +} + +file out[]; +file data<"data.txt">; + +/* App invocation: n times */ +foreach j in [1:@toint(@arg("n","1"))] { + out[j] = cat(data); +} +----- + +Make sure a file named +data.txt+ is available in the current directory where the above Swift source file will be saved. + +*step 4.* The next step is to create a sites file. An example sites file (sites.xml) is shown as follows: + +----- + + + + + + TG-EAR130015 + + 1 + 00:11:00 + 800 + + 100 + 100 + + + development + + + me at dept.org + ALL + + + /path/to/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=0 +lazy.errors=false +status.mode=provider +use.provider.staging=false +provider.staging.pin.swiftfiles=false +use.wrapper.staging=false +----- + +The tc file (tc) is as follows: + +----- +stampede 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/guides/trunk/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 +cat+ in parallel + +*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+) + +---- +login3$ swift -sites.file sites.stampede.xml -config cf -tc.file tc catsn.swift +Swift trunk swift-r6290 cog-r3609 + +RunID: 20130221-1030-faapk389 +Progress: time: Thu, 21 Feb 2013 10:30:21 -0600 +Progress: time: Thu, 21 Feb 2013 10:30:22 -0600 Submitting:1 +Progress: time: Thu, 21 Feb 2013 10:30:29 -0600 Submitted:1 +Progress: time: Thu, 21 Feb 2013 10:30:51 -0600 Active:1 +Progress: time: Thu, 21 Feb 2013 10:30:54 -0600 Finished successfully:1 +Final status: Thu, 21 Feb 2013 10:30:54 -0600 Finished successfully:1 +---- + +Troubleshooting +~~~~~~~~~~~~~~~ + +In this section we will discuss some of the common issues and remedies while using Swift on Stampede. The origin of these issues can be Swift or Stampede's configuration, state and usage load among other factors. We try to identify maximum known issues and address them here: + +* Command not found: Make sure the +bin+ directory of Swift installation is in +PATH+. + + +* Failed to transfer wrapperlog for job cat-nmobtbkk and/or Job failed with an exit code of 254. Check the element on the sites.xml file. + +----- +/work/your/path/swift.workdir +----- + +It is likely that it is set to a path where the compute nodes can not write or no space available, e.g. your /home directory. The remedy for this error is to set your workdirectory to the path where Swift could write from compute nodes and there is enough space, e.g. /scratch directory. + +* If the jobs are not getting to active state for a long time, check the job status using the slurm squeue command: +---- +$ squeue -u `whoami` +---- + +The output will give an indication of the status of jobs. See the slurm manual for more information on job management commands: + +---- +$ man slurm +---- Modified: branches/faster/docs/tutorial/tutorial.txt =================================================================== --- branches/faster/docs/tutorial/tutorial.txt 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/tutorial/tutorial.txt 2013-07-08 08:19:11 UTC (rev 6619) @@ -15,3 +15,6 @@ include::runtime_features[] include::bits[] + +link:http://www.ci.uchicago.edu/swift/docs/index.php[home] + Modified: branches/faster/docs/userguide/app_procedures =================================================================== --- branches/faster/docs/userguide/app_procedures 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/userguide/app_procedures 2013-07-08 08:19:11 UTC (rev 6619) @@ -292,11 +292,15 @@ Swift trace: hello ---- - at extractint + at extractInt ~~~~~~~~~~~ - at extractint(file) will read the specified file, parse an integer from + at extractInt(file) will read the specified file, parse an integer from the file contents and return that integer. + at extractFloat +~~~~~~~~~~~~~ +Similar to @extractInt, @extractFloat(file) will read the specified file, parse a float from +the file contents and return that float. @filename ~~~~~~~~~ @@ -406,18 +410,24 @@ parallel). - at toint + at toInt ~~~~~~ - at toint(input) will parse its input string into an integer. This can be + at toInt(input) will parse its input string into an integer. This can be used with @arg to pass input parameters to a Swift script as integers. - at tofloat -~~~~~~ - at tofloat(input) will parse its input string into a floating point number. This can be + at toFloat +~~~~~~~~ + at toFloat(input) will parse its input string into a floating point number. This can be used with @arg to pass input parameters to a Swift script as floating point numbers. + at toString +~~~~~~~~ + at toString(input) will parse its input into a string. This can be +used with @arg to pass input parameters to a Swift script as +strings. + @length ~~~~~~ @length(array) will return the length of an array in Swift. This function will wait for all elements in the array to be written before returning the length. @@ -458,7 +468,7 @@ Where the contents of the "emps.txt" file are: ---- -name id address +name id loc Thomas 2222 Chicago Gina 3333 Boston Anne 4444 Houston @@ -514,7 +524,6 @@ trace will log its parameters. By default these will appear on both stdout and in the run log file. Some formatting occurs to produce the log message. The particular output format should not be relied upon. -(since Swift 0.4) tracef ~~~~~~ @@ -533,6 +542,7 @@ Specifiers: +%s+:: Format a string. ++%b+:: Format a boolean. +%i+:: Format a number as an integer. +%f+:: Format a number as a floating point number. +%q+:: Format an array. @@ -551,4 +561,9 @@ writeData ~~~~~~~~~ writeData will write out data structures in the format described for -readData +readData. The following example demonstrates how one can write a string "foo" into a file "writeDataPrimitive.out": + +---- +include::../../tests/language-behaviour/IO/writeDataPrimitive.swift[] +---- + Modified: branches/faster/docs/userguide/build_options =================================================================== --- branches/faster/docs/userguide/build_options 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/userguide/build_options 2013-07-08 08:19:11 UTC (rev 6619) @@ -1,50 +1,24 @@ Build options ------------- -See the Swift download page - for instructions on -downloading and building Swift from source. When building, various build -options can be supplied on the ant commandline. These are summarised here: +See the Swift download page for +instructions on downloading and building Swift from source. When building, +various build options can be supplied on the ant commandline. These are +summarised here: with-provider-condor - build with CoG condor provider -with-provider-coaster - build with CoG coaster provider (see the -section on coasters). Since 0.8, coasters are always built, -and this option has no effect. - -with-provider-deef - build with Falkon provider deef. In order for -this option to work, it is necessary to check out the provider-deef code -in the cog/modules directory alongside swift: - ----- -$ cd cog/modules -$ svn co https://svn.ci.uchicago.edu/svn/vdl2/provider-deef -$ cd ../swift -$ ant -Dwith-provider-deef=true redist ----- +with-provider-coaster - build with CoG coaster provider (see the section on +coasters). Since 0.8, coasters are always built, and this option has no effect. -with-provider-wonky - build with provider-wonky, an execution provider -that provides delays and unreliability for the purposes of testing -Swift's fault tolerance mechanisms. In order for this option to work, it -is necessary to check out the provider-wonky code in the |cog/modules| -directory alongside swift: +no-supporting - produces a distribution without supporting commands such as +grid-proxy-init. This is intended for when the Swift distribution will be used +in an environment where those commands are already provided by other packages, +where the Swift package should be providing only Swift commands, and where the +presence of commands such as grid-proxy-init from the Swift distribution in the +path will mask the presence of those commands from their true distribution +package such as a Globus Toolkit package. ---- -$ cd cog/modules -$ svn co https://svn.ci.uchicago.edu/svn/vdl2/provider-wonky -$ cd ../swift -$ ant -Dwith-provider-wonky=true redist ----- - -no-supporting - produces a distribution without supporting commands -such as grid-proxy-init. This is intended for when the Swift -distribution will be used in an environment where those commands are -already provided by other packages, where the Swift package should be -providing only Swift commands, and where the presence of commands such -as grid-proxy-init from the Swift distribution in the path will mask the -presence of those commands from their true distribution package such as -a Globus Toolkit package. - ----- $ ant -Dno-supporting=true redist ---- Modified: branches/faster/docs/userguide/clustering =================================================================== --- branches/faster/docs/userguide/clustering 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/userguide/clustering 2013-07-08 08:19:11 UTC (rev 6619) @@ -1,26 +1,24 @@ Clustering ---------- -Swift can group a number of short job submissions into a single larger -job submission to minimize overhead involved in launching jobs (for -example, caused by security negotiation and queuing delay). In general, -CoG coasters should be used in preference to the clustering -mechanism documented in this section. +Swift can group a number of short job submissions into a single larger job +submission to minimize overhead involved in launching jobs (for example, caused +by security negotiation and queuing delay). In general, coasters should be used +in preference to the clustering mechanism documented in this section. By default, clustering is disabled. It can be activated by setting the clustering.enabled property to true. -A job is eligible for clustering if the GLOBUS::maxwalltime profile -is specified in the tc.data entry for that job, and its value is -less than the value of the clustering.min.time property. +A job is eligible for clustering if the GLOBUS::maxwalltime profile is +specified in the tc.data entry for that job, and its value is less than the +value of the clustering.min.time property. -Two or more jobs are considered compatible if they share the same site -and do not have conflicting profiles (e.g. different values for the same -environment variable). +Two or more jobs are considered compatible if they share the same site and do +not have conflicting profiles (e.g. different values for the same environment +variable). -When a submitted job is eligible for clustering, it will be put in a -clustering queue rather than being submitted to a remote site. The -clustering queue is processed at intervals specified by the -clustering.queue.delay property. The -processing of the clustering queue consists of selecting compatible jobs -and grouping them into clusters whose maximum wall time does not exceed -twice the value of the clustering.min.time property. +When a submitted job is eligible for clustering, it will be put in a clustering +queue rather than being submitted to a remote site. The queue is processed at +intervals specified by the clustering.queue.delay property. The processing of +the clustering queue consists of selecting compatible jobs and grouping them +into clusters whose maximum wall time does not exceed twice the value of the +clustering.min.time property. Modified: branches/faster/docs/userguide/coasters =================================================================== --- branches/faster/docs/userguide/coasters 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/userguide/coasters 2013-07-08 08:19:11 UTC (rev 6619) @@ -90,3 +90,5 @@ |remoteMonitorEnabled|If true, show a graphical display of the status of the coaster service |================== + + Modified: branches/faster/docs/userguide/commands =================================================================== --- branches/faster/docs/userguide/commands 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/userguide/commands 2013-07-08 08:19:11 UTC (rev 6619) @@ -74,10 +74,34 @@ unique with respect to all other run IDs that might be used, irrespective of (at least) expected execution sites, program or user. +-version + + Display Swift version and exit + +-recompile + + Forces Swift to re-compile the invoked Swift script. While Swift + is meant to detect when recompilation is necessary, in some + special cases it fails to do so. This flag helps with those + special cases. + +-cdm.file + + Specifies a CDM policy file. + +-reduced.logging + + Makes logging more terse by disabling provenance information and + low-level task messages + +-minimal.logging + + Makes logging much more terse: reports warnings only + -tui Displays an interactive text mode monitor during a run. (since Swift - 0.9) + 0.9) In addition, the following Swift properties can be set on the command line: @@ -118,20 +142,28 @@ The swift is influenced by the following environment variables: -GLOBUS_HOSTNAME, GLOBUS_TCP_PORT_RANGE - set in the environment -before running Swift. These can be set to inform Swift of the -configuration of your local firewall. More information can be found in -the Globus firewall How-to . +GLOBUS_HOSTNAME, GLOBUS_TCP_PORT_RANGE -COG_OPTS - set in the environment before running Swift. Options set in -this variable will be passed as parameters to the Java Virtual Machine -which will run Swift. The parameters vary between virtual machine -imlementations, but can usually be used to alter settings such as -maximum heap size. Typing 'java -help' will sometimes give a list of -commands. The Sun Java 1.4.2 command line options are documented here -. + Set in the environment before running Swift. These can be set to inform Swift + of the configuration of your local firewall. More information can be found in + the Globus firewall How-to . +SWIFT_HEAP_MAX + Sets the java heap size. Use this if Swift runs out of memory. + Uses the format set by java -Xmx, which is how this is implemented. + The default setting is 1024M. + +COG_OPTS + + Set in the environment before running Swift. Options set in + this variable will be passed as parameters to the Java Virtual Machine + which will run Swift. The parameters vary between virtual machine + imlementations, but can usually be used to alter settings such as + maximum heap size. Typing 'java -help' will sometimes give a list of + commands. + + swift-osg-ress-site-catalog ~~~~~~~~~~~~~~~~~~~~~~~~~~~ The swift-osg-ress-site-catalog command generates a site catalog based Modified: branches/faster/docs/userguide/configuration_properties =================================================================== --- branches/faster/docs/userguide/configuration_properties 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/userguide/configuration_properties 2013-07-08 08:19:11 UTC (rev 6619) @@ -1,17 +1,16 @@ Swift configuration properties ------------------------------ -Various aspects of the behavior of the Swift Engine can be configured -through properties. The Swift Engine recognizes a global, per -installation properties file which can found in etc/swift.properties -in the Swift installation directory and a user properties file which can -be created by each user in ~/.swift/swift.properties. The Swift Engine -will first load the global properties file. It will then try to load the -user properties file. If a user properties file is found, individual -properties explicitly set in that file will override the respective -properties in the global properties file. Furthermore, some of the -properties can be overridden directly using command line arguments to -the *swift* command. +Various aspects of the behavior of Swift can be configured through properties. +Swift recognizes a global, per installation properties file which can found in +etc/swift.properties in the Swift installation directory and a user properties +file which can be created by each user in ~/.swift/swift.properties. +Swift will first load the global properties file. It will then try to load the +user properties file. If a user properties file is found, individual properties +explicitly set in that file will override the respective properties in the +global properties file. Furthermore, some of the properties can be overridden +directly using command line arguments to the *swift* command. + Swift properties are specified in the following format: = @@ -416,6 +415,13 @@ directory. In such cases, relative mode must be used. (since Swift 0.9) +use.wrapper.staging + + Valid values: true, false + Default value: false + + Determines if the Swift wrapper should do file staging. + wrapper.parameter.mode Controls how Swift will supply parameters to the remote wrapper @@ -445,3 +451,43 @@ ip.address=192.168.0.1 ---- +Monitoring Swift +~~~~~~~~~~~~~~~~ + +A Swift run can be monitored for progress and resource usage. To monitor the resource usage, use the +-monitor+ option with the Swift commandline. For example: + +---- +swift -tc.file tc -sites.file sites.xml -config cf modis04.swift -monitor +---- + +This will produce a gui/X window consisting of the following quantities: + +* Allocated memory +* Heap Size +* Total Threads +* Total Workers + +.Figure 4. Resource Monitor +image:swift_monitor.png[] + +Figure 4 shows a snapshot of a Swift resource monitor. + + +The progress of a Swift run can be monitored using the +-tui+ option. For example: + +---- +swift -tc.file tc -sites.file sites.xml -config cf modis04.swift -tui +---- + +This will produce a textual user interface with multiple tabs, each showing the following features of the current Swift run: + +* A summary view showing task status +* An apps tab +* A jobs tab +* A transfer tab +* A scheduler tab +* A Tast statistics tab +* A customized tab called 'Ben's View' + +Navigation between these tabs can be done using the function keys f2 through f8. + Modified: branches/faster/docs/userguide/kickstart =================================================================== --- branches/faster/docs/userguide/kickstart 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/userguide/kickstart 2013-07-08 08:19:11 UTC (rev 6619) @@ -27,5 +27,5 @@ ---- -There are various kickstat.* properties, which have sensible default +There are various kickstart.* properties, which have sensible default values. These are documented in the properties section. Modified: branches/faster/docs/userguide/log-processing =================================================================== --- branches/faster/docs/userguide/log-processing 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/userguide/log-processing 2013-07-08 08:19:11 UTC (rev 6619) @@ -112,18 +112,22 @@ the "-resume" option. The .rlog file is only for Swift's internal purpose and not to be interpreted by the user. -Each line in the log file is typically made up of three parts. The first part +Each line in the log file typically consists of three parts. The first part is the timestamp, the second is the type of log message and the third is the message itself. The types of log messages follows the java log4j standard types -of TRACE, DEBUG, INFO, WARN, ERROR and FATAL. This section lists the various -Swift log messages and explains the meaning and likely interpretation of those -messages. Please note that the list is not comprehensive at this time. Also -note that we will ignore the timestamps here. +of TRACE, DEBUG, INFO, WARN, ERROR and FATAL. +//// +This section lists the various Swift log messages and explains the meaning and +likely interpretation of those messages. Note that the list is not +comprehensive at this time. Also note that we will ignore the timestamps here. + . _DEBUG Loader arguments: [-sites.file, sites.xml, -config, cf, -tc.file, tc, postproc-gridftp.swift]_ + Swift commandline arguments . _DEBUG Loader Max heap: 5592449024_ + The java runtime heap size . _DEBUG textfiles BEGIN_ -. _DEBUG Loader kmlversion is_ + A dump of config and source files associated with this run . _DEBUG VDL2ExecutionContext Stack dump_ . _INFO SetFieldValue Set_ . _INFO get__site STARTCOMPOUND thread=0-8 name=get__site_ @@ -142,7 +146,9 @@ . _INFO ThrottleManager mem=113.54 MB, heap=482.88 MB, maxHeap=5.21 GB_ . _INFO ThrottleManager I maxBuffers=512, crtBuffers=0, allowedTransfers=256, active=0, suspended=0_ . _INFO PerformanceDiagnosticInputStream [MEM] Heap total: 482.88 MB, Heap used: 118.58 MB_ +Heap sizes for performance . _INFO vdl:execute END_SUCCESS thread=0-8-0 tr=getsite_ +The job ended successfully . _INFO WeightedHostScoreScheduler CONTACT_SELECTED host=localhost, score=99.854_ . _ - +//// Modified: branches/faster/docs/userguide/mappers =================================================================== --- branches/faster/docs/userguide/mappers 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/userguide/mappers 2013-07-08 08:19:11 UTC (rev 6619) @@ -244,7 +244,24 @@ subsequent case blocks, and no break statement is necessary at the end of each block. +Following is an example of a switch expression in Swift: +---- +int score=60; +switch (score){ +case 100: + tracef("%s\n", "Bravo!"); +case 90: + tracef("%s\n", "very good"); +case 80: + tracef("%s\n", "good"); +case 70: + tracef("%s\n", "fair"); +default: + tracef("%s\n", "unknown grade"); + } +---- + iterate ^^^^^^^ iterate expressions allow a block of code to be evaluated repeatedly, @@ -263,6 +280,14 @@ iteration. That variable is in scope in the statements block and when evaluating the termination expression. +For example, the following block will iterate over the +months+ variable 12 times: + +---- +iterate month { + tracef("%i\n", month); + } until (month==12); +---- + Operators ~~~~~~~~~ The following infix operators are available for use in Swift script @@ -631,14 +656,12 @@ Example: ---- -string s = "picture.gif"; -file f ; +file s <"picture.gif">; +file f ; ---- -This example transforms a string ending gif into one ending jpg and +This example transforms a file ending gif into one ending jpg and maps that to a file. [options="header, autowidth"] @@ -649,9 +672,10 @@ structured regular expression mapper ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The structured_regexp_mapper is similar to the regexp_mapper. The -structured_regexp_mapper can be applied to lists while the regexp_mapper cannot. +The structured_regexp_mapper is similar to the regexp_mapper with the only +difference that it can be applied to arrays while the regexp_mapper cannot. + [options="header, autowidth"] |========== |parameter|meaning @@ -667,14 +691,13 @@ Example: ---- -string s[] = ["picture.gif", "hello.gif", "world.gif"]; -file f[] ; +file s[] ; + +file f[] ; ---- -This example transforms all strings in a list that end in gif to end in jpg and maps +This example transforms all files in a list that end in gif to end in jpg and maps the list to those files. csv mapper Modified: branches/faster/docs/userguide/overview =================================================================== --- branches/faster/docs/userguide/overview 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/userguide/overview 2013-07-08 08:19:11 UTC (rev 6619) @@ -3,18 +3,17 @@ This manual provides reference material for Swift: the Swift language and the Swift runtime system. For introductory material, consult the Swift tutorial -. +http://www.ci.uchicago.edu/swift/guides/trunk/tutorial/tutorial.html -Swift is a data-oriented coarse grained scripting language that supports +Swift is a data-flow oriented coarse grained scripting language that supports dataset typing and mapping, dataset iteration, conditional branching, and procedural composition. Swift programs (or workflows) are written in a language called -Swift scripts. +Swift script. -Swift scripts are dataflow oriented - they are primarily -concerned with processing (possibly large) collections of data files, by -invoking programs to do that processing. Swift handles execution of such -programs on remote sites by choosing sites, handling the staging of -input and output files to and from the chosen sites and remote execution -of program code. +Swift scripts are primarily concerned with processing (possibly large) +collections of data files, by invoking programs to do that processing. Swift +handles execution of such programs on remote sites by choosing sites, handling +the staging of input and output files to and from the chosen sites and remote +execution of program code. Modified: branches/faster/docs/userguide/profiles =================================================================== --- branches/faster/docs/userguide/profiles 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/userguide/profiles 2013-07-08 08:19:11 UTC (rev 6619) @@ -39,35 +39,47 @@ swift namespace ~~~~~~~~~~~~~~~ -storagesize limits the amount of space that will be used on the remote -site for temporary files. When more than that amount of space is used, -the remote temporary file cache will be cleared using the algorithm -specified in the caching.algorithm property. -wrapperInterpreter - The wrapper interpreter indicates the command -(executable) to be used to run the Swift wrapper script. The default is -"/bin/bash" on Unix sites and "cscript.exe" on Windows sites. +storagesize -wrapperInterpreterOptions - Allows specifying additional options to the -executable used to run the Swift wrapper. The defaults are no options on -Unix sites and "Nologo" on Windows sites. + limits the amount of space that will be used on the remote site for temporary + files. When more than that amount of space is used, the remote temporary file + cache will be cleared using the algorithm specified in the caching.algorithm + property. -wrapperScript - Specifies the name of the wrapper script to be used on a -site. The defaults are "_swiftwrap" on Unix sites and "_swiftwrap.vbs" -on Windows sites. If you specify a custom wrapper script, it must be -present in the "libexec" directory of the Swift installation. +wrapperInterpreter -cleanupCommand Indicates the command to be run at the end of a Swift -run to clean up the run directories on a remote site. Defaults are -"/bin/rm" on Unix sites and "cmd.exe" on Windows sites + The wrapper interpreter indicates the command (executable) to be used to run + the Swift wrapper script. The default is "/bin/bash" on Unix sites and + "cscript.exe" on Windows sites. -cleanupCommandOptions Specifies the options to be passed to the -cleanup command above. The options are passed in the argument list to -the cleanup command. After the options, the last argument is the -directory to be deleted. The default on Unix sites is "-rf". The default -on Windows sites is ["/C", "del", "/Q"]. +wrapperInterpreterOptions + Allows specifying additional options to the executable used to run the Swift + wrapper. The defaults are no options on Unix sites and "Nologo" on Windows + sites. +wrapperScript + + Specifies the name of the wrapper script to be used on a site. The defaults are + "_swiftwrap" on Unix sites and "_swiftwrap.vbs" on Windows sites. If you + specify a custom wrapper script, it must be present in the "libexec" directory + of the Swift installation. + +cleanupCommand + + Indicates the command to be run at the end of a Swift run to clean up the run + directories on a remote site. Defaults are "/bin/rm" on Unix sites and + "cmd.exe" on Windows sites + +cleanupCommandOptions + + Specifies the options to be passed to the cleanup command above. The options + are passed in the argument list to the cleanup command. After the options, the + last argument is the directory to be deleted. The default on Unix sites is + "-rf". The default on Windows sites is ["/C", "del", "/Q"]. + + Globus namespace ~~~~~~~~~~~~~~~~ maxwalltime specifies a walltime limit for each job, in minutes. @@ -80,29 +92,28 @@ Example: ---- -localhost echo /bin/echo INSTALLED INTEL32::LINUX GLOBUS::maxwalltime="00:20:00" +localhost echo /bin/echo INSTALLED INTEL32::LINUX GLOBUS::maxwalltime="00:20:00" ---- -When replication is enabled (see replication), then -walltime will also be enforced at the Swift client side: when a job has -been active for more than twice the maxwalltime, Swift will kill the job -and regard it as failed. +When replication is enabled (see replication), then walltime will also be +enforced at the Swift client side: when a job has been active for more than +twice the maxwalltime, Swift will kill the job and regard it as failed. -When clustering is used, maxwalltime will be used to select which jobs -will be clustered together. More information on this is available in the -clustering section. +When clustering is used, maxwalltime will be used to select which jobs will be +clustered together. More information on this is available in the clustering +section. -When coasters as used, maxwalltime influences the default coaster -worker maxwalltime, and which jobs will be sent to which workers. More -information on this is available in the coasters section. +When coasters as used, maxwalltime influences the default coaster worker +maxwalltime, and which jobs will be sent to which workers. More information on +this is available in the coasters section. -queue is used by the PBS, GRAM2 and GRAM4 providers. This profile -entry specifies which queue jobs will be submitted to. The valid queue -names are site-specific. +queue is used by the PBS, GRAM2 and GRAM4 providers. This profile entry +specifies which queue jobs will be submitted to. The valid queue names are +site-specific. -host_types specifies the types of host that are permissible for a job -to run on. The valid values are site-specific. This profile entry is -used by the GRAM2 and GRAM4 providers. +host_types specifies the types of host that are permissible for a job to run +on. The valid values are site-specific. This profile entry is used by the GRAM2 +and GRAM4 providers. condor_requirements allows a requirements string to be specified when Condor is used as an LRM behind GRAM2. Example: @@ -111,113 +122,144 @@ Arch == "X86_64" || Arch="INTEL" ---- -slots When using coasters, this parameter specifies the -maximum number of jobs/blocks that the coaster scheduler will have -running at any given time. The default is 20. +slots -jobsPerNode - This parameter determines how many coaster workers are -started one each compute node. The default value is 1. + When using coasters, this parameter specifies the maximum number of jobs/blocks + that the coaster scheduler will have running at any given time. The default is + 20. -nodeGranularity - When allocating a coaster worker block, this parameter -restricts the number of nodes in a block to a multiple of this value. -The total number of workers will then be a multiple of workersPerNode * -nodeGranularity. The default value is 1. +jobsPerNode -allocationStepSize - Each time the coaster block scheduler computes a -schedule, it will attempt to allocate a number of slots from the number -of available slots (limited using the above slots profile). This -parameter specifies the maximum fraction of slots that are allocated in -one schedule. Default is 0.1. + This parameter determines how many coaster workers are started one each compute + node. The default value is 1. -lowOverallocation - Overallocation is a function of the walltime of a -job which determines how long (time-wise) a worker job will be. For -example, if a number of 10s jobs are submitted to the coaster service, -and the overallocation for 10s jobs is 10, the coaster scheduler will -attempt to start worker jobs that have a walltime of 100s. The -overallocation is controlled by manipulating the end-points of an -overallocation function. The low endpoint, specified by this parameter, -is the overallocation for a 1s job. The high endpoint is the -overallocation for a (theoretical) job of infinite length. The -overallocation for job sizes in the [1s, +inf) interval is determined -using an exponential decay function: overallocation(walltime) = walltime -* (lowOverallocation - highOverallocation) * exp(-walltime * -overallocationDecayFactor) + highOverallocation The default value of -lowOverallocation is 10. +nodeGranularity -highOverallocation - The high overallocation endpoint (as described -above). Default: 1 + When allocating a coaster worker block, this parameter restricts the number of + nodes in a block to a multiple of this value. The total number of workers will + then be a multiple of workersPerNode * nodeGranularity. The default value is 1. -overallocationDecayFactor - The decay factor for the overallocation -curve. Default 0.001 (1e-3). +allocationStepSize -spread - When a large number of jobs is submitted to the a coaster -service, the work is divided into blocks. This parameter allows a rough -control of the relative sizes of those blocks. A value of 0 indicates -that all work should be divided equally between the blocks (and blocks -will therefore have equal sizes). A value of 1 indicates the largest -possible spread. The existence of the spread parameter is based on the -assumption that smaller overall jobs will generally spend less time in -the queue than larger jobs. By submitting blocks of different sizes, -submitted jobs may be finished quicker by smaller blocks. Default: 0.9. + Each time the coaster block scheduler computes a schedule, it will attempt to + allocate a number of slots from the number of available slots (limited using + the above slots profile). This parameter specifies the maximum fraction of + slots that are allocated in one schedule. Default is 0.1. -reserve - Reserve time is a time in the allocation of a worker that sits -at the end of the worker time and is useable only for critical -operations. For example, a job will not be submitted to a worker if it -overlaps its reserve time, but a job that (due to inaccurate walltime -specification) runs into the reserve time will not be killed (note that -once the worker exceeds its walltime, the queuing system will kill the -job anyway). Default 10 (s). +lowOverallocation -maxnodes - Determines the maximum number of nodes that can be allocated -in one coaster block. Default: unlimited. + Overallocation is a function of the walltime of a job which determines how + long (time-wise) a worker job will be. For example, if a number of 10s jobs + are submitted to the coaster service, and the overallocation for 10s jobs + is 10, the coaster scheduler will attempt to start worker jobs that have a + walltime of 100s. The overallocation is controlled by manipulating the + end-points of an overallocation function. The low endpoint, specified by + this parameter, is the overallocation for a 1s job. The high endpoint is + the overallocation for a (theoretical) job of infinite length. The + overallocation for job sizes in the [1s, +inf) interval is determined using + an exponential decay function: + + overallocation(walltime) = walltime * (lowOverallocation - + highOverallocation) * exp(-walltime * overallocationDecayFactor) + + highOverallocation -maxtime - Indicates the maximum walltime, in seconds, that a coaster -block can have. -Default: unlimited. + The default value of lowOverallocation is 10. -remoteMonitorEnabled - If set to "true", the client side will get a -Swing window showing, graphically, the state of the coaster scheduler -(blocks, jobs, etc.). Default: false +highOverallocation -internalhostname - If the head node has multiple network interfaces, -only one of which is visible from the worker nodes. The choice of -which interface is the one that worker nodes can connect to is a -matter of the particular cluster. This must be set in the your -sites file to clarify to the workers which exact interface on the -head node they are to try to connect to. + The high overallocation endpoint (as described above). Default: 1 +overallocationDecayFactor + + The decay factor for the overallocation curve. Default 0.001 (1e-3). + +spread + + When a large number of jobs is submitted to coaster service, the work is + divided into blocks. This parameter allows a rough control of the relative + sizes of those blocks. A value of 0 indicates that all work should be divided + equally between the blocks (and blocks will therefore have equal sizes). A + value of 1 indicates the largest possible spread. The existence of the spread + parameter is based on the assumption that smaller overall jobs will generally + spend less time in the queue than larger jobs. By submitting blocks of + different sizes, submitted jobs may be finished quicker by smaller blocks. + Default: 0.9. + +reserve + + Reserve time is a time in the allocation of a worker that sits + at the end of the worker time and is useable only for critical + operations. For example, a job will not be submitted to a worker if it + overlaps its reserve time, but a job that (due to inaccurate walltime + specification) runs into the reserve time will not be killed (note that + once the worker exceeds its walltime, the queuing system will kill the + job anyway). Default 10 (s). + +maxnodes + + Determines the maximum number of nodes that can be allocated + in one coaster block. Default: unlimited. + +maxtime + + Indicates the maximum walltime, in seconds, that a coaster + block can have. + Default: unlimited. + +remoteMonitorEnabled + + If set to "true", the client side will get a Swing window showing, graphically, + the state of the coaster scheduler (blocks, jobs, etc.). Default: false + +internalhostname + + If the head node has multiple network interfaces, + only one of which is visible from the worker nodes. The choice of + which interface is the one that worker nodes can connect to is a + matter of the particular cluster. This must be set in the your + sites file to clarify to the workers which exact interface on the + head node they are to try to connect to. + env namespace ~~~~~~~~~~~~~ + Profile keys set in the env namespace will be set in the unix environment of the executed job. Some environment variables influence the worker-side behaviour of Swift: -PATHPREFIX - set in env namespace profiles. This path is prefixed onto -the start of the PATH when jobs are executed. It can be more useful -than setting the PATH environment variable directly, because setting -PATH will cause the execution site's default path to be lost. +PATHPREFIX -SWIFT_JOBDIR_PATH - set in env namespace profiles. If set, then Swift -will use the path specified here as a worker-node local temporary -directory to copy input files to before running a job. If unset, Swift -will keep input files on the site-shared filesystem. In some cases, -copying to a worker-node local directory can be much faster than having -applications access the site-shared filesystem directly. + set in env namespace profiles. This path is prefixed onto the start of the + PATH when jobs are executed. It can be more useful than setting the PATH + environment variable directly, because setting PATH will cause the + execution site's default path to be lost. -SWIFT_EXTRA_INFO - set in env namespace profiles. If set, then Swift -will execute the command specified in SWIFT_EXTRA_INFO on execution -sites immediately before each application execution, and will record the -stdout of that command in the wrapper info log file for that job. This -is intended to allow software version and other arbitrary information -about the remote site to be gathered and returned to the submit side. -(since Swift 0.9) +SWIFT_JOBDIR_PATH -SWIFT_GEN_SCRIPTS - set in the env namespace profiles. This variable -just needs to be set, it doesn't matter what it is set to. If set, then Swift -will keep the script that was used to execute the job in the job directory. -The script will be called run.sh and will have the command line that Swift -tried to execute with. + set in env namespace profiles. If set, then Swift will use the path + specified here as a worker-node local temporary directory to copy input + files to before running a job. If unset, Swift will keep input files on the + site-shared filesystem. In some cases, copying to a worker-node local + directory can be much faster than having applications access the + site-shared filesystem directly. +SWIFT_EXTRA_INFO + + set in env namespace profiles. If set, then Swift will execute the command + specified in SWIFT_EXTRA_INFO on execution sites immediately before each + application execution, and will record the stdout of that command in the + wrapper info log file for that job. This is intended to allow software + version and other arbitrary information about the remote site to be + gathered and returned to the submit side. (since Swift 0.9) + +SWIFT_GEN_SCRIPTS + + set in the env namespace profiles. This variable just needs to be set, it + doesn't matter what it is set to. If set, then Swift will keep the script + that was used to execute the job in the job directory. The script will be + called run.sh and will have the command line that Swift tried to execute + with. + === Dynamic profiles To set a profile setting based on the value of a Swift variable, you Modified: branches/faster/docs/userguide/site_catalog =================================================================== --- branches/faster/docs/userguide/site_catalog 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/userguide/site_catalog 2013-07-08 08:19:11 UTC (rev 6619) @@ -11,7 +11,6 @@ The sites file is formatted as XML. It consists of elements, one for each site that Swift will use. - Pool element ~~~~~~~~~~~~ Each pool element must have a handle attribute, giving a symbolic @@ -25,7 +24,6 @@ a remote working directory. Optionally, profile settings can be specified. - File transfer method ~~~~~~~~~~~~~~~~~~~~ Transfer methods are specified with either the element or @@ -150,14 +148,29 @@ stored. ---- -/home/benc +/tmp/swift.workdir ---- -This file must be accessible through the transfer mechanism specified in -the element and also mounted on all worker nodes that will -be used for execution. A shared cluster scratch filesystem is -appropriate for this. +This directory must be accessible through the specified transfer mechanism and +also mounted on all worker nodes that will be used for execution. A shared +cluster scratch filesystem is appropriate for this. Note that you need to +specify _absolute pathname_ for this field. + +Scratch +~~~~~~~ + +The scratch element takes in a value of a directory on a shared filesystem. For example: + +---- +/work/01739/ketan/lab/swift/myscratch +---- + +The scratch element specifies that the underlying Swift wrapper will copy the +input files into the scratch directory and the job will be run from that +directory. In the absence of scratch tag, Swift will run the job from +workdirectory by creating symlinks to input files in a shared directory. + Profiles ~~~~~~~~ Profile keys can be specified using the element. Copied: branches/faster/docs/userguide/swift_monitor.png (from rev 6618, trunk/docs/userguide/swift_monitor.png) =================================================================== (Binary files differ) Modified: branches/faster/docs/userguide/transformation_catalog =================================================================== --- branches/faster/docs/userguide/transformation_catalog 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/userguide/transformation_catalog 2013-07-08 08:19:11 UTC (rev 6619) @@ -1,19 +1,20 @@ -The Transformation Catalog - tc.data ------------------------------------- +The Transformation Catalog - tc +------------------------------- The transformation catalog lists where application executables are -located on remote sites. +located on execution sites. By default, the site catalog is stored in etc/tc.data. This path can be overridden with the tc.file configuration property, either in the Swift configuration file or on the command line. -The format is one line per executable per site, with fields separated by -tabs. +The format is one line per executable per site, with fields separated by space or tab. Some example entries: ---- -localhost echo /bin/echo INSTALLED INTEL32::LINUX null -TGUC touch /usr/bin/touch INSTALLED INTEL32::LINUX GLOBUS::maxwalltime="0:1" +localhost cat /bin/cat null null null +localhost vasp /home/ketan/runvasp.sh null null null +fusion echo /bin/echo INSTALLED INTEL32::LINUX null +TGUC touch /usr/bin/touch INSTALLED INTEL32::LINUX GLOBUS::maxwalltime="0:1" ---- The fields are: site, transformation name, executable path, installation @@ -24,11 +25,11 @@ The transformation name should correspond to the transformation name used in a Swift script app procedure. -The executable path should specify where the particular executable is +The executable path should specify where the executable is located on that site. The installation status and platform fields are not used. Set them to -INSTALLED and INTEL32::LINUX respectively. +INSTALLED and INTEL32::LINUX respectively. Alternatively, they could be set to null. The profiles field should be set to null if no profile entries are to be specified. @@ -39,8 +40,9 @@ This can be accomplished using *env* in the profile entry. For example, the following application sets an environment variable called R_LIBS to /home/user/R_libs. + ----- -localhost R /usr/bin/R INSTALLED INTEL32::LINUX env::R_LIBS=/home/user/r_libs +localhost R /usr/bin/R INSTALLED INTEL32::LINUX env::R_LIBS=/home/user/r_libs ----- Setting Multiple Profiles @@ -49,5 +51,5 @@ sets two environment variables: R_LIBS and R_HOME. ----- -localhost R /usr/bin/R INSTALLED INTEL32::LINUX env::R_LIBS=/home/user/r_libs;env::R_HOME=/home/user/r +localhost R /usr/bin/R INSTALLED INTEL32::LINUX env::R_LIBS=/home/user/r_libs;env::R_HOME=/home/user/r ----- Modified: branches/faster/docs/userguide/userguide.txt =================================================================== --- branches/faster/docs/userguide/userguide.txt 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/userguide/userguide.txt 2013-07-08 08:19:11 UTC (rev 6619) @@ -39,3 +39,5 @@ include::cdm[] include::log-processing[] + +link:http://www.ci.uchicago.edu/swift/docs/index.php[home] Modified: branches/faster/docs/utils/gensites.txt =================================================================== --- branches/faster/docs/utils/gensites.txt 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/docs/utils/gensites.txt 2013-07-08 08:19:11 UTC (rev 6619) @@ -9,8 +9,8 @@ -------- 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 +to generate a sites.xml file for running a Swift script on a given +site. It accomplishes this by using site 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. @@ -25,21 +25,25 @@ You should see output similar to this: ----- +beagle +beagle-ssh intrepid local -local-pbs-coasters +midway pads +persistent-coasters queenbee sge-local -ssh ssh-pbs-coasters +stampede surveyor +uc3 ----- 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 +ssh-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 @@ -50,19 +54,19 @@ $ 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. +Running this command will print the contents of sites.xml file corresponding to +the template and give you an idea of what settings you will need to specify. -The required tokens are required to properly use the templates. These are -placeholder values you will need to specify in the following steps. +The 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. +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: @@ -71,9 +75,8 @@ #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: +For 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 @@ -119,7 +122,7 @@ 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 +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. ----- @@ -139,7 +142,7 @@ 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 +contents of your tc.data will be lost. Either rename your tc file or copy to a different location. Running Swift With the New Configuration @@ -159,18 +162,19 @@ to the swift.properties, use: ----- -$ gensites surveyor -p myswift.properties > myconfig.xml +$ gensites surveyor -p myswift.properties > sites.surveyor.xml ----- -Next, provide the configuration filename to swift: +Next, provide the configuration filename to Swift: ----- -$ swift -sites.file myconfig.xml myscript.swift +$ swift -sites.file sites.surveyor.xml myscript.swift ----- Alternatively, if you have specified applications, be sure to load that into -Swift +Swift: + ----- -$ swift -sites.file myconfig.xml -tc.file tc.data mycript.swift +$ swift -sites.file sites.surveyor.xml -tc.file tc.data mycript.swift ----- Providing Default Values for All Templates Modified: branches/faster/etc/sites/beagle-ssh =================================================================== --- branches/faster/etc/sites/beagle-ssh 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/etc/sites/beagle-ssh 2013-07-08 08:19:11 UTC (rev 6619) @@ -1,5 +1,5 @@ - + 24 100 100 Copied: branches/faster/etc/sites/local-coasters (from rev 6618, trunk/etc/sites/local-coasters) =================================================================== --- branches/faster/etc/sites/local-coasters (rev 0) +++ branches/faster/etc/sites/local-coasters 2013-07-08 08:19:11 UTC (rev 6619) @@ -0,0 +1,12 @@ + + + + + 0 + 10000 + 1000 + 1 + _WORK_ + _SCRATCH_ + + Deleted: branches/faster/etc/sites/stampede =================================================================== --- branches/faster/etc/sites/stampede 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/etc/sites/stampede 2013-07-08 08:19:11 UTC (rev 6619) @@ -1,18 +0,0 @@ - - - - - 16 - 16 - 43200 - 00:05:00 - 100 - 100 - normal - 1 - TG-ASC090068 - 100 - 10000 - {env.SCRATCH} - - Copied: branches/faster/etc/sites/stampede (from rev 6618, trunk/etc/sites/stampede) =================================================================== --- branches/faster/etc/sites/stampede (rev 0) +++ branches/faster/etc/sites/stampede 2013-07-08 08:19:11 UTC (rev 6619) @@ -0,0 +1,17 @@ + + + TG-EAR130015 + 1 + 16 + 16 + 01:00:00 + 3700 + 100 + 100 + development + ketancmaheshwari at gmail.com + ALL + 10000 + + {env.SCRATCH} + Copied: branches/faster/etc/sites/stampede-ssh (from rev 6618, trunk/etc/sites/stampede-ssh) =================================================================== --- branches/faster/etc/sites/stampede-ssh (rev 0) +++ branches/faster/etc/sites/stampede-ssh 2013-07-08 08:19:11 UTC (rev 6619) @@ -0,0 +1,18 @@ + + + + + 16 + 16 + 43200 + 00:05:00 + 100 + 100 + normal + 1 + TG-ASC090068 + 100 + 10000 + {env.SCRATCH} + + Modified: branches/faster/libexec/_swiftwrap.wrapperstaging =================================================================== --- branches/faster/libexec/_swiftwrap.wrapperstaging 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/libexec/_swiftwrap.wrapperstaging 2013-07-08 08:19:11 UTC (rev 6619) @@ -58,6 +58,8 @@ localPath() { # remove protocol:// PATH="${1#*://}" + # Remove hostname + PATH="${PATH#*/}" # remove leading "/" if present PATH="${PATH#/}" log "Transformed $1 to $PATH" @@ -67,7 +69,6 @@ stagein() { SRC=$1 DST=$2 - case $SRC in *://*) ;; @@ -80,12 +81,12 @@ case $SRC in file://*) - SRC=${SRC#file://} + SRC=${SRC#file://*/} log "Copying $SRC to $DST" if [ ! -f $SRC ]; then fail 254 "Cannot stage in $SRC. File not found." fi - cp $SRC $DST 2>&1 >& "$INFO" + dd if=$SRC of=$DST bs=16M 2>&1 >& "$INFO" ;; http://*) log "Fetching $SRC using wget" @@ -121,7 +122,7 @@ DIR=`dirname $DST` mkdir -p $DIR log "Copying $SRC to $DST" - cp $SRC $DST 2>&1 >& "$INFO" + dd if=$SRC of=$DST bs=16M 2>&1 >& "$INFO" ;; *://*) fail 254 "Cannot handle protocol ${DST%%://*}" @@ -268,6 +269,11 @@ cdm_gather_action $GATHER_MAX $GATHER_OUTPUT } +strip_prefix() +{ + echo $@ | sed -e s/__root__//g -e s/__parent__//g +} + COMMANDLINE=$@ PARAMFILE= @@ -329,7 +335,7 @@ shift $SHIFTCOUNT getarg "-d" "$@" -DIRS=$VALUE +DIRS=$( strip_prefix $VALUE ) shift $SHIFTCOUNT getarg "-if" "$@" @@ -362,7 +368,7 @@ declare -a CMDARGS if [ "$PARAMFILE" == "" ] && [ "$1" == "-a" ] ; then shift - CMDARGS=("$@") + CMDARGS=( $( strip_prefix "$@" ) ) elif [ "$PARAMFILE" != "" ] ; then CMDARGS=() FIRST=1 @@ -425,6 +431,7 @@ log "CDM_FILE=$CDM_FILE" log "ARGS=$@" log "ARGC=$#" + [ -n $MPI_RANK ] && log "MPI_RANK=$MPI_RANK" && log "PMI_RANK=$PMI_RANK" IFS="|" @@ -453,8 +460,8 @@ eval cdm_action $DIR "INPUT" $L $CDM_POLICY continue fi - - stagein $L "$DIR/`localPath $L`" + + stagein $L "$DIR/`localPath $L`" done if [[ $CDM_FILE != "" ]]; then Modified: branches/faster/libexec/swift-int.k =================================================================== --- branches/faster/libexec/swift-int.k 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/libexec/swift-int.k 2013-07-08 08:19:11 UTC (rev 6619) @@ -57,17 +57,15 @@ log(LOG:INFO, "SUCCESS jobid={jobid} - Success file found") } else { - try { - msg := checkErrorFile(rhost, wfdir, jobid, jobdir) + msg := try { + checkErrorFile(rhost, wfdir, jobid, jobdir) } 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(msg) } - else { - throw(checkErrorFile(rhost, wfdir, jobid, jobdir)) - } } initSharedDir := function(progress, rhost) { Modified: branches/faster/libexec/swift-lib.k =================================================================== --- branches/faster/libexec/swift-lib.k 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/libexec/swift-lib.k 2013-07-08 08:19:11 UTC (rev 6619) @@ -1,5 +1,6 @@ namespace(swiftscript) { export(extractInt, def("org.griphyn.vdl.karajan.lib.swiftscript.ExtractInt")) + export(extractFloat, def("org.griphyn.vdl.karajan.lib.swiftscript.ExtractFloat")) export(readData, def("org.griphyn.vdl.karajan.lib.swiftscript.ReadData")) export(readData2, def("org.griphyn.vdl.karajan.lib.swiftscript.ReadStructured")) export(readStructured, def("org.griphyn.vdl.karajan.lib.swiftscript.ReadStructured")) Property changes on: branches/faster/src ___________________________________________________________________ Modified: svn:mergeinfo - /branches/release-0.94/src:6387 /trunk/src:6214,6255 + /branches/release-0.94/src:6387 /trunk/src:6214,6255,6275-6618 Modified: branches/faster/src/org/globus/swift/data/Action.java =================================================================== --- branches/faster/src/org/globus/swift/data/Action.java 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/src/org/globus/swift/data/Action.java 2013-07-08 08:19:11 UTC (rev 6619) @@ -94,6 +94,10 @@ String desthost = bc.getHost(); String workdir = (String) bc.getProperty("workdir"); + if (workdir != null && !workdir.startsWith("/")) { + workdir = System.getProperty("user.dir") + "/" + workdir; + } + org.globus.swift.data.policy.External.doExternal(srcfile, srcdir, desthost, workdir + "/" + destdir); } Modified: branches/faster/src/org/griphyn/vdl/engine/ProcedureSignature.java =================================================================== --- branches/faster/src/org/griphyn/vdl/engine/ProcedureSignature.java 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/src/org/griphyn/vdl/engine/ProcedureSignature.java 2013-07-08 08:19:11 UTC (rev 6619) @@ -185,6 +185,7 @@ add(functionsMap, "arg", returns(STRING), args(STRING, optional(STRING))); add(functionsMap, "extractInt", returns(INT), args(ANY)); + add(functionsMap, "extractFloat", returns(FLOAT), args(ANY)); add(functionsMap, "filename", returns(STRING), args(ANY)); add(functionsMap, "filenames", returns(STRING_ARRAY), args(ANY)); add(functionsMap, "dirname", returns(STRING), args(ANY)); Modified: branches/faster/src/org/griphyn/vdl/karajan/Loader.java =================================================================== --- branches/faster/src/org/griphyn/vdl/karajan/Loader.java 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/src/org/griphyn/vdl/karajan/Loader.java 2013-07-08 08:19:11 UTC (rev 6619) @@ -111,7 +111,8 @@ System.exit(0); } if (!ap.hasValue(ArgumentParser.DEFAULT)) { - error("No SwiftScript program specified"); + version(); + error("No Swift script specified"); } project = ap.getStringValue(ArgumentParser.DEFAULT); } Modified: branches/faster/src/org/griphyn/vdl/karajan/VDSTaskTransformer.java =================================================================== --- branches/faster/src/org/griphyn/vdl/karajan/VDSTaskTransformer.java 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/src/org/griphyn/vdl/karajan/VDSTaskTransformer.java 2013-07-08 08:19:11 UTC (rev 6619) @@ -124,6 +124,14 @@ String dir = spec.getDirectory(); BoundContact bc = (BoundContact) contacts[0]; String workdir = (String) bc.getProperty("workdir"); + + if (workdir==null){ + workdir=System.getProperty("user.dir"); + } + + if (workdir!=null && !workdir.startsWith("/")){ + workdir=System.getProperty("user.dir")+"/"+workdir; + } if (dir == null || !dir.startsWith("/")) { if (workdir != null) { if (dir == null) { Modified: branches/faster/src/org/griphyn/vdl/karajan/lib/CacheUnlockFiles.java =================================================================== --- branches/faster/src/org/griphyn/vdl/karajan/lib/CacheUnlockFiles.java 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/src/org/griphyn/vdl/karajan/lib/CacheUnlockFiles.java 2013-07-08 08:19:11 UTC (rev 6619) @@ -87,7 +87,7 @@ for (Object o : pairs) { String file = (String) o; - File f = new File(new AbsFile(file).getPath(), dir, host, 0); + File f = new File(PathUtils.remotePathName(new AbsFile(file).getPath()), dir, host, 0); CacheReturn cr = cache.unlockEntry(f, force); rem.addAll(cr.remove); } Modified: branches/faster/src/org/griphyn/vdl/karajan/lib/InFileDirs.java =================================================================== --- branches/faster/src/org/griphyn/vdl/karajan/lib/InFileDirs.java 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/src/org/griphyn/vdl/karajan/lib/InFileDirs.java 2013-07-08 08:19:11 UTC (rev 6619) @@ -50,22 +50,13 @@ Channel ret = cr_vargs.get(stack); for (String path : files) { AbsFile af = new AbsFile(path); + String dir = af.getDir(); if ("file".equals(af.getProtocol())) { - String dir = af.getDir(); - // there could be a clash here since - // "/a/b/c.txt" would be remotely the same - // as "a/b/c.txt". Perhaps absolute paths - // should have a unique prefix. - if (dir.startsWith("/") && dir.length() != 1) { - ret.add(dir.substring(1)); - } - else if (dir.length() != 0) { - ret.add(dir); - } + ret.add(PathUtils.remotePathName(dir)); } else { // also prepend host name to the path - ret.add(af.getHost() + "/" + af.getDir()); + ret.add(af.getHost() + "/" + PathUtils.remotePathName(dir)); } } } Modified: branches/faster/src/org/griphyn/vdl/karajan/lib/PathUtils.java =================================================================== --- branches/faster/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/src/org/griphyn/vdl/karajan/lib/PathUtils.java 2013-07-08 08:19:11 UTC (rev 6619) @@ -55,15 +55,154 @@ @Override public Object function(Stack stack) { String dir = new AbsFile(path.getValue(stack)).getDir(); - if (dir.startsWith("/")) { - return dir.substring(1); + return remotePathName(dir); + } + } + + private static final char EOL = '\0'; + /** + * Replace leading slash if present with "__root__" and replace + * parent dir references with "__parent__" + */ + + public static String remotePathName(String dir) { + if (dir.length() == 0) { + return dir; + StringBuilder sb = null; + + // parse it by hand to avoid creating too much string object garbage + boolean modified = false; + boolean nondot = false; + int dotcount = 0; + int start = 0; + for (int i = 0; i <= dir.length(); i++) { + boolean skip = false; + char c; + if (i == dir.length()) { + c = EOL; } else { - return dir; + c = dir.charAt(i); } + switch (c) { + case EOL: + case '/': + if (i == 0) { + sb = new StringBuilder(); + sb.append("__root__/"); + skip = true; + modified = true; + } + else if (nondot) { + // do nothing + } + else { + // only dots. If zero or one, remove completely ("//", "/./") + switch (dotcount) { + case 0: + case 1: + case 2: + modified = true; + skip = true; + if (sb == null) { + sb = new StringBuilder(); + append(sb, dir, 0, i - dotcount); + } + if (dotcount == 2) { + sb.append("__parent__"); + if (c != EOL) { + sb.append('/'); + } + } + default: + // pass along + } + } + nondot = false; + dotcount = 0; + break; + case '.': + if (nondot) { + // a path element containing a dot among other things + // so leave it alone + } + else { + dotcount++; + skip = true; + } + break; + default: + nondot = true; + if (dotcount > 0) { + if (modified) { + for (int j = 0; j < dotcount; j++) { + sb.append('.'); + } + } + dotcount = 0; + } + } + if (modified) { + if (sb == null) { + sb = new StringBuilder(); + append(sb, dir, 0, i - dotcount); + } + if (!skip && c != EOL) { + sb.append(c); + } + } } + if (modified) { + return sb.toString(); + } + else { + return dir; + } } + + public static void testMakeRelative(String str, String expected, boolean samestr) { + String result = remotePathName(str); + if (!result.equals(expected)) { + throw new RuntimeException("input: '" + str + "', expected: '" + expected + "', result: '" + result + "'"); + } + if (samestr && (str != result)) { + throw new RuntimeException("Expected same string for '" + str + "'"); + } + System.out.println("OK '" + str + "' -> '" + result + "'"); + } + + public static void main(String[] args) { + testMakeRelative("onething", "onething", true); + testMakeRelative("two/things", "two/things", true); + testMakeRelative("/absolute/path", "__root__/absolute/path", false); + testMakeRelative("../in/the/beginning", "__parent__/in/the/beginning", false); + testMakeRelative("in/the/../middle", "in/the/__parent__/middle", false); + // nonsensical, but meh + testMakeRelative("/../in/the/beginning/absolute", "__root__/__parent__/in/the/beginning/absolute", false); + testMakeRelative("/in/the/../middle/absolute", "__root__/in/the/__parent__/middle/absolute", false); + testMakeRelative("../in/../many/../places", "__parent__/in/__parent__/many/__parent__/places", false); + testMakeRelative("/../in/../many/../places/../absolute", "__root__/__parent__/in/__parent__/many/__parent__/places/__parent__/absolute", false); + testMakeRelative("a/single/./dot", "a/single/dot", false); + testMakeRelative("double//slash", "double/slash", false); + testMakeRelative("./single/dot/at/start", "single/dot/at/start", false); + testMakeRelative("/./single/dot/at/start/absolute", "__root__/single/dot/at/start/absolute", false); + testMakeRelative("multiple/single/././././dots", "multiple/single/dots", false); + // technically this isn't valid, but that's not our problem + testMakeRelative("three/.../dots", "three/.../dots", true); + testMakeRelative("two/..valid/dots", "two/..valid/dots", true); + testMakeRelative("more/val..id/dots", "more/val..id/dots", true); + testMakeRelative("/everything/./in/../../one//single../../path", "__root__/everything/in/__parent__/__parent__/one/single../__parent__/path", false); + testMakeRelative("..", "__parent__", false); + testMakeRelative("ends/in/..", "ends/in/__parent__", false); + } + private static void append(StringBuilder sb, String str, int begin, int end) { + for (int i = begin; i < end; i++) { + sb.append(str.charAt(i)); + } + } + + public static class BaseName extends AbstractSingleValuedFunction { private ArgRef path; @@ -134,13 +273,13 @@ } private static String windowsify(String path, boolean windows) { - if (windows) { - return path.replace('/', '\\'); - } - else { - return path; - } - } + if (windows) { + return path.replace('/', '\\'); + } + else { + return path; + } + } public static class PathNames extends AbstractSingleValuedFunction { private ArgRef> files; @@ -154,7 +293,7 @@ public String[] function(Stack stack) { List l = new ArrayList(); for (String f : files.getValue(stack)) { - l.add(new AbsFile(f).getPath()); + l.add(remotePathName(new AbsFile(f).getPath())); } return l.toArray(new String[0]); } Modified: branches/faster/src/org/griphyn/vdl/karajan/lib/SwiftFunction.java =================================================================== --- branches/faster/src/org/griphyn/vdl/karajan/lib/SwiftFunction.java 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/src/org/griphyn/vdl/karajan/lib/SwiftFunction.java 2013-07-08 08:19:11 UTC (rev 6619) @@ -296,12 +296,7 @@ */ public static String relativize(String name) { name = pathOnly(name); - if (name != null && name.length() > 0 && name.charAt(0) == '/') { - return name.substring(1); - } - else { - return name; - } + return PathUtils.remotePathName(name); } protected boolean compatible(Type expectedType, Type actualType) { Copied: branches/faster/src/org/griphyn/vdl/karajan/lib/swiftscript/ExtractFloat.java (from rev 6618, trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/ExtractFloat.java) =================================================================== --- branches/faster/src/org/griphyn/vdl/karajan/lib/swiftscript/ExtractFloat.java (rev 0) +++ branches/faster/src/org/griphyn/vdl/karajan/lib/swiftscript/ExtractFloat.java 2013-07-08 08:19:11 UTC (rev 6619) @@ -0,0 +1,66 @@ +/* + * Copyright 2012 University of Chicago + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; +import java.io.FileReader; +import java.io.IOException; +import java.io.Reader; + +import k.rt.ExecutionException; +import k.rt.Stack; + +import org.globus.cog.karajan.analyzer.ArgRef; +import org.globus.cog.karajan.analyzer.Signature; +import org.griphyn.vdl.karajan.lib.SwiftFunction; +import org.griphyn.vdl.mapping.AbstractDataNode; +import org.griphyn.vdl.mapping.DSHandle; +import org.griphyn.vdl.mapping.RootDataNode; +import org.griphyn.vdl.type.Types; + + +public class ExtractFloat extends SwiftFunction { + private ArgRef var; + + @Override + protected Signature getSignature() { + return new Signature(params("var")); + } + + @Override + public Object function(Stack stack) { + AbstractDataNode handle = this.var.getValue(stack); + try { + handle.waitFor(this); + + String fn = argList(filename(handle), true); + Reader freader = new FileReader(fn); + BufferedReader breader = new BufferedReader(freader); + String str = breader.readLine(); + freader.close(); + DSHandle result = new RootDataNode(Types.FLOAT, Double.parseDouble(str)); + int provid = SwiftFunction.nextProvenanceID(); + SwiftFunction.logProvenanceResult(provid, result, "extractfloat"); + SwiftFunction.logProvenanceParameter(provid, handle, "filename"); + return result; + } + catch (IOException ioe) { + throw new ExecutionException("Reading integer content of file", ioe); + } + } +} Modified: branches/faster/tests/README =================================================================== --- branches/faster/tests/README 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/tests/README 2013-07-08 08:19:11 UTC (rev 6619) @@ -1,6 +1,6 @@ USAGENOTES contains instructions on how to operate the test suite. It is an asciidoc document, in order to properly build it run the following command: -$ asciidoc -a toc USAGENOTES +$ asciidoc -a toc USAGENOTES.txt It will generate an HTML file called USAGENOTES. Warning: Modified: branches/faster/tests/USAGENOTES.txt =================================================================== --- branches/faster/tests/USAGENOTES.txt 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/tests/USAGENOTES.txt 2013-07-08 08:19:11 UTC (rev 6619) @@ -36,7 +36,7 @@ have the conventional *_cog/modules/swift_* configuration, and you have done an *ant dist*, you can run ********************************************************* - suite.sh -t -o /tmp $PWD/tests/groups/group-all-local.sh + suite.sh -t -o /tmp $PWD/groups/group-all-local.sh ********************************************************* or *cd* into */tmp* and run ************************************************************** Deleted: branches/faster/tests/language-behaviour/mappers/076-structured-regexp-mapper.b.out.expected =================================================================== --- branches/faster/tests/language-behaviour/mappers/076-structured-regexp-mapper.b.out.expected 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/tests/language-behaviour/mappers/076-structured-regexp-mapper.b.out.expected 2013-07-08 08:19:11 UTC (rev 6619) @@ -1 +0,0 @@ -Hello, world! Copied: branches/faster/tests/language-behaviour/mappers/076-structured-regexp-mapper.b0.out.expected (from rev 6618, trunk/tests/language-behaviour/mappers/076-structured-regexp-mapper.b0.out.expected) =================================================================== --- branches/faster/tests/language-behaviour/mappers/076-structured-regexp-mapper.b0.out.expected (rev 0) +++ branches/faster/tests/language-behaviour/mappers/076-structured-regexp-mapper.b0.out.expected 2013-07-08 08:19:11 UTC (rev 6619) @@ -0,0 +1 @@ +Hello, world! Copied: branches/faster/tests/language-behaviour/mappers/076-structured-regexp-mapper.b1.out.expected (from rev 6618, trunk/tests/language-behaviour/mappers/076-structured-regexp-mapper.b1.out.expected) =================================================================== --- branches/faster/tests/language-behaviour/mappers/076-structured-regexp-mapper.b1.out.expected (rev 0) +++ branches/faster/tests/language-behaviour/mappers/076-structured-regexp-mapper.b1.out.expected 2013-07-08 08:19:11 UTC (rev 6619) @@ -0,0 +1 @@ +Hello, world! Modified: branches/faster/tests/language-behaviour/mappers/076-structured-regexp-mapper.swift =================================================================== --- branches/faster/tests/language-behaviour/mappers/076-structured-regexp-mapper.swift 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/tests/language-behaviour/mappers/076-structured-regexp-mapper.swift 2013-07-08 08:19:11 UTC (rev 6619) @@ -12,14 +12,14 @@ } } +messagefile outfile[] ; -messagefile outfile <"076-structured-regexp-mapper.a.out">; -messagefile outfile2 ; +messagefile outfile2[] ; -outfile = greeting(); +foreach i in [0:1]{ + outfile[i] = greeting(); + outfile2[i] = greeting2(outfile[i]); +} -outfile2 = greeting2(outfile); Modified: branches/faster/tests/language-behaviour/mappers/077-regexp-mapper.swift =================================================================== --- branches/faster/tests/language-behaviour/mappers/077-regexp-mapper.swift 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/tests/language-behaviour/mappers/077-regexp-mapper.swift 2013-07-08 08:19:11 UTC (rev 6619) @@ -6,10 +6,10 @@ } } -messagefile outfile ; +messagefile infile <"077-regexpmapper-input.in">; +messagefile outfile ; + outfile = greeting(); Copied: branches/faster/tests/language-behaviour/mappers/077-regexpmapper-input.in (from rev 6618, trunk/tests/language-behaviour/mappers/077-regexpmapper-input.in) =================================================================== --- branches/faster/tests/language-behaviour/mappers/077-regexpmapper-input.in (rev 0) +++ branches/faster/tests/language-behaviour/mappers/077-regexpmapper-input.in 2013-07-08 08:19:11 UTC (rev 6619) @@ -0,0 +1 @@ +garuda Modified: branches/faster/tests/sites/intrepid/sites.template.xml =================================================================== --- branches/faster/tests/sites/intrepid/sites.template.xml 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/tests/sites/intrepid/sites.template.xml 2013-07-08 08:19:11 UTC (rev 6619) @@ -18,14 +18,14 @@ _QUEUE_ zeptoos true - 21 + 5.11 10000 1 DEBUG 1 900 - 64 - 64 + 512 + 512 _WORK_ Modified: branches/faster/tests/sites/mcs/coaster-service.conf =================================================================== --- branches/faster/tests/sites/mcs/coaster-service.conf 2013-07-08 06:24:47 UTC (rev 6618) +++ branches/faster/tests/sites/mcs/coaster-service.conf 2013-07-08 08:19:11 UTC (rev 6619) @@ -33,7 +33,7 @@ # Below are various settings to give information about how to create sites.xml export WORK=/home/${USER}/work -export JOBS_PER_NODE=4 +export JOBSPERNODE=4 # Try to determine throttle automatically based on the number of nodes and jobs per node export JOB_THROTTLE=$( echo "scale=5; ($JOBS_PER_NODE * $( echo $WORKER_HOSTS | wc -w ))/100 - 0.00001"|bc ) From hategan at ci.uchicago.edu Thu Jul 25 14:29:02 2013 From: hategan at ci.uchicago.edu (hategan at ci.uchicago.edu) Date: Thu, 25 Jul 2013 19:29:02 -0000 Subject: [Swift-commit] r6666 - in trunk: lib resources resources/gui resources/gui/icons resources/httpmonitor resources/httpmonitor/css resources/httpmonitor/css/theme-dark resources/httpmonitor/css/theme-dark/images resources/httpmonitor/css/theme-light resources/httpmonitor/css/theme-light/images resources/httpmonitor/js src/org/griphyn/vdl/karajan src/org/griphyn/vdl/karajan/lib src/org/griphyn/vdl/karajan/monitor 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/http src/org/griphyn/vdl/karajan/monitor/monitors/swing src/org/griphyn/vdl/karajan/monitor/processors Message-ID: <20130725192900.182E5187CC1@svn.ci.uchicago.edu> Author: hategan Date: 2013-07-25 14:28:59 -0500 (Thu, 25 Jul 2013) New Revision: 6666 Added: trunk/lib/jcommon-1.0.18.jar trunk/lib/jfreechart-1.0.15.jar trunk/resources/gui/ trunk/resources/gui/icons/ trunk/resources/gui/icons/layout.png trunk/resources/gui/icons/minus.png trunk/resources/gui/icons/plus.png trunk/resources/httpmonitor/ trunk/resources/httpmonitor/async.js trunk/resources/httpmonitor/css/ trunk/resources/httpmonitor/css/style.css trunk/resources/httpmonitor/css/theme-dark.css trunk/resources/httpmonitor/css/theme-dark/ trunk/resources/httpmonitor/css/theme-dark/images/ trunk/resources/httpmonitor/css/theme-dark/images/animated-overlay.gif trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_000000_40x100.png trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_1e1e1e_40x100.png trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_3c3c3c_40x100.png trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_505050_40x100.png trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_b4a028_40x100.png trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_eeeeee_40x100.png trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_30_cccccc_40x100.png trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_50_5c5c5c_40x100.png trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_glass_40_ffc73d_1x400.png trunk/resources/httpmonitor/css/theme-dark/images/ui-icons_222222_256x240.png trunk/resources/httpmonitor/css/theme-dark/images/ui-icons_4b8e0b_256x240.png trunk/resources/httpmonitor/css/theme-dark/images/ui-icons_a83300_256x240.png trunk/resources/httpmonitor/css/theme-dark/images/ui-icons_cccccc_256x240.png trunk/resources/httpmonitor/css/theme-dark/images/ui-icons_ffffff_256x240.png trunk/resources/httpmonitor/css/theme-dark/jquery-ui-1.10.3.custom.css trunk/resources/httpmonitor/css/theme-dark/jquery-ui-1.10.3.custom.min.css trunk/resources/httpmonitor/css/theme-light.css trunk/resources/httpmonitor/css/theme-light/ trunk/resources/httpmonitor/css/theme-light/images/ trunk/resources/httpmonitor/css/theme-light/images/animated-overlay.gif trunk/resources/httpmonitor/css/theme-light/images/ui-bg_flat_0_aaaaaa_40x100.png trunk/resources/httpmonitor/css/theme-light/images/ui-bg_flat_75_ffffff_40x100.png trunk/resources/httpmonitor/css/theme-light/images/ui-bg_glass_55_fbf9ee_1x400.png trunk/resources/httpmonitor/css/theme-light/images/ui-bg_glass_65_ffffff_1x400.png trunk/resources/httpmonitor/css/theme-light/images/ui-bg_glass_75_dadada_1x400.png trunk/resources/httpmonitor/css/theme-light/images/ui-bg_glass_75_e6e6e6_1x400.png trunk/resources/httpmonitor/css/theme-light/images/ui-bg_glass_95_fef1ec_1x400.png trunk/resources/httpmonitor/css/theme-light/images/ui-bg_highlight-soft_75_cccccc_1x100.png trunk/resources/httpmonitor/css/theme-light/images/ui-icons_222222_256x240.png trunk/resources/httpmonitor/css/theme-light/images/ui-icons_2e83ff_256x240.png trunk/resources/httpmonitor/css/theme-light/images/ui-icons_454545_256x240.png trunk/resources/httpmonitor/css/theme-light/images/ui-icons_888888_256x240.png trunk/resources/httpmonitor/css/theme-light/images/ui-icons_cd0a0a_256x240.png trunk/resources/httpmonitor/css/theme-light/jquery-ui-1.10.3.custom.css trunk/resources/httpmonitor/css/theme-light/jquery-ui-1.10.3.custom.min.css trunk/resources/httpmonitor/images/ trunk/resources/httpmonitor/index.html trunk/resources/httpmonitor/js/ trunk/resources/httpmonitor/js/jquery-1.9.1.js trunk/resources/httpmonitor/js/jquery-ui-1.10.3.custom.js trunk/resources/httpmonitor/js/jquery-ui-1.10.3.custom.min.js trunk/resources/laf.xml trunk/src/org/griphyn/vdl/karajan/monitor/TimeData.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/http/ trunk/src/org/griphyn/vdl/karajan/monitor/monitors/http/HTTPMonitor.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/http/HTTPServer.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/http/StateDataBuilder.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/http/SummaryDataBuilder.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/ColorButton.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GraphPanel.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GraphsPanel.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/GridView.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/MSynthPainter.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/SpringUtilities.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/SpringUtils.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/swing/SummaryPanel.java Modified: trunk/src/org/griphyn/vdl/karajan/Loader.java trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java trunk/src/org/griphyn/vdl/karajan/monitor/RadixTree.java trunk/src/org/griphyn/vdl/karajan/monitor/SystemState.java trunk/src/org/griphyn/vdl/karajan/monitor/items/SummaryItem.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/ansi/GlobalProgress.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/SummaryPane.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/ANSIContext.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Button.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Component.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Dialog.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Graph.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Key.java trunk/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/LayeredContainer.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/TabbedContainer.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/swing/ApplicationTable.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/processors/SummaryProcessor.java trunk/src/org/griphyn/vdl/karajan/monitor/processors/SwiftProcessorDispatcher.java Log: some updates to the UIs as well as a preliminary version of the http UI Added: trunk/lib/jcommon-1.0.18.jar =================================================================== (Binary files differ) Property changes on: trunk/lib/jcommon-1.0.18.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/lib/jfreechart-1.0.15.jar =================================================================== (Binary files differ) Property changes on: trunk/lib/jfreechart-1.0.15.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/gui/icons/layout.png =================================================================== (Binary files differ) Property changes on: trunk/resources/gui/icons/layout.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/gui/icons/minus.png =================================================================== (Binary files differ) Property changes on: trunk/resources/gui/icons/minus.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/gui/icons/plus.png =================================================================== (Binary files differ) Property changes on: trunk/resources/gui/icons/plus.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/async.js =================================================================== --- trunk/resources/httpmonitor/async.js (rev 0) +++ trunk/resources/httpmonitor/async.js 2013-07-25 19:28:59 UTC (rev 6666) @@ -0,0 +1,109 @@ +var INITIAL = 1000; +var DELAY = 2000; +var TIMEOUT = 10000; + +function AsyncRequest(url, callback) { + self.browser = navigator.appName; + self.url = url; + self.rcb = callback; + self.responseReceived = false; + + if(browser == "Microsoft Internet Explorer") { + self.ro = new ActiveXObject("Microsoft.XMLHTTP"); + } + else { + self.ro = new XMLHttpRequest(); + } + + self.handleResponse = function() { + if (self.ro.readyState == 4) { + self.responseReceived = true; + try { + var response = self.ro.responseText; + /*alert("status: " + self.ro.status + "\nstatusText: " + self.ro.statusText + + "\nresponseType: " + self.ro.responseType + "\nresponseText: " + self.ro.responseText);*/ + var i; + for(i = 0; i < response.length; i++) { + var c = response.charAt(i); + if (c != '\n' && c != '\t' && c != '\r' && c != ' ' && c != '\f') { + break; + } + } + response = response.substring(i); + var update = new Array(); + if(response.indexOf('\n' != -1)) { + values = response.split('\n'); + for (v in values) { + var value = values[v]; + var i = value.indexOf(":"); + if (i == -1) { + update[value] = ""; + } + else { + update[value.substr(0, i)] = value.substr(i + 1); + } + } + } + } + catch(err) { + self.rcb(null, "Error processing response from server: " + err); + } + try { + self.rcb(update, null); + } + catch(err) { + self.callbackErr(err); + } + } + } + + self.callbackErr = function(err) { + try { + self.rcb(null, "Update failed: " + err); + } + catch(err2) { + //Probably should write something out to the page indicating that updates + //Are no longer being monitored + //window.alert("Callback failed to process error message\n" + err + "\n" + err2); + self.stopUpdates(); + } + } + + self.replyTimeout = function() { + if (!self.responseReceived) { + self.callbackErr("Reply timeout"); + } + } +} + +AsyncRequest.prototype.send = function() { + self.ro.open('get', self.url); + self.ro.onreadystatechange = self.handleResponse; + self.ro.send(null); + self.setTimeout(replyTimeout, TIMEOUT); +} + + +function registerUpdate(url, callback, initial, delay) { + if (initial === undefined) { initial = INITIAL; } + if (delay === undefined) { delay = DELAY; } + self.setTimeout(tick, initial); + self.tcb = callback; + self.done = false; + + function tick() { + var request = new AsyncRequest(url, reply); + request.send(); + } + + function reply(stuff, error) { + self.tcb(stuff, error); + if (!self.done) { + self.setTimeout(tick, delay); + } + } +} + +function stopUpdates() { + self.done = true; +} Added: trunk/resources/httpmonitor/css/style.css =================================================================== --- trunk/resources/httpmonitor/css/style.css (rev 0) +++ trunk/resources/httpmonitor/css/style.css 2013-07-25 19:28:59 UTC (rev 6666) @@ -0,0 +1,77 @@ +#appSummary { + padding-top: 8px; +} + +#tabs { + width: 100px; + + position: absolute; + top:32px; + left: 0; + right: 0; + + margin: auto; +} + +.fixed-width { + width: 720px; +} + +.bordered { + margin: 4px; + padding: 4px; +} + +.mlabel { + position: relative; + top: 14px; + left: 16px; + padding-left: 9px; + padding-right: 4px; + width: 80px; +} + +#appSummary .label { + padding-right: 8px; +} + +.pbl { + position: absolute; + left: 0px; + width: 100%; + text-align: center; + line-height: 1.9em; +} + +#tabs { + width: 840px; +} + +.pbi { + position: relative; + width: 100%; +} + +#error-text { + white-space: pre; +} + +.label { + font-size: 12px; +} + +.nowrap { + white-space: pre; +} + +.expand { + width: 100%; +} + +#pbi-main { + margin-top: 16px; + height: 24px; + font-size: 14px; + font-weight: bold; + white-space: pre; +} \ No newline at end of file Added: trunk/resources/httpmonitor/css/theme-dark/images/animated-overlay.gif =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-dark/images/animated-overlay.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_000000_40x100.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_000000_40x100.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_1e1e1e_40x100.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_1e1e1e_40x100.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_3c3c3c_40x100.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_3c3c3c_40x100.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_505050_40x100.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_505050_40x100.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_b4a028_40x100.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_b4a028_40x100.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_eeeeee_40x100.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_100_eeeeee_40x100.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_30_cccccc_40x100.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_30_cccccc_40x100.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_50_5c5c5c_40x100.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_flat_50_5c5c5c_40x100.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_glass_40_ffc73d_1x400.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-dark/images/ui-bg_glass_40_ffc73d_1x400.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-dark/images/ui-icons_222222_256x240.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-dark/images/ui-icons_222222_256x240.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-dark/images/ui-icons_4b8e0b_256x240.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-dark/images/ui-icons_4b8e0b_256x240.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-dark/images/ui-icons_a83300_256x240.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-dark/images/ui-icons_a83300_256x240.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-dark/images/ui-icons_cccccc_256x240.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-dark/images/ui-icons_cccccc_256x240.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-dark/images/ui-icons_ffffff_256x240.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-dark/images/ui-icons_ffffff_256x240.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-dark/jquery-ui-1.10.3.custom.css =================================================================== --- trunk/resources/httpmonitor/css/theme-dark/jquery-ui-1.10.3.custom.css (rev 0) +++ trunk/resources/httpmonitor/css/theme-dark/jquery-ui-1.10.3.custom.css 2013-07-25 19:28:59 UTC (rev 6666) @@ -0,0 +1,945 @@ +/*! jQuery UI - v1.10.3 - 2013-07-22 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Segoe%20UI%2CArial%2Csans-serif&fwDefault=bold&fsDefault=12px&cornerRadius=4px&bgColorHeader=%23000000&bgTextureHeader=flat&bgImgOpacityHeader=100&borderColorHeader=%23000000&fcHeader=%23ffffff&iconColorHeader=%23ffffff&bgColorContent=%233c3c3c&bgTextureContent=flat&bgImgOpacityContent=100&borderColorContent=%233c3c3c&fcContent=%23ffffff&iconColorContent=%23cccccc&bgColorDefault=%231e1e1e&bgTextureDefault=flat&bgImgOpacityDefault=100&borderColorDefault=%231e1e1e&fcDefault=%23eeeeee&iconColorDefault=%23cccccc&bgColorHover=%23505050&bgTextureHover=flat&bgImgOpacityHover=100&borderColorHover=%23505050&fcHover=%23ffffff&iconColorHover=%23ffffff&bgColorActive=%23b4a028&bgTextureActive=flat&bgImgOpacityActive=100&borderColorActive=%23b4a028&fcActive=%23ffffff&iconColorActive=%23222222&bgColorHighlight=%23eeeeee&bgTextureHighlight=flat&bgImgOpacityHighlight=100&borderColorHighlight=%23cccccc&fcHighlig ht=%23b4a028&iconColorHighlight=%234b8e0b&bgColorError=%23ffc73d&bgTextureError=glass&bgImgOpacityError=40&borderColorError=%23ffb73d&fcError=%23111111&iconColorError=%23a83300&bgColorOverlay=%235c5c5c&bgTextureOverlay=flat&bgImgOpacityOverlay=50&opacityOverlay=80&bgColorShadow=%23cccccc&bgTextureShadow=flat&bgImgOpacityShadow=30&opacityShadow=60&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px +* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-menu { + list-style: none; + padding: 2px; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + margin-top: -3px; + position: absolute; +} +.ui-menu .ui-menu-item { + margin: 0; + padding: 0; + width: 100%; + /* support: IE10, see #8844 */ + list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); +} +.ui-menu .ui-menu-divider { + margin: 5px -2px 5px -2px; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-menu-item a { + text-decoration: none; + display: block; + padding: 2px .4em; + line-height: 1.5; + min-height: 0; /* support: IE7 */ + font-weight: normal; +} +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} + +.ui-menu .ui-state-disabled { + font-weight: normal; + margin: .4em 0 .2em; + line-height: 1.5; +} +.ui-menu .ui-state-disabled a { + cursor: default; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item a { + position: relative; + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: .2em; + left: .2em; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + position: static; + float: right; +} +.ui-progressbar { + height: 20px; + text-align: center; + overflow: hidden; +} + +div.ui-progressbar { + background-color: #000000; + background: #000000 url(images/ui-bg_flat_100_000000_40x100.png) 50% 50% repeat-x; +} + +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; + background: #b4a028 url(images/ui-bg_flat_100_b4a028_40x100.png) 50% 50% repeat-x; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("images/animated-overlay.gif"); + height: 100%; + filter: alpha(opacity=25); + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* For IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to overide default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertical centre icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} + +div.ui-tabs { + background: #000000 url(images/ui-bg_flat_100_000000_40x100.png) 50% 50% repeat-x; + border: none; +} + +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav li a { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active a, +.ui-tabs .ui-tabs-nav li.ui-state-disabled a, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading a { + cursor: text; +} +.ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { + cursor: pointer; +} + +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + background: #3c3c3c url(images/ui-bg_flat_100_3c3c3c_40x100.png) 50% 50% repeat-x; + border: 1px solid #3c3c3c; + border-bottom: 0px; +} + +.ui-tabs .ui-tabs-panel { + display: block; + padding: 1em 1.4em; + border: 1px solid #3c3c3c; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + background: #3c3c3c url(images/ui-bg_flat_100_3c3c3c_40x100.png) 50% 50% repeat-x; +} + +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Segoe UI,Arial,sans-serif; + font-size: 12px; +} +.ui-widget .ui-widget { + font-size: 12px; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Segoe UI,Arial,sans-serif; + font-size: 12px; +} +.ui-widget-content { + border: 1px solid #3c3c3c; + background: #3c3c3c url(images/ui-bg_flat_100_3c3c3c_40x100.png) 50% 50% repeat-x; + color: #ffffff; +} +.ui-widget-content a { + color: #ffffff; +} +.ui-widget-header { + border: 1px solid #000000; + background: #000000 url(images/ui-bg_flat_100_000000_40x100.png) 50% 50% repeat-x; + color: #ffffff; + font-weight: bold; +} +.ui-widget-header a { + color: #ffffff; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #1e1e1e; + background: #1e1e1e url(images/ui-bg_flat_100_1e1e1e_40x100.png) 50% 50% repeat-x; + font-weight: bold; + color: #eeeeee; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #eeeeee; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #505050; + background: #505050 url(images/ui-bg_flat_100_505050_40x100.png) 50% 50% repeat-x; + font-weight: bold; + color: #ffffff; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited { + color: #ffffff; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #b4a028; + background: #b4a028 url(images/ui-bg_flat_100_b4a028_40x100.png) 50% 50% repeat-x; + font-weight: bold; + color: #ffffff; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #ffffff; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #cccccc; + background: #eeeeee url(images/ui-bg_flat_100_eeeeee_40x100.png) 50% 50% repeat-x; + color: #b4a028; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #b4a028; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #ffb73d; + background: #ffc73d url(images/ui-bg_glass_40_ffc73d_1x400.png) 50% 50% repeat-x; + color: #111111; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #111111; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #111111; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* For IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url(images/ui-icons_cccccc_256x240.png); +} +.ui-widget-header .ui-icon { + background-image: url(images/ui-icons_ffffff_256x240.png); +} +.ui-state-default .ui-icon { + background-image: url(images/ui-icons_cccccc_256x240.png); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url(images/ui-icons_ffffff_256x240.png); +} +.ui-state-active .ui-icon { + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-state-highlight .ui-icon { + background-image: url(images/ui-icons_4b8e0b_256x240.png); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url(images/ui-icons_a83300_256x240.png); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 4px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #5c5c5c url(images/ui-bg_flat_50_5c5c5c_40x100.png) 50% 50% repeat-x; + opacity: .8; + filter: Alpha(Opacity=80); +} +.ui-widget-shadow { + margin: -7px 0 0 -7px; + padding: 7px; + background: #cccccc url(images/ui-bg_flat_30_cccccc_40x100.png) 50% 50% repeat-x; + opacity: .6; + filter: Alpha(Opacity=60); + border-radius: 8px; +} Added: trunk/resources/httpmonitor/css/theme-dark/jquery-ui-1.10.3.custom.min.css =================================================================== --- trunk/resources/httpmonitor/css/theme-dark/jquery-ui-1.10.3.custom.min.css (rev 0) +++ trunk/resources/httpmonitor/css/theme-dark/jquery-ui-1.10.3.custom.min.css 2013-07-25 19:28:59 UTC (rev 6666) @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.10.3 - 2013-07-22 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Segoe%20UI%2CArial%2Csans-serif&fwDefault=bold&fsDefault=12px&cornerRadius=4px&bgColorHeader=%23000000&bgTextureHeader=flat&bgImgOpacityHeader=100&borderColorHeader=%23000000&fcHeader=%23ffffff&iconColorHeader=%23ffffff&bgColorContent=%233c3c3c&bgTextureContent=flat&bgImgOpacityContent=100&borderColorContent=%233c3c3c&fcContent=%23ffffff&iconColorContent=%23cccccc&bgColorDefault=%231e1e1e&bgTextureDefault=flat&bgImgOpacityDefault=100&borderColorDefault=%231e1e1e&fcDefault=%23eeeeee&iconColorDefault=%23cccccc&bgColorHover=%23505050&bgTextureHover=flat&bgImgOpacityHover=100&borderColorHover=%23505050&fcHover=%23ffffff&iconColorHover=%23ffffff&bgColorActive=%23b4a028&bgTextureActive=flat&bgImgOpacityActive=100&borderColorActive=%23b4a028&fcActive=%23ffffff&iconColorActive=%23222222&bgColorHighlight=%23eeeeee&bgTextureHighlight=flat&bgImgOpacityHighlight=100&borderColorHighlight=%23cccccc&fcHighlig ht=%23b4a028&iconColorHighlight=%234b8e0b&bgColorError=%23ffc73d&bgTextureError=glass&bgImgOpacityError=40&borderColorError=%23ffb73d&fcError=%23111111&iconColorError=%23a83300&bgColorOverlay=%235c5c5c&bgTextureOverlay=flat&bgImgOpacityOverlay=50&opacityOverlay=80&bgColorShadow=%23cccccc&bgTextureShadow=flat&bgImgOpacityShadow=30&opacityShadow=60&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px +* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-disabled .ui- resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted #000}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-butto n:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin -top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:0}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0}.ui-menu .ui-menu-item a{text-decoration:non e;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:400}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:400;margin:-1px}.ui-menu .ui-state-disabled{font-weight:400;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url(images/animated-overlay.gif);height:100%;filter:alpha(opacity=25);opacity:.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui -slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:0;background:0;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-righ t:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:0;border-bottom:0;border-right:0}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Segoe UI,Arial,sans-serif;font-size:12px}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Segoe UI,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #3c3c3c;background:#3c3c3c url(images/ui-bg_flat_100_3c3c3c_40x100.png) 50% 50% repeat-x;color:#fff}.ui-widget-content a{color:#fff}.ui-widget-header{border:1px solid #000;background:#000 url(images/ui-bg_flat_100_000000_40x100.png) 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px s olid #1e1e1e;background:#1e1e1e url(images/ui-bg_flat_100_1e1e1e_40x100.png) 50% 50% repeat-x;font-weight:bold;color:#eee}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#eee;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #505050;background:#505050 url(images/ui-bg_flat_100_505050_40x100.png) 50% 50% repeat-x;font-weight:bold;color:#fff}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#fff;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #b4a028;background:#b4a028 url(images/ui-bg_flat_100_b4a028_40x100.png) 50% 50% repeat-x;font-weight:bold;color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-h ighlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #ccc;background:#eee url(images/ui-bg_flat_100_eeeeee_40x100.png) 50% 50% repeat-x;color:#b4a028}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#b4a028}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #ffb73d;background:#ffc73d url(images/ui-bg_glass_40_ffc73d_1x400.png) 50% 50% repeat-x;color:#111}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#111}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#111}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70) ;font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_cccccc_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_cccccc_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_4b8e0b_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_a83300_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-positi on:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}. ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{back ground-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-ar rowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-fo lder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{ background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scisso rs{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{back ground-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle- s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dott ed-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#5c5c5c url(images/ui-bg_flat_50_5c5c5c_40x100.png) 50% 50% repeat-x;opacity:.8;filter:Alpha(Opacity=80)}.ui-widget-shadow{margin:-7px 0 0 -7px;padding:7px;background:#ccc url(images/ui-bg_flat_30_cccccc_40x100.png) 50% 50% repeat-x;opacity:.6;filter:Alpha(Opacity=60);border-radius:8px} \ No newline at end of file Added: trunk/resources/httpmonitor/css/theme-dark.css =================================================================== --- trunk/resources/httpmonitor/css/theme-dark.css (rev 0) +++ trunk/resources/httpmonitor/css/theme-dark.css 2013-07-25 19:28:59 UTC (rev 6666) @@ -0,0 +1,15 @@ +body { + background-color: #000000; + font-family: Sans; + font-size: 12px; + color: #ffffff; +} + + +.bordered { + border: 2px solid black; +} + +.mlabel { + background-color: #3c3c3c; +} Added: trunk/resources/httpmonitor/css/theme-light/images/animated-overlay.gif =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-light/images/animated-overlay.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-light/images/ui-bg_flat_0_aaaaaa_40x100.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-light/images/ui-bg_flat_0_aaaaaa_40x100.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-light/images/ui-bg_flat_75_ffffff_40x100.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-light/images/ui-bg_flat_75_ffffff_40x100.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-light/images/ui-bg_glass_55_fbf9ee_1x400.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-light/images/ui-bg_glass_55_fbf9ee_1x400.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-light/images/ui-bg_glass_65_ffffff_1x400.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-light/images/ui-bg_glass_65_ffffff_1x400.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-light/images/ui-bg_glass_75_dadada_1x400.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-light/images/ui-bg_glass_75_dadada_1x400.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-light/images/ui-bg_glass_75_e6e6e6_1x400.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-light/images/ui-bg_glass_75_e6e6e6_1x400.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-light/images/ui-bg_glass_95_fef1ec_1x400.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-light/images/ui-bg_glass_95_fef1ec_1x400.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-light/images/ui-bg_highlight-soft_75_cccccc_1x100.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-light/images/ui-bg_highlight-soft_75_cccccc_1x100.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-light/images/ui-icons_222222_256x240.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-light/images/ui-icons_222222_256x240.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-light/images/ui-icons_2e83ff_256x240.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-light/images/ui-icons_2e83ff_256x240.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-light/images/ui-icons_454545_256x240.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-light/images/ui-icons_454545_256x240.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-light/images/ui-icons_888888_256x240.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-light/images/ui-icons_888888_256x240.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-light/images/ui-icons_cd0a0a_256x240.png =================================================================== (Binary files differ) Property changes on: trunk/resources/httpmonitor/css/theme-light/images/ui-icons_cd0a0a_256x240.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/httpmonitor/css/theme-light/jquery-ui-1.10.3.custom.css =================================================================== --- trunk/resources/httpmonitor/css/theme-light/jquery-ui-1.10.3.custom.css (rev 0) +++ trunk/resources/httpmonitor/css/theme-light/jquery-ui-1.10.3.custom.css 2013-07-25 19:28:59 UTC (rev 6666) @@ -0,0 +1,849 @@ +/*! jQuery UI - v1.10.3 - 2013-07-25 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bg TextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px +* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-menu { + list-style: none; + padding: 2px; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + margin-top: -3px; + position: absolute; +} +.ui-menu .ui-menu-item { + margin: 0; + padding: 0; + width: 100%; + /* support: IE10, see #8844 */ + list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); +} +.ui-menu .ui-menu-divider { + margin: 5px -2px 5px -2px; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-menu-item a { + text-decoration: none; + display: block; + padding: 2px .4em; + line-height: 1.5; + min-height: 0; /* support: IE7 */ + font-weight: normal; +} +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} + +.ui-menu .ui-state-disabled { + font-weight: normal; + margin: .4em 0 .2em; + line-height: 1.5; +} +.ui-menu .ui-state-disabled a { + cursor: default; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item a { + position: relative; + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: .2em; + left: .2em; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + position: static; + float: right; +} +.ui-progressbar { + height: 2em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("images/animated-overlay.gif"); + height: 100%; + filter: alpha(opacity=25); + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* For IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to overide default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertical centre icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav li a { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active a, +.ui-tabs .ui-tabs-nav li.ui-state-disabled a, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading a { + cursor: text; +} +.ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Verdana,Arial,sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Verdana,Arial,sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; + color: #222222; +} +.ui-widget-content a { + color: #222222; +} +.ui-widget-header { + border: 1px solid #aaaaaa; + background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; + color: #222222; + font-weight: bold; +} +.ui-widget-header a { + color: #222222; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #d3d3d3; + background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; + font-weight: normal; + color: #555555; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #555555; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #999999; + background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; + font-weight: normal; + color: #212121; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited { + color: #212121; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #aaaaaa; + background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; + font-weight: normal; + color: #212121; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #212121; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #fcefa1; + background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; + color: #363636; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #363636; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cd0a0a; + background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; + color: #cd0a0a; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #cd0a0a; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #cd0a0a; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* For IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-widget-header .ui-icon { + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-state-default .ui-icon { + background-image: url(images/ui-icons_888888_256x240.png); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url(images/ui-icons_454545_256x240.png); +} +.ui-state-active .ui-icon { + background-image: url(images/ui-icons_454545_256x240.png); +} +.ui-state-highlight .ui-icon { + background-image: url(images/ui-icons_2e83ff_256x240.png); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url(images/ui-icons_cd0a0a_256x240.png); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 4px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; + opacity: .3; + filter: Alpha(Opacity=30); +} +.ui-widget-shadow { + margin: -8px 0 0 -8px; + padding: 8px; + background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; + opacity: .3; + filter: Alpha(Opacity=30); + border-radius: 8px; +} Added: trunk/resources/httpmonitor/css/theme-light/jquery-ui-1.10.3.custom.min.css =================================================================== --- trunk/resources/httpmonitor/css/theme-light/jquery-ui-1.10.3.custom.min.css (rev 0) +++ trunk/resources/httpmonitor/css/theme-light/jquery-ui-1.10.3.custom.min.css 2013-07-25 19:28:59 UTC (rev 6666) @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.10.3 - 2013-07-25 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bg TextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px +* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line -height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-butto n-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:0}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{ margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:400}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:400;margin:-1px}.ui-menu .ui-state-disabled{font-weight:400;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url(images/animated-overlay.gif);height:100%;filter:alpha(opacity=25);opacity:.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-slider{position: relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui -spinner-input{border:0;background:0;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:0;border-bottom:0;border-right:0}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widge t-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:normal ;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:b old}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .u i-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{bac kground-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240p x -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-positio n:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-p osition:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar {background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{bac kground-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{backgro und-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -1 92px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;ba ckground:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px} \ No newline at end of file Added: trunk/resources/httpmonitor/css/theme-light.css =================================================================== --- trunk/resources/httpmonitor/css/theme-light.css (rev 0) +++ trunk/resources/httpmonitor/css/theme-light.css 2013-07-25 19:28:59 UTC (rev 6666) @@ -0,0 +1,13 @@ +body { + font-family: Sans; + font-size: 12px; +} + + +.bordered { + border: 2px solid black; +} + +.mlabel { + background-color: #ffffff; +} Added: trunk/resources/httpmonitor/index.html =================================================================== --- trunk/resources/httpmonitor/index.html (rev 0) +++ trunk/resources/httpmonitor/index.html 2013-07-25 19:28:59 UTC (rev 6666) @@ -0,0 +1,94 @@ + + + Swift System Monitor + + + + + + + + +
    + +
    +
    App Summary
    +
    + + +
    +
    +
    + + +
    Heap:
    +
    +
    +
    +
    +
    +
    + +
    +
    + + + + \ No newline at end of file Added: trunk/resources/httpmonitor/js/jquery-1.9.1.js =================================================================== --- trunk/resources/httpmonitor/js/jquery-1.9.1.js (rev 0) +++ trunk/resources/httpmonitor/js/jquery-1.9.1.js 2013-07-25 19:28:59 UTC (rev 6666) @@ -0,0 +1,9597 @@ +/*! + * jQuery JavaScript Library v1.9.1 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-2-4 + */ +(function( window, undefined ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +//"use strict"; +var + // The deferred used on DOM ready + readyList, + + // A central reference to the root jQuery(document) + rootjQuery, + + // Support: IE<9 + // For `typeof node.method` instead of `node.method !== undefined` + core_strundefined = typeof undefined, + + // Use the correct document accordingly with window argument (sandbox) + document = window.document, + location = window.location, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // [[Class]] -> type pairs + class2type = {}, + + // List of deleted data cache ids, so we can reuse them + core_deletedIds = [], + + core_version = "1.9.1", + + // Save a reference to some core methods + core_concat = core_deletedIds.concat, + core_push = core_deletedIds.push, + core_slice = core_deletedIds.slice, + core_indexOf = core_deletedIds.indexOf, + core_toString = class2type.toString, + core_hasOwn = class2type.hasOwnProperty, + core_trim = core_version.trim, + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Used for matching numbers + core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + + // Used for splitting on whitespace + core_rnotwhite = /\S+/g, + + // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, + rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }, + + // The ready event handler + completed = function( event ) { + + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { + detach(); + jQuery.ready(); + } + }, + // Clean-up method for dom ready events + detach = function() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); + } + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: core_version, + + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return core_slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; + }, + + slice: function() { + return this.pushStack( core_slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: core_push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger("ready").off("ready"); + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + if ( obj == null ) { + return String( obj ); + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ core_toString.call(obj) ] || "object" : + typeof obj; + }, + + isPlainObject: function( obj ) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !core_hasOwn.call(obj, "constructor") && + !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || core_hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + // data: string of html + // context (optional): If specified, the fragment will be created in this context, defaults to document + // keepScripts (optional): If true, will include scripts passed in the html string + parseHTML: function( data, context, keepScripts ) { + if ( !data || typeof data !== "string" ) { + return null; + } + if ( typeof context === "boolean" ) { + keepScripts = context; + context = false; + } + context = context || document; + + var parsed = rsingleTag.exec( data ), + scripts = !keepScripts && []; + + // Single tag + if ( parsed ) { + return [ context.createElement( parsed[1] ) ]; + } + + parsed = jQuery.buildFragment( [ data ], context, scripts ); + if ( scripts ) { + jQuery( scripts ).remove(); + } + return jQuery.merge( [], parsed.childNodes ); + }, + + parseJSON: function( data ) { + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + if ( data === null ) { + return data; + } + + if ( typeof data === "string" ) { + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + if ( data ) { + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + } + } + } + + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + if ( !data || typeof data !== "string" ) { + return null; + } + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Use native String.trim function wherever possible + trim: core_trim && !core_trim.call("\uFEFF\xA0") ? + function( text ) { + return text == null ? + "" : + core_trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + core_push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( core_indexOf ) { + return core_indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var l = second.length, + i = first.length, + j = 0; + + if ( typeof l === "number" ) { + for ( ; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var retVal, + ret = [], + i = 0, + length = elems.length; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return core_concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = core_slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + // Multifunctional method to get and set values of a collection + // The value/s can optionally be executed if it's a function + access: function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; + }, + + now: function() { + return ( new Date() ).getTime(); + } +}); + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + + // If IE event model is used + } else { + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", completed ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", completed ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch(e) {} + + if ( top && top.doScroll ) { + (function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll("left"); + } catch(e) { + return setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + })(); + } + } + } + return readyList.promise( obj ); +}; + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || type !== "function" && + ( length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj ); +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // First callback to fire (used internally by add and fireWith) + firingStart, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( list && ( !fired || stack ) ) { + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var action = tuple[ 0 ], + fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = core_slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; + if( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); +jQuery.support = (function() { + + var support, all, a, + input, select, fragment, + opt, eventName, isSupported, i, + div = document.createElement("div"); + + // Setup + div.setAttribute( "className", "t" ); + div.innerHTML = "
    a"; + + // Support tests won't run in some limited or non-browser environments + all = div.getElementsByTagName("*"); + a = div.getElementsByTagName("a")[ 0 ]; + if ( !all || !a || !all.length ) { + return {}; + } + + // First batch of tests + select = document.createElement("select"); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName("input")[ 0 ]; + + a.style.cssText = "top:1px;float:left;opacity:.5"; + support = { + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + getSetAttribute: div.className !== "t", + + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: div.firstChild.nodeType === 3, + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText instead) + style: /top/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: a.getAttribute("href") === "/a", + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.5/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) + checkOn: !!input.value, + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Tests for enctype support on a form (#6743) + enctype: !!document.createElement("form").enctype, + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", + + // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode + boxModel: document.compatMode === "CSS1Compat", + + // Will be defined later + deleteExpando: true, + noCloneEvent: true, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableMarginRight: true, + boxSizingReliable: true, + pixelPosition: false + }; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Support: IE<9 + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + // Check if we can trust getAttribute("value") + input = document.createElement("input"); + input.setAttribute( "value", "" ); + support.input = input.getAttribute( "value" ) === ""; + + // Check if an input maintains its value after becoming a radio + input.value = "t"; + input.setAttribute( "type", "radio" ); + support.radioValue = input.value === "t"; + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "checked", "t" ); + input.setAttribute( "name", "t" ); + + fragment = document.createDocumentFragment(); + fragment.appendChild( input ); + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<9 + // Opera does not clone events (and typeof div.attachEvent === undefined). + // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() + if ( div.attachEvent ) { + div.attachEvent( "onclick", function() { + support.noCloneEvent = false; + }); + + div.cloneNode( true ).click(); + } + + // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php + for ( i in { submit: true, change: true, focusin: true }) { + div.setAttribute( eventName = "on" + i, "t" ); + + support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; + } + + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, marginDiv, tds, + divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + container = document.createElement("div"); + container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; + + body.appendChild( container ).appendChild( div ); + + // Support: IE8 + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + div.innerHTML = "
    t
    "; + tds = div.getElementsByTagName("td"); + tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Support: IE8 + // Check if empty table cells still have offsetWidth/Height + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Check box-sizing and margin behavior + div.innerHTML = ""; + div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; + support.boxSizing = ( div.offsetWidth === 4 ); + support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); + + // Use window.getComputedStyle because jsdom on node.js will break without it. + if ( window.getComputedStyle ) { + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; + support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. (#3333) + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + marginDiv = div.appendChild( document.createElement("div") ); + marginDiv.style.cssText = div.style.cssText = divReset; + marginDiv.style.marginRight = marginDiv.style.width = "0"; + div.style.width = "1px"; + + support.reliableMarginRight = + !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); + } + + if ( typeof div.style.zoom !== core_strundefined ) { + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.innerHTML = ""; + div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); + + // Support: IE6 + // Check if elements with layout shrink-wrap their children + div.style.display = "block"; + div.innerHTML = "
    "; + div.firstChild.style.width = "5px"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); + + if ( support.inlineBlockNeedsLayout ) { + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild( container ); + + // Null elements to avoid leaks in IE + container = div = tds = marginDiv = null; + }); + + // Null elements to avoid leaks in IE + all = select = fragment = opt = a = input = null; + + return support; +})(); + +var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + rmultiDash = /([A-Z])/g; + +function internalData( elem, name, data, pvt /* Internal Use Only */ ){ + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, ret, + internalKey = jQuery.expando, + getByName = typeof name === "string", + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // Avoids exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( getByName ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; +} + +function internalRemoveData( elem, name, pvt ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var i, l, thisCache, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split(" "); + } + } + } else { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + } + + for ( i = 0, l = name.length; i < l; i++ ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + } else if ( jQuery.support.deleteExpando || cache != cache.window ) { + delete cache[ id ]; + + // When all else fails, null + } else { + cache[ id ] = null; + } +} + +jQuery.extend({ + cache: {}, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data ) { + return internalData( elem, name, data ); + }, + + removeData: function( elem, name ) { + return internalRemoveData( elem, name ); + }, + + // For internal use only. + _data: function( elem, name, data ) { + return internalData( elem, name, data, true ); + }, + + _removeData: function( elem, name ) { + return internalRemoveData( elem, name, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + // Do not set data on non-element because it will not be cleared (#8335). + if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { + return false; + } + + var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; + + // nodes accept data unless otherwise specified; rejection can be conditional + return !noData || noData !== true && elem.getAttribute("classid") === noData; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var attrs, name, + elem = this[0], + i = 0, + data = null; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + attrs = elem.attributes; + for ( ; i < attrs.length; i++ ) { + name = attrs[i].name; + + if ( !name.indexOf( "data-" ) ) { + name = jQuery.camelCase( name.slice(5) ); + + dataAttr( elem, name, data[ name ] ); + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + return jQuery.access( this, function( value ) { + + if ( value === undefined ) { + // Try to fetch any internally stored data first + return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; + } + + this.each(function() { + jQuery.data( this, key, value ); + }); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray(data) ) { + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + hooks.cur = fn; + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + jQuery._removeData( elem, type + "queue" ); + jQuery._removeData( elem, key ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var nodeHook, boolHook, + rclass = /[\t\r\n]/g, + rreturn = /\r/g, + rfocusable = /^(?:input|select|textarea|button|object)$/i, + rclickable = /^(?:a|area)$/i, + rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i, + ruseDefault = /^(?:checked|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + getSetInput = jQuery.support.input; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call( this, j, this.className ) ); + }); + } + + if ( proceed ) { + // The disjunction here is for better compressibility (see removeClass) + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + " " + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + elem.className = jQuery.trim( cur ); + + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = arguments.length === 0 || typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call( this, j, this.className ) ); + }); + } + if ( proceed ) { + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + "" + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + elem.className = value ? jQuery.trim( cur ) : ""; + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.match( core_rnotwhite ) || []; + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space separated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + // Toggle whole class name + } else if ( type === core_strundefined || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // If the element has a class name or if we're passed "false", + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var ret, hooks, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var val, + self = jQuery(this); + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, self.val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, option, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one" || index < 0, + values = one ? null : [], + max = one ? index + 1 : options.length, + i = index < 0 ? + max : + one ? index : 0; + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // oldIE doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + // Don't return options that are disabled or in a disabled optgroup + ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && + ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var values = jQuery.makeArray( value ); + + jQuery(elem).find("option").each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attr: function( elem, name, value ) { + var hooks, notxml, ret, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === core_strundefined ) { + return jQuery.prop( elem, name, value ); + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( notxml ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + + } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, value + "" ); + return value; + } + + } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + + // In IE9+, Flash objects don't have .getAttribute (#12945) + // Support: IE9+ + if ( typeof elem.getAttribute !== core_strundefined ) { + ret = elem.getAttribute( name ); + } + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var name, propName, + i = 0, + attrNames = value && value.match( core_rnotwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( (name = attrNames[i++]) ) { + propName = jQuery.propFix[ name ] || name; + + // Boolean attributes get special treatment (#10870) + if ( rboolean.test( name ) ) { + // Set corresponding property to false for boolean attributes + // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8 + if ( !getSetAttribute && ruseDefault.test( name ) ) { + elem[ jQuery.camelCase( "default-" + name ) ] = + elem[ propName ] = false; + } else { + elem[ propName ] = false; + } + + // See #9699 for explanation of this approach (setting first, then removal) + } else { + jQuery.attr( elem, name, "" ); + } + + elem.removeAttribute( getSetAttribute ? name : propName ); + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to default in case type is set after value during creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + "for": "htmlFor", + "class": "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + return ( elem[ name ] = value ); + } + + } else { + if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + return elem[ name ]; + } + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + var attributeNode = elem.getAttributeNode("tabindex"); + + return attributeNode && attributeNode.specified ? + parseInt( attributeNode.value, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + } + } +}); + +// Hook for boolean attributes +boolHook = { + get: function( elem, name ) { + var + // Use .prop to determine if this attribute is understood as boolean + prop = jQuery.prop( elem, name ), + + // Fetch it accordingly + attr = typeof prop === "boolean" && elem.getAttribute( name ), + detail = typeof prop === "boolean" ? + + getSetInput && getSetAttribute ? + attr != null : + // oldIE fabricates an empty string for missing boolean attributes + // and conflates checked/selected into attroperties + ruseDefault.test( name ) ? + elem[ jQuery.camelCase( "default-" + name ) ] : + !!attr : + + // fetch an attribute node for properties not recognized as boolean + elem.getAttributeNode( name ); + + return detail && detail.value !== false ? + name.toLowerCase() : + undefined; + }, + set: function( elem, value, name ) { + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + // IE<8 needs the *property* name + elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); + + // Use defaultChecked and defaultSelected for oldIE + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; + } + + return name; + } +}; + +// fix oldIE value attroperty +if ( !getSetInput || !getSetAttribute ) { + jQuery.attrHooks.value = { + get: function( elem, name ) { + var ret = elem.getAttributeNode( name ); + return jQuery.nodeName( elem, "input" ) ? + + // Ignore the value *property* by using defaultValue + elem.defaultValue : + + ret && ret.specified ? ret.value : undefined; + }, + set: function( elem, value, name ) { + if ( jQuery.nodeName( elem, "input" ) ) { + // Does not return so that setAttribute is also used + elem.defaultValue = value; + } else { + // Use nodeHook if defined (#1954); otherwise setAttribute is fine + return nodeHook && nodeHook.set( elem, value, name ); + } + } + }; +} + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = jQuery.valHooks.button = { + get: function( elem, name ) { + var ret = elem.getAttributeNode( name ); + return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ? + ret.value : + undefined; + }, + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + elem.setAttributeNode( + (ret = elem.ownerDocument.createAttribute( name )) + ); + } + + ret.value = value += ""; + + // Break association with cloned elements by also using setAttribute (#9646) + return name === "value" || value === elem.getAttribute( name ) ? + value : + undefined; + } + }; + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + get: nodeHook.get, + set: function( elem, value, name ) { + nodeHook.set( elem, value === "" ? false : value, name ); + } + }; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }); + }); +} + + +// Some attributes require a special call on IE +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !jQuery.support.hrefNormalized ) { + jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + get: function( elem ) { + var ret = elem.getAttribute( name, 2 ); + return ret == null ? undefined : ret; + } + }); + }); + + // href/src property should get the full normalized URL (#10299/#12915) + jQuery.each([ "href", "src" ], function( i, name ) { + jQuery.propHooks[ name ] = { + get: function( elem ) { + return elem.getAttribute( name, 4 ); + } + }; + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Note: IE uppercases css property names, but if we were to .toLowerCase() + // .cssText, that would destroy case senstitivity in URL's, like in "background" + return elem.style.cssText || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = value + "" ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }); +} + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +if ( !jQuery.support.checkOn ) { + jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + get: function( elem ) { + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + } + }; + }); +} +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }); +}); +var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [ elem || document ], + type = core_hasOwn.call( event, "type" ) ? event.type : event, + namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + event.isTrigger = true; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && + !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[ type ](); + } catch ( e ) { + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, ret, handleObj, matched, j, + handlerQueue = [], + args = core_slice.call( arguments ), + handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var sel, handleObj, matches, i, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + for ( ; cur != this; cur = cur.parentNode || this ) { + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: IE<9 + // Fix target property (#1925) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Support: Chrome 23+, Safari? + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + this.click(); + return false; + } + } + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== document.activeElement && this.focus ) { + try { + this.focus(); + return false; + } catch ( e ) { + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === document.activeElement && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + + beforeunload: { + postDispatch: function( event ) { + + // Even when returnValue equals to undefined Firefox will still show alert + if ( event.result !== undefined ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, to properly expose it to GC + if ( typeof elem[ name ] === core_strundefined ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if ( !e ) { + return; + } + + // If preventDefault exists, run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + if ( !e ) { + return; + } + // If stopPropagation exists, run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !jQuery._data( form, "submitBubbles" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + jQuery._data( form, "submitBubbles", true ); + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + } + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event, true ); + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + jQuery._data( elem, "changeBubbles", true ); + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var type, origFn; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license + * http://sizzlejs.com/ + */ +(function( window, undefined ) { + +var i, + cachedruns, + Expr, + getText, + isXML, + compile, + hasDuplicate, + outermostContext, + + // Local document vars + setDocument, + document, + docElem, + documentIsXML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + sortOrder, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + support = {}, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Array methods + arr = [], + pop = arr.pop, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + operators = "([*^$|!~]?=)", + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + + "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", + + // Prefer arguments quoted, + // then not containing pseudos/brackets, + // then attribute selectors/non-parenthetical expressions, + // then anything else + // These preferences are here to reduce the number of selectors + // needing tokenize in the PSEUDO preFilter + pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rsibling = /[\x20\t\r\n\f]*[+~]/, + + rnative = /^[^{]+\{\s*\[native code/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rescape = /'|\\/g, + rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, + funescape = function( _, escaped ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + return high !== high ? + escaped : + // BMP codepoint + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Use a stripped-down slice if we can't use a native one +try { + slice.call( preferredDoc.documentElement.childNodes, 0 )[0].nodeType; +} catch ( e ) { + slice = function( i ) { + var elem, + results = []; + while ( (elem = this[i++]) ) { + results.push( elem ); + } + return results; + }; +} + +/** + * For feature detection + * @param {Function} fn The function to test for native support + */ +function isNative( fn ) { + return rnative.test( fn + "" ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var cache, + keys = []; + + return (cache = function( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key += " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key ] = value); + }); +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return fn( div ); + } catch (e) { + return false; + } finally { + // release memory in IE + div = null; + } +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( !documentIsXML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) { + push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); + return results; + } + } + + // QSA path + if ( support.qsa && !rbuggyQSA.test(selector) ) { + old = true; + nid = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && context.parentNode || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, slice.call( newContext.querySelectorAll( + newSelector + ), 0 ) ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Detect xml + * @param {Element|Object} elem An element or a document + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var doc = node ? node.ownerDocument || node : preferredDoc; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsXML = isXML( doc ); + + // Check if getElementsByTagName("*") returns only elements + support.tagNameNoComments = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if attributes should be retrieved by attribute nodes + support.attributes = assert(function( div ) { + div.innerHTML = ""; + var type = typeof div.lastChild.getAttribute("multiple"); + // IE8 returns a string for some attributes even when not present + return type !== "boolean" && type !== "string"; + }); + + // Check if getElementsByClassName can be trusted + support.getByClassName = assert(function( div ) { + // Opera can't find a second classname (in 9.6) + div.innerHTML = ""; + if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { + return false; + } + + // Safari 3.2 caches class attributes and doesn't catch changes + div.lastChild.className = "e"; + return div.getElementsByClassName("e").length === 2; + }); + + // Check if getElementById returns elements by name + // Check if getElementsByName privileges form controls or returns elements by ID + support.getByName = assert(function( div ) { + // Inject content + div.id = expando + 0; + div.innerHTML = "
    "; + docElem.insertBefore( div, docElem.firstChild ); + + // Test + var pass = doc.getElementsByName && + // buggy browsers will return fewer than the correct 2 + doc.getElementsByName( expando ).length === 2 + + // buggy browsers will return more than the correct 0 + doc.getElementsByName( expando + 0 ).length; + support.getIdNotName = !doc.getElementById( expando ); + + // Cleanup + docElem.removeChild( div ); + + return pass; + }); + + // IE6/7 return modified attributes + Expr.attrHandle = assert(function( div ) { + div.innerHTML = ""; + return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && + div.firstChild.getAttribute("href") === "#"; + }) ? + {} : + { + "href": function( elem ) { + return elem.getAttribute( "href", 2 ); + }, + "type": function( elem ) { + return elem.getAttribute("type"); + } + }; + + // ID find and filter + if ( support.getIdNotName ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && !documentIsXML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && !documentIsXML ) { + var m = context.getElementById( id ); + + return m ? + m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? + [m] : + undefined : + []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.tagNameNoComments ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Name + Expr.find["NAME"] = support.getByName && function( tag, context ) { + if ( typeof context.getElementsByName !== strundefined ) { + return context.getElementsByName( name ); + } + }; + + // Class + Expr.find["CLASS"] = support.getByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) { + return context.getElementsByClassName( className ); + } + }; + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21), + // no need to also add to buggyMatches since matches checks buggyQSA + // A support test would require too much code (would include document ready) + rbuggyQSA = [ ":focus" ]; + + if ( (support.qsa = isNative(doc.querySelectorAll)) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explictly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = ""; + + // IE8 - Some boolean attributes are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + + // Opera 10-12/IE8 - ^= $= *= and empty values + // Should not select anything + div.innerHTML = ""; + if ( div.querySelectorAll("[i^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector || + docElem.mozMatchesSelector || + docElem.webkitMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = new RegExp( rbuggyMatches.join("|") ); + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = isNative(docElem.contains) || docElem.compareDocumentPosition ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + // Document order sorting + sortOrder = docElem.compareDocumentPosition ? + function( a, b ) { + var compare; + + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) { + if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) { + if ( a === doc || contains( preferredDoc, a ) ) { + return -1; + } + if ( b === doc || contains( preferredDoc, b ) ) { + return 1; + } + return 0; + } + return compare & 4 ? -1 : 1; + } + + return a.compareDocumentPosition ? -1 : 1; + } : + function( a, b ) { + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Parentless nodes are either documents or disconnected + } else if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + // Always assume the presence of duplicates if sort doesn't + // pass them to our comparison function (as in Google Chrome). + hasDuplicate = false; + [0, 0].sort( sortOrder ); + support.detectDuplicates = hasDuplicate; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + // rbuggyQSA always contains :focus, so no need for an existence check + if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) { + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [elem] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + var val; + + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + if ( !documentIsXML ) { + name = name.toLowerCase(); + } + if ( (val = Expr.attrHandle[ name ]) ) { + return val( elem ); + } + if ( documentIsXML || support.attributes ) { + return elem.getAttribute( name ); + } + return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ? + name : + val && val.specified ? val.value : null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +// Document sorting and removing duplicates +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + i = 1, + j = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( ; (elem = results[i]); i++ ) { + if ( elem === results[ i - 1 ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + return results; +}; + +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +// Returns a function to use in pseudos for input types +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +// Returns a function to use in pseudos for buttons +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +// Returns a function to use in pseudos for positionals +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + for ( ; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[5] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[4] ) { + match[2] = match[4]; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeName ) { + if ( nodeName === "*" ) { + return function() { return true; }; + } + + nodeName = nodeName.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifider + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsXML ? + elem.getAttribute("xml:lang") || elem.getAttribute("lang") : + elem.lang) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +function tokenize( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( tokens = [] ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push( { + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + } ); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push( { + value: matched, + type: type, + matches: match + } ); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +} + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var data, cache, outerCache, + dirkey = dirruns + " " + doneName; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { + if ( (data = cache[1]) === true || data === cachedruns ) { + return data === true; + } + } else { + cache = outerCache[ dir ] = [ dirkey ]; + cache[1] = matcher( elem, context, xml ) || cachedruns; + if ( cache[1] === true ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + // A counter to specify which element is currently being matched + var matcherCachedRuns = 0, + bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, expandContext ) { + var elem, j, matcher, + setMatched = [], + matchedCount = 0, + i = "0", + unmatched = seed && [], + outermost = expandContext != null, + contextBackup = outermostContext, + // We must always have either seed elements or context + elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); + + if ( outermost ) { + outermostContext = context !== document && context; + cachedruns = matcherCachedRuns; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + for ( ; (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + cachedruns = ++matcherCachedRuns; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !group ) { + group = tokenize( selector ); + } + i = group.length; + while ( i-- ) { + cached = matcherFromTokens( group[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + } + return cached; +}; + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function select( selector, context, results, seed ) { + var i, tokens, token, type, find, + match = tokenize( selector ); + + if ( !seed ) { + // Try to minimize operations if there is only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + context.nodeType === 9 && !documentIsXML && + Expr.relative[ tokens[1].type ] ) { + + context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0]; + if ( !context ) { + return results; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && context.parentNode || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, slice.call( seed, 0 ) ); + return results; + } + + break; + } + } + } + } + } + + // Compile and execute a filtering function + // Provide `match` to avoid retokenization if we modified the selector above + compile( selector, match )( + seed, + context, + documentIsXML, + results, + rsibling.test( selector ) + ); + return results; +} + +// Deprecated +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Easy API for creating new setFilters +function setFilters() {} +Expr.filters = setFilters.prototype = Expr.pseudos; +Expr.setFilters = new setFilters(); + +// Initialize with the default document +setDocument(); + +// Override sizzle attribute retrieval +Sizzle.attr = jQuery.attr; +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})( window ); +var runtil = /Until$/, + rparentsprev = /^(?:parents|prev(?:Until|All))/, + isSimple = /^.[^:#\[\.,]*$/, + rneedsContext = jQuery.expr.match.needsContext, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var i, ret, self, + len = this.length; + + if ( typeof selector !== "string" ) { + self = this; + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + ret = []; + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, this[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = ( this.selector ? this.selector + " " : "" ) + selector; + return ret; + }, + + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false) ); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true) ); + }, + + is: function( selector ) { + return !!selector && ( + typeof selector === "string" ? + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + rneedsContext.test( selector ) ? + jQuery( selector, this.context ).index( this[0] ) >= 0 : + jQuery.filter( selector, this ).length > 0 : + this.filter( selector ).length > 0 ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + ret = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + cur = this[i]; + + while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + } + cur = cur.parentNode; + } + } + + return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( jQuery.unique(all) ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +jQuery.fn.andSelf = jQuery.fn.addBack; + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( this.length > 1 && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + + // Can't pass null or undefined to indexOf in Firefox 4 + // Set to 0 to skip string check + qualifier = qualifier || 0; + + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem ) { + return ( elem === qualifier ) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; + }); +} +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rtbody = /\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
    ", "
    " ], + area: [ 1, "", "" ], + param: [ 1, "", "" ], + thead: [ 1, "", "
    " ], + tr: [ 2, "", "
    " ], + col: [ 2, "", "
    " ], + td: [ 3, "", "
    " ], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
    ", "
    " ] + }, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +jQuery.fn.extend({ + text: function( value ) { + return jQuery.access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + wrapAll: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapAll( html.call(this, i) ); + }); + } + + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + + if ( this[0].parentNode ) { + wrap.insertBefore( this[0] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { + elem = elem.firstChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function(i) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + }, + + append: function() { + return this.domManip(arguments, true, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip(arguments, true, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.insertBefore( elem, this.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, false, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, false, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) { + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if ( elem.options && jQuery.nodeName( elem, "select" ) ) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function () { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return jQuery.access( this, function( value ) { + var elem = this[0] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1>" ); + + try { + for (; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch(e) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function( value ) { + var isFunc = jQuery.isFunction( value ); + + // Make sure that the elements are removed from the DOM before they are inserted + // this can help fix replacing a parent with child elements + if ( !isFunc && typeof value !== "string" ) { + value = jQuery( value ).not( this ).detach(); + } + + return this.domManip( [ value ], true, function( elem ) { + var next = this.nextSibling, + parent = this.parentNode; + + if ( parent ) { + jQuery( this ).remove(); + parent.insertBefore( elem, next ); + } + }); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, table, callback ) { + + // Flatten any nested arrays + args = core_concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[0], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[0] = value.call( this, index, table ? self.html() : undefined ); + } + self.domManip( args, table, callback ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + table = table && jQuery.nodeName( first, "tr" ); + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( + table && jQuery.nodeName( this[i], "table" ) ? + findOrAppend( this[i], "tbody" ) : + this[i], + node, + i + ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Hope ajax is available... + jQuery.ajax({ + url: node.src, + type: "GET", + dataType: "script", + async: false, + global: false, + "throws": true + }); + } else { + jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return this; + } +}); + +function findOrAppend( elem, tag ) { + return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + var attr = elem.getAttributeNode("type"); + elem.type = ( attr && attr.specified ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { + elem.type = match[1]; + } else { + elem.removeAttribute("type"); + } + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var elem, + i = 0; + for ( ; (elem = elems[i]) != null; i++ ) { + jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); + } +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function fixCloneNodeIssues( src, dest ) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { + data = jQuery._data( dest ); + + for ( e in data.events ) { + jQuery.removeEvent( dest, e, data.handle ); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute( jQuery.expando ); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if ( nodeName === "script" && dest.text !== src.text ) { + disableScript( dest ).text = src.text; + restoreScript( dest ); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if ( nodeName === "object" ) { + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone(true); + jQuery( insert[i] )[ original ]( elems ); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + core_push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + +function getAll( context, tag ) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : + undefined; + + if ( !found ) { + for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { + if ( !tag || jQuery.nodeName( elem, tag ) ) { + found.push( elem ); + } else { + jQuery.merge( found, getAll( elem, tag ) ); + } + } + } + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], found ) : + found; +} + +// Used in buildFragment, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( manipulation_rcheckableType.test( elem.type ) ) { + elem.defaultChecked = elem.checked; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains( elem.ownerDocument, elem ); + + if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + // Fix all IE cloning issues + for ( i = 0; (node = srcElements[i]) != null; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + fixCloneNodeIssues( node, destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0; (node = srcElements[i]) != null; i++ ) { + cloneCopyEvent( node, destElements[i] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var j, elem, contains, + tmp, tag, tbody, wrap, + l = elems.length, + + // Ensure a safe fragment + safe = createSafeFragment( context ), + + nodes = [], + i = 0; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || safe.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + + tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; + + // Descend through wrappers to the right content + j = wrap[0]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Manually add leading whitespace removed by IE + if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); + } + + // Remove IE's autoinserted from table fragments + if ( !jQuery.support.tbody ) { + + // String was a , *may* have spurious + elem = tag === "table" && !rtbody.test( elem ) ? + tmp.firstChild : + + // String was a bare or + wrap[1] === "
    " && !rtbody.test( elem ) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while ( j-- ) { + if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { + elem.removeChild( tbody ); + } + } + } + + jQuery.merge( nodes, tmp.childNodes ); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while ( tmp.firstChild ) { + tmp.removeChild( tmp.firstChild ); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if ( tmp ) { + safe.removeChild( tmp ); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !jQuery.support.appendChecked ) { + jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); + } + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( safe.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + tmp = null; + + return safe; + }, + + cleanData: function( elems, /* internal */ acceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + deleteExpando = jQuery.support.deleteExpando, + special = jQuery.event.special; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( acceptData || jQuery.acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( deleteExpando ) { + delete elem[ internalKey ]; + + } else if ( typeof elem.removeAttribute !== core_strundefined ) { + elem.removeAttribute( internalKey ); + + } else { + elem[ internalKey ] = null; + } + + core_deletedIds.push( id ); + } + } + } + } + } +}); +var iframe, getStyles, curCSS, + ralpha = /alpha\([^)]*\)/i, + ropacity = /opacity\s*=\s*([^)]*)/, + rposition = /^(top|right|bottom|left)$/, + // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" + // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rmargin = /^margin/, + rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), + rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), + rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), + elemdisplay = { BODY: "block" }, + + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: 0, + fontWeight: 400 + }, + + cssExpand = [ "Top", "Right", "Bottom", "Left" ], + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; + +// return a css property mapped to a potentially vendor prefixed property +function vendorPropName( style, name ) { + + // shortcut for names that are not vendor prefixed + if ( name in style ) { + return name; + } + + // check for vendor prefixed names + var capName = name.charAt(0).toUpperCase() + name.slice(1), + origName = name, + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in style ) { + return name; + } + } + + return origName; +} + +function isHidden( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); +} + +function showHide( elements, show ) { + var display, elem, hidden, + values = [], + index = 0, + length = elements.length; + + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + values[ index ] = jQuery._data( elem, "olddisplay" ); + display = elem.style.display; + if ( show ) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !values[ index ] && display === "none" ) { + elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( elem.style.display === "" && isHidden( elem ) ) { + values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); + } + } else { + + if ( !values[ index ] ) { + hidden = isHidden( elem ); + + if ( display && display !== "none" || !hidden ) { + jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); + } + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( index = 0; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { + elem.style.display = show ? values[ index ] || "" : "none"; + } + } + + return elements; +} + +jQuery.fn.extend({ + css: function( name, value ) { + return jQuery.access( this, function( elem, name, value ) { + var len, styles, + map = {}, + i = 0; + + if ( jQuery.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + }, + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + var bool = typeof state === "boolean"; + + return this.each(function() { + if ( bool ? state : isHidden( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + }); + } +}); + +jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Exclude the following css properties to add px + cssNumber: { + "columnCount": true, + "fillOpacity": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + style = elem.style; + + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); + // Fixes bug #9237 + type = "number"; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { + value += "px"; + } + + // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, + // but it would mean to define eight (for every problematic property) identical functions + if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { + + // Wrapped to prevent IE from throwing errors when 'invalid' values are provided + // Fixes bug #5509 + try { + style[ name ] = value; + } catch(e) {} + } + + } else { + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var num, val, hooks, + origName = jQuery.camelCase( name ); + + // Make sure that we're working with the right name + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + //convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Return, converting to number if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; + } + return val; + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; + } +}); + +// NOTE: we've included the "window" in window.getComputedStyle +// because jsdom on node.js will break without it. +if ( window.getComputedStyle ) { + getStyles = function( elem ) { + return window.getComputedStyle( elem, null ); + }; + + curCSS = function( elem, name, _computed ) { + var width, minWidth, maxWidth, + computed = _computed || getStyles( elem ), + + // getPropertyValue is only needed for .css('filter') in IE9, see #12537 + ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, + style = elem.style; + + if ( computed ) { + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret; + }; +} else if ( document.documentElement.currentStyle ) { + getStyles = function( elem ) { + return elem.currentStyle; + }; + + curCSS = function( elem, name, _computed ) { + var left, rs, rsLeft, + computed = _computed || getStyles( elem ), + ret = computed ? computed[ name ] : undefined, + style = elem.style; + + // Avoid setting ret to empty string here + // so we don't default to auto + if ( ret == null && style && style[ name ] ) { + ret = style[ name ]; + } + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + // but not position css attributes, as those are proportional to the parent element instead + // and we can't measure the parent instead because it might trigger a "stacking dolls" problem + if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { + + // Remember the original values + left = style.left; + rs = elem.runtimeStyle; + rsLeft = rs && rs.left; + + // Put in the new values to get a computed value out + if ( rsLeft ) { + rs.left = elem.currentStyle.left; + } + style.left = name === "fontSize" ? "1em" : ret; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + if ( rsLeft ) { + rs.left = rsLeft; + } + } + + return ret === "" ? "auto" : ret; + }; +} + +function setPositiveNumber( elem, value, subtract ) { + var matches = rnumsplit.exec( value ); + return matches ? + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { + var i = extra === ( isBorderBox ? "border" : "content" ) ? + // If we already have the right measurement, avoid augmentation + 4 : + // Otherwise initialize for horizontal or vertical properties + name === "width" ? 1 : 0, + + val = 0; + + for ( ; i < 4; i += 2 ) { + // both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + } + + if ( isBorderBox ) { + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // at this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } else { + // at this point, extra isn't content, so add padding + val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // at this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with offset property, which is equivalent to the border-box value + var valueIsBorderBox = true, + val = name === "width" ? elem.offsetWidth : elem.offsetHeight, + styles = getStyles( elem ), + isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // some non-html elements return undefined for offsetWidth, so check for null/undefined + // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 + // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 + if ( val <= 0 || val == null ) { + // Fall back to computed then uncomputed css if necessary + val = curCSS( elem, name, styles ); + if ( val < 0 || val == null ) { + val = elem.style[ name ]; + } + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test(val) ) { + return val; + } + + // we need the check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + } + + // use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles + ) + ) + "px"; +} + +// Try to determine the default display value of an element +function css_defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + // Use the already-created iframe if possible + iframe = ( iframe || + jQuery("