Explorar o código

Modified measurements and scripts for bench

Andra Hugo %!s(int64=14) %!d(string=hai) anos
pai
achega
f7e89f74ed

+ 3 - 2
examples/cholesky_and_lu/cholesky/cholesky.h

@@ -74,8 +74,9 @@ void chol_cublas_codelet_update_u22(void *descr[], void *_args);
 int run_cholesky_grain_tag(struct starpu_sched_ctx *sched_ctx, int argc, char **argv);
 int run_cholesky_implicit(struct starpu_sched_ctx *sched_ctx, int argc, char **argv);
 int run_cholesky_tag(struct starpu_sched_ctx *sched_ctx, int argc, char **argv);
-int run_cholesky_tile_tag(struct starpu_sched_ctx *sched_ctx, int argc, char **argv);
-int finish_cholesky_tile_tag();
+int run_cholesky_tile_tag(struct starpu_sched_ctx *sched_ctx, int argc, char **argv, 
+			  struct timeval *start);
+int finish_cholesky_tile_tag(struct timeval *end);
 
 extern struct starpu_perfmodel_t chol_model_11;
 extern struct starpu_perfmodel_t chol_model_21;

+ 12 - 16
examples/cholesky_and_lu/cholesky/cholesky_tile_tag.c

@@ -20,9 +20,8 @@
 /* A [ y ] [ x ] */
 float *A[NMAXBLOCKS][NMAXBLOCKS];
 starpu_data_handle A_state[NMAXBLOCKS][NMAXBLOCKS];
-struct timeval start;
-struct timeval end;
-
+//struct timeval start;
+//struct timeval end;
 
 /*
  *	Some useful functions
@@ -184,7 +183,7 @@ static void create_task_22(unsigned k, unsigned i, unsigned j, struct starpu_sch
  *	and construct the DAG
  */
 
-static void cholesky_no_stride(struct starpu_sched_ctx *sched_ctx)
+static void cholesky_no_stride(struct starpu_sched_ctx *sched_ctx, struct timeval *start)
 {
 	struct starpu_task *entry_task = NULL;
 
@@ -215,12 +214,14 @@ static void cholesky_no_stride(struct starpu_sched_ctx *sched_ctx)
 	}
 
 	/* schedule the codelet */
-	gettimeofday(&start, NULL);
+	if(start != NULL){
+		gettimeofday(start, NULL);
+	}
 	starpu_task_submit_to_ctx(entry_task, sched_ctx);
 
 }
 
-int run_cholesky_tile_tag(struct starpu_sched_ctx *sched_ctx, int argc, char **argv)
+int run_cholesky_tile_tag(struct starpu_sched_ctx *sched_ctx, int argc, char **argv, struct timeval *start)
 {
 	unsigned x, y;
 	unsigned i, j;
@@ -290,27 +291,22 @@ int run_cholesky_tile_tag(struct starpu_sched_ctx *sched_ctx, int argc, char **a
 		}
 	}
 
-	cholesky_no_stride(sched_ctx);
+	cholesky_no_stride(sched_ctx, start);
 
 	//	starpu_shutdown();
 	return 0;
 }
 
 
-int finish_cholesky_tile_tag(){	
+int finish_cholesky_tile_tag(struct timeval *end){	
   //	starpu_helper_cublas_shutdown();
 
 	/* stall the application until the end of computations */
 	starpu_tag_wait(TAG11(nblocks-1));
 
-	gettimeofday(&end, NULL);
-
-	double timing = (double)((end.tv_sec - start.tv_sec)*1000000 + (end.tv_usec - start.tv_usec));
-	//	fprintf(stderr, "Computation took (in ms)\n");
-	printf("%2.2f ", timing/1000);
-
-	double flop = (1.0f*size*size*size)/3.0f;
-	//	fprintf(stderr, "Synthetic GFlops : %2.2f\n", (flop/timing/1000.0f));
+	if(end != NULL){
+	  gettimeofday(end, NULL);
+	}
 
 	return 0;
 }

+ 7 - 14
examples/cholesky_and_lu/cholesky_and_lu.c

@@ -5,36 +5,29 @@ int main(int argc, char **argv)
 {
   struct timeval start;
   struct timeval end;
-  gettimeofday(&start, NULL);
 
   starpu_init(NULL);
 
   struct starpu_sched_ctx sched_ctx;
   int procs[] = {1, 2, 3};
-  starpu_create_sched_ctx(&sched_ctx, "random", procs, 3);
+  starpu_create_sched_ctx(&sched_ctx, "heft", procs, 3);
 
-  run_cholesky_tile_tag(&sched_ctx, argc, argv);
+  run_cholesky_tile_tag(&sched_ctx, argc, argv, &start);
 
   struct starpu_sched_ctx sched_ctx2;
-  int procs2[] = {0, 4, 5, 6, 7};
-  starpu_create_sched_ctx(&sched_ctx2, "random", procs2, 5);
+  int procs2[] = {0, 4, 5, 6, 7, 8, 9, 10, 11};
+  starpu_create_sched_ctx(&sched_ctx2, "heft", procs2, 5);
 
-  run_lu(&sched_ctx2, argc, argv);
+  run_lu(&sched_ctx2, argc, argv, NULL);
 
-  finish_cholesky_tile_tag();
-  finish_lu();
+  finish_cholesky_tile_tag(NULL);
+  finish_lu(&end);
   //starpu_task_wait_for_all();
 
   starpu_shutdown();
 
-  gettimeofday(&end, NULL);
-
   double timing = (double)((end.tv_sec - start.tv_sec)*1000000 + (end.tv_usec - start.tv_usec));
-  //      fprintf(stderr, "Computation took (in ms)\n");                                          
   printf("%2.2f\n", timing/1000);
 
-  double flop = (1.0f*size*size*size)/3.0f;
-  //      fprintf(stderr, "Synthetic GFlops : %2.2f\n", (flop/timing/1000.0f));               
-  
   return 0;
 }

+ 10 - 21
examples/cholesky_and_lu/lu/lu_example.c

@@ -35,8 +35,8 @@ static unsigned profile = 0;
 static unsigned bound = 0;
 static unsigned bounddeps = 0;
 static unsigned boundprio = 0;
-struct timeval lu_start;
-struct timeval lu_end;
+//struct timeval lu_start;
+//struct timeval lu_end;
 unsigned *ipiv;
 
 TYPE *A, *A_saved;
@@ -265,7 +265,7 @@ static void check_result(void)
 		exit(-1);
 }
 
-int run_lu(struct starpu_sched_ctx *sched_ctx, int argc, char **argv)
+int run_lu(struct starpu_sched_ctx *sched_ctx, int argc, char **argv, struct timeval *start)
 {
 	lu_parse_args(argc, argv);
 
@@ -296,21 +296,19 @@ int run_lu(struct starpu_sched_ctx *sched_ctx, int argc, char **argv)
 			A_blocks = malloc(lu_nblocks*lu_nblocks*sizeof(TYPE **));
 			copy_matrix_into_blocks();
 
-			STARPU_LU(lu_decomposition_pivot_no_stride)(A_blocks, ipiv, lu_size, lu_size, lu_nblocks, sched_ctx);
+			STARPU_LU(lu_decomposition_pivot_no_stride)(A_blocks, ipiv, lu_size, lu_size, lu_nblocks, sched_ctx, start);
 
 			copy_blocks_into_matrix();
 			free(A_blocks);
 		}
 		else 
 		{
-			gettimeofday(&lu_start, NULL);
-
-			STARPU_LU(lu_decomposition_pivot)(A, ipiv, lu_size, lu_size, lu_nblocks, sched_ctx);
+			STARPU_LU(lu_decomposition_pivot)(A, ipiv, lu_size, lu_size, lu_nblocks, sched_ctx, start);
 		}
 	}
 	else
 	{
-	  STARPU_LU(lu_decomposition)(A, lu_size, lu_size, lu_nblocks, sched_ctx);
+	  STARPU_LU(lu_decomposition)(A, lu_size, lu_size, lu_nblocks, sched_ctx, start);
 	}
 
 
@@ -319,32 +317,23 @@ int run_lu(struct starpu_sched_ctx *sched_ctx, int argc, char **argv)
 	return 0;
 }
 
-int finish_lu()
+int finish_lu(struct timeval *end)
 {
 
 	if (pivot)
 	{
 		if (no_stride)
 		{
-			finish_lu_decomposition_pivot_no_stride(lu_nblocks);
+		  finish_lu_decomposition_pivot_no_stride(lu_nblocks, end);
 		}
 		else 
 		{
-			finish_lu_decomposition_pivot(lu_nblocks);
-			gettimeofday(&lu_end, NULL);
-			
-			double timing = (double)((lu_end.tv_sec - lu_start.tv_sec)*1000000 + (lu_end.tv_usec - lu_start.tv_usec));
-			
-			unsigned n = lu_size;
-			double flop = (2.0f*n*n*n)/3.0f;
-			fprintf(stderr, "Synthetic GFlops (TOTAL) : \n");
-			fprintf(stdout, "%d	%6.2f\n", n, (flop/timing/1000.0f));
-
+		  finish_lu_decomposition_pivot(lu_nblocks, end);
 		}
 	}
 	else
 	{
-	  finish_lu_decomposition(lu_nblocks);
+	  finish_lu_decomposition(lu_nblocks, end);
 	}
 
   

+ 12 - 16
examples/cholesky_and_lu/lu/xlu.c

@@ -29,8 +29,8 @@
 					| (unsigned long long)(j))))
 
 static unsigned no_prio = 0;
-struct timeval xlu_start;
-struct timeval xlu_end;
+//struct timeval xlu_start;
+//struct timeval xlu_end;
 starpu_data_handle xlu_dataA;
 
 
@@ -165,7 +165,7 @@ static void create_task_22(starpu_data_handle dataA, unsigned k, unsigned i, uns
  *	code to bootstrap the factorization 
  */
 
-static void dw_codelet_facto_v3(starpu_data_handle dataA, unsigned nblocks, struct starpu_sched_ctx *sched_ctx)
+static void dw_codelet_facto_v3(starpu_data_handle dataA, unsigned nblocks, struct starpu_sched_ctx *sched_ctx, struct timeval *start)
 {
 	struct starpu_task *entry_task = NULL;
 
@@ -200,7 +200,9 @@ static void dw_codelet_facto_v3(starpu_data_handle dataA, unsigned nblocks, stru
 	}
 
 	/* schedule the codelet */
-	gettimeofday(&xlu_start, NULL);
+	if(start != NULL){
+	  gettimeofday(start, NULL);
+	}
 	int ret = starpu_task_submit_to_ctx(entry_task, sched_ctx);
 	if (STARPU_UNLIKELY(ret == -ENODEV))
 	{
@@ -210,7 +212,7 @@ static void dw_codelet_facto_v3(starpu_data_handle dataA, unsigned nblocks, stru
 
 }
 
-void STARPU_LU(lu_decomposition)(TYPE *matA, unsigned size, unsigned ld, unsigned nblocks, struct starpu_sched_ctx *sched_ctx)
+void STARPU_LU(lu_decomposition)(TYPE *matA, unsigned size, unsigned ld, unsigned nblocks, struct starpu_sched_ctx *sched_ctx, struct timeval *start)
 {
 	/* monitor and partition the A matrix into blocks :
 	 * one block is now determined by 2 unsigned (i,j) */
@@ -233,23 +235,17 @@ void STARPU_LU(lu_decomposition)(TYPE *matA, unsigned size, unsigned ld, unsigne
 
 	starpu_data_map_filters(xlu_dataA, 2, &f, &f2);
 
-	dw_codelet_facto_v3(xlu_dataA, nblocks, sched_ctx);
+	dw_codelet_facto_v3(xlu_dataA, nblocks, sched_ctx, start);
 }
 
-void finish_lu_decomposition(unsigned nblocks)
+void finish_lu_decomposition(unsigned nblocks, struct timeval *end)
 {
 	/* stall the application until the end of computations */
 	starpu_tag_wait(TAG11(nblocks-1));
 
-	gettimeofday(&xlu_end, NULL);
-
-	double timing = (double)((xlu_end.tv_sec - xlu_start.tv_sec)*1000000 + (xlu_end.tv_usec - xlu_start.tv_usec));
-	//	fprintf(stderr, "Computation took (in ms)\n");
-	printf("%2.2f ", timing/1000);
-
-	unsigned n = starpu_matrix_get_nx(xlu_dataA);
-	double flop = (2.0f*n*n*n)/3.0f;
-	//	fprintf(stderr, "Synthetic GFlops : %2.2f\n", (flop/timing/1000.0f));
+	if(end != NULL){
+	  gettimeofday(end, NULL);
+	}
 
 	/* gather all the data */
 	starpu_data_unpartition(xlu_dataA, 0);

+ 6 - 6
examples/cholesky_and_lu/lu/xlu.h

@@ -110,12 +110,12 @@ struct piv_s {
 	unsigned last; /* last element */
 };
 
-void STARPU_LU(lu_decomposition)(TYPE *matA, unsigned size, unsigned ld, unsigned nblocks, struct starpu_sched_ctx *sched_ctx);
-void STARPU_LU(lu_decomposition_pivot_no_stride)(TYPE **matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks, struct starpu_sched_ctx *sched_ctx);
-void STARPU_LU(lu_decomposition_pivot)(TYPE *matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks, struct starpu_sched_ctx *sched_ctx);
+void STARPU_LU(lu_decomposition)(TYPE *matA, unsigned size, unsigned ld, unsigned nblocks, struct starpu_sched_ctx *sched_ctx, struct timeval *start);
+void STARPU_LU(lu_decomposition_pivot_no_stride)(TYPE **matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks, struct starpu_sched_ctx *sched_ctx, struct timeval *start);
+void STARPU_LU(lu_decomposition_pivot)(TYPE *matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks, struct starpu_sched_ctx *sched_ctx, struct timeval *start);
 
-void finish_lu_decomposition(unsigned nblocks);
-void finish_lu_decomposition_pivot_no_stride(unsigned nblocks);
-void finish_lu_decomposition_pivot(unsigned nblocks);
+void finish_lu_decomposition(unsigned nblocks, struct timeval *end);
+void finish_lu_decomposition_pivot_no_stride(unsigned nblocks, struct timeval *end);
+void finish_lu_decomposition_pivot(unsigned nblocks, struct timeval *end);
 
 #endif // __XLU_H__

+ 19 - 31
examples/cholesky_and_lu/lu/xlu_pivot.c

@@ -32,10 +32,10 @@
 static unsigned no_prio = 0;
 starpu_data_handle xlu_pivot_dataA;
 starpu_data_handle *xlu_pivot_dataAp;
-struct timeval xlu_pivot_start;
-struct timeval xlu_pivot_end;
-struct timeval xlu_pivot_no_stride_start;
-struct timeval xlu_pivot_no_stride_end;
+/* struct timeval xlu_pivot_start; */
+/* struct timeval xlu_pivot_end; */
+/* struct timeval xlu_pivot_no_stride_start; */
+/* struct timeval xlu_pivot_no_stride_end; */
 
 
 /*
@@ -268,7 +268,9 @@ static double dw_codelet_facto_pivot(starpu_data_handle *dataAp,
 	}
 
 	/* schedule the codelet */
-	gettimeofday(start, NULL);
+	if(start != NULL){
+	  gettimeofday(start, NULL);
+	}
 	int ret = starpu_task_submit_to_ctx(entry_task, sched_ctx);
 	if (STARPU_UNLIKELY(ret == -ENODEV))
 	{
@@ -287,7 +289,7 @@ starpu_data_handle get_block_with_striding(starpu_data_handle *dataAp,
 }
 
 
-void STARPU_LU(lu_decomposition_pivot)(TYPE *matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks, struct starpu_sched_ctx *sched_ctx)
+void STARPU_LU(lu_decomposition_pivot)(TYPE *matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks, struct starpu_sched_ctx *sched_ctx, struct timeval *start)
 {
 
 	/* monitor and partition the A matrix into blocks :
@@ -329,7 +331,7 @@ void STARPU_LU(lu_decomposition_pivot)(TYPE *matA, unsigned *ipiv, unsigned size
 	}
 #endif
 
-	dw_codelet_facto_pivot(&xlu_pivot_dataA, piv_description, nblocks, get_block_with_striding, sched_ctx, &xlu_pivot_start);
+	dw_codelet_facto_pivot(&xlu_pivot_dataA, piv_description, nblocks, get_block_with_striding, sched_ctx, start);
 }
 
 
@@ -339,7 +341,7 @@ starpu_data_handle get_block_with_no_striding(starpu_data_handle *dataAp, unsign
 	return dataAp[i+j*nblocks];
 }
 
-void STARPU_LU(lu_decomposition_pivot_no_stride)(TYPE **matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks, struct starpu_sched_ctx *sched_ctx)
+void STARPU_LU(lu_decomposition_pivot_no_stride)(TYPE **matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks, struct starpu_sched_ctx *sched_ctx, struct timeval *start)
 {
 	xlu_pivot_dataAp = malloc(nblocks*nblocks*sizeof(starpu_data_handle));
 
@@ -370,10 +372,10 @@ void STARPU_LU(lu_decomposition_pivot_no_stride)(TYPE **matA, unsigned *ipiv, un
 		piv_description[block].last = (block + 1) * (size / nblocks);
 	}
 
-	dw_codelet_facto_pivot(xlu_pivot_dataAp, piv_description, nblocks, get_block_with_no_striding, sched_ctx, &xlu_pivot_no_stride_start);
+	dw_codelet_facto_pivot(xlu_pivot_dataAp, piv_description, nblocks, get_block_with_no_striding, sched_ctx, start);
 }
 
-void finish_lu_decomposition_pivot(unsigned nblocks)
+void finish_lu_decomposition_pivot(unsigned nblocks, struct timeval *end)
 {
 	/* we wait the last task (TAG11(nblocks - 1)) and all the pivot tasks */
 	starpu_tag_t *tags = malloc(nblocks*nblocks*sizeof(starpu_tag_t));
@@ -394,22 +396,15 @@ void finish_lu_decomposition_pivot(unsigned nblocks)
 	starpu_tag_wait_array(ndeps, tags);
 //	starpu_task_wait_for_all();
 
-	gettimeofday(&xlu_pivot_end, NULL);
-
-	double timing = (double)((&xlu_pivot_end.tv_sec - &xlu_pivot_start.tv_sec)*1000000 + (&xlu_pivot_end.tv_usec - &xlu_pivot_start.tv_usec));
-
-	//	fprintf(stderr, "Computation took (in ms)\n");
-	fprintf(stderr, "%2.2f ", timing/1000);
-
-	unsigned n = starpu_matrix_get_nx(xlu_pivot_dataA);
-	double flop = (2.0f*n*n*n)/3.0f;
-	//	fprintf(stderr, "Synthetic GFlops : %2.2f\n", (flop/timing/1000.0f));
+	if(end != NULL){
+	  gettimeofday(end, NULL);
+	}
 
 	/* gather all the data */
 	starpu_data_unpartition(xlu_pivot_dataA, 0);
 }
 
-void finish_lu_decomposition_pivot_no_stride(unsigned nblocks)
+void finish_lu_decomposition_pivot_no_stride(unsigned nblocks, struct timeval *end)
 {
 	/* we wait the last task (TAG11(nblocks - 1)) and all the pivot tasks */
 	starpu_tag_t *tags = malloc(nblocks*nblocks*sizeof(starpu_tag_t));
@@ -430,16 +425,9 @@ void finish_lu_decomposition_pivot_no_stride(unsigned nblocks)
 	starpu_tag_wait_array(ndeps, tags);
 //	starpu_task_wait_for_all();
 
-	gettimeofday(&xlu_pivot_no_stride_end, NULL);
-
-	double timing = (double)((&xlu_pivot_no_stride_end.tv_sec - &xlu_pivot_no_stride_start.tv_sec)*1000000 + (&xlu_pivot_no_stride_end.tv_usec - &xlu_pivot_no_stride_start.tv_usec));
-
-	//	fprintf(stderr, "Computation took (in ms)\n");
-	fprintf(stderr, "%2.2f ", timing/1000);
-
-	unsigned n = starpu_matrix_get_nx(xlu_pivot_dataAp[0])*nblocks;
-	double flop = (2.0f*n*n*n)/3.0f;
-	//	fprintf(stderr, "Synthetic GFlops : %2.2f\n", (flop/timing/1000.0f));
+	if(end != NULL){
+	  gettimeofday(end, NULL);
+	}
 
 	unsigned bi, bj;
 	for (bj = 0; bj < nblocks; bj++)

+ 2 - 2
examples/cholesky_and_lu_without_sched_ctx/cholesky/cholesky.h

@@ -74,8 +74,8 @@ void chol_cublas_codelet_update_u22(void *descr[], void *_args);
 int run_cholesky_grain_tag(int argc, char **argv);
 int run_cholesky_implicit(int argc, char **argv);
 int run_cholesky_tag(int argc, char **argv);
-int run_cholesky_tile_tag(int argc, char **argv);
-int finish_cholesky_tile_tag(void);
+int run_cholesky_tile_tag(int argc, char **argv, struct timeval *start);
+int finish_cholesky_tile_tag(struct timeval *end);
 
 extern struct starpu_perfmodel_t chol_model_11;
 extern struct starpu_perfmodel_t chol_model_21;

+ 10 - 15
examples/cholesky_and_lu_without_sched_ctx/cholesky/cholesky_tile_tag.c

@@ -20,8 +20,8 @@
 /* A [ y ] [ x ] */
 float *A[NMAXBLOCKS][NMAXBLOCKS];
 starpu_data_handle A_state[NMAXBLOCKS][NMAXBLOCKS];
-struct timeval start;
-struct timeval end;
+/* struct timeval start; */
+/* struct timeval end; */
 
 
 /*
@@ -184,7 +184,7 @@ static void create_task_22(unsigned k, unsigned i, unsigned j)
  *	and construct the DAG
  */
 
-static void cholesky_no_stride(void)
+static void cholesky_no_stride(struct timeval *start)
 {
 	struct starpu_task *entry_task = NULL;
 
@@ -215,12 +215,13 @@ static void cholesky_no_stride(void)
 	}
 
 	/* schedule the codelet */
-	gettimeofday(&start, NULL);
+	if(start != NULL)
+	  gettimeofday(start, NULL);
 	starpu_task_submit(entry_task);
 
 }
 
-int run_cholesky_tile_tag(int argc, char **argv)
+int run_cholesky_tile_tag(int argc, char **argv, struct timeval *start)
 {
 	unsigned x, y;
 	unsigned i, j;
@@ -290,28 +291,22 @@ int run_cholesky_tile_tag(int argc, char **argv)
 		}
 	}
 
-	cholesky_no_stride();
+	cholesky_no_stride(start);
 
 	//	starpu_shutdown();
 	return 0;
 }
 
 
-int finish_cholesky_tile_tag(){	
+int finish_cholesky_tile_tag(struct timeval *end){	
   //	starpu_helper_cublas_shutdown();
 
 	/* stall the application until the end of computations */
 	starpu_tag_wait(TAG11(nblocks-1));
 	starpu_shutdown();
 
-	gettimeofday(&end, NULL);
-
-	double timing = (double)((end.tv_sec - start.tv_sec)*1000000 + (end.tv_usec - start.tv_usec));
-	//	fprintf(stderr, "Computation took (in ms)\n");
-	printf("%2.2f ", timing/1000);
-
-	double flop = (1.0f*size*size*size)/3.0f;
-	//	fprintf(stderr, "Synthetic GFlops : %2.2f\n", (flop/timing/1000.0f));
+	if(end != NULL)
+	  gettimeofday(end, NULL);
 
 	return 0;
 }

+ 4 - 12
examples/cholesky_and_lu_without_sched_ctx/cholesky_and_lu_without_sched_ctx.c

@@ -6,23 +6,15 @@ int main(int argc, char **argv)
   struct timeval start;
   struct timeval end;
 
-  gettimeofday(&start, NULL);
+  run_cholesky_tile_tag(argc, argv, &start);
 
-  run_cholesky_tile_tag(argc, argv);
+  run_lu(argc, argv, NULL);
 
-  run_lu(argc, argv);
-
-  finish_cholesky_tile_tag();
-  finish_lu();
-  
-  gettimeofday(&end, NULL);
+  finish_cholesky_tile_tag(NULL);
+  finish_lu(&end);
 
   double timing = (double)((end.tv_sec - start.tv_sec)*1000000 + (end.tv_usec - start.tv_usec));
-  //      fprintf(stderr, "Computation took (in ms)\n");                                    
   printf("%2.2f\n", timing/1000);
 
-  double flop = (1.0f*size*size*size)/3.0f;
-  //      fprintf(stderr, "Synthetic GFlops : %2.2f\n", (flop/timing/1000.0f));     
-
   return 0;
 }

+ 10 - 20
examples/cholesky_and_lu_without_sched_ctx/lu/lu_example.c

@@ -35,8 +35,8 @@ static unsigned profile = 0;
 static unsigned bound = 0;
 static unsigned bounddeps = 0;
 static unsigned boundprio = 0;
-struct timeval lu_start;
-struct timeval lu_end;
+/* struct timeval lu_start; */
+/* struct timeval lu_end; */
 unsigned *ipiv;
 
 TYPE *A, *A_saved;
@@ -265,7 +265,7 @@ static void check_result(void)
 		exit(-1);
 }
 
-int run_lu(int argc, char **argv)
+int run_lu(int argc, char **argv, struct timeval *start)
 {
 	lu_parse_args(argc, argv);
 
@@ -296,21 +296,20 @@ int run_lu(int argc, char **argv)
 			A_blocks = malloc(lu_nblocks*lu_nblocks*sizeof(TYPE **));
 			copy_matrix_into_blocks();
 
-			STARPU_LU(lu_decomposition_pivot_no_stride)(A_blocks, ipiv, lu_size, lu_size, lu_nblocks);
+			STARPU_LU(lu_decomposition_pivot_no_stride)(A_blocks, ipiv, lu_size, lu_size, lu_nblocks, start);
 
 			copy_blocks_into_matrix();
 			free(A_blocks);
 		}
 		else 
 		{
-			gettimeofday(&lu_start, NULL);
 
-			STARPU_LU(lu_decomposition_pivot)(A, ipiv, lu_size, lu_size, lu_nblocks);
+		  STARPU_LU(lu_decomposition_pivot)(A, ipiv, lu_size, lu_size, lu_nblocks, start);
 		}
 	}
 	else
 	{
-	  STARPU_LU(lu_decomposition)(A, lu_size, lu_size, lu_nblocks);
+	  STARPU_LU(lu_decomposition)(A, lu_size, lu_size, lu_nblocks, start);
 	}
 
 
@@ -319,32 +318,23 @@ int run_lu(int argc, char **argv)
 	return 0;
 }
 
-int finish_lu()
+int finish_lu(struct timeval *end)
 {
 
 	if (pivot)
 	{
 		if (no_stride)
 		{
-			finish_lu_decomposition_pivot_no_stride(lu_nblocks);
+		  finish_lu_decomposition_pivot_no_stride(lu_nblocks, end);
 		}
 		else 
 		{
-			finish_lu_decomposition_pivot(lu_nblocks);
-			gettimeofday(&lu_end, NULL);
-			
-			double timing = (double)((lu_end.tv_sec - lu_start.tv_sec)*1000000 + (lu_end.tv_usec - lu_start.tv_usec));
-			
-			unsigned n = lu_size;
-			double flop = (2.0f*n*n*n)/3.0f;
-			//			fprintf(stderr, "Synthetic GFlops (TOTAL) : \n");
-			//			fprintf(stdout, "%d	%6.2f\n", n, (flop/timing/1000.0f));
-
+		  finish_lu_decomposition_pivot(lu_nblocks, end);
 		}
 	}
 	else
 	{
-	  finish_lu_decomposition(lu_nblocks);
+	  finish_lu_decomposition(lu_nblocks, end);
 	}
 
   

+ 10 - 16
examples/cholesky_and_lu_without_sched_ctx/lu/xlu.c

@@ -29,8 +29,8 @@
 					| (unsigned long long)(j))))
 
 static unsigned no_prio = 0;
-struct timeval xlu_start;
-struct timeval xlu_end;
+//struct timeval xlu_start;
+//struct timeval xlu_end;
 starpu_data_handle xlu_dataA;
 
 
@@ -165,7 +165,7 @@ static void create_task_22(starpu_data_handle dataA, unsigned k, unsigned i, uns
  *	code to bootstrap the factorization 
  */
 
-static void dw_codelet_facto_v3(starpu_data_handle dataA, unsigned nblocks)
+static void dw_codelet_facto_v3(starpu_data_handle dataA, unsigned nblocks, struct timeval *start)
 {
 	struct starpu_task *entry_task = NULL;
 
@@ -200,7 +200,8 @@ static void dw_codelet_facto_v3(starpu_data_handle dataA, unsigned nblocks)
 	}
 
 	/* schedule the codelet */
-	gettimeofday(&xlu_start, NULL);
+	if(start != NULL)
+	  gettimeofday(start, NULL);
 	int ret = starpu_task_submit(entry_task);
 	if (STARPU_UNLIKELY(ret == -ENODEV))
 	{
@@ -210,7 +211,7 @@ static void dw_codelet_facto_v3(starpu_data_handle dataA, unsigned nblocks)
 
 }
 
-void STARPU_LU(lu_decomposition)(TYPE *matA, unsigned size, unsigned ld, unsigned nblocks)
+void STARPU_LU(lu_decomposition)(TYPE *matA, unsigned size, unsigned ld, unsigned nblocks, struct timeval *start)
 {
 	/* monitor and partition the A matrix into blocks :
 	 * one block is now determined by 2 unsigned (i,j) */
@@ -233,23 +234,16 @@ void STARPU_LU(lu_decomposition)(TYPE *matA, unsigned size, unsigned ld, unsigne
 
 	starpu_data_map_filters(xlu_dataA, 2, &f, &f2);
 
-	dw_codelet_facto_v3(xlu_dataA, nblocks);
+	dw_codelet_facto_v3(xlu_dataA, nblocks, start);
 }
 
-void finish_lu_decomposition(unsigned nblocks)
+void finish_lu_decomposition(unsigned nblocks, struct timeval *end)
 {
 	/* stall the application until the end of computations */
 	starpu_tag_wait(TAG11(nblocks-1));
 
-	gettimeofday(&xlu_end, NULL);
-
-	double timing = (double)((xlu_end.tv_sec - xlu_start.tv_sec)*1000000 + (xlu_end.tv_usec - xlu_start.tv_usec));
-	//	fprintf(stderr, "Computation took (in ms)\n");
-	printf("%2.2f ", timing/1000);
-
-	unsigned n = starpu_matrix_get_nx(xlu_dataA);
-	double flop = (2.0f*n*n*n)/3.0f;
-	//	fprintf(stderr, "Synthetic GFlops : %2.2f\n", (flop/timing/1000.0f));
+	if(end != NULL)
+	  gettimeofday(end, NULL);
 
 	/* gather all the data */
 	starpu_data_unpartition(xlu_dataA, 0);

+ 6 - 6
examples/cholesky_and_lu_without_sched_ctx/lu/xlu.h

@@ -110,12 +110,12 @@ struct piv_s {
 	unsigned last; /* last element */
 };
 
-void STARPU_LU(lu_decomposition)(TYPE *matA, unsigned size, unsigned ld, unsigned nblocks);
-void STARPU_LU(lu_decomposition_pivot_no_stride)(TYPE **matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks);
-void STARPU_LU(lu_decomposition_pivot)(TYPE *matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks);
+void STARPU_LU(lu_decomposition)(TYPE *matA, unsigned size, unsigned ld, unsigned nblocks, struct timeval *start);
+void STARPU_LU(lu_decomposition_pivot_no_stride)(TYPE **matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks, struct timeval *start);
+void STARPU_LU(lu_decomposition_pivot)(TYPE *matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks, struct timeval *start);
 
-void finish_lu_decomposition(unsigned nblocks);
-void finish_lu_decomposition_pivot_no_stride(unsigned nblocks);
-void finish_lu_decomposition_pivot(unsigned nblocks);
+void finish_lu_decomposition(unsigned nblocks, struct timeval *end);
+void finish_lu_decomposition_pivot_no_stride(unsigned nblocks, struct timeval *end);
+void finish_lu_decomposition_pivot(unsigned nblocks, struct timeval *end);
 
 #endif // __XLU_H__

+ 17 - 32
examples/cholesky_and_lu_without_sched_ctx/lu/xlu_pivot.c

@@ -1,4 +1,4 @@
-/* StarPU --- Runtime system for heterogeneous multicore architectures.
+/* StarPUf --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010  Université de Bordeaux 1
  * Copyright (C) 2010  Centre National de la Recherche Scientifique
@@ -32,10 +32,10 @@
 static unsigned no_prio = 0;
 starpu_data_handle xlu_pivot_dataA;
 starpu_data_handle *xlu_pivot_dataAp;
-struct timeval xlu_pivot_start;
-struct timeval xlu_pivot_end;
-struct timeval xlu_pivot_no_stride_start;
-struct timeval xlu_pivot_no_stride_end;
+/* struct timeval xlu_pivot_start; */
+/* struct timeval xlu_pivot_end; */
+/* struct timeval xlu_pivot_no_stride_start; */
+/* struct timeval xlu_pivot_no_stride_end; */
 
 
 /*
@@ -267,7 +267,8 @@ static double dw_codelet_facto_pivot(starpu_data_handle *dataAp,
 	}
 
 	/* schedule the codelet */
-	gettimeofday(start, NULL);
+	if(start != NULL)
+	  gettimeofday(start, NULL);
 	int ret = starpu_task_submit(entry_task);
 	if (STARPU_UNLIKELY(ret == -ENODEV))
 	{
@@ -286,7 +287,7 @@ starpu_data_handle get_block_with_striding(starpu_data_handle *dataAp,
 }
 
 
-void STARPU_LU(lu_decomposition_pivot)(TYPE *matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks)
+void STARPU_LU(lu_decomposition_pivot)(TYPE *matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks, struct timeval *start)
 {
 
 	/* monitor and partition the A matrix into blocks :
@@ -328,7 +329,7 @@ void STARPU_LU(lu_decomposition_pivot)(TYPE *matA, unsigned *ipiv, unsigned size
 	}
 #endif
 
-	dw_codelet_facto_pivot(&xlu_pivot_dataA, piv_description, nblocks, get_block_with_striding, &xlu_pivot_start);
+	dw_codelet_facto_pivot(&xlu_pivot_dataA, piv_description, nblocks, get_block_with_striding, start);
 }
 
 
@@ -338,7 +339,7 @@ starpu_data_handle get_block_with_no_striding(starpu_data_handle *dataAp, unsign
 	return dataAp[i+j*nblocks];
 }
 
-void STARPU_LU(lu_decomposition_pivot_no_stride)(TYPE **matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks)
+void STARPU_LU(lu_decomposition_pivot_no_stride)(TYPE **matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks, struct timeval *start)
 {
 	xlu_pivot_dataAp = malloc(nblocks*nblocks*sizeof(starpu_data_handle));
 
@@ -369,10 +370,10 @@ void STARPU_LU(lu_decomposition_pivot_no_stride)(TYPE **matA, unsigned *ipiv, un
 		piv_description[block].last = (block + 1) * (size / nblocks);
 	}
 
-	dw_codelet_facto_pivot(xlu_pivot_dataAp, piv_description, nblocks, get_block_with_no_striding, &xlu_pivot_no_stride_start);
+	dw_codelet_facto_pivot(xlu_pivot_dataAp, piv_description, nblocks, get_block_with_no_striding, start);
 }
 
-void finish_lu_decomposition_pivot(unsigned nblocks)
+void finish_lu_decomposition_pivot(unsigned nblocks, struct timeval *end)
 {
 	/* we wait the last task (TAG11(nblocks - 1)) and all the pivot tasks */
 	starpu_tag_t *tags = malloc(nblocks*nblocks*sizeof(starpu_tag_t));
@@ -393,22 +394,14 @@ void finish_lu_decomposition_pivot(unsigned nblocks)
 	starpu_tag_wait_array(ndeps, tags);
 //	starpu_task_wait_for_all();
 
-	gettimeofday(&xlu_pivot_end, NULL);
-
-	double timing = (double)((&xlu_pivot_end.tv_sec - &xlu_pivot_start.tv_sec)*1000000 + (&xlu_pivot_end.tv_usec - &xlu_pivot_start.tv_usec));
-
-	//	fprintf(stderr, "Computation took (in ms)\n");
-	fprintf(stderr, "%2.2f ", timing/1000);
-
-	unsigned n = starpu_matrix_get_nx(xlu_pivot_dataA);
-	double flop = (2.0f*n*n*n)/3.0f;
-	//	fprintf(stderr, "Synthetic GFlops : %2.2f\n", (flop/timing/1000.0f));
+	if(end != NULL)
+	  gettimeofday(end, NULL);
 
 	/* gather all the data */
 	starpu_data_unpartition(xlu_pivot_dataA, 0);
 }
 
-void finish_lu_decomposition_pivot_no_stride(unsigned nblocks)
+void finish_lu_decomposition_pivot_no_stride(unsigned nblocks, struct timeval *end)
 {
 	/* we wait the last task (TAG11(nblocks - 1)) and all the pivot tasks */
 	starpu_tag_t *tags = malloc(nblocks*nblocks*sizeof(starpu_tag_t));
@@ -429,16 +422,8 @@ void finish_lu_decomposition_pivot_no_stride(unsigned nblocks)
 	starpu_tag_wait_array(ndeps, tags);
 //	starpu_task_wait_for_all();
 
-	gettimeofday(&xlu_pivot_no_stride_end, NULL);
-
-	double timing = (double)((&xlu_pivot_no_stride_end.tv_sec - &xlu_pivot_no_stride_start.tv_sec)*1000000 + (&xlu_pivot_no_stride_end.tv_usec - &xlu_pivot_no_stride_start.tv_usec));
-
-	//	fprintf(stderr, "Computation took (in ms)\n");
-	fprintf(stderr, "%2.2f ", timing/1000);
-
-	unsigned n = starpu_matrix_get_nx(xlu_pivot_dataAp[0])*nblocks;
-	double flop = (2.0f*n*n*n)/3.0f;
-	//	fprintf(stderr, "Synthetic GFlops : %2.2f\n", (flop/timing/1000.0f));
+	if(end != NULL)
+	  gettimeofday(end, NULL);
 
 	unsigned bi, bj;
 	for (bj = 0; bj < nblocks; bj++)

+ 3 - 0
simple_ex/exemple.c

@@ -54,6 +54,9 @@ int main(int argc, char **argv)
   // printf("got here \n");
   starpu_init(NULL);
 
+  for(i = 0; i < 12; i++)
+    printf("%d: arch is %d\n", starpu_worker_get_type(i));
+
   starpu_data_handle dataA;
   starpu_vector_data_register(&dataA, 0, (uintptr_t)mat, size, sizeof(mat[00]));
 

+ 6 - 5
src/core/sched_policy.c

@@ -173,7 +173,8 @@ static struct starpu_sched_policy_s *select_sched_policy(struct starpu_machine_c
 		return selected_policy;
 
 	/* If no policy was specified, we use the greedy policy as a default */
-	return &_starpu_sched_eager_policy;
+	//	return &_starpu_sched_eager_policy;
+	return &heft_policy;
 }
 
 void _starpu_init_sched_policy(struct starpu_machine_config_s *config, struct starpu_sched_ctx *sched_ctx, const char *policy_name)
@@ -347,10 +348,10 @@ struct starpu_task *_starpu_pop_task(struct starpu_worker_s *worker)
 		  }
 	  }
 
- 	if(task)
-	  {
-	    printf("task %s poped by th %d for %d  with strateg %s\n", task->name, worker->workerid, worker->arch, task->sched_ctx->sched_policy->policy_name);
-	  }
+ 	/* if(task) */
+	/*   { */
+	/*     printf("task %s poped by th %d for %d  with strateg %s\n", task->name, worker->workerid, worker->arch, task->sched_ctx->sched_policy->policy_name); */
+	/*   } */
 
 	/* Note that we may get a NULL task in case the scheduler was unlocked
 	 * for some reason. */

+ 1 - 1
src/core/workers.h

@@ -219,6 +219,6 @@ void _starpu_worker_set_status(int workerid, starpu_worker_status status);
 /* TODO move */
 unsigned _starpu_execute_registered_progression_hooks(void);
 
-/* We keep an initial sched ctx which might be used in care no other ctx is available */
+/* We keep an initial sched ctx which might be used in case no other ctx is available */
 struct starpu_sched_ctx* _starpu_get_initial_sched_ctx(void);
 #endif // __WORKERS_H__

+ 21 - 58
tests/cholesky_and_lu/sched.sh

@@ -21,14 +21,10 @@ DIR=$PWD
 ROOTDIR=$DIR/../..
 TIMINGDIR=$DIR/timings-sched/
 mkdir -p $TIMINGDIR
-
+BENCH_NAME=cholesky_and_lu
 ns=10
-nsamples=0
-sampleList_cholesky=""
-sampleList_lu=""
-sampleList_all=""
 
-filename=$TIMINGDIR/sched
+filename=$TIMINGDIR/$BENCH_NAME
     
 for blocks in `seq 10 2 24`
 do
@@ -36,13 +32,18 @@ do
     
     echo "size : $size"
     
+    nsamples=0
+    sampleList=""
+
+    sum=0
+
     OPTIONS="-pin -nblocks $blocks -size $size"
 
-    echo "$ROOTDIR/examples/cholesky_and_lu/cholesky_and_lu $OPTIONS 2> /dev/null"
+    echo "$ROOTDIR/examples/$BENCH_NAME/$BENCH_NAME $OPTIONS"
 
     for s in `seq 1 $ns`
     do
-	val=`$ROOTDIR/examples/cholesky_and_lu/cholesky_and_lu $OPTIONS 2> /dev/null`
+	val=`$ROOTDIR/examples/$BENCH_NAME/$BENCH_NAME $OPTIONS`
 	echo "val = $val"
 	if [ "$val" != "" ];
 	then
@@ -51,65 +52,27 @@ do
 
 	echo "$nsamples"
 
-	sampleRes=(`echo $val | tr " " "\n"`)
+	sampleList="$sampleList $val"
+    done
 
-        sampleList_cholesky="$sampleList_cholesky ${sampleRes[0]}"
-	sampleList_lu="$sampleList_cholesky ${sampleRes[1]}"
-	sampleList_all="$sampleList_cholesky ${sampleRes[2]}"
-	
-	sum_cholesky=0
-	sum_lu=0
-	sum_all=0
-	
-	for val in $sampleList_cholesky
-	do
-	    sum_cholesky=$(echo "$sum_cholesky + $val"|bc -l)
-	done
-	
-	for val in $sampleList_lu
-	do
-	    sum_lu=$(echo "$sum_lu + $val"|bc -l)
-	done
-	
-	for val in $sampleList_all
-	do
-	    sum_all=$(echo "$sum_all + $val"|bc -l)
-	done
+    for val in $sampleList
+    do
+	sum=$(echo "$sum + $val"|bc -l)
     done
     
     if [ "nsamples" != "0" ];
     then
-        avg_cholesky=$(echo "$sum_cholesky / $nsamples"|bc -l)
-        avg_lu=$(echo "$sum_lu / $nsamples"|bc -l)
-        avg_all=$(echo "$sum_all / $nsamples"|bc -l)
+        avg=$(echo "$sum / $nsamples"|bc -l)
 	
-        orderedsampleList_cholesky=$(echo "$sampleList_cholesky"|tr " " "\n" |sort -n)
-        orderedsampleList_lu=$(echo "$sampleList_lu"|tr " " "\n" |sort -n)
-        orderedsampleList_all=$(echo "$sampleList_all"|tr " " "\n" |sort -n)
+        orderedsampleList=$(echo "$sampleList"|tr " " "\n" |sort -n)
 	
-        ylow_cholesky=$(echo $orderedsampleList_cholesky | awk '{print $1}')
-        yhigh_cholesky=$(echo "$orderedsampleList_cholesky"|tail -1)
-
-	echo "ylow_cholesky = $ylow_cholesky"
-	echo "yhigh_cholesky = $yhigh_cholesky"
-
-        ylow_lu=$(echo $orderedsampleList_lu | awk '{print $1}')
-        yhigh_lu=$(echo "$orderedsampleList_lu"|tail -1)
-
-	echo "ylow_lu = $ylow_lu"
-	echo "yhigh_lu = $yhigh_lu"
-
-        ylow_all=$(echo $orderedsampleList_all | awk '{print $1}')
-        yhigh_all=$(echo "$orderedsampleList_all"|tail -1)
+        ylow=$(echo $orderedsampleList | awk '{print $1}')
+        yhigh=$(echo "$orderedsampleList"|tail -1)
 		
-	echo "ylow_all = $ylow_all"
-	echo "yhigh_all = $yhigh_all"
+	echo "ylow = $ylow"
+	echo "yhigh = $yhigh"
 	
-        echo "$size $avg_cholesky $ylow_cholesky $yhigh_cholesky" >> $filename.cholesky
-        echo "$size $avg_lu $ylow_lu $yhigh_lu" >> $filename.lu
-        echo "$size $avg_all $ylow_all $yhigh_all" >> $filename.all
-
-	nsamples=0
+        echo "$size $avg $ylow $yhigh" >> $filename
     fi
 done
 

+ 22 - 57
tests/cholesky_and_lu_without_sched_ctx/sched.sh

@@ -20,15 +20,12 @@
 DIR=$PWD
 ROOTDIR=$DIR/../..
 TIMINGDIR=$DIR/timings-sched/
+BENCH_NAME=cholesky_and_lu_without_sched_ctx
 mkdir -p $TIMINGDIR
 
 ns=10
-nsamples=0
-sampleList_cholesky=""
-sampleList_lu=""
-sampleList_all=""
 
-filename=$TIMINGDIR/sched
+filename=$TIMINGDIR/$BENCH_NAME
     
 for blocks in `seq 10 2 24`
 do
@@ -36,13 +33,18 @@ do
     
     echo "size : $size"
     
+    nsamples=0
+    sampleList=""
+
+    sum=0
+
     OPTIONS="-pin -nblocks $blocks -size $size"
 
-    echo "$ROOTDIR/examples/cholesky_and_lu_without_sched_ctx/cholesky_and_lu_without_sched_ctx $OPTIONS 2> /dev/null"
+    echo "$ROOTDIR/examples/$BENCH_NAME/$BENCH_NAME $OPTIONS"
 
     for s in `seq 1 $ns`
     do
-	val=`$ROOTDIR/examples/cholesky_and_lu/cholesky_and_lu $OPTIONS 2> /dev/null`
+	val=`$ROOTDIR/examples/$BENCH_NAME/$BENCH_NAME $OPTIONS`
 	echo "val = $val"
 	if [ "$val" != "" ];
 	then
@@ -51,65 +53,28 @@ do
 
 	echo "$nsamples"
 
-	sampleRes=(`echo $val | tr " " "\n"`)
+	sampleList="$sampleList $val"
+    done
 
-        sampleList_cholesky="$sampleList_cholesky ${sampleRes[0]}"
-	sampleList_lu="$sampleList_cholesky ${sampleRes[1]}"
-	sampleList_all="$sampleList_cholesky ${sampleRes[2]}"
-	
-	sum_cholesky=0
-	sum_lu=0
-	sum_all=0
-	
-	for val in $sampleList_cholesky
-	do
-	    sum_cholesky=$(echo "$sum_cholesky + $val"|bc -l)
-	done
-	
-	for val in $sampleList_lu
-	do
-	    sum_lu=$(echo "$sum_lu + $val"|bc -l)
-	done
-	
-	for val in $sampleList_all
-	do
-	    sum_all=$(echo "$sum_all + $val"|bc -l)
-	done
+    for val in $sampleList
+    do
+	sum=$(echo "$sum + $val"|bc -l)
     done
+
     
     if [ "nsamples" != "0" ];
     then
-        avg_cholesky=$(echo "$sum_cholesky / $nsamples"|bc -l)
-        avg_lu=$(echo "$sum_lu / $nsamples"|bc -l)
-        avg_all=$(echo "$sum_all / $nsamples"|bc -l)
+        avg=$(echo "$sum / $nsamples"|bc -l)
 	
-        orderedsampleList_cholesky=$(echo "$sampleList_cholesky"|tr " " "\n" |sort -n)
-        orderedsampleList_lu=$(echo "$sampleList_lu"|tr " " "\n" |sort -n)
-        orderedsampleList_all=$(echo "$sampleList_all"|tr " " "\n" |sort -n)
+        orderedsampleList=$(echo "$sampleList"|tr " " "\n" |sort -n)
 	
-        ylow_cholesky=$(echo $orderedsampleList_cholesky | awk '{print $1}')
-        yhigh_cholesky=$(echo "$orderedsampleList_cholesky"|tail -1)
-
-	echo "ylow_cholesky = $ylow_cholesky"
-	echo "yhigh_cholesky = $yhigh_cholesky"
-
-        ylow_lu=$(echo $orderedsampleList_lu | awk '{print $1}')
-        yhigh_lu=$(echo "$orderedsampleList_lu"|tail -1)
-
-	echo "ylow_lu = $ylow_lu"
-	echo "yhigh_lu = $yhigh_lu"
-
-        ylow_all=$(echo $orderedsampleList_all | awk '{print $1}')
-        yhigh_all=$(echo "$orderedsampleList_all"|tail -1)
+        ylow=$(echo $orderedsampleList | awk '{print $1}')
+        yhigh=$(echo "$orderedsampleList"|tail -1)
 		
-	echo "ylow_all = $ylow_all"
-	echo "yhigh_all = $yhigh_all"
+	echo "ylow = $ylow"
+	echo "yhigh = $yhigh"
 	
-        echo "$size $avg_cholesky $ylow_cholesky $yhigh_cholesky" >> $filename.cholesky
-        echo "$size $avg_lu $ylow_lu $yhigh_lu" >> $filename.lu
-        echo "$size $avg_all $ylow_all $yhigh_all" >> $filename.all
-
-	nsamples=0
+        echo "$size $avg $ylow $yhigh" >> $filename
     fi
 done