Commit 5f168016 authored by Adam Caprez's avatar Adam Caprez
Browse files

Add job resources via Pegasus profiles

parent fa51392f
......@@ -130,14 +130,27 @@ class WorkflowJob(object):
for f in output_files:
job.uses(f["file"], link=Link.OUTPUT, transfer=True)
job.addArguments(*self._create_arg_list(input_files, output_files))
# Add memory / walltime
job.profile(Namespace.GLOBUS, "maxwalltime", self.params["walltime"] if "walltime" in self.params else self.base[self.jobname]["walltime"])
job.profile(Namespace.GLOBUS, "maxmemory", self.params["memory"] if "memory" in self.params else self.base[self.jobname]["walltime"])
return job
print self.err
return None
def _add_job_resources(self,job):
Add the job's resources (memory, walltime, etc.) via Pegasus
for resource_type in chipathlon.conf.resources.keys():
resource_value = self.params[resource_type]
except KeyError:
resource_value = self.base[self.jobname][resource_type]
print "%s %s" % (resource_type,resource_value)
ns = chipathlon.conf.resources[resource_type]["namespace"]
key = chipathlon.conf.resources[resource_type]["key"]
def _create_arg_list(self, input_files, output_files):
Create the necessary argument list for pegasus.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment