Commit 168247bb authored by Swann Perarnau's avatar Swann Perarnau

[feature] Add config option for pmpi library

Add a config option to specify the location of the PMPI LD_PRELOAD
library available in libnrm. This should make it easier to use this
library.
parent e43c491a
......@@ -33,7 +33,9 @@ def main(argv=None):
"hwloc": "hwloc",
"perf": "perf",
"argo_perf_wrapper": "argo-perf-wrapper",
"argo_nodeos_config": "argo_nodeos_config"}
"argo_nodeos_config": "argo_nodeos_config",
"pmpi_lib": "/usr/lib/libnrm-pmpi.so",
}
if args.print_defaults:
print defaults
......@@ -74,6 +76,11 @@ def main(argv=None):
"variable.",
default=os.environ.get('PERF',
'perf'))
parser.add_argument(
'--pmpi_lib',
help="Path to the libnrm PMPI library used for the power policy"
"Override default with the PMPI environment variable.",
default=os.environ.get('PMPI', defaults['pmpi_lib']))
parser.add_argument(
'--argo_perf_wrapper',
help="Path to the linux perf tool to use. This path can"
......
......@@ -19,7 +19,8 @@ class ContainerManager(object):
def __init__(self, rm,
perfwrapper="argo-perf-wrapper",
linuxperf="perf",
argo_nodeos_config="argo_nodeos_config"):
argo_nodeos_config="argo_nodeos_config",
pmpi_lib="/usr/lib/libnrm-pmpi.so"):
self.linuxperf = linuxperf
self.perfwrapper = perfwrapper
self.nodeos = NodeOSClient(argo_nodeos_config=argo_nodeos_config)
......@@ -27,6 +28,7 @@ class ContainerManager(object):
self.pids = dict()
self.resourcemanager = rm
self.chrt = ChrtClient()
self.pmpi_lib = pmpi_lib
def create(self, request):
"""Create a container according to the request.
......@@ -49,7 +51,7 @@ class ContainerManager(object):
logger.info("run: ucontainername: %s", ucontainername)
# TODO: Application library to load must be set during configuration
apppreloadlibrary = ''
apppreloadlibrary = self.pmpi_lib
manifest = ImageManifest()
if not manifest.load(manifestfile):
......
......@@ -300,7 +300,8 @@ class Daemon(object):
self.resource_manager,
perfwrapper=self.config.argo_perf_wrapper,
linuxperf=self.config.perf,
argo_nodeos_config=self.config.argo_nodeos_config
argo_nodeos_config=self.config.argo_nodeos_config,
pmpi_lib=self.config.pmpi_lib,
)
self.application_manager = ApplicationManager()
self.sensor_manager = SensorManager()
......
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