Selaa lähdekoodia

finalize properly

Corentin Salingue 8 vuotta sitten
vanhempi
commit
2f0f8ec9e4
2 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 4 0
      src/core/workers.c
  2. 1 1
      src/drivers/mp_common/mp_common.c

+ 4 - 0
src/core/workers.c

@@ -1677,6 +1677,10 @@ void starpu_shutdown(void)
 	if (_starpu_scc_common_is_mp_initialized())
 		_starpu_scc_src_mp_deinit();
 #endif
+#ifdef STARPU_USE_MPI_MASTER_SLAVE
+    if (_starpu_mpi_common_is_mp_initialized())
+        _starpu_mpi_common_mp_deinit();
+#endif 
 	_starpu_print_idle_time();
 	_STARPU_DEBUG("Shutdown finished\n");
 

+ 1 - 1
src/drivers/mp_common/mp_common.c

@@ -332,7 +332,7 @@ void _starpu_mp_common_node_destroy(struct _starpu_mp_node *node)
 	STARPU_PTHREAD_MUTEX_DESTROY(&node->message_queue_mutex);
 
 	/* If the node is a sink then we must destroy some field */
-	if(node->kind == STARPU_MIC_SINK || node->kind == STARPU_SCC_SINK)
+	if(node->kind == STARPU_MIC_SINK || node->kind == STARPU_SCC_SINK || node->kind == STARPU_MPI_SINK)
 	{
 		int i;
 		for(i=0; i<node->nb_cores; i++)