[Swift-commit] r7314 - in trunk: bin etc

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Sun Nov 24 09:18:39 CST 2013


Author: davidk
Date: 2013-11-24 09:18:37 -0600 (Sun, 24 Nov 2013)
New Revision: 7314

Modified:
   trunk/bin/swiftrun
   trunk/etc/sites.xml
Log:
Cleanup default sites.xml
Remove module requirement in swiftrun


Modified: trunk/bin/swiftrun
===================================================================
--- trunk/bin/swiftrun	2013-11-23 04:47:22 UTC (rev 7313)
+++ trunk/bin/swiftrun	2013-11-24 15:18:37 UTC (rev 7314)
@@ -6,7 +6,6 @@
 use lib "$FindBin::Bin/../lib/perl";
 use File::Basename;
 use Getopt::Long qw(GetOptionsFromArray);
-use Switch;
 use Cwd;
 
 Getopt::Long::Configure("pass_through");
@@ -86,12 +85,10 @@
    }     
    
    # Make sure to handle special cases that are not in the namespace=x, key=y, format
-   switch($namespace) {
-      case "provider"	   { return "<execution provider=\"" . $property . "\" jobmanager=\"" . $value . "\"/>\n"; }
-      case "workdirectory" { return "<workdirectory>$value</workdirectory>\n"; }
-      case "filesystem"    { return "<filesystem provider=\"" . $value . "\"/>\n"; }
-      else                 { return "<profile namespace=\"" . $namespace . "\" key=\"" . $property . "\">" . $value . "</profile>\n"; }
-   }
+   if    ( $namespace eq "provider" )      { return "<execution provider=\"" . $property . "\" jobmanager=\"" . $value . "\"/>\n"; }
+   elsif ( $namespace eq "workdirectory" ) { return "<workdirectory>$value</workdirectory>\n"; }
+   elsif ( $namespace eq "filesystem" )    { return "<filesystem provider=\"" . $value . "\"/>\n"; }
+   else                                    { return "<profile namespace=\"" . $namespace . "\" key=\"" . $property . "\">" . $value . "</profile>\n"; }
 } 
 
 # Write apps to file in tc.data format
@@ -272,11 +269,8 @@
 # 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 ); }
-   }
+   if ( $option eq "-site" || $option eq "-sites" ) { shift; }
+   else { push( @new_swift_args, $option ); }
 }
 
 push( @new_swift_args, sprintf( "-logfile $run_directory/run%03s.log", $run_number ));

Modified: trunk/etc/sites.xml
===================================================================
--- trunk/etc/sites.xml	2013-11-23 04:47:22 UTC (rev 7313)
+++ trunk/etc/sites.xml	2013-11-24 15:18:37 UTC (rev 7314)
@@ -3,21 +3,20 @@
 
 <!-- sites.xml specifies details of the sites that Swift can run on.
 
-The first entry entry, for localhost, should work on most linux-like systems
+The entry for localhost should work on most linux-like systems
 without any change.
 
-It may be necessary to change the two occurences of /var/tmp to a different
+It may be necessary to change /var/tmp to a different
 working directory.
 
 The jobThrottle profile is set to 0 so that Swift will not try to run more
 than two jobs at once (the minimum) when using the local sites. This is
 appropriate for local execution, but make sure if/when using another
 execution mechanism to submit to an HPC resource that this jobThrottle
-is removed.
+is updated.
 
 -->
 
-
   <pool handle="localhost">
     <filesystem provider="local" />
     <execution provider="local" />
@@ -25,120 +24,4 @@
     <profile namespace="karajan" key="jobThrottle">0</profile>
   </pool>
 
-
-
-
-
-<!-- The remainder of this file is commented out by default. It contains
-example site definitions for a number of sites on TeraGrid and OSG.
-
-How this list was constructed:
-
-1. Teragrid
-http://www.teragrid.org/userinfo/hardware/resources.php
-fill out the gatekeeper info and the gridftp hostname
-for the storage/workspace, login into the machine, and make yourself a
-temporary directory
-
-2. OSG
-http://osg-cat.grid.iu.edu/index.php?site_name=osgcat
-sort by CPUs
-Add the gatekeeper hostname into the jobmanager name and into the gridftp url
-Add the ($TMP) or ($WNTMP) to the storage element in the gridftp url AND
-into the workspace element
-
-TODO by user:
-customize the storage and workdirectory to use your personal working directories
-
--->
-
-
-<!--
-  <pool handle="skynet" >
-    <gridftp url="gsiftp://skynet-login.isi.edu" > 
-    </gridftp>
-    <jobmanager universe="vanilla" url="skynet-login.isi.edu/jobmanager-fork" major="2" />
-    <workdirectory >/nfs/scratch01/tiberius</workdirectory>
-  </pool>
--->
-<!--
-  <pool handle="teraport" >
-    <gridftp  url="gsiftp://tp-grid1.uchicago.edu" /> 
-    <jobmanager universe="vanilla" url="tp-grid1.uchicago.edu/jobmanager-pbs" major="2" />
-    <workdirectory >/home/tiberius/scratch/SWIFT-WORK</workdirectory>
-  </pool>
--->
-<!--
-<pool handle="ncsa_32" >
-    <gridftp  url="gsiftp://login-w.ncsa.teragrid.org" />
-    <jobmanager universe="vanilla" url="grid-w.ncsa.teragrid.org/jobmanager" major="2" /> 
-    <workdirectory >/u/ac/tstef</workdirectory>
-</pool>
--->
-<!--
-<pool handle="purdue" >
-    <gridftp  url="gsiftp://tg-data.purdue.teragrid.org" />
-    <jobmanager universe="vanilla" url="tg-gatekeeper.purdue.teragrid.org" major="2" />
-    <workdirectory >/scratch/teragrid/stef</workdirectory>
-</pool>
--->
-<!-- 
-<pool handle="tacc" >
-    <gridftp  url="gsiftp://tg-gridftp.lonestar.tacc.teragrid.org" />
-    <jobmanager universe="vanilla" url="tg-login.tacc.teragrid.org/jobmanager-lsf" major="2" />
-    <workdirectory >/work/teragrid/tstef</workdirectory>
-</pool>
--->
-<!-- 
-<pool handle="UC" >
-    <gridftp url="gsiftp://tg-gridftp.uc.teragrid.org" />
-    <execution provider="gt4" jobmanager="PBS" url="tg-grid.uc.teragrid.org" />
-    <workdirectory >/disks/scratchgpfs1/tstef</workdirectory>
-</pool>
- -->
- 
-<!-- OSG SITES -->
-<!-- 
-<pool handle="OSG_LIGO_PSU" >
-    <gridftp  url="gsiftp://grid3.aset.psu.edu" />
-    <jobmanager universe="vanilla" url="grid3.aset.psu.edu/jobmanager-pbs" major="2" />
-    <workdirectory >/usr1/grid3/data</workdirectory>
-</pool>
- -->
-<!-- 
-<pool handle="fnal" >
-    <gridftp  url="gsiftp://fngp-osg.fnal.gov" />
-    <jobmanager universe="vanilla" url="fngp-osg.fnal.gov/jobmanager-pbs" major="2" minor="2" />
-    <workdirectory >/grid/data</workdirectory>
-</pool>
--->
-<!-- 
-<pool handle="prod_slac" >
-    <gridftp  url="gsiftp://osgserv01.slac.stanford.edu" />
-    <jobmanager universe="vanilla" url="osgserv01.slac.stanford.edu/jobmanager-lsf" major="2" />
-    <workdirectory >/nfs/slac/g/grid/osg/data</workdirectory>
-</pool>
--->
-<!-- 
-<pool handle="bnl_atlas_2" >
-    <gridftp  url="gsiftp://gridgk02.racf.bnl.gov" />
-    <jobmanager universe="vanilla" url="gridgk02.racf.bnl.gov/jobmanager-condor" major="2" />
-    <workdirectory >/usatlas/prodjob/share/</workdirectory>
-</pool>
--->
-<!--
-<pool handle="unm_hpc" >
-    <gridftp  url="gsiftp://milta.alliance.unm.edu" />
-    <jobmanager universe="vanilla" url="milta.alliance.unm.edu/jobmanager-pbs" major="2" />
-    <workdirectory >/tmp</workdirectory>
-</pool>
--->
-<!--  
-<pool handle="UWM_CMS" >
-    <gridftp  url="gsiftp://cmsgrid02.hep.wisc.edu" />
-    <jobmanager universe="vanilla" url="cmsgrid02.hep.wisc.edu/jobmanager-condor" major="2" />
-    <workdirectory >/tmp</workdirectory>
-</pool>
--->
-
 </config>




More information about the Swift-commit mailing list