def start(self, n): self.context["cores"] = self.cores if self.mem: # lsf.conf can specify nonstandard units for memory reservation lsf_unit = lsf.get_lsf_units(resource=True) mem = utils.convert_mb(float(self.mem) * 1024, lsf_unit) # check if memory reservation is per core or per job if lsf.per_core_reservation(): mem = mem / self.cores self.context["mem"] = '#BSUB -R "rusage[mem=%s]"' % mem else: self.context["mem"] = "" self.context["tag"] = self.tag if self.tag else "bcbio" self.context["resources"] = _format_lsf_resources(self.resources) return super(BcbioLSFEngineSetLauncher, self).start(n)
def start(self, n): self.context["cores"] = self.cores * self.numengines if self.mem: # lsf.conf can specify nonstandard units for memory reservation mem = lsf.parse_memory(float(self.mem)) # check if memory reservation is per core or per job if lsf.per_core_reservation(): mem = mem / (self.cores * self.numengines) mem = mem * self.numengines self.context["mem"] = '#BSUB -R "rusage[mem=%s]"' % mem else: self.context["mem"] = "" self.context["tag"] = self.tag if self.tag else "bcbio" self.context["resources"] = _format_lsf_resources(self.resources) self.context["cmd"] = get_engine_commands(self.context, self.numengines) return super(BcbioLSFEngineSetLauncher, self).start(n)