Skip to content
This repository was archived by the owner on Dec 7, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions etc/create-tables.mysql
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CREATE TABLE Jobs (
groupname VARCHAR(32),
account VARCHAR(32),
submithost VARCHAR(32),
vntype VARCHAR(32),
jobname TINYTEXT,
nproc INT UNSIGNED DEFAULT 1,
mppe INT UNSIGNED,
Expand Down
1 change: 1 addition & 0 deletions etc/create-tables.sqlite
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CREATE TABLE Jobs (
groupname VARCHAR(32),
account VARCHAR(32),
submithost VARCHAR(32),
vntype VARCHAR(32),
jobname TINYTEXT,
nproc INT UNSIGNED DEFAULT 1,
mppe INT UNSIGNED,
Expand Down
12 changes: 10 additions & 2 deletions src/python/pbsacct/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Copyright 2016, 2017, 2018 Ohio Supercomputer Center
# Authors: Aaron Maharry
# Troy Baer <troy@osc.edu>
# Mark Glants
#
# License: GNU GPL v2, see ../COPYING for details.

Expand Down Expand Up @@ -107,6 +108,8 @@ def __repr__(self):
output += "\tngpus = %d\n" % self.num_gpus()
if ( self.feature() is not None ):
output += "\tfeature = %s\n" % self.feature()
if ( self.vntype() is not None ):
output += "\tvntype = %s\n" % self.vntype()
if ( self.gattr() is not None ):
output += "\tgattr = %s\n" % self.gattr()
if ( self.gres() is not None ):
Expand Down Expand Up @@ -415,7 +418,8 @@ def num_gpus(self):

def feature(self):
return self.get_resource("Resource_List.feature")

def vntype(self):
return self.get_resource("Resource_List.vntype")
def gattr(self):
return self.get_resource("Resource_List.gattr")

Expand Down Expand Up @@ -542,6 +546,7 @@ def __init__(self,methodName='runTest'):
'Resource_List.walltime': '1:00:00',
'Resource_List.mem': '1GB',
'Resource_List.vmem': '1GB',
'Resource_List.vntype': 'cray_compute',
'resources_used.cput': '00:00:02',
'resources_used.walltime': '00:00:01',
'resources_used.mem': '1024kb',
Expand Down Expand Up @@ -1227,6 +1232,9 @@ def _job_set_fields(self,job,system=None,oldjob=None,append_to_jobid=None):
if ( job.feature() is not None and
( oldjob is None or job.feature()!=oldjob.feature() ) ):
fields_to_set["feature"] = "'%s'" % job.feature()
if ( job.vntype() is not None and
( oldjob is None or job.vntype()!=oldjob.vntype() ) ):
fields_to_set["vntype"] = "'%s'" % job.vntype()
if ( job.gattr() is not None and
( oldjob is None or job.gattr()!=oldjob.gattr() ) ):
fields_to_set["gattr"] = "'%s'" % job.gattr()
Expand Down Expand Up @@ -1580,4 +1588,4 @@ def get_job(self,jobid,noop=False,append_to_jobid=None):
if __name__ == "__main__":
unittest.main()
#import glob
#print str(jobs_from_files(glob.glob("/users/sysp/amaharry/acct-data/201603*")))
#print str(jobs_from_files(glob.glob("/users/sysp/amaharry/acct-data/201603*")))