Browse Source

Avoid any tentative definitions, not supported on MacOS

Samuel Thibault 6 years ago
parent
commit
bb783da7b0

+ 1 - 0
configure.ac

@@ -2609,6 +2609,7 @@ if test "x$STARPU_DEVEL" != x; then
 	IS_SUPPORTED_CFLAG(-Wundef)
 	IS_SUPPORTED_CFLAG(-Wshadow)
 	IS_SUPPORTED_CFLAG(-Werror=pointer-arith)
+	IS_SUPPORTED_CFLAG(-fno-common)
 	if test x$enable_debug = xyes; then
 		IS_SUPPORTED_CFLAG(-fno-optimize-sibling-calls)
 	fi

+ 7 - 7
examples/cholesky/cholesky.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011,2012                                Inria
- * Copyright (C) 2008-2017                                Université de Bordeaux
+ * Copyright (C) 2008-2017,2019                           Université de Bordeaux
  * Copyright (C) 2010-2013,2015-2017                      CNRS
  * Copyright (C) 2013                                     Thibaut Lambert
  *
@@ -158,13 +158,13 @@ static unsigned with_noctxs_p = 0;
 static unsigned chole1_p = 0;
 static unsigned chole2_p = 0;
 
-struct starpu_perfmodel chol_model_11;
-struct starpu_perfmodel chol_model_21;
-struct starpu_perfmodel chol_model_22;
+extern struct starpu_perfmodel chol_model_11;
+extern struct starpu_perfmodel chol_model_21;
+extern struct starpu_perfmodel chol_model_22;
 
-struct starpu_codelet cl11;
-struct starpu_codelet cl21;
-struct starpu_codelet cl22;
+extern struct starpu_codelet cl11;
+extern struct starpu_codelet cl21;
+extern struct starpu_codelet cl22;
 
 void chol_cpu_codelet_update_u11(void **, void *);
 void chol_cpu_codelet_update_u21(void **, void *);

+ 5 - 1
examples/cholesky/cholesky_kernels.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2008-2015,2017,2018                      Université de Bordeaux
+ * Copyright (C) 2008-2015,2017,2018-2019                 Université de Bordeaux
  * Copyright (C) 2010-2012,2015,2017                      CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -300,6 +300,10 @@ void chol_cublas_codelet_update_u11(void *descr[], void *_args)
 }
 #endif/* STARPU_USE_CUDA */
 
+struct starpu_perfmodel chol_model_11;
+struct starpu_perfmodel chol_model_21;
+struct starpu_perfmodel chol_model_22;
+
 struct starpu_codelet cl11 =
 {
 	.type = STARPU_SEQ,

+ 6 - 1
examples/heat/dw_factolu.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2008-2014,2017                           Université de Bordeaux
+ * Copyright (C) 2008-2014,2017,2019                      Université de Bordeaux
  * Copyright (C) 2010-2013,2015-2017                      CNRS
  * Copyright (C) 2013                                     Thibaut Lambert
  *
@@ -215,4 +215,9 @@ void dw_callback_v2_codelet_update_u12(void *);
 void dw_callback_v2_codelet_update_u21(void *);
 void dw_callback_v2_codelet_update_u22(void *);
 
+extern struct starpu_perfmodel model_11;
+extern struct starpu_perfmodel model_12;
+extern struct starpu_perfmodel model_21;
+extern struct starpu_perfmodel model_22;
+
 #endif /* __DW_FACTO_LU_H__ */

+ 1 - 6
examples/heat/dw_factolu_grain.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009-2011,2014-2017                      Université de Bordeaux
+ * Copyright (C) 2009-2011,2014-2017, 2019                      Université de Bordeaux
  * Copyright (C) 2012,2013                                Inria
  * Copyright (C) 2010                                     Mehdi Juhoor
  * Copyright (C) 2010-2013,2015-2017                      CNRS
@@ -38,11 +38,6 @@
 					| ((unsigned long long)(i)<<16)	\
 					| (unsigned long long)(j))))
 
-struct starpu_perfmodel model_11;
-struct starpu_perfmodel model_12;
-struct starpu_perfmodel model_21;
-struct starpu_perfmodel model_22;
-
 /*
  *	Construct the DAG
  */

+ 1 - 6
examples/heat/dw_factolu_tag.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2008-2011,2014,2015                      Université de Bordeaux
+ * Copyright (C) 2008-2011,2014,2015,2019                 Université de Bordeaux
  * Copyright (C) 2012,2013                                Inria
  * Copyright (C) 2010                                     Mehdi Juhoor
  * Copyright (C) 2010-2013,2015,2017                      CNRS
@@ -34,11 +34,6 @@
 					| ((unsigned long long)(i)<<16)	\
 					| (unsigned long long)(j))))
 
-struct starpu_perfmodel model_11;
-struct starpu_perfmodel model_12;
-struct starpu_perfmodel model_21;
-struct starpu_perfmodel model_22;
-
 static unsigned no_prio = 0;
 
 /*

+ 5 - 5
mpi/examples/mpi_lu/pxlu_kernels.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2012,2014                           Université de Bordeaux
+ * Copyright (C) 2010-2012,2014,2019                      Université de Bordeaux
  * Copyright (C) 2010-2012,2015,2017                      CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -24,9 +24,9 @@
 #define xstr(s)        str(s)
 #define STARPU_PLU_STR(name)  xstr(STARPU_PLU(name))
 
-struct starpu_codelet STARPU_PLU(cl11);
-struct starpu_codelet STARPU_PLU(cl12);
-struct starpu_codelet STARPU_PLU(cl21);
-struct starpu_codelet STARPU_PLU(cl22);
+extern struct starpu_codelet STARPU_PLU(cl11);
+extern struct starpu_codelet STARPU_PLU(cl12);
+extern struct starpu_codelet STARPU_PLU(cl21);
+extern struct starpu_codelet STARPU_PLU(cl22);
 
 #endif // __PXLU_KERNELS_H__