瀏覽代碼

Merge remote-tracking branch 'gitlab/master' into ft_checkpoint

# Conflicts:
#	mpi/src/starpu_mpi_private.h
Romain LION 5 年之前
父節點
當前提交
6f5e92da68

+ 2 - 8
mpi/src/starpu_mpi_private.h

@@ -195,18 +195,12 @@ struct _starpu_mpi_coop_sends
 	unsigned redirects_sent;
 };
 
-struct _starpu_cache_info
-{
-	unsigned int in_cache:1;
-	unsigned int ft_induced_cache:1;
-};
-
 /** Initialized in starpu_mpi_data_register_comm */
 struct _starpu_mpi_data
 {
-	int                         magic;
+	int magic;
 	struct _starpu_mpi_node_tag node_tag;
-	unsigned int *cache_sent;
+	char *cache_sent;
 	unsigned int cache_received;
 	unsigned int ft_induced_cache_received:1;
 

+ 4 - 1
src/core/dependencies/implicit_data_deps.c

@@ -225,10 +225,13 @@ struct starpu_task *_starpu_detect_implicit_data_deps_with_handle(struct starpu_
 		struct _starpu_job *pre_sync_job = _starpu_get_job_associated_to_task(pre_sync_task);
 		struct _starpu_job *post_sync_job = _starpu_get_job_associated_to_task(post_sync_task);
 
+		if (mode & STARPU_R)
+			STARPU_ASSERT_MSG(handle->initialized || handle->init_cl, "Handle %p is not initialized, it cannot be read", handle);
+
 		if (mode & STARPU_W || mode == STARPU_REDUX)
 		{
 
-			STARPU_ASSERT_MSG(!handle->readonly, "Read-only handles can not be written to");
+			STARPU_ASSERT_MSG(!handle->readonly, "Read-only handle %p can not be written to", handle);
 
 			handle->initialized = 1;
 			/* We will change our value, disconnect from our readonly duplicates */

+ 4 - 0
src/datawizard/interfaces/data_interface.c

@@ -836,6 +836,10 @@ static void _starpu_data_unregister(starpu_data_handle_t handle, unsigned cohere
 	int sequential_consistency = handle->sequential_consistency;
 	if (sequential_consistency && !nowait)
 	{
+		/* We will acquire it in write mode to catch all dependencies,
+		 * but possibly it's not actually initialized. Fake it to avoid
+		 getting caught doing it */
+		handle->initialized = 1;
 		STARPU_ASSERT_MSG(_starpu_worker_may_perform_blocking_calls(), "starpu_data_unregister must not be called from a task or callback, perhaps you can use starpu_data_unregister_submit instead");
 
 		/* If sequential consistency is enabled, wait until data is available */

+ 2 - 2
src/debug/traces/starpu_fxt.c

@@ -333,7 +333,7 @@ static struct data_info *get_data(unsigned long handle, int mpi_rank)
 	return data;
 }
 
-static void handle_papi_event(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
+static void handle_papi_event(struct fxt_ev_64 *ev STARPU_ATTRIBUTE_UNUSED, struct starpu_fxt_options *options STARPU_ATTRIBUTE_UNUSED)
 {
 #ifdef STARPU_PAPI
 	int event_code = ev->param[0];
@@ -4450,7 +4450,7 @@ void _starpu_fxt_number_events_file_close(void)
 		for (i = 0; i <= FUT_SETUP_CODE; i++)
 		{
 			if (number_events[i] > 0)
-				fprintf(number_events_file, "0x%x\t%lu\n", i, number_events[i]);
+				fprintf(number_events_file, "0x%x\t%"PRIu64"\n", i, number_events[i]);
 		}
 
 		free(number_events);

+ 3 - 3
src/debug/traces/starpu_fxt_mpi.c

@@ -354,10 +354,10 @@ static void display_all_transfers_from_trace(FILE *out_paje_file, FILE *out_comm
 				fprintf(out_comms_file, "SendHandle: %lx\n", send_handle);
 				fprintf(out_comms_file, "RecvHandle: %lx\n", recv_handle);
 				if (cur->jobid != -1)
-					fprintf(out_comms_file, "SendJobId: %d_%lu\n", src, cur->jobid);
+					fprintf(out_comms_file, "SendJobId: %d_%ld\n", src, cur->jobid);
 				if (match->jobid != -1)
-					fprintf(out_comms_file, "RecvJobId: %d_%lu\n", dst, match->jobid);
-				fprintf(out_comms_file, "Size: %lu\n", size);
+					fprintf(out_comms_file, "RecvJobId: %d_%ld\n", dst, match->jobid);
+				fprintf(out_comms_file, "Size: %lu\n", (unsigned long)size);
 				fprintf(out_comms_file, "\n");
 			}
 		}