[Swift-commit] r7394 - trunk/bin
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Tue Dec 10 11:39:55 CST 2013
Author: davidk
Date: 2013-12-10 11:39:54 -0600 (Tue, 10 Dec 2013)
New Revision: 7394
Modified:
trunk/bin/swiftrun
Log:
New jobmanager format
Modified: trunk/bin/swiftrun
===================================================================
--- trunk/bin/swiftrun 2013-12-09 23:56:32 UTC (rev 7393)
+++ trunk/bin/swiftrun 2013-12-10 17:39:54 UTC (rev 7394)
@@ -146,7 +146,35 @@
}
# Make sure to handle special cases that are not in the namespace=x, key=y, format
- if ( $namespace eq "provider" ) { return "<execution provider=\"" . $property . "\" jobmanager=\"" . $value . "\"/>\n"; }
+ if ( $namespace eq "jobmanager" ) {
+ my $ccount = ($value =~ s/:/:/g);
+
+ # With no separators, assume local
+ if( $ccount == 0 ) {
+ $jobmanager = "local:$value";
+ }
+
+ # With one separator, use ssh-cl and assume hostname:type
+ elsif ( $ccount == 1) {
+ (my $first, my $second) = split(':', $value);
+ $jobmanager = "ssh-cl:$second";
+ $jobmanagerURL = "$first";
+ }
+
+ # Other, in the format of proto:host:jobMgr
+ elsif ( $ccount == 2) {
+ (my $first, my $second, my $third) = split(':', $value);
+ $jobmanager="$first:$third";
+ $jobmanagerURL = "$second";
+ }
+
+ if ( defined($jobmanagerURL) && length($jobmanagerURL) > 0) {
+ return "<execution provider=\"coaster\" jobmanager=\"" . $jobmanager . "\" url=\"" . $jobmanagerURL . "\"/>\n";
+ } else {
+ return "<execution provider=\"coaster\" jobmanager=\"" . $jobmanager . "\"/>\n";
+ }
+ }
+
elsif ( $namespace eq "workdirectory" ) { return "<workdirectory>$value</workdirectory>\n"; }
elsif ( $namespace eq "workdir" ) { return "<workdirectory>$value</workdirectory>\n"; }
elsif ( $namespace eq "taskdir" ) { return "<scratch>$value</scratch>\n"; }
More information about the Swift-commit
mailing list