#phdeem
This is a wrapper for using the hdeem library from within a MPI context.
##Compilation and Installation
###Prerequisites
To compile this plugin, you need:
-
MPI
-
libhdeem
-
FreeIPMI
###Building
-
Create a build directory
mkdir build cd build
-
Invoke CMake
Simplest possible call:
cmake ..
If either
libhdeem
or FreeIPMI are not installed in standard paths, you need to pass hints to CMake. Forlibhdeem
you have to useHDEEM_ROOT_DIR
and for FreeIPMIFreeIPMI_ROOT_DIR
, e.g.cmake .. -DHDEEM_ROOT_DIR=/opt/hdeem/ -DFreeIPMI_ROOT_DIR=/home/user/freeipmi
These can be provided as environment variables to. You can also pass different locations for header files and libraries with
HDEEM_INCLUDE_DIR
andHDEEM_LIBRARY
orFreeIPMI_INCLUDE_DIR
andFreeIPMI_LIBRARY
resp.If you want to build the examples, include
BUILD_EXAMPLES=on
in your CMake call, or for the testsBUILD_TESTS=on
resp., e.g.:cmake .. -DBUILD_EXAMPLES=on -DBUILD_TESTS=on
-
Invoke make
make
-
Copy the resulting
libphdeem.so
to a location listed inLD_LIBRARY_PATH
or add the current path toLD_LIBRARY_PATH
withexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`
##Usage
The usage of phdeem is just the same as the usage of libhdeem
. You just have to replace the
hdeem_
in the function names with phdeem_
and provide some additional parameters:
-
info
A
phdeem_info_t
storing the information about the caller for each process. You don't have to worry about the contents of this, it is just for internal context. -
ret_val
A
phdeem_status_t
containing the return values of the internally calledlibhdeem
and MPI functions. You can access the values viampi_ret_value
andhdeem_ret_value
resp.
They are passed as references to all function calls as shown below:
int ret;
phdeem_info_t info;
phdeem_status_t int_rets;
hdeem_bmc_data_t hdeem_data;
ret = phdeem_init( &hdeem_data, &info, MPI_COMM_WORLD, &int_rets );
The return values of the functions tell you if either
-
everything went fine (
PHDEEM_SUCCESS
) or -
the calling process is not the root process on the node and therefore no call to hdeem has been made (
PHDEEM_NOT_ROOT
) or -
an error occurred in MPI (
PHDEEM_MPI_ERROR
) orlibhdeem
(PHDEEM_HDEEM_ERROR
) (with the corresponding return values inret_val
).
For more information take a look at the comments in the header file or the examples.
Note:
hdeem_version()
is not mapped at the moment.
Note:
phdeem is not thread-safe!
###Tests
phdeem uses a hash function to determine whether the calling process is the root process on a specific node. This function may collide for some of your node names. If you encounter errors, please check if these are caused by collisions of the hash function.
In order to do that you can use the test_hash
program which expects a newline seperated list of
node names in a file called nodes.txt
and prints the number of dublicates found. You can build the
test_hash
program by passing -DBUILD_TESTS=on
as an argument to you CMake call. If you encounter
a non-zero return value, please file an issue on Github.
###Environment variables
None. For environment variables influencing the build, see the Building section.
###If anything fails
-
Check if your hardware has hdeem capability.
-
Write an issue on Github.
-
Write a mail to the author.
##Author
- Philipp Trommler (philipp.trommler at tu-dresden dot de)