Bläddra i källkod

fix invalid printf argument type mistakes

Nathalie Furmento 8 år sedan
förälder
incheckning
967077a22b

+ 7 - 7
examples/cholesky/cholesky_models.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010-2011, 2015  Université de Bordeaux
- * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015  CNRS
+ * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2017  CNRS
  * Copyright (C) 2011  Télécom-SudParis
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -51,7 +51,7 @@ double cpu_chol_task_11_cost(struct starpu_task *task, struct starpu_perfmodel_a
 	double cost = (((double)(n)*n*n)/1000.0f*0.894/0.79176);
 
 #ifdef STARPU_MODEL_DEBUG
-	FPRINTF(stdout, "cpu_chol_task_11_cost n %d cost %e\n", n, cost);
+	FPRINTF(stdout, "cpu_chol_task_11_cost n %u cost %e\n", n, cost);
 #endif
 
 	return PERTURBATE(cost);
@@ -66,7 +66,7 @@ double cuda_chol_task_11_cost(struct starpu_task *task, struct starpu_perfmodel_
 	double cost = (((double)(n)*n*n)/50.0f/10.75/5.088633/0.9883);
 
 #ifdef STARPU_MODEL_DEBUG
-	FPRINTF(stdout, "cuda_chol_task_11_cost n %d cost %e\n", n, cost);
+	FPRINTF(stdout, "cuda_chol_task_11_cost n %u cost %e\n", n, cost);
 #endif
 
 	return PERTURBATE(cost);
@@ -81,7 +81,7 @@ double cpu_chol_task_21_cost(struct starpu_task *task, struct starpu_perfmodel_a
 	double cost = (((double)(n)*n*n)/7706.674/0.95/0.9965);
 
 #ifdef STARPU_MODEL_DEBUG
-	FPRINTF(stdout, "cpu_chol_task_21_cost n %d cost %e\n", n, cost);
+	FPRINTF(stdout, "cpu_chol_task_21_cost n %u cost %e\n", n, cost);
 #endif
 
 	return PERTURBATE(cost);
@@ -96,7 +96,7 @@ double cuda_chol_task_21_cost(struct starpu_task *task, struct starpu_perfmodel_
 	double cost = (((double)(n)*n*n)/50.0f/10.75/87.29520);
 
 #ifdef STARPU_MODEL_DEBUG
-	FPRINTF(stdout, "cuda_chol_task_21_cost n %d cost %e\n", n, cost);
+	FPRINTF(stdout, "cuda_chol_task_21_cost n %u cost %e\n", n, cost);
 #endif
 
 	return PERTURBATE(cost);
@@ -111,7 +111,7 @@ double cpu_chol_task_22_cost(struct starpu_task *task, struct starpu_perfmodel_a
 	double cost = (((double)(n)*n*n)/50.0f/10.75/8.0760);
 
 #ifdef STARPU_MODEL_DEBUG
-	FPRINTF(stdout, "cpu_chol_task_22_cost n %d cost %e\n", n, cost);
+	FPRINTF(stdout, "cpu_chol_task_22_cost n %u cost %e\n", n, cost);
 #endif
 
 	return PERTURBATE(cost);
@@ -126,7 +126,7 @@ double cuda_chol_task_22_cost(struct starpu_task *task, struct starpu_perfmodel_
 	double cost = (((double)(n)*n*n)/50.0f/10.75/76.30666);
 
 #ifdef STARPU_MODEL_DEBUG
-	FPRINTF(stdout, "cuda_chol_task_22_cost n %d cost %e\n", n, cost);
+	FPRINTF(stdout, "cuda_chol_task_22_cost n %u cost %e\n", n, cost);
 #endif
 
 	return PERTURBATE(cost);

+ 1 - 1
mpi/tests/insert_task_recv_cache.c

@@ -153,7 +153,7 @@ int main(int argc, char **argv)
 	if (rank == 1)
 	{
 		result = (comm_amount_with_cache[0] == comm_amount_without_cache[0] * 2);
-		FPRINTF_MPI(stderr, "Communication cache mechanism is %sworking (with cache: %ld) (without cache: %ld)\n", result?"":"NOT ", comm_amount_with_cache[0], comm_amount_without_cache[0]);
+		FPRINTF_MPI(stderr, "Communication cache mechanism is %sworking (with cache: %ld) (without cache: %ld)\n", result?"":"NOT ", (long)comm_amount_with_cache[0], (long)comm_amount_without_cache[0]);
 	}
 	else
 	{

+ 2 - 2
tests/datawizard/reclaim.c

@@ -116,7 +116,7 @@ int main(int argc, char **argv)
 		mb = 1;
 #endif
 
-	FPRINTF(stderr, "Allocate %d buffers of size %d and create %u tasks\n", mb, BLOCK_SIZE, ntasks);
+	FPRINTF(stderr, "Allocate %u buffers of size %d and create %u tasks\n", mb, BLOCK_SIZE, ntasks);
 
 	float **host_ptr_array;
 	starpu_data_handle_t *handle_array;
@@ -133,7 +133,7 @@ int main(int argc, char **argv)
 		if (host_ptr_array[j] == NULL)
 		{
 			mb = j;
-			FPRINTF(stderr, "Cannot allocate more than %d buffers\n", mb);
+			FPRINTF(stderr, "Cannot allocate more than %u buffers\n", mb);
 			break;
 		}
 		starpu_variable_data_register(&handle_array[j], STARPU_MAIN_RAM, (uintptr_t)host_ptr_array[j], BLOCK_SIZE);