Browse Source

Fix crash in simgrid mode with void datas

Samuel Thibault 9 years ago
parent
commit
204e364248
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/core/simgrid.c

+ 5 - 1
src/core/simgrid.c

@@ -544,7 +544,11 @@ int _starpu_simgrid_transfer(size_t size, unsigned src_node, unsigned dst_node,
 	hosts[0] = _starpu_simgrid_memory_node_get_host(src_node);
 	hosts[0] = _starpu_simgrid_memory_node_get_host(src_node);
 	hosts[1] = _starpu_simgrid_memory_node_get_host(dst_node);
 	hosts[1] = _starpu_simgrid_memory_node_get_host(dst_node);
 	STARPU_ASSERT(hosts[0] != hosts[1]);
 	STARPU_ASSERT(hosts[0] != hosts[1]);
-	communication[1] = size;
+	if (size)
+		communication[1] = size+0.000001;
+	else
+		/* Simgrid does not like 0-bytes transfers, fake one byte */
+		communication[1] = 1;
 
 
 	task = MSG_parallel_task_create("copy", 2, hosts, computation, communication, NULL);
 	task = MSG_parallel_task_create("copy", 2, hosts, computation, communication, NULL);