[ARVADOS] updated: edbd43f2b89a915cf33b963c1e1ae86447c1e93b

Git user git at public.curoverse.com
Thu Jul 7 11:24:22 EDT 2016


Summary of changes:
 services/crunch-dispatch-slurm/crunch-dispatch-slurm.go      | 12 ++++--------
 services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go |  2 +-
 2 files changed, 5 insertions(+), 9 deletions(-)

       via  edbd43f2b89a915cf33b963c1e1ae86447c1e93b (commit)
       via  659f1244e1d0b427317efa5550ee4f6e7f80ba96 (commit)
      from  1061e5ea1d8cd16628e18e7b2dee8df3797484a2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit edbd43f2b89a915cf33b963c1e1ae86447c1e93b
Merge: 1061e5e 659f124
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Jul 7 11:23:59 2016 -0400

    Merge branch '9528-slurm-parsable'
    
    closes #9528


commit 659f1244e1d0b427317efa5550ee4f6e7f80ba96
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Jul 6 22:11:56 2016 -0400

    9528: Drop sbatch --parsable flag. It fails in older versions of slurm,
    and we don't need to parse the output anyway.

diff --git a/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go b/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
index 4bfff6a..46df528 100644
--- a/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
+++ b/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
@@ -72,7 +72,7 @@ func doMain() error {
 // sbatchCmd
 func sbatchFunc(container arvados.Container) *exec.Cmd {
 	memPerCPU := math.Ceil(float64(container.RuntimeConstraints.RAM) / (float64(container.RuntimeConstraints.VCPUs) * 1048576))
-	return exec.Command("sbatch", "--share", "--parsable",
+	return exec.Command("sbatch", "--share",
 		fmt.Sprintf("--job-name=%s", container.UUID),
 		fmt.Sprintf("--mem-per-cpu=%d", int(memPerCPU)),
 		fmt.Sprintf("--cpus-per-task=%d", container.RuntimeConstraints.VCPUs),
@@ -90,9 +90,7 @@ var scancelCmd = scancelFunc
 
 // Submit job to slurm using sbatch.
 func submit(dispatcher *dispatch.Dispatcher,
-	container arvados.Container, crunchRunCommand string) (jobid string, submitErr error) {
-	submitErr = nil
-
+	container arvados.Container, crunchRunCommand string) (submitErr error) {
 	defer func() {
 		// If we didn't get as far as submitting a slurm job,
 		// unlock the container and return it to the queue.
@@ -171,9 +169,7 @@ func submit(dispatcher *dispatch.Dispatcher,
 		return
 	}
 
-	// If everything worked out, got the jobid on stdout
-	jobid = strings.TrimSpace(string(stdoutMsg))
-
+	log.Printf("sbatch succeeded: %s", strings.TrimSpace(string(stdoutMsg)))
 	return
 }
 
@@ -194,7 +190,7 @@ func monitorSubmitOrCancel(dispatcher *dispatch.Dispatcher, container arvados.Co
 
 			log.Printf("About to submit queued container %v", container.UUID)
 
-			if _, err := submit(dispatcher, container, *crunchRunCommand); err != nil {
+			if err := submit(dispatcher, container, *crunchRunCommand); err != nil {
 				log.Printf("Error submitting container %s to slurm: %v",
 					container.UUID, err)
 				// maybe sbatch is broken, put it back to queued
diff --git a/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go b/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go
index d8b94f9..ede767c 100644
--- a/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go
+++ b/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go
@@ -95,7 +95,7 @@ func (s *TestSuite) TestIntegrationCancel(c *C) {
 }
 
 func (s *TestSuite) TestIntegrationMissingFromSqueue(c *C) {
-	container := s.integrationTest(c, func() *exec.Cmd { return exec.Command("echo") }, []string{"sbatch", "--share", "--parsable",
+	container := s.integrationTest(c, func() *exec.Cmd { return exec.Command("echo") }, []string{"sbatch", "--share",
 		fmt.Sprintf("--job-name=%s", "zzzzz-dz642-queuedcontainer"),
 		fmt.Sprintf("--mem-per-cpu=%d", 2862),
 		fmt.Sprintf("--cpus-per-task=%d", 4),

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list