1616 * All rights reserved.
1717 * Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
1818 * Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
19- * Copyright (c) 2014-2018 Research Organization for Information Science
20- * and Technology (RIST). All rights reserved.
19+ * Copyright (c) 2014-2019 Research Organization for Information Science
20+ * and Technology (RIST). All rights reserved.
2121 * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved.
2222 * Copyright (c) 2018 Triad National Security, LLC. All rights
2323 * reserved.
@@ -341,6 +341,11 @@ static int mca_btl_vader_component_close(void)
341341 mca_btl_vader_knem_fini ();
342342#endif
343343
344+ if (mca_btl_vader_component .mpool ) {
345+ mca_btl_vader_component .mpool -> mpool_finalize (mca_btl_vader_component .mpool );
346+ mca_btl_vader_component .mpool = NULL ;
347+ }
348+
344349 return OPAL_SUCCESS ;
345350}
346351
@@ -370,6 +375,7 @@ static int mca_btl_base_vader_modex_send (void)
370375 return rc ;
371376}
372377
378+ #if OPAL_BTL_VADER_HAVE_XPMEM || OPAL_BTL_VADER_HAVE_CMA || OPAL_BTL_VADER_HAVE_KNEM
373379static void mca_btl_vader_select_next_single_copy_mechanism (void )
374380{
375381 for (int i = 0 ; single_copy_mechanisms [i ].value != MCA_BTL_VADER_NONE ; ++ i ) {
@@ -379,10 +385,13 @@ static void mca_btl_vader_select_next_single_copy_mechanism (void)
379385 }
380386 }
381387}
388+ #endif
382389
383390static void mca_btl_vader_check_single_copy (void )
384391{
392+ #if OPAL_BTL_VADER_HAVE_XPMEM || OPAL_BTL_VADER_HAVE_CMA || OPAL_BTL_VADER_HAVE_KNEM
385393 int initial_mechanism = mca_btl_vader_component .single_copy_mechanism ;
394+ #endif
386395
387396 /* single-copy emulation is always used to support AMO's right now */
388397 mca_btl_vader_sc_emu_init ();
@@ -526,7 +535,6 @@ static mca_btl_base_module_t **mca_btl_vader_component_init (int *num_btls,
526535 mca_btl_vader_check_single_copy ();
527536
528537 if (MCA_BTL_VADER_XPMEM != mca_btl_vader_component .single_copy_mechanism ) {
529- const char * base_dir = opal_process_info .proc_session_dir ;
530538 char * sm_file ;
531539
532540 rc = asprintf (& sm_file , "%s" OPAL_PATH_SEP "vader_segment.%s.%x.%d" , mca_btl_vader_component .backing_directory ,
0 commit comments