Browse Source

use STARPU_MAIN_RAM instead of 0 to design main memory

Nathalie Furmento 12 years ago
parent
commit
4f8ef3e329

+ 2 - 2
doc/doxygen/chapters/api/data_partition.doxy

@@ -54,12 +54,12 @@ starpu_data_partition(A_handle, &f);
 \ingroup API_Data_Partition
 \ingroup API_Data_Partition
 This unapplies one filter, thus unpartitioning the data. The
 This unapplies one filter, thus unpartitioning the data. The
 pieces of data are collected back into one big piece in the
 pieces of data are collected back into one big piece in the
-\p gathering_node (usually 0). Tasks working on the partitioned data must
+\p gathering_node (usually STARPU_MAIN_RAM). Tasks working on the partitioned data must
 be already finished when calling starpu_data_unpartition().
 be already finished when calling starpu_data_unpartition().
 
 
 Here an example of how to use the function.
 Here an example of how to use the function.
 \code{.c}
 \code{.c}
-starpu_data_unpartition(A_handle, 0);
+starpu_data_unpartition(A_handle, STARPU_MAIN_RAM);
 \endcode
 \endcode
 
 
 \fn int starpu_data_get_nb_children(starpu_data_handle_t handle)
 \fn int starpu_data_get_nb_children(starpu_data_handle_t handle)

+ 2 - 2
doc/texinfo/chapters/api.texi

@@ -1584,11 +1584,11 @@ starpu_data_partition(A_handle, &f);
 
 
 @deftypefun void starpu_data_unpartition (starpu_data_handle_t @var{root_data}, unsigned @var{gathering_node})
 @deftypefun void starpu_data_unpartition (starpu_data_handle_t @var{root_data}, unsigned @var{gathering_node})
 This unapplies one filter, thus unpartitioning the data. The pieces of data are
 This unapplies one filter, thus unpartitioning the data. The pieces of data are
-collected back into one big piece in the @var{gathering_node} (usually 0). Tasks
+collected back into one big piece in the @var{gathering_node} (usually STARPU_MAIN_RAM). Tasks
 working on the partitioned data must be already finished when calling @code{starpu_data_unpartition}.
 working on the partitioned data must be already finished when calling @code{starpu_data_unpartition}.
 @cartouche
 @cartouche
 @smallexample
 @smallexample
-starpu_data_unpartition(A_handle, 0);
+starpu_data_unpartition(A_handle, STARPU_MAIN_RAM);
 @end smallexample
 @end smallexample
 @end cartouche
 @end cartouche
 @end deftypefun
 @end deftypefun

+ 2 - 2
examples/cholesky/cholesky_tag.c

@@ -2,7 +2,7 @@
  *
  *
  * Copyright (C) 2009-2013  Université de Bordeaux 1
  * Copyright (C) 2009-2013  Université de Bordeaux 1
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
  * it under the terms of the GNU Lesser General Public License as published by
@@ -234,7 +234,7 @@ static void _cholesky(starpu_data_handle_t dataA, unsigned nblocks)
 	/* stall the application until the end of computations */
 	/* stall the application until the end of computations */
 	starpu_tag_wait(TAG11(nblocks-1));
 	starpu_tag_wait(TAG11(nblocks-1));
 
 
-	starpu_data_unpartition(dataA, 0);
+	starpu_data_unpartition(dataA, STARPU_MAIN_RAM);
 
 
 	end = starpu_timing_now();
 	end = starpu_timing_now();
 
 

+ 1 - 1
examples/heat/dw_factolu_tag.c

@@ -316,7 +316,7 @@ void dw_factoLU_tag(float *matA, unsigned size, unsigned ld, unsigned nblocks, u
 	dw_codelet_facto_v3(dataA, nblocks);
 	dw_codelet_facto_v3(dataA, nblocks);
 
 
 	/* gather all the data */
 	/* gather all the data */
-	starpu_data_unpartition(dataA, 0);
+	starpu_data_unpartition(dataA, STARPU_MAIN_RAM);
 
 
 	starpu_data_unregister(dataA);
 	starpu_data_unregister(dataA);
 
 

+ 2 - 2
sc_hypervisor/examples/cholesky/cholesky_grain_tag.c

@@ -234,7 +234,7 @@ static void cholesky_grain_rec(float *matA, unsigned size, unsigned ld, unsigned
 	{
 	{
 		/* stall the application until the end of computations */
 		/* stall the application until the end of computations */
 		starpu_tag_wait(TAG11_AUX(nblocks-1, reclevel));
 		starpu_tag_wait(TAG11_AUX(nblocks-1, reclevel));
-		starpu_data_unpartition(dataA, 0);
+		starpu_data_unpartition(dataA, STARPU_MAIN_RAM);
 		starpu_data_unregister(dataA);
 		starpu_data_unregister(dataA);
 		return;
 		return;
 	}
 	}
@@ -258,7 +258,7 @@ static void cholesky_grain_rec(float *matA, unsigned size, unsigned ld, unsigned
 
 
 		free(tag_array);
 		free(tag_array);
 
 
-		starpu_data_unpartition(dataA, 0);
+		starpu_data_unpartition(dataA, STARPU_MAIN_RAM);
 		starpu_data_unregister(dataA);
 		starpu_data_unregister(dataA);
 
 
 		float *newmatA = &matA[nbigblocks*(size/nblocks)*(ld+1)];
 		float *newmatA = &matA[nbigblocks*(size/nblocks)*(ld+1)];

+ 1 - 1
sc_hypervisor/examples/cholesky/cholesky_implicit.c

@@ -157,7 +157,7 @@ static void _cholesky(starpu_data_handle_t dataA, unsigned nblocks)
 	if (bound)
 	if (bound)
 		starpu_bound_stop();
 		starpu_bound_stop();
 
 
-	starpu_data_unpartition(dataA, 0);
+	starpu_data_unpartition(dataA, STARPU_MAIN_RAM);
 
 
 	gettimeofday(&end, NULL);
 	gettimeofday(&end, NULL);
 
 

+ 1 - 1
sc_hypervisor/examples/cholesky/cholesky_tag.c

@@ -225,7 +225,7 @@ static void _cholesky(starpu_data_handle_t dataA, unsigned nblocks)
 	/* stall the application until the end of computations */
 	/* stall the application until the end of computations */
 	starpu_tag_wait(TAG11(nblocks-1));
 	starpu_tag_wait(TAG11(nblocks-1));
 
 
-	starpu_data_unpartition(dataA, 0);
+	starpu_data_unpartition(dataA, STARPU_MAIN_RAM);
 
 
 	gettimeofday(&end, NULL);
 	gettimeofday(&end, NULL);
 
 

+ 2 - 2
tests/datawizard/acquire_cb_insert.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
  * it under the terms of the GNU Lesser General Public License as published by
@@ -112,7 +112,7 @@ int main(int argc, char **argv)
 
 
 	ret = starpu_task_wait_for_all();
 	ret = starpu_task_wait_for_all();
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_wait_for_all");
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_wait_for_all");
-	starpu_data_unpartition(f_handle, 0);
+	starpu_data_unpartition(f_handle, STARPU_MAIN_RAM);
 	starpu_data_unregister(f_handle);
 	starpu_data_unregister(f_handle);
 	starpu_data_unregister(x_handle);
 	starpu_data_unregister(x_handle);
 
 

+ 1 - 1
tests/datawizard/data_lookup.c

@@ -127,7 +127,7 @@ static void test_filters(void)
 		STARPU_ASSERT(starpu_data_lookup(children_pointers[i]) == child);
 		STARPU_ASSERT(starpu_data_lookup(children_pointers[i]) == child);
 	}
 	}
 
 
-	starpu_data_unpartition(handle, 0);
+	starpu_data_unpartition(handle, STARPU_MAIN_RAM);
 
 
 	for (i = 0; i < CHILDREN_COUNT; i++)
 	for (i = 0; i < CHILDREN_COUNT; i++)
 	{
 	{