Analytics plugin build install
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
.
Build and install Plugin library inside of orcm
The steps are listed below for building and installing a plugin library in orcm
:
-
Create a folder with proper name (e.g.
average
) in the directory:orcm/mca/analytics/extension_plugins
-
Develop all the plugin code (refer to section 4.4.2) within the created folder.
-
Add a
Makefile.am
file in the created folder (e.g.average
) like follows (replaceaverage
with the proper plugin name)average_sources = \ extension_plugins/average/analytics_average.h \ extension_plugins/average/analytics_average.cpp component_noinst = component_install = analytics_extension_average.la mcacomponentdir = $(orcmlibdir) mcacomponent_LTLIBRARIES = $(component_install) analytics_extension_average_la_SOURCES = $(average_sources) analytics_extension_average_la_LDFLAGS = -module -avoid-version
Notice that the library name is
analytics\_extension\_average.la
. One requirement is that the library name must start withanalytics\_extension
. -
In the analytics makefile (i.e.
orcm/mca/analytics/Makefile.am
), include the path of the addedMakefile.am
of the plugin as follows:include extension_plugins/average/Makefile.am
After the above steps are done, do a build and installation of Sensys, the analytics\_extension\_average.la
and the analytics\_extension\_average.so
will be installed in the $(install\_dir)/lib/openmpi
folder for dynamic build. For static build, there will be no analytics\_extension\_average.so
library.
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
and -lsensysplugins
.
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
.