Skip to content

Commit

Permalink
Application.sbatch(): Ensure argument to --mem is always an integer.
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardomurri committed Sep 26, 2016
1 parent 0024761 commit f421dee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gc3libs/__init__.py
Expand Up @@ -1482,7 +1482,7 @@ def sbatch(self, resource, **extra_args):
if self.requested_memory:
# SLURM uses `mem_free` for memory limits;
# 'M' suffix allowed for Megabytes
sbatch += ['--mem', self.requested_memory.amount(MB)]
sbatch += ['--mem', 1+int(self.requested_memory.amount(MB))]
if 'jobname' in self and self.jobname:
sbatch += ['--job-name', ('%s' % self.jobname)]
return (sbatch, cmdline)
Expand Down

0 comments on commit f421dee

Please sign in to comment.