Add heterofs support to supernode as well. Tested somewhat manually and

lightly because supernode doesn't really support per-job outputs or
interaction really. linux-uniform on supernode seems to do the right
thing and nothing crashes when run with various heterogenous rootfs
configurations.
This commit is contained in:
Nathan Pemberton 2019-01-26 01:22:48 +00:00
parent 1a849cdb0e
commit 936d4d8a8e
2 changed files with 16 additions and 8 deletions

View File

@ -383,15 +383,17 @@ class FireSimSuperNodeServerNode(FireSimServerNode):
return [filepath, get_path_trailing(filepath) + str(index)]
all_paths = []
# todo handle none case
all_paths.append([self.get_job().rootfs_path(),
self.get_rootfs_name()])
if self.get_job().rootfs_path() is not None:
all_paths.append([self.get_job().rootfs_path(),
self.get_rootfs_name()])
num_siblings = self.supernode_get_num_siblings()
for x in range(1, num_siblings):
all_paths.append([self.supernode_get_sibling_rootfs_path(x),
self.supernode_get_sibling_rootfs(x)])
sibling_rootfs_path = self.supernode_get_sibling_rootfs_path(x)
if sibling_rootfs_path is not None:
all_paths.append([sibling_rootfs_path,
self.supernode_get_sibling_rootfs(x)])
all_paths.append([self.get_job().bootbinary_path(),
self.get_bootbin_name()])
@ -406,9 +408,12 @@ class FireSimSuperNodeServerNode(FireSimServerNode):
return all_paths
def get_rootfs_name(self, dummyindex=0):
if dummyindex:
if self.get_job().rootfs_path() is None:
return None
elif dummyindex:
return self.get_job().rootfs_path().split("/")[-1] + "-" + str(dummyindex)
return self.get_job().rootfs_path().split("/")[-1]
else:
return self.get_job().rootfs_path().split("/")[-1]
def get_bootbin_name(self, dummyindex=0):
if dummyindex:

View File

@ -137,7 +137,10 @@ class RuntimeHWConfig:
runtimeconf = self.get_local_runtimeconf_binaryname()
def array_to_plusargs(valuesarr, plusarg):
args = map(lambda ind_rootfs: """{}{}={}""".format(plusarg, ind_rootfs[0], ind_rootfs[1]), enumerate(valuesarr))
args = []
for index, arg in enumerate(valuesarr):
if arg is not None:
args.append("""{}{}={}""".format(plusarg, index, arg))
return " ".join(args) + " "
command_macs = array_to_plusargs(all_macs, "+macaddr")