opal: always run opal_class_finalize in the opal_cleanup destructor
if MPI_Init[_thread]/MPI_Finalize and MPI_T_init_thread/MPI_T_finalize are balanced, opal_initialized is zero, and hence opal_cleanup destructor never invokes opal_class_finalize. if MPI_Init[_thread] nor MPI_T_init_thread have been called, classes is NULL, so opal_class_finalize does nothing
Этот коммит содержится в:
родитель
b55dd2442a
Коммит
0d24fad307
@ -13,6 +13,8 @@
|
|||||||
* Copyright (c) 2010-2015 Los Alamos National Security, LLC.
|
* Copyright (c) 2010-2015 Los Alamos National Security, LLC.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved
|
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved
|
||||||
|
* Copyright (c) 2016 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -60,11 +62,6 @@ extern bool opal_init_called;
|
|||||||
|
|
||||||
static void __opal_attribute_destructor__ opal_cleanup (void)
|
static void __opal_attribute_destructor__ opal_cleanup (void)
|
||||||
{
|
{
|
||||||
if (!opal_initialized) {
|
|
||||||
/* nothing to do */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* finalize the class/object system */
|
/* finalize the class/object system */
|
||||||
opal_class_finalize();
|
opal_class_finalize();
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user