Skip to content

Commit

Permalink
STARPU_MPI_PER_NODE: Check coherency of parameters.
Browse files Browse the repository at this point in the history
Fixes #51
  • Loading branch information
sthibaul committed Jul 25, 2024
1 parent 1e8c4a5 commit ada0ee4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mpi/src/starpu_mpi_select_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ int _starpu_mpi_select_node_with_most_data(int me, int nb_nodes, struct starpu_d
int rank = starpu_data_get_rank(data);
size_t size = data->ops->get_size(data);

if (rank == STARPU_MPI_PER_NODE)
/* Each of them has it */
continue;

if (mode & STARPU_R)
size_on_nodes[rank] += size;

Expand Down
4 changes: 4 additions & 0 deletions mpi/src/starpu_mpi_task_insert.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ int _starpu_mpi_find_executee_node(starpu_data_handle_t data, enum starpu_data_a
{
_STARPU_MPI_DEBUG(100, "Another node %d had already been selected to execute the codelet, can't now set %d\n", *xrank, mpi_rank);
*inconsistent_execute = 1;
if (*xrank == STARPU_MPI_PER_NODE)
_STARPU_ERROR("Data %p has rank %d but we had STARPU_MPI_PER_NODE data before that", data, mpi_rank);
else if (mpi_rank == STARPU_MPI_PER_NODE)
_STARPU_ERROR("Data %p has rank STARPU_MPI_PER_NODE but we had non-STARPU_MPI_PER_NODE data before that (rank %d)", data, *xrank);
}
}
_STARPU_MPI_DEBUG(100, "Executing: inconsistent=%d, do_execute=%d, xrank=%d\n", *inconsistent_execute, *do_execute, *xrank);
Expand Down

0 comments on commit ada0ee4

Please sign in to comment.