Commit 302a9ea4 authored by Paul Rich's avatar Paul Rich
Browse files

Merge branch '81-enh-env-xalt' into 'develop'

adding queue and project to ProcessGroup

Closes #81

See merge request !41
parents c89bddf3 3e2e0393
......@@ -32,7 +32,6 @@ class ALPSScriptChild (PGChild):
PGChild.__init__(self, id=id, **kwargs)
self.pagg_id = None
self.alps_res_id = None
try:
self.bg_partition = self.pg.location[0]
except IndexError:
......@@ -77,6 +76,9 @@ class ALPSScriptChild (PGChild):
self.env["COBALT_PARTNAME"] = self.bg_partition
self.env["COBALT_PARTSIZE"] = str(self.pg.nodect)
self.env["COBALT_JOBSIZE"] = str(self.pg.size)
self.env["COBALT_PARTCORES"] = str(DEFAULT_DEPTH)
self.env["COBALT_PROJECT"] = str(self.pg.project)
self.env["COBALT_QUEUE"] = str(self.pg.queue)
#used for "simulation modes"
if os.environ.has_key('COBALT_CONFIG_FILES'):
self.env['COBALT_CONFIG_FILES'] = os.environ['COBALT_CONFIG_FILES']
......
......@@ -862,6 +862,8 @@ class Job (StateMachine):
'resid': self.resid,
'runid': self.runid,
'attrs': self.attrs,
'queue': self.queue,
'project': self.project
}])
if pgroup[0].has_key('id'):
self.taskid = pgroup[0]['id']
......
......@@ -43,6 +43,8 @@ class ProcessGroup(Data):
umask -- permissions to set
user -- the user the process group is running under
sigkill_time -- time at which to send a sigkill (seconds since epoch)
queue -- queue job was run from
project -- accounting project tied to the job
Only used by BlueGene/Q systems:
ion_kernel -- alternatve ION kernel to boot
......@@ -57,7 +59,7 @@ class ProcessGroup(Data):
"stdin", "stdout", "umask", "user", "starttime",
"walltime", "resid", "runid", "forker",
"subblock", "subblock_parent", "corner", "extents",
"attrs", "alps_res_id"]
"attrs", "alps_res_id", "queue", "project"]
required = Data.required + ["args", "cwd", "executable", "jobid",
"location", "size", "user"]
......@@ -104,6 +106,8 @@ class ProcessGroup(Data):
#TODO: extract into subclass
self.alps_res_id = spec.get('alps_res_id', None)
self.startup_timeout = spec.get("pgroup_startup_timeout", 0)
self.project = spec.get('project', None)
self.queue = spec.get('queue', None)
def __getstate__(self):
data = {}
......
Markdown is supported
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