-
Notifications
You must be signed in to change notification settings - Fork 932
Add opal destructor/fini function #528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This is independent of #516 so was pulled into a separate PR. |
|
|
Refer to this link for build results (access rights to CI server needed): |
|
|
Refer to this link for build results (access rights to CI server needed): |
|
|
Refer to this link for build results (access rights to CI server needed): |
opal/runtime/opal_init.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spelling mistake? compilere - probably wanted compiler
|
👍 |
This commit is related to an RFC from June 2014. Disscussion can be found at: http://www.open-mpi.org/community/lists/devel/2014/07/15140.php The finalize function is set using either the linker option -fini or __attribute__((destructor)) depending on compiler support. I have confirmed that this hybrid approach works with all the major compilers. The attribute is supported by gcc, clang, llvm, xlc, and icc. The fini function will support pgi. If a compiler/linker combination does not support either the destructor or fini function a message will be printed on re-init indicating it is not supported (an improvement over the current behavior-- SEGV). I moved the following to the destructor function: - Class system finalize. This solves a bug when MPI_T_finalize is called before MPI_Init. The only downside to this change is we will leave the footprint of the opal class system after MPI_Finalize. This footprint should be relatively small. This is an alternative to open-mpi#517 but the two PRs are not mutually-exclusive (with some modifications). This commit should also be safe for 1.8.x as it does not change internal or external ABI (open-mpi#517 changes internal ABI). Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
|
|
Refer to this link for build results (access rights to CI server needed): Build Log Test FAILed. |
|
bot:retest |
|
bot:retest |
|
|
Refer to this link for build results (access rights to CI server needed): |
opal/Makefile.am
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd change this to:
lib@OPAL_LIB_PREFIX@open_pal_la_LDFLAGS = -version-info $(libopen_pal_so_version)
if NEED_LD_FINI
lib@OPAL_LIB_PREFIX@open_pal_la_LDFLAGS += -Wl,fini,opal_cleanup
endif
and define the AM_CONDITIONAL for NEED_LD_FINI to be "if linker supports it and we the compiler doesn't support the destructor attribute.
Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
|
|
Refer to this link for build results (access rights to CI server needed): Build Log Test FAILed. |
|
&^$%#. Damn Jenkins. bot:retest |
|
bot:retest |
|
|
Refer to this link for build results (access rights to CI server needed): |
Add opal destructor/fini function
Java GC bugfix
found at:
http://www.open-mpi.org/community/lists/devel/2014/07/15140.php
The finalize function is set using either the linker option -fini or
__attribute__((destructor))depending on compiler support. I haveconfirmed that this hybrid approach works with all the major
compilers. The attribute is supported by gcc, clang, llvm, xlc, and
icc. The fini function will support pgi. If a compiler/linker
combination does not support either the destructor or fini function a
message will be printed on re-init indicating it is not supported (an
improvement over the current behavior-- SEGV).
I moved the following to the destructor function:
called before MPI_Init. The only downside to this change is we will
leave the footprint of the opal class system after
MPI_Finalize. This footprint should be relatively small.
This is an alternative to #517 but the two PRs are not
mutually-exclusive (with some modifications). This commit should also
be safe for 1.8.x as it does not change internal or external ABI (#517
changes internal ABI).
Signed-off-by: Nathan Hjelm hjelmn@lanl.gov