Skip to content

Commit 7de01b3

Browse files
committed
ompi/init: fix abstraction violation
This fixes 8b05f30 libmpi.so cannot be built (unresolved symbols) with configure'd with --disable-mem-debug --disable-mem-profile --disable-memchecker --without-memory-manager
1 parent 7c20d3d commit 7de01b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ompi/runtime/ompi_mpi_init.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
1919
* Copyright (c) 2012-2013 Inria. All rights reserved.
2020
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
21-
* Copyright (c) 2014-2015 Research Organization for Information Science
21+
* Copyright (c) 2014-2016 Research Organization for Information Science
2222
* and Technology (RIST). All rights reserved.
2323
*
2424
* $COPYRIGHT$
@@ -98,15 +98,15 @@
9898
#endif
9999
#include "ompi/runtime/ompi_cr.h"
100100

101-
#if MEMORY_LINUX_HAVE_MALLOC_HOOK_SUPPORT
101+
#if defined(MEMORY_LINUX_PTMALLOC2) && MEMORY_LINUX_PTMALLOC2 && MEMORY_LINUX_HAVE_MALLOC_HOOK_SUPPORT
102102
#include "opal/mca/memory/linux/memory_linux.h"
103103
/* So this sucks, but with OPAL in its own library that is brought in
104104
implicity from libmpi, there are times when the malloc initialize
105105
hook in the memory component doesn't work. So we have to do it
106106
from here, since any MPI code is going to call MPI_Init... */
107107
OPAL_DECLSPEC void (*__malloc_initialize_hook) (void) =
108108
opal_memory_linux_malloc_init_hook;
109-
#endif /* MEMORY_LINUX_HAVE_MALLOC_HOOK_SUPPORT */
109+
#endif /* defined(MEMORY_LINUX_PTMALLOC2) && MEMORY_LINUX_PTMALLOC2 && MEMORY_LINUX_HAVE_MALLOC_HOOK_SUPPORT */
110110

111111
/* This is required for the boundaries of the hash tables used to store
112112
* the F90 types returned by the MPI_Type_create_f90_XXX functions.

0 commit comments

Comments
 (0)