Browse Source

merge trunk

Nathalie Furmento 11 years ago
parent
commit
c0459a27c9

+ 4 - 4
doc/doxygen/chapters/02basic_examples.doxy

@@ -156,7 +156,7 @@ int main(int argc, char **argv)
 
 \verbatim
 $ make hello_world
-cc $(pkg-config --cflags starpu-1.2)  $(pkg-config --libs starpu-1.2) hello_world.c -o hello_world
+cc $(pkg-config --cflags starpu-1.2) hello_world.c -o hello_world $(pkg-config --libs starpu-1.2)
 $ ./hello_world
 Hello world
 \endverbatim
@@ -234,7 +234,7 @@ int main(int argc, char **argv)
 
 \verbatim
 $ make hello_world
-cc $(pkg-config --cflags starpu-1.2)  $(pkg-config --libs starpu-1.2) hello_world.c -o hello_world
+cc $(pkg-config --cflags starpu-1.2) hello_world.c -o hello_world $(pkg-config --libs starpu-1.2)
 $ ./hello_world
 Hello world (params = {1, 2.000000} )
 \endverbatim
@@ -285,7 +285,7 @@ int main(int argc, char **argv)
 
 \verbatim
 $ make hello_world
-cc $(pkg-config --cflags starpu-1.2)  $(pkg-config --libs starpu-1.2) hello_world.c -o hello_world
+cc $(pkg-config --cflags starpu-1.2) hello_world.c -o hello_world $(pkg-config --libs starpu-1.2) 
 $ ./hello_world
 Hello world
 Callback function (arg 42)
@@ -606,7 +606,7 @@ pointer.
 
 \verbatim
 $ make vector_scal
-cc $(pkg-config --cflags starpu-1.2)  $(pkg-config --libs starpu-1.2)  vector_scal.c   -o vector_scal
+cc $(pkg-config --cflags starpu-1.2) vector_scal.c -o vector_scal $(pkg-config --libs starpu-1.2)
 $ ./vector_scal
 0.000000 3.000000 6.000000 9.000000 12.000000
 \endverbatim

+ 1 - 1
doc/doxygen/chapters/07data_management.doxy

@@ -120,7 +120,7 @@ starpu_vector_data_register(&handle, STARPU_MAIN_RAM, (uintptr_t)vector,
                             NX, sizeof(vector[0]));
 
 /* Partition the vector in PARTS sub-vectors */
-starpu_data_filter f =
+struct starpu_data_filter f =
 {
     .filter_func = starpu_vector_filter_block,
     .nchildren = PARTS

+ 1 - 1
mpi/examples/Makefile.am

@@ -152,7 +152,7 @@ mpi_lu_plu_implicit_example_double_LDADD =	\
 	$(STARPU_BLAS_LDFLAGS) -lm
 
 mpi_lu_plu_implicit_example_double_SOURCES =	\
-	mpi_lu/plu_outofcore_example_double.c	\
+	mpi_lu/plu_implicit_example_double.c	\
 	mpi_lu/plu_solve_double.c		\
 	mpi_lu/pdlu_kernels.c			\
 	mpi_lu/pdlu_implicit.c			\

+ 1 - 1
mpi/examples/mpi_lu/plu_outofcore_example.c

@@ -38,7 +38,7 @@ static unsigned check = 0;
 static int p = 1;
 static int q = 1;
 static unsigned display = 0;
-static char *path = "/tmp/starpu-mpi_LU";
+static char *path = "./starpu-ooc-files";
 
 #ifdef STARPU_HAVE_LIBNUMA
 static unsigned numa = 0;

+ 1 - 1
src/debug/traces/starpu_paje.c

@@ -284,7 +284,7 @@ void _starpu_fxt_write_paje_header(FILE *file)
 6       Sl       Ctx%u      Sleeping         \".9 .1 .0\"		\n\
 6       P       Ctx%u       Progressing         \".4 .1 .6\"		\n\
 6       U       Ctx%u       Unpartitioning         \".0 .0 1.0\"		\n",
-		i, i, i, i, i, i, i, i, i, i);
+		i, i, i, i, i, i, i, i, i, i, i);
 	fprintf(file, "\
 6       A       MS      Allocating         \".4 .1 .0\"		\n\
 6       Ar       MS      AllocatingReuse       \".1 .1 .8\"		\n\

+ 22 - 14
tests/loader.c

@@ -129,28 +129,36 @@ static void test_cleaner(int sig)
 	exit(EXIT_FAILURE);
 }
 
+static int _decode(char **src, char *motif, const char *value)
+{
+	char *found;
+
+	found = strstr(*src, motif);
+	if (found == NULL) return 0;
+
+	char *new_src = malloc((strlen(*src)+strlen(value))*sizeof(char));
+	strcpy(new_src, "");
+
+	strncat(new_src, *src, strlen(*src)-strlen(found));
+	strcat(new_src, value);
+	strcat(new_src, found+strlen(motif));
+
+	*src = strdup(new_src);
+	return 1;
+}
+
 static void decode(char **src, char *motif, const char *value)
 {
 	if (*src)
 	{
-		char *y = strstr(*src, motif);
-		if (y && value == NULL)
+		if (strstr(*src, motif) && value == NULL)
 		{
 			fprintf(stderr, "error: $%s undefined\n", motif);
 			exit(EXIT_FAILURE);
 		}
-		while (y)
-		{
-			char *neo = malloc((strlen(*src)-strlen(motif)+strlen(value)) * sizeof(char));
-			char *to = neo;
-
-			to = strncpy(to, *src, strlen(*src)-strlen(y)); to += strlen(*src)-strlen(y);
-			to = strcpy(to, value); to += strlen(value);
-			strcpy(to, y+strlen(motif));
-
-			*src = strdup(neo);
-			y = strstr(*src, motif);
-		}
+		int d = _decode(src, motif, value);
+		while (d)
+			d = _decode(src, motif, value);
 	}
 }