Bladeren bron

fix warnings

Samuel Thibault 5 jaren geleden
bovenliggende
commit
e54ec1a16b

+ 1 - 1
src/core/dependencies/data_concurrency.c

@@ -245,7 +245,7 @@ static unsigned _starpu_attempt_to_submit_data_request(unsigned request_from_cod
  * This is typicall used for nodeps tasks, for which a previous task has already
  * waited for the proper conditions, and we just need to take another reference
  * for overall reference coherency.
-/* No lock is held, this acquires and releases the handle header lock */
+ * No lock is held, this acquires and releases the handle header lock */
 static void _starpu_take_data(unsigned request_from_codelet,
 						       starpu_data_handle_t handle, enum starpu_data_access_mode mode,
 						       struct _starpu_job *j)

+ 3 - 1
src/core/perfmodel/perfmodel_bus.c

@@ -91,6 +91,7 @@ static unsigned ncpus = 0;
 static unsigned nnumas = 0;
 static unsigned ncuda = 0;
 static unsigned nopencl = 0;
+#ifndef STARPU_SIMGRID
 static unsigned nmic = 0;
 static unsigned nmpi_ms = 0;
 
@@ -99,7 +100,6 @@ static unsigned nmpi_ms = 0;
 static double numa_latency[STARPU_MAXNUMANODES][STARPU_MAXNUMANODES];
 static double numa_timing[STARPU_MAXNUMANODES][STARPU_MAXNUMANODES];
 
-#ifndef STARPU_SIMGRID
 static uint64_t cuda_size[STARPU_MAXCUDADEVS];
 #endif
 #ifdef STARPU_USE_CUDA
@@ -675,6 +675,7 @@ static void measure_bandwidth_between_host_and_dev(int dev, struct dev_timing *d
 }
 #endif /* defined(STARPU_USE_CUDA) || defined(STARPU_USE_OPENCL) */
 
+#if !defined(STARPU_SIMGRID)
 static void measure_bandwidth_latency_between_numa(int numa_src, int numa_dst)
 {
 #if defined(STARPU_HAVE_HWLOC)
@@ -733,6 +734,7 @@ static void measure_bandwidth_latency_between_numa(int numa_src, int numa_dst)
 		numa_latency[numa_src][numa_dst] = 0;
 	}
 }
+#endif
 
 static void benchmark_all_gpu_devices(void)
 {

+ 1 - 1
src/core/topology.c

@@ -1876,7 +1876,7 @@ void _starpu_destroy_machine_config(struct _starpu_machine_config *config)
 #endif
 }
 
-int _starpu_bind_thread_on_cpu(int cpuid STARPU_ATTRIBUTE_UNUSED, int workerid STARPU_ATTRIBUTE_UNUSED, const char *name)
+int _starpu_bind_thread_on_cpu(int cpuid STARPU_ATTRIBUTE_UNUSED, int workerid STARPU_ATTRIBUTE_UNUSED, const char *name STARPU_ATTRIBUTE_UNUSED)
 {
 	int ret = 0;
 #ifdef STARPU_SIMGRID

+ 2 - 0
src/drivers/cuda/driver_cuda.c

@@ -1512,6 +1512,8 @@ uintptr_t _starpu_cuda_malloc_on_node(unsigned dst_node, size_t size, int flags)
 
 void _starpu_cuda_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, int flags)
 {
+	(void) dst_node;
+	(void) addr;
 	(void) size;
 	(void) flags;
 

+ 3 - 2
src/drivers/opencl/driver_opencl.c

@@ -1323,9 +1323,10 @@ uintptr_t _starpu_opencl_malloc_on_node(unsigned dst_node, size_t size, int flag
 
 void _starpu_opencl_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, int flags)
 {
-	(void)flags;
-	(void)size;
 	(void)dst_node;
+	(void)addr;
+	(void)size;
+	(void)flags;
 #ifdef STARPU_SIMGRID
 	STARPU_PTHREAD_MUTEX_LOCK(&opencl_alloc_mutex);
 	/* Sleep for the free */

+ 5 - 3
tools/starpu_replay.c

@@ -144,6 +144,7 @@ struct replay_interface
 static struct starpu_data_interface_ops replay_interface_ops;
 static void register_replay(starpu_data_handle_t handle, unsigned home_node, void *data_interface)
 {
+	(void) home_node;
 	struct replay_interface *replay_interface = data_interface;
 	unsigned node;
 	for (node = 0; node < STARPU_MAXNODES; node++)
@@ -243,6 +244,7 @@ static void free_replay_on_node(void *data_interface, unsigned dst_node)
 
 static int replay_copy(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data)
 {
+	(void) dst_interface;
 	struct replay_interface *src = src_interface;
 
 	/* We don't care about pointers */
@@ -861,7 +863,7 @@ int main(int argc, char **argv)
 						int one = 0;
 						for (i = 0; i < narch ; i++)
 						{
-							struct starpu_perfmodel_arch *arch = starpu_perfmodel_arch_comb_fetch(i);
+							arch = starpu_perfmodel_arch_comb_fetch(i);
 							perfTime[i] = starpu_perfmodel_history_based_expected_perf(&realmodel->perfmodel, arch, footprint);
 							if (!(perfTime[i] == 0 || isnan(perfTime[i])))
 								one = 1;
@@ -1020,7 +1022,7 @@ int main(int argc, char **argv)
 		else if (TEST("Modes"))
 		{
 			char * buffer = s + 7;
-			int mode_i = 0;
+			unsigned mode_i = 0;
 			const char * delim = " ";
 			char * token = strtok(buffer, delim);
 
@@ -1055,7 +1057,7 @@ int main(int argc, char **argv)
 			char *  buffer = s + 7;
 			const char * delim = " ";
 			char * token = strtok(buffer, delim);
-			int k = 0;
+			unsigned k = 0;
 
 			_STARPU_MALLOC(sizes_set, nb_parameters * sizeof(size_t));