1
1

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
Этот коммит содержится в:
Gilles Gouaillardet 2016-09-29 13:49:19 +09:00
родитель b55dd2442a
Коммит 0d24fad307

@ -13,6 +13,8 @@
* Copyright (c) 2010-2015 Los Alamos National Security, LLC.
* 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$
*
* Additional copyrights may follow
@ -60,11 +62,6 @@ extern bool opal_init_called;
static void __opal_attribute_destructor__ opal_cleanup (void)
{
if (!opal_initialized) {
/* nothing to do */
return;
}
/* finalize the class/object system */
opal_class_finalize();
}