Mentions légales du service

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

starpu/descriptor: fix unregister/flush

parent 8667b7fe
No related branches found
No related tags found
1 merge request!256Update on descriptors
......@@ -241,8 +241,8 @@ void RUNTIME_desc_destroy( CHAM_desc_t *desc )
for (n = 0; n < lnt; n++) {
for (m = 0; m < lmt; m++)
{
if (*handle != NULL) {
starpu_data_unregister(*handle);
if ( *handle != NULL ) {
starpu_data_unregister_submit(*handle);
*handle = NULL;
}
handle++;
......@@ -384,14 +384,25 @@ void RUNTIME_data_flush( const RUNTIME_sequence_t *sequence,
{
int64_t mm = m + (A->i / A->mb);
int64_t nn = n + (A->j / A->nb);
starpu_data_handle_t *handle = A->schedopt;
handle += ((int64_t)A->lmt) * nn + mm;
int64_t shift = ((int64_t)A->lmt) * nn + mm;
starpu_data_handle_t *handle = A->schedopt + shift;
CHAM_tile_t *tile = A->tiles + shift;
if (*handle == NULL) {
return;
}
/*
* TODO: check later, a better check would be to check if we
* partitionned the handle or not
*
* Right now, we can't flush a partitionned handle, we would need to
* unpartition first, so we flush only the children.
*/
if ( tile->format & CHAMELEON_TILE_DESC ) {
CHAMELEON_Desc_Flush( tile->mat, sequence );
}
#if defined(CHAMELEON_USE_MPI)
starpu_mpi_cache_flush( MPI_COMM_WORLD, *handle );
#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