Hide some internal functions and 13 variables from public ABI - #14367
Hide some internal functions and 13 variables from public ABI#14367hppritcha wants to merge 1 commit into
Conversation
Add OMPI_HIDDEN attribute to internal symbols in libmpi.so and libmpi_abi.so to prevent them from being exported in the public API. Hidden functions (27): - 9 ABI C callback functions (ABI_C_MPI_*_FN) - 12 MPI_T functions (ompit_*, including ompi_mpit_lock/unlock) - 4 Fortran ABI functions (ompi_abi_get/set_fortran_*) - 2 Sendrecv functions (ompi_sendrecv, ompi_isendrecv) Hidden variables (13): - 9 ABI variables (ompi_abi_mpi_*) - 2 MPI_T variables (ompi_mpit_big_lock, ompi_mpit_init_failed) - 2 Class instances (ompi_isendrecv_context_t_class, ompi_isendrecv_replace_context_t_class) Files modified: - ompi/mpi/c/attr_fn_abi.c - ompi/mpi/c/abi.h - ompi/mpi/c/bindings.h - ompi/mpi/c/ompi_abi_fortran.c - ompi/mpi/c/ompi_isendrecv.c - ompi/mpi/c/ompi_sendrecv.c - ompi/mpi/tool/mpit_common.c - ompi/mpi/tool/mpit-internal.h - ompi/test/general/abi_fortran.c - ompi/mpi/bindings/ompi_bindings/c.py - ompi/mpi/c/isendrecv_replace.c.in Also updated AGENTS.md with a note about changing visibility of internal symbols which tests might be using. Related to open-mpi#14336 Signed-off-by: Howard Pritchard <howardp@lanl.gov>
|
This PR doesn't address the mysterious mentioned in the issue. That will be investigated/addressed in a different PR> |
devreal
left a comment
There was a problem hiding this comment.
I cannot find another place where we have used OMPI_HIDDEN in the ompi source tree (only in the third-party tree). Why is it necessary for internal ABI and tools functions? Would OMPI_DECLSPEC not achieve the same goal?
|
@dalcinl how important do you think it is for there to be abidiff between the stub implementation and ompi libmpi_abi? |
Well, it depends on what kind of differences we are talking about. For sure there should be nothing missing, that would be a bug. That's why I pointed out the missing However, I would not complain if OMPI exposes additional functions. For example, OMPI may want to expose MPIX_* functions related to the current in-development fault tolerance APis. I think MPICH is currently doing that, that is exposing its What I'm not so OK about is carelessly exposing internal functions and variables without a clear purpose. I think that is the case of the 27 functions and 13 variables I reported in #14336. We could think of adding a CI test using abidiff. A suppression file would be enough to ignore extra symbols not in the MPI standard, e.g. the |
Well, OMPI's ABI |
Add OMPI_HIDDEN attribute to internal symbols in libmpi.so and libmpi_abi.so to prevent them from being exported in the public API.
Hidden functions (27):
Hidden variables (13):
Files modified:
Also updated AGENTS.md with a note about changing visibility of internal symbols which tests might be using.
Related to #14336