[Swift-commit] r7476 - branches/release-0.95/bin
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Wed Jan 15 23:25:13 CST 2014
Author: davidk
Date: 2014-01-15 23:25:13 -0600 (Wed, 15 Jan 2014)
New Revision: 7476
Modified:
branches/release-0.95/bin/swiftrun
Log:
Allow more flexibility with providers
Modified: branches/release-0.95/bin/swiftrun
===================================================================
--- branches/release-0.95/bin/swiftrun 2014-01-16 05:24:31 UTC (rev 7475)
+++ branches/release-0.95/bin/swiftrun 2014-01-16 05:25:13 UTC (rev 7476)
@@ -135,10 +135,12 @@
my $ccount = ($value =~ s/:/:/g);
my $jobmanager = "";
my $jobmanagerURL = "";
+ my $provider = "";
# With no separators, assume local
if( $ccount == 0 ) {
$jobmanager = "local:$value";
+ return "<execution provider=\"coaster\" jobmanager=\"" . $jobmanager . "\"/>\n";
}
# With one separator, use ssh-cl and assume hostname:type
@@ -146,6 +148,7 @@
(my $first, my $second) = split(':', $value);
$jobmanager = "ssh-cl:$second";
$jobmanagerURL = "$first";
+ return "<execution provider=\"coaster\" jobmanager=\"" . $jobmanager . "\" url=\"" . $jobmanagerURL . "\"/>\n";
}
# Other, in the format of proto:host:jobMgr
@@ -153,13 +156,16 @@
(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 ( $ccount == 3) {
+ (my $first, my $second, my $third, my $fourth) = split(':', $value);
+ $provider=$first;
+ $jobmanager="$second:$third";
+ $jobmanagerURL="$fourth";
+ return "<execution provider=\"$provider\" jobmanager=\"" . $jobmanager . "\" url=\"" . $jobmanagerURL . "\"/>\n";
+ }
}
elsif ( $property eq "workdir" ) { return "<workdirectory>$value</workdirectory>\n"; }
More information about the Swift-commit
mailing list