[Swift-commit] r7799 - trunk/bin

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Thu Apr 24 15:38:11 CDT 2014


Author: davidk
Date: 2014-04-24 15:38:11 -0500 (Thu, 24 Apr 2014)
New Revision: 7799

Modified:
   trunk/bin/swiftrun
Log:
Verify swift properties


Modified: trunk/bin/swiftrun
===================================================================
--- trunk/bin/swiftrun	2014-04-24 20:37:07 UTC (rev 7798)
+++ trunk/bin/swiftrun	2014-04-24 20:38:11 UTC (rev 7799)
@@ -26,42 +26,84 @@
 my @new_swift_args;		# New command line arguments
 my @original_swift_args;	# Original arguments
 
-# List of xml shortcuts
+# List of allowable site properties and their xml namespace
 my %site_aliases = (
-                   'allocationstepsize'        => 'globus.allocationStepSize',
-                   'condor'                    => 'globus.condor',
-                   'delaybase'                 => 'karajan.delayBase',
-                   'filesystem'                => 'filesystem',
-                   'highoverallocation'        => 'globus.highOverallocation',
-                   'initialscore'              => 'karajan.initialScore',
-                   'internalhostname'          => 'globus.internalhostname',
-                   'jobgranularity'            => 'globus.nodeGranularity',
-                   'jobmanager'                => 'jobmanager',
-		   'jobproject'                => 'globus.project',
-                   'jobqueue'                  => 'globus.queue',
-                   'jobtype'                   => 'globus.jobType',
-		   'jobwalltime'               => 'globus.maxtime',
-                   'jobwalltimereserve'        => 'globus.reserve',
-                   'lowoverallocation'         => 'globus.lowOverallocation',
-		   'maxjobs'                   => 'globus.slots',
-                   'maxnodesperjob'            => 'globus.maxNodes',
-                   'maxsubmitrate'             => 'karajan.maxSubmitRate',
-                   'overallocationdecayfactor' => 'globus.overallocationDecayFactor',
-		   'pe'                        => 'globus.pe',
-                   'providerattributes'        => 'globus.providerAttributes',
-                   'remotemonitorenabled'      => 'globus.remoteMonitorEnabled',
-                   'slurm'                     => 'globus.slurm',
-                   'taskdir'                   => 'globus.scratch',
-                   'tasksperworker'            => 'globus.jobsPerNode',
-                   'taskthrottle'              => 'karajan.jobThrottle',
-                   'taskwalltime'              => 'globus.maxwalltime',
-		   'userhomeoverride'	       => 'globus.userHomeOverride',
-                   'workdir'                   => 'workdir',
-		   'workerloglevel'            => 'globus.workerlogginglevel',
-                   'workerlogdirectory'        => 'globus.workerloggingdirectory',
-		   'workermanager'             => 'globus.workerManager',
+   'allocationstepsize'        => 'globus.allocationStepSize',
+   'condor'                    => 'globus.condor',
+   'delaybase'                 => 'karajan.delayBase',
+   'filesystem'                => 'filesystem',
+   'highoverallocation'        => 'globus.highOverallocation',
+   'initialscore'              => 'karajan.initialScore',
+   'internalhostname'          => 'globus.internalhostname',
+   'jobgranularity'            => 'globus.nodeGranularity',
+   'jobmanager'                => 'jobmanager',
+   'jobproject'                => 'globus.project',
+   'jobqueue'                  => 'globus.queue',
+   'jobtype'                   => 'globus.jobType',
+   'jobwalltime'               => 'globus.maxtime',
+   'jobwalltimereserve'        => 'globus.reserve',
+   'lowoverallocation'         => 'globus.lowOverallocation',
+   'maxjobs'                   => 'globus.slots',
+   'maxnodesperjob'            => 'globus.maxNodes',
+   'maxsubmitrate'             => 'karajan.maxSubmitRate',
+   'overallocationdecayfactor' => 'globus.overallocationDecayFactor',
+   'pe'                        => 'globus.pe',
+   'providerattributes'        => 'globus.providerAttributes',
+   'remotemonitorenabled'      => 'globus.remoteMonitorEnabled',
+   'slurm'                     => 'globus.slurm',
+   'taskdir'                   => 'globus.scratch',
+   'tasksperworker'            => 'globus.jobsPerNode',
+   'taskthrottle'              => 'karajan.jobThrottle',
+   'taskwalltime'              => 'globus.maxwalltime',
+   'userhomeoverride'	       => 'globus.userHomeOverride',
+   'workdir'                   => 'workdir',
+   'workerloglevel'            => 'globus.workerlogginglevel',
+   'workerlogdirectory'        => 'globus.workerloggingdirectory',
+   'workermanager'             => 'globus.workerManager',
 );
 
+# List of allowable swift properties and aliases
+my %property_aliases = (
+   'caching.algorithm'               => 'caching.algorithm',
+   'clustering.enabled'              => 'clustering.enabled',
+   'clustering.min.time'             => 'clustering.min.time',
+   'clustering.queue.delay'          => 'clustering.queue.delay',
+   'config.rundirs'                  => 'config.rundirs',
+   'execution.retries'               => 'execution.retries',
+   'foreach.max.threads'             => 'foreach.max.threads',
+   'kickstart.enabled'               => 'kickstart.enabled',
+   'kickstart.always.transfer'       => 'kickstart.always.transfer',
+   'lazy.errors'                     => 'lazy.errors',
+   'pgraph'                          => 'pgraph',                 
+   'pgraph.graph.options'            => 'pgraph.graph.options',
+   'pgraph.node.options'             => 'pgraph.node.options',
+   'provenance.log'                  => 'provenance.log',
+   'provider.staging.pin.swiftfiles' => 'provider.staging.pin.swiftfiles',
+   'replication.enabled'             => 'replication.enabled',
+   'replication.min.queue.time'      => 'replication.min.queue.time',
+   'replication.limit'               => 'replication.limit',
+   'sitedir.keep'                    => 'sitedir.keep',
+   'sites.file'                      => 'sites.file',
+   'status.mode'                     => 'status.mode',
+   'swift.home'                      => 'swift.home',
+   'tc.file'                         => 'tc.file',
+   'tcp.port.range'                  => 'tcp.port.range',
+   'throttle.file.operations'        => 'throttle.file.operations',
+   'throttle.host.submit'            => 'throttle.host.submit',
+   'throttle.score.job.factor'       => 'throttle.score.job.factor',
+   'throttle.submit'                 => 'throttle.submit',
+   'throttle.transfers'              => 'throttle.transfers',
+   'ticker.date.format'              => 'ticker.date.format',
+   'ticker.disable'                  => 'ticker.disable',
+   'ticker.prefix'                   => 'ticker.prefix',
+   'tracing.enabled'                 => 'tracing.enabled',
+   'use.wrapper.staging'             => 'use.wrapper.staging',
+   'use.provider.staging'            => 'use.provider.staging',
+   'wrapper.invocation.mode'         => 'wrapper.invocation.mode',
+   'wrapper.parameter.mode'          => 'wrapper.parameter.mode',
+   'wrapperlog.always.transfer'      => 'wrapperlog.always.transfer',
+);
+
 # Verify a property file exists and add it to the search path
 sub add_property_file {
    my $property_file = $_[0];
@@ -230,9 +272,13 @@
    open( PROPERTY_FILE, ">$run_directory/$property_filename" ) || &swiftquit("Unable to open $run_directory/$property_filename");
    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";
+      next if $key =~ /^\s*app\./;
+      next if $key =~ /^\s*site$/;
+      next if $key =~ /^\s*site\./;
+      if( !defined( $property_aliases{ $key } )) {
+         swiftquit("Error: Unknown property $key");
+      }
+      print PROPERTY_FILE "$property_aliases{$key}=$value\n";
    }
    push( @new_swift_args, "-config $run_directory/$property_filename" );
 }




More information about the Swift-commit mailing list