ompi: invokes opal_cleanup() if ompi_mpi_finalize() when possible
As long as it is illegal to call MPI_T_init_thread() after MPI_Finalize(), be gentle and release as much memory as possible in MPI_Finalize(). opal_cleanup() will be invoked again by the OPAL destructor, but will do nothing since classes was set to NULL
Этот коммит содержится в:
родитель
0d24fad307
Коммит
315a622723
@ -17,6 +17,8 @@
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
|
||||
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
*
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -485,6 +487,13 @@ int ompi_mpi_finalize(void)
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (0 == opal_initialized) {
|
||||
/* if there is no MPI_T_init_thread that has been MPI_T_finalize'd,
|
||||
* then be gentle to the app and release all the memory now (instead
|
||||
* of the opal library destructor */
|
||||
opal_class_finalize();
|
||||
}
|
||||
|
||||
/* All done */
|
||||
|
||||
done:
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user