|
@@ -537,6 +537,9 @@ static void transfer_submit(struct transfer *transfer)
|
|
|
/* Data transfer issued by StarPU */
|
|
|
int _starpu_simgrid_transfer(size_t size, unsigned src_node, unsigned dst_node, struct _starpu_data_request *req)
|
|
|
{
|
|
|
+ /* Simgrid does not like 0-bytes transfers */
|
|
|
+ if (!size)
|
|
|
+ return 0;
|
|
|
msg_task_t task;
|
|
|
msg_host_t *hosts = calloc(2, sizeof(*hosts));
|
|
|
double *computation = calloc(2, sizeof(*computation));
|
|
@@ -548,11 +551,7 @@ int _starpu_simgrid_transfer(size_t size, unsigned src_node, unsigned dst_node,
|
|
|
hosts[0] = _starpu_simgrid_memory_node_get_host(src_node);
|
|
|
hosts[1] = _starpu_simgrid_memory_node_get_host(dst_node);
|
|
|
STARPU_ASSERT(hosts[0] != hosts[1]);
|
|
|
- if (size)
|
|
|
- communication[1] = size;
|
|
|
- else
|
|
|
- /* Simgrid does not like 0-bytes transfers, fake one byte */
|
|
|
- communication[1] = 1;
|
|
|
+ communication[1] = size;
|
|
|
|
|
|
task = MSG_parallel_task_create("copy", 2, hosts, computation, communication, NULL);
|
|
|
|