Explorar o código

Handle case when we have not found a target

Samuel Thibault %!s(int64=12) %!d(string=hai) anos
pai
achega
6d7b9fc372
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/datawizard/memalloc.c

+ 1 - 1
src/datawizard/memalloc.c

@@ -1103,7 +1103,7 @@ choose_target(starpu_data_handle_t handle, unsigned node)
 		}
 	}
 	/* we haven't the right to write on the disk */
-	if (starpu_node_get_kind(target) == STARPU_DISK_RAM && _starpu_get_disk_flag(target) == STARPU_DISK_NO_RECLAIM)
+	if (target != -1 && starpu_node_get_kind(target) == STARPU_DISK_RAM && _starpu_get_disk_flag(target) == STARPU_DISK_NO_RECLAIM)
 		target = -1;
 
 	return target;