Unpartitioning requires register(home_node) with home_node == STARPU_MAIN_RAM
Assume the following program executed by 3 nodes
ptr = me == 0 ? malloc(<very big>) : NULL
starpu_data_register(handle, me == 0 ? ptr : NULL, me == 0 ? STARPU_MAIN_RAM : -1)
starpu_mpi_data_register(handle, 0)
starpu_mpi_data_migrate(handle, 1)
starpu_data_partition_plan(handle, filter, handles)
starpu_data_partition_submit(handle, 2, handles)
starpu_mpi_task_insert(cl, STARPU_RW, handles[0], ON_NODE, 2)
starpu_mpi_task_insert(cl, STARPU_RW, handles[1], ON_NODE, 2)
starpu_data_unpartition_submit(handle, vhandles)
starpu_data_unpartition_clean(handle, 2, vhandles)
The program fails when unpartioning as 1 (which is the owner of handle
according to the StarPU-MPI layer) has not registered the value on its home_node
(from the StarPU layer). Partioning is however possible (1 holds a valid copy of the data initialized by 0).
The program works if me == 0
is transformed in me == 0 || me == 1
but it is not the intended starting allocation.
I think either of those two could be done :
- not allow partitionning if unpartitionning cannot be done (i.e. require that the "gathering node" exists in both case so that the program fails "properly")
- allow unpartioning if the "gathering node" doesn't exist but the handle has been allocated (so that the program is operational)