Skip to content

Commit 5a9ba57

Browse files
authored
Merge pull request #2217 from hjelmn/v2.x_ptmalloc2
Remove ptmalloc2 hooks from v2.1.x
2 parents f56ea5d + ee4890a commit 5a9ba57

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+65
-11335
lines changed

opal/mca/btl/openib/btl_openib_component.c

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2536,39 +2536,6 @@ btl_openib_component_init(int *num_btl_modules,
25362536
goto no_btls;
25372537
}
25382538

2539-
/* If we are using ptmalloc2 and there are no posix threads
2540-
available, this will cause memory corruption. Refuse to run.
2541-
Right now, ptmalloc2 is the only memory manager that we have on
2542-
OS's that support OpenFabrics that provide both FREE and MUNMAP
2543-
support, so the following test is [currently] good enough... */
2544-
value = opal_mem_hooks_support_level();
2545-
2546-
/* If we have a memory manager available, and
2547-
opal_leave_pinned==-1, then unless the user explicitly set
2548-
opal_leave_pinned_pipeline==0, then set opal_leave_pinned to 1.
2549-
2550-
We have a memory manager if we have both FREE and MUNMAP
2551-
support */
2552-
if ((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) ==
2553-
((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) & value)) {
2554-
if (0 == opal_leave_pinned_pipeline &&
2555-
-1 == opal_leave_pinned) {
2556-
opal_leave_pinned = 1;
2557-
}
2558-
} else {
2559-
opal_leave_pinned = 0;
2560-
opal_leave_pinned_pipeline = 0;
2561-
}
2562-
2563-
#if OPAL_CUDA_SUPPORT
2564-
if (mca_btl_openib_component.cuda_want_gdr && (0 == opal_leave_pinned)) {
2565-
opal_show_help("help-mpi-btl-openib.txt",
2566-
"CUDA_gdr_and_nopinned", true,
2567-
opal_process_info.nodename);
2568-
goto no_btls;
2569-
}
2570-
#endif /* OPAL_CUDA_SUPPORT */
2571-
25722539
index = mca_base_var_find("ompi", "btl", "openib", "max_inline_data");
25732540
if (index >= 0) {
25742541
if (OPAL_SUCCESS == mca_base_var_get_value(index, NULL, &source, NULL)) {
@@ -2905,6 +2872,22 @@ btl_openib_component_init(int *num_btl_modules,
29052872
mca_btl_openib_component.if_exclude_list = NULL;
29062873
}
29072874

2875+
/* If we are using ptmalloc2 and there are no posix threads
2876+
available, this will cause memory corruption. Refuse to run.
2877+
Right now, ptmalloc2 is the only memory manager that we have on
2878+
OS's that support OpenFabrics that provide both FREE and MUNMAP
2879+
support, so the following test is [currently] good enough... */
2880+
value = opal_mem_hooks_support_level();
2881+
2882+
#if OPAL_CUDA_SUPPORT
2883+
if (mca_btl_openib_component.cuda_want_gdr && (0 == opal_leave_pinned)) {
2884+
opal_show_help("help-mpi-btl-openib.txt",
2885+
"CUDA_gdr_and_nopinned", true,
2886+
opal_process_info.nodename);
2887+
goto no_btls;
2888+
}
2889+
#endif /* OPAL_CUDA_SUPPORT */
2890+
29082891
mca_btl_openib_component.memory_registration_verbose = opal_output_open(NULL);
29092892
opal_output_set_verbosity (mca_btl_openib_component.memory_registration_verbose,
29102893
mca_btl_openib_component.memory_registration_verbose_level);

opal/mca/btl/ugni/btl_ugni_component.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -335,26 +335,6 @@ btl_ugni_component_close(void)
335335
return OPAL_SUCCESS;
336336
}
337337

338-
static void mca_btl_ugni_autoset_leave_pinned (void) {
339-
if (MCA_BTL_UGNI_RCACHE_UDREG != mca_btl_ugni_component.rcache_type) {
340-
int value = opal_mem_hooks_support_level();
341-
if ((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) ==
342-
((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) & value)) {
343-
/* Set leave pinned to 1 if leave pinned pipeline is not set */
344-
if (-1 == opal_leave_pinned) {
345-
opal_leave_pinned = !opal_leave_pinned_pipeline;
346-
}
347-
} else {
348-
opal_leave_pinned = 0;
349-
opal_leave_pinned_pipeline = 0;
350-
}
351-
} else if (-1 == opal_leave_pinned) {
352-
/* if udreg is in use we can set leave pinned without checking for the
353-
* memory hooks. */
354-
opal_leave_pinned = !opal_leave_pinned_pipeline;
355-
}
356-
}
357-
358338
static mca_btl_base_module_t **
359339
mca_btl_ugni_component_init (int *num_btl_modules,
360340
bool enable_progress_threads,
@@ -413,8 +393,6 @@ mca_btl_ugni_component_init (int *num_btl_modules,
413393
}
414394
}
415395

416-
mca_btl_ugni_autoset_leave_pinned ();
417-
418396
mca_btl_ugni_module.super.btl_rdma_pipeline_send_length = mca_btl_ugni_module.super.btl_eager_limit;
419397

420398
for (i = 0 ; i < mca_btl_ugni_component.ugni_num_btls ; ++i) {

opal/mca/memory/linux/COPYRIGHT-ptmalloc2.txt

Lines changed: 0 additions & 19 deletions
This file was deleted.

opal/mca/memory/linux/ChangeLog-ptmalloc2.txt

Lines changed: 0 additions & 181 deletions
This file was deleted.

opal/mca/memory/linux/Makefile.am

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)