Explorar el Código

Handle case when we have not found a target

Samuel Thibault hace 12 años
padre
commit
6d7b9fc372
Se han modificado 1 ficheros con 1 adiciones y 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;