Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 94313750 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Add function to cleanup the datatypes

parent ef2d5e22
No related branches found
No related tags found
1 merge request!204Add support for registering MPI data types
...@@ -142,6 +142,8 @@ int RUNTIME_init( CHAM_context_t *chamctxt, ...@@ -142,6 +142,8 @@ int RUNTIME_init( CHAM_context_t *chamctxt,
starpu_cublas_init(); starpu_cublas_init();
#endif #endif
starpu_cham_tile_interface_init();
return hres; return hres;
} }
...@@ -157,6 +159,8 @@ void RUNTIME_finalize( CHAM_context_t *chamctxt ) ...@@ -157,6 +159,8 @@ void RUNTIME_finalize( CHAM_context_t *chamctxt )
return; return;
} }
starpu_cham_tile_interface_fini();
#if defined(CHAMELEON_USE_CUDA) && !defined(CHAMELEON_SIMULATION) #if defined(CHAMELEON_USE_CUDA) && !defined(CHAMELEON_SIMULATION)
starpu_cublas_shutdown(); starpu_cublas_shutdown();
#endif #endif
......
...@@ -53,4 +53,7 @@ cti_interface_get( starpu_cham_tile_interface_t *interface ) ...@@ -53,4 +53,7 @@ cti_interface_get( starpu_cham_tile_interface_t *interface )
return &(interface->tile); return &(interface->tile);
} }
void starpu_cham_tile_interface_init();
void starpu_cham_tile_interface_fini();
#endif /* _cham_tile_interface_h_ */ #endif /* _cham_tile_interface_h_ */
...@@ -512,9 +512,6 @@ cti_free_datatype( MPI_Datatype *datatype ) ...@@ -512,9 +512,6 @@ cti_free_datatype( MPI_Datatype *datatype )
} }
#endif #endif
void
starpu_cham_tile_interface_init() __attribute__((constructor));
void void
starpu_cham_tile_interface_init() starpu_cham_tile_interface_init()
{ {
...@@ -528,3 +525,14 @@ starpu_cham_tile_interface_init() ...@@ -528,3 +525,14 @@ starpu_cham_tile_interface_init()
#endif #endif
} }
} }
void
starpu_cham_tile_interface_fini()
{
if ( starpu_interface_cham_tile_ops.interfaceid != STARPU_UNKNOWN_INTERFACE_ID )
{
#if defined(HAVE_STARPU_MPI_INTERFACE_DATATYPE_REGISTER)
starpu_mpi_interface_datatype_unregister( starpu_interface_cham_tile_ops.interfaceid );
#endif
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment