Skip to content

Commit 0d24fad

Browse files
committed
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
1 parent b55dd24 commit 0d24fad

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

opal/runtime/opal_finalize.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* Copyright (c) 2010-2015 Los Alamos National Security, LLC.
1414
* All rights reserved.
1515
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved
16+
* Copyright (c) 2016 Research Organization for Information Science
17+
* and Technology (RIST). All rights reserved.
1618
* $COPYRIGHT$
1719
*
1820
* Additional copyrights may follow
@@ -60,11 +62,6 @@ extern bool opal_init_called;
6062

6163
static void __opal_attribute_destructor__ opal_cleanup (void)
6264
{
63-
if (!opal_initialized) {
64-
/* nothing to do */
65-
return;
66-
}
67-
6865
/* finalize the class/object system */
6966
opal_class_finalize();
7067
}

0 commit comments

Comments
 (0)