Ugh. Work around an issue with memory hooks and the change from one big
library to multiple libraries that are implicitly sucked into the executable as a dependency of libmpi. The initialize hook isn't visible to libc on some linux distributions when it's in libopal and libopal isn't explicity linked into the executable. The fix is to have a duplicate initialize hook in libmpi as well as libopal. *sigh*. This commit was SVN r28164.
Этот коммит содержится в:
родитель
7bda23dd84
Коммит
fc2b3b8d46
@ -89,6 +89,16 @@
|
||||
#endif
|
||||
#include "ompi/runtime/ompi_cr.h"
|
||||
|
||||
#if defined(MEMORY_LINUX_PTMALLOC2) && MEMORY_LINUX_PTMALLOC2
|
||||
#include "opal/mca/memory/linux/memory_linux.h"
|
||||
/* So this sucks, but with OPAL in its own library that is brought in
|
||||
implicity from libmpi, there are times when the malloc initialize
|
||||
hook in the memory component doesn't work. So we have to do it
|
||||
from here, since any MPI code is going to call MPI_Init... */
|
||||
void (*__malloc_initialize_hook) (void) =
|
||||
opal_memory_linux_malloc_init_hook;
|
||||
#endif
|
||||
|
||||
/* This is required for the boundaries of the hash tables used to store
|
||||
* the F90 types returned by the MPI_Type_create_f90_XXX functions.
|
||||
*/
|
||||
|
@ -732,7 +732,7 @@ static check_result_t check(const char *name)
|
||||
}
|
||||
|
||||
/* OMPI's init function */
|
||||
static void opal_memory_linux_malloc_init_hook(void)
|
||||
void opal_memory_linux_malloc_init_hook(void)
|
||||
{
|
||||
check_result_t r1, lp, lpp;
|
||||
bool want_rcache = false, found_driver = false;
|
||||
|
@ -56,6 +56,7 @@ int opal_memory_linux_ummunotify_close(void);
|
||||
/* memory_linux_ptmalloc2.c */
|
||||
int opal_memory_linux_ptmalloc2_open(void);
|
||||
int opal_memory_linux_ptmalloc2_close(void);
|
||||
OPAL_DECLSPEC void opal_memory_linux_malloc_init_hook(void);
|
||||
|
||||
/* memory_linux_munmap.c */
|
||||
OPAL_DECLSPEC int opal_memory_linux_free_ptmalloc2_munmap(void *start, size_t length, int from_alloc);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user