Browse Source

Make sure we don't post disk-related requests to a disk node. This would have happened for a gpu-disk transfer.

Samuel Thibault 12 years ago
parent
commit
fa47d65684
2 changed files with 5 additions and 2 deletions
  1. 2 2
      src/datawizard/coherency.c
  2. 3 0
      src/datawizard/data_request.c

+ 2 - 2
src/datawizard/coherency.c

@@ -284,12 +284,12 @@ static int determine_request_path(starpu_data_handle_t handle,
 		/* GPU -> RAM */
 		src_nodes[0] = src_node;
 		dst_nodes[0] = STARPU_MAIN_RAM;
-		handling_nodes[0] = src_node;
+		handling_nodes[0] = starpu_node_get_kind(src_node) == STARPU_DISK_RAM ? STARPU_MAIN_RAM : src_node;
 
 		/* RAM -> GPU */
 		src_nodes[1] = STARPU_MAIN_RAM;
 		dst_nodes[1] = dst_node;
-		handling_nodes[1] = dst_node;
+		handling_nodes[1] = starpu_node_get_kind(dst_node) == STARPU_DISK_RAM ? STARPU_MAIN_RAM : dst_node;
 
 		return 2;
 	}

+ 3 - 0
src/datawizard/data_request.c

@@ -182,6 +182,9 @@ int _starpu_wait_data_request_completion(struct _starpu_data_request *r, unsigne
 /* this is non blocking */
 void _starpu_post_data_request(struct _starpu_data_request *r, unsigned handling_node)
 {
+	/* We don't have a worker for disk nodes, these should have been posted to a main RAM node */
+	STARPU_ASSERT(starpu_node_get_kind(handling_node) != STARPU_DISK_RAM);
+
 //	_STARPU_DEBUG("POST REQUEST\n");
 
 	/* If some dependencies are not fulfilled yet, we don't actually post the request */