* Fix issue with duplicate symbol for the initialize hook due to it existing in both libmpi and libopen-pal by removing the one for libopen-pal. This won't work if we eventually need registration caching in opal/orte, but I'm hoping that by that point, OFED will have gotten off its butt and properly integrated ummunotify into the verbs layer so that this code can go away.
At the same time, fix a minor issue where the init hook was being called twice, once by the libc malloc and once by our malloc by removing the call from our malloc.
1.1 --- a/ompi/runtime/ompi_mpi_init.c Thu Mar 21 16:05:50 2013 +0000
1.2 +++ b/ompi/runtime/ompi_mpi_init.c Thu Mar 21 23:05:54 2013 +0000
1.3 @@ -95,7 +95,7 @@
1.4 implicity from libmpi, there are times when the malloc initialize
1.5 hook in the memory component doesn't work. So we have to do it
1.6 from here, since any MPI code is going to call MPI_Init... */
1.7 -void (*__malloc_initialize_hook) (void) =
1.8 +OPAL_DECLSPEC void (*__malloc_initialize_hook) (void) =
1.9 opal_memory_linux_malloc_init_hook;
1.10 #endif
1.11
2.1 --- a/opal/mca/memory/linux/arena.c Thu Mar 21 16:05:50 2013 +0000
2.2 +++ b/opal/mca/memory/linux/arena.c Thu Mar 21 23:05:54 2013 +0000
2.3 @@ -462,8 +462,11 @@
2.4 if(s[0]) mALLOPt(M_CHECK_ACTION, (int)(s[0] - '0'));
2.5 __malloc_check_init();
2.6 }
2.7 +#if 0
2.8 + /* OMPI Change: Don't call the initialize hook; it was us. */
2.9 if(__malloc_initialize_hook != NULL)
2.10 (*__malloc_initialize_hook)();
2.11 +#endif
2.12
2.13 __malloc_initialized = 1;
2.14 }
3.1 --- a/opal/mca/memory/linux/hooks.c Thu Mar 21 16:05:50 2013 +0000
3.2 +++ b/opal/mca/memory/linux/hooks.c Thu Mar 21 23:05:54 2013 +0000
3.3 @@ -892,11 +892,6 @@
3.4
3.5
3.6
3.7 -/* OMPI change: This is the symbol to override to make the above
3.8 - function get fired during malloc initialization time. */
3.9 -void (*__malloc_initialize_hook) (void) =
3.10 - opal_memory_linux_malloc_init_hook;
3.11 -
3.12 /*
3.13 * Local variables:
3.14 * c-basic-offset: 4