@@ -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 );
0 commit comments