8017: RuntimeConstraints uses int64
authorradhika <radhika@curoverse.com>
Tue, 10 May 2016 17:34:34 +0000 (13:34 -0400)
committerradhika <radhika@curoverse.com>
Tue, 10 May 2016 17:34:34 +0000 (13:34 -0400)
services/crunch-dispatch-slurm/crunch-dispatch-slurm.go

index 8c3f5c99fc64b8c9d1d49021190ffc97000f4c71..f45c2a106a07a61f8c9af871936b51f83c178e12 100644 (file)
@@ -141,7 +141,7 @@ func dispatchSlurm(priorityPollInterval int, crunchRunCommand, finishCommand str
 
 // sbatchCmd
 func sbatchFunc(container Container) *exec.Cmd {
-       memPerCPU := math.Ceil(float64(container.RuntimeConstraints["ram"]) / float64(container.RuntimeConstraints["vcpus"]*1048576))
+       memPerCPU := math.Ceil((float64(container.RuntimeConstraints["ram"])) / (float64(container.RuntimeConstraints["vcpus"]*1048576)))
        return exec.Command("sbatch", "--share", "--parsable",
                "--job-name="+container.UUID,
                "--mem-per-cpu="+strconv.Itoa(int(memPerCPU)),