Mentions légales du service

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

Reduce the number of data registration

parent 9280e415
Branches
Tags
1 merge request!321Feature: Add a redispatch function to change the data distribution of a given descriptor.
...@@ -416,11 +416,23 @@ void RUNTIME_data_migrate( const RUNTIME_sequence_t *sequence, ...@@ -416,11 +416,23 @@ void RUNTIME_data_migrate( const RUNTIME_sequence_t *sequence,
lhandle = *handle; lhandle = *handle;
if ( lhandle == NULL ) { if ( lhandle == NULL ) {
int involved;
old_rank = A->get_rankof( A, Am, An );
involved = (A->myrank == old_rank) || (A->myrank == new_rank);
/* Quick return */
if ( !involved ) {
return;
}
/* Register the data */ /* Register the data */
lhandle = RUNTIME_data_getaddr( A, Am, An ); lhandle = RUNTIME_data_getaddr( A, Am, An );
} }
old_rank = starpu_mpi_data_get_rank( lhandle );
/* Update the rank if has been moved already (cf qr for example) */
old_rank = starpu_mpi_data_get_rank( lhandle );
assert( old_rank == A->get_rankof( A, Am, An ) );
if ( old_rank != new_rank ) { if ( old_rank != new_rank ) {
starpu_mpi_data_migrate( MPI_COMM_WORLD, lhandle, new_rank ); starpu_mpi_data_migrate( MPI_COMM_WORLD, lhandle, new_rank );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment