From b9a0c317b0a7622530513c641fe4facd6783cf9d Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 7 Apr 2021 19:41:09 +0200 Subject: [Mesh] add NoMesh flavor disabling the mesh algorithm --- allocbench/allocators/mesh.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/allocbench/allocators/mesh.py b/allocbench/allocators/mesh.py index a268e01..0de702d 100644 --- a/allocbench/allocators/mesh.py +++ b/allocbench/allocators/mesh.py @@ -20,15 +20,17 @@ from allocbench.allocator import Allocator from allocbench.artifact import GitArtifact +VERSION = '4a1012cee990cb98cc1ea0294a836f467b29be02' + class Mesh(Allocator): """Mesh allocator""" sources = GitArtifact("Mesh", "https://github.com/plasma-umass/Mesh") - def __init__(self, name, **kwargs): + def __init__(self, name, config_opts="", **kwargs): self.ld_preload = "{dir}/libmesh.so" self.build_cmds = [ - "cd {srcdir}; ./configure", "cd {srcdir}; make -j 4", + f"cd {{srcdir}}; ./configure {config_opts}", "cd {srcdir}; make -j 4", "mkdir -p {dir}", "ln -f -s {srcdir}/libmesh.so {dir}/libmesh.so" ] @@ -37,5 +39,9 @@ class Mesh(Allocator): # pylint: disable=invalid-name mesh = Mesh("Mesh", - version="4a1012cee990cb98cc1ea0294a836f467b29be02", + version=VERSION, color="xkcd:mint") + +nomesh = Mesh("NoMesh", + config_opts="--disable-meshing", + version=VERSION) -- cgit v1.2.3