[Swift-commit] cog r3537

swift at ci.uchicago.edu swift at ci.uchicago.edu
Wed Jan 2 00:20:04 CST 2013


------------------------------------------------------------------------
r3537 | davidkelly999 | 2013-01-02 00:15:17 -0600 (Wed, 02 Jan 2013) | 2 lines

Fix for user defined slurm commands

------------------------------------------------------------------------
Index: modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/slurm/SlurmExecutor.java
===================================================================
--- modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/slurm/SlurmExecutor.java	(revision 3536)
+++ modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/slurm/SlurmExecutor.java	(working copy)
@@ -129,20 +129,22 @@
 		writeNonEmptyAttr("project", "--account", wr);
 		writeNonEmptyAttr("queue", "--partition", wr);
 		writeWallTime(wr);
-		wr.write("\n");
-
-		for (String name : spec.getEnvironmentVariableNames()) {
-			wr.write("export " + name + '=' + quote(spec.getEnvironmentVariable(name)) + '\n');
-		}
-
+		
 		// Handle all slurm attributes specified by the user
 		for (String a : spec.getAttributeNames()) {
 			if (a != null && a.startsWith("slurm.")) {
 				String attributeName[] = a.split("slurm.");
-				wr.write("#SBATCH --" + attributeName[1] + " = " + spec.getAttribute(a) + '\n');
+				wr.write("#SBATCH --" + attributeName[1] + "=" + spec.getAttribute(a) + '\n');
 			}
 		}
+		
+		wr.write("\n");
+		for (String name : spec.getEnvironmentVariableNames()) {
+			wr.write("export " + name + '=' + quote(spec.getEnvironmentVariable(name)) + '\n');
+		}
 
+
+
 		String type = (String) spec.getAttribute("jobType");
 		if (logger.isDebugEnabled())
 			logger.debug("Job type: " + type);



More information about the Swift-commit mailing list