Skip to content

4.4.3 Analytics Plugin Build Install

lrrajesh edited this page Sep 14, 2016 · 1 revision

There are two ways in building and installing a newly developed plugin library. One is to build and install the library inside of orcm, and the other is to build and install the library outsite of orcm.

1. Build and install Plugin library inside of orcm

The steps are listed below for building and installing a plugin library in orcm:

(1) Create a folder with proper name (e.g. example) in the directory: "orcm/mca/analytics/extension_plugins"

(2) Develop all the plugin code (refer to section 4.4.2) within the created folder.

(3) add a "Makefile.am" file in the created folder (e.g. example) like follows (replace "example" with the proper plugin name)

    example_sources = \
        extension_plugins/example/analytics_example.h \
        extension_plugins/example/analytics_example.cpp
    component_noinst =
    component_install = analytics_extension_example.la
    mcacomponentdir = $(orcmlibdir)
    mcacomponent_LTLIBRARIES = $(component_install)
    analytics_extension_example_la_SOURCES = $(example_sources)
    analytics_extension_example_la_LDFLAGS = -module -avoid-version

Notice that the library name is "analytics_extension_example.la". One requirement is that the library name must start with "analytics_extension".

(4) In the analytics makefile (i.e. "orcm/mca/analytics/Makefile.am"), include the path of the added "Makefile.am" of the plugin as follows:

    include extension_plugins/example/Makefile.am

After the above steps are done, do a build and installation of SenSys, the "analytics_extension_example.la" and the "analytics_extension_example.so" will be installed in the $(install_dir)/lib/openmpi folder for dynamic build. For static build, there will be no "analytics_extension_example.so" library.

2. Build and install Plugin library outside of orcm

In addition to build and install plugin library inside of orcm, developers are allowed to build and install the library as wanted. To build and install the plugin library outside of orcm, the following library dependencies should be provided in the makefile:

-lorcm, -lsensysplugins, -lsensysplugins_helper

Again, the library name must start with "analytics_extension". In addition, if the library is installed outsite of orcm, when running the orcmd daemon, the directory must be provided through the mca parameter "analytics_base_pluginlibdir" in order for orcmd to find the libraries. For example, if the library is installed in the /opt/foo directory, orcmd daemon should be run as follows:

./orcmd --omca analytics_base_pluginlibdir /opt/foo

By default, "analytics_base_pluginlibdir" points to the directory: $(install_dir)/lib/openmpi

Clone this wiki locally