[mpich-discuss] Have constants available in shared library

Erik Schnetter schnetter at gmail.com
Thu Apr 14 09:04:06 CDT 2016


I am one of the maintainers of the MPI wrapper package for Julia
<https://github.com/JuliaParallel/MPI.jl>. This package provides Julia
language bindings for MPI, essentially wrapping various MPI functions,
comparable to what mpi4py <http://pythonhosted.org/mpi4py/> does for
Python.

It is in Julia straightforward to call C functions in a shared
library. The MPI API is standardized, so that part is straightforward.
What is not standardized are the values of various constants, such as
e.g. MPI_INT, MPI_MAX, or MPI_ANY_TAG.

We currently use a cmake function that builds and runs a small
executable that outputs the (implementation-specific) values of these
constants, and auto-generates Julia code that defines these constants.
We do this when the Julia MPI package is installed or updated. This
works fine, but I think there could be a better way.

The HDF5 library <https://www.hdfgroup.org/HDF5/> puts global
constants into the data section of their library, with names derived
from the preprocessor constants (with a _g suffix, I believe). This
makes it straightforward to access the values of these constants at
run time. For example, there exists a constant H5T_NATIVE_INT_g.

Could you add similar constants to the OpenMPI shared library? This
would simplify wrapping the library.

Thanks,
-erik

-- 
Erik Schnetter <schnetter at gmail.com>
http://www.perimeterinstitute.ca/personal/eschnetter/
_______________________________________________
discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss


More information about the discuss mailing list