Explorar o código

Fix crash in simgrid mode with void datas

Samuel Thibault %!s(int64=9) %!d(string=hai) anos
pai
achega
204e364248
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  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[1] = _starpu_simgrid_memory_node_get_host(dst_node);
 	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);