Skip to content

Commit 20be67c

Browse files
committed
Start fixing handling GPU-reliant packages
Software packages that require a GPU (i.e. have 'GPU_reliance: required' in their .BBSoptions file) are now ignored by the software builds (buildtype == 'bioc') and picked up by the GPU-enabled builds (buildtype == 'bioc-gpu').
1 parent a420c31 commit 20be67c

File tree

6 files changed

+39
-11
lines changed

6 files changed

+39
-11
lines changed

BBS-make-OUTGOING.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ def copy_outgoing_pkgs(products_in_subdir, source_node):
9999
meat_index_path = os.path.join(BBSvars.Central_rdir.path,
100100
BBSutils.meat_index_file)
101101
pkgs = bbs.parse.get_meat_packages_for_node(meat_index_path, node_hostname,
102-
node_Arch, node_pkgType)
102+
node_Arch, node_pkgType,
103+
BBSvars.buildtype)
103104
meat_index = bbs.parse.get_meat_packages(meat_index_path, as_dict=True)
104105
for pkg in pkgs:
105106
if block_package(node_hostname, node_id, pkg):

BBS-prerun.py

+4
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ def _add_or_skip_or_ignore_package(pkgsrctree, meat_index):
117117
unsupported += ', win'
118118
if unsupported != None:
119119
meat_index.write('UnsupportedPlatforms: %s\n' % unsupported)
120+
if options != None:
121+
GPU_reliance = options.get('GPU_reliance')
122+
if GPU_reliance != None:
123+
meat_index.write('GPU_reliance: %s\n' % GPU_reliance)
120124
meat_index.write('\n')
121125
return 0 # package will be added to the "meat index"
122126

BBS-report.py

+16-2
Original file line numberDiff line numberDiff line change
@@ -896,8 +896,22 @@ def write_pkg_statuses_as_TDs(out, pkg, node,
896896
out.write('<TD %s>%s</TD>' % (TDattrs, TDcontent))
897897
elif not BBSreportutils.is_supported(pkg, node):
898898
TDattrs = 'COLSPAN="%s" class="%s"' % (ncol_to_display, TDclasses)
899-
TDcontent = '... NOT SUPPORTED ...'
900-
TDcontent = '%s' % TDcontent.replace(' ', '&nbsp;')
899+
## This is only a temporary hack based on the questionable assumption
900+
## that a software package unsupported on Linux is GPU-reliant, which
901+
## is of course not necessarily the case in general, but it just
902+
## happens to be true at the moment for Bioconductor software packages.
903+
## TODO: If we decide to get rid of the dedicated GPU-enabled builds
904+
## (buildtype == 'bioc-gpu') and to incorporate the GPU-capable
905+
## builders to the software builds, then we can get rid of this hack.
906+
display_link_to_gpu_builds = buildtype == 'bioc' and \
907+
sys.platform not in ['win32', 'darwin']:
908+
if display_link_to_gpu_builds:
909+
url = '%s/../bioc-gpu-LATEST/' % topdir
910+
TDcontent = 'see GPU-enabled build/check ' + \
911+
'report <A href="%s">here</A>' % url
912+
else:
913+
TDcontent = '... NOT SUPPORTED ...'
914+
TDcontent = '%s' % TDcontent.replace(' ', '&nbsp;')
901915
out.write('<TD %s>%s</TD>' % (TDattrs, TDcontent))
902916
else:
903917
for stage in BBSreportutils.stages_to_display(buildtype):

BBS-run.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,9 @@ def get_list_of_target_pkgs():
181181
node_hostname = BBSvars.node_hostname
182182
node_Arch = BBSutils.getNodeSpec(node_hostname, 'Arch')
183183
node_pkgType = BBSutils.getNodeSpec(node_hostname, 'pkgType')
184-
return bbs.parse.get_meat_packages_for_node(meat_index_path,
185-
node_hostname,
186-
node_Arch,
187-
node_pkgType)
184+
return bbs.parse.get_meat_packages_for_node(meat_index_path, node_hostname,
185+
node_Arch, node_pkgType,
186+
BBSvars.buildtype)
188187

189188
def getSrcPkgFilesFromSuccessfulSTAGE3(stage_label):
190189
print('BBS> Get list of source tarballs to %s ...' % stage_label, end=' ')

BBSreportutils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ def set_NODES(fancynames_in_one_string):
8989
pkgType = BBSutils.getNodeSpec(hostname, 'pkgType')
9090
pkgs = bbs.parse.get_meat_packages_for_node(
9191
BBSutils.meat_index_file,
92-
hostname, arch, pkgType)
92+
hostname, arch, pkgType,
93+
BBSvars.buildtype)
9394
node = Node(hostname, node_id, os_html, arch, platform, buildbin, pkgs)
9495
NODES.append(node)
9596
if len(NODES) == 0:

bbs/parse.py

+12-3
Original file line numberDiff line numberDiff line change
@@ -406,14 +406,23 @@ def _is_supported(unsupported_platforms, node_hostname,
406406
### 'node_Arch' and 'node_pkgType' are the Arch and pkgType of node of name
407407
### 'node_hostname', as specified in BBS/nodes/nodespecs.py.
408408
def get_meat_packages_for_node(meat_index_file, node_hostname,
409-
node_Arch=None, node_pkgType=None):
409+
node_Arch=None, node_pkgType=None,
410+
buildtype=None):
410411
dcf_records = parse_DCF(meat_index_file)
411412
pkgs = []
412413
for dcf_record in dcf_records:
413414
pkg = dcf_record['Package']
414415
unsupported_platforms = dcf_record.get('UnsupportedPlatforms')
415-
if (_is_supported(unsupported_platforms, node_hostname,
416-
node_Arch, node_pkgType)):
416+
ok1 = _is_supported(unsupported_platforms, node_hostname,
417+
node_Arch, node_pkgType)
418+
GPU_reliance = dcf_record.get('GPU_reliance')
419+
if buildtype == 'bioc':
420+
ok2 = GPU_reliance != 'required'
421+
elif buildtype == 'bioc-gpu':
422+
ok2 = GPU_reliance in ['required', 'optional']
423+
else:
424+
ok2 = True
425+
if ok1 and ok2:
417426
pkgs.append(pkg)
418427
pkgs.sort(key=str.lower)
419428
return pkgs

0 commit comments

Comments
 (0)