Andra Hugo 14 年 前
コミット
d945c8a74a

+ 45 - 0
tests/datawizard/acquire_cb.c

@@ -0,0 +1,45 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2011  Université de Bordeaux 1
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+#include <starpu.h>
+
+#define FPRINTF(ofile, fmt, args ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ##args); }} while(0)
+
+unsigned token = 0;
+starpu_data_handle token_handle;
+
+void callback(void *arg __attribute__ ((unused)))
+{
+	token = 42;
+        starpu_data_release(token_handle);
+}
+
+int main(int argc, char **argv)
+{
+        starpu_init(NULL);
+
+	starpu_variable_data_register(&token_handle, 0, (uintptr_t)&token, sizeof(unsigned));
+        starpu_data_acquire_cb(token_handle, STARPU_RW, callback, NULL);
+
+	starpu_data_unregister(token_handle);
+
+        FPRINTF(stderr, "Token: %u\n", token);
+        STARPU_ASSERT(token == 42);
+
+	starpu_shutdown();
+
+	return 0;
+}

+ 125 - 0
tests/datawizard/acquire_cb_insert.c

@@ -0,0 +1,125 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2011  Centre National de la Recherche Scientifique
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+#include <starpu.h>
+
+#define N 16
+#define M 4
+#define X 2
+
+#define FPRINTF(ofile, fmt, args ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ##args); }} while(0)
+
+void which_index_cpu(void *descr[], void *_args)
+{
+	int *x0 = (int *)STARPU_VARIABLE_GET_PTR(descr[0]);
+
+	/* A real case would actually compute something */
+	*x0 = X;
+}
+
+starpu_codelet which_index = {
+	.where = STARPU_CPU,
+	.cpu_func = which_index_cpu,
+        .nbuffers = 1
+};
+
+void work_cpu(void *descr[], void *_args)
+{
+	int i, n = STARPU_VECTOR_GET_NX(descr[0]);
+	float *x0 = (float *)STARPU_VECTOR_GET_PTR(descr[0]);
+
+	for (i = 0; i < n; i++)
+		x0[i] = i + 1;
+}
+
+starpu_codelet work = {
+	.where = STARPU_CPU,
+	.cpu_func = work_cpu,
+        .nbuffers = 1
+};
+
+static int x;
+static starpu_data_handle x_handle, f_handle;
+
+void callback(void *arg) {
+	starpu_insert_task(&work, STARPU_W, starpu_data_get_sub_data(f_handle, 1, x), 0);
+	starpu_data_release(x_handle);
+}
+
+int main(int argc, char **argv)
+{
+        int i, ret;
+	float *f;
+
+	starpu_init(NULL);
+
+	/* Declare x */
+	starpu_variable_data_register(&x_handle, 0, (uintptr_t)&x, sizeof(x));
+
+	/* Allocate and Declare f */
+	starpu_malloc((void**)&f, N * sizeof(*f));
+	memset(f, 0, N * sizeof(*f));
+	starpu_vector_data_register(&f_handle, 0, (uintptr_t)f, N, sizeof(*f));
+
+	/* Partition f */
+	struct starpu_data_filter filter = {
+		.filter_func = starpu_block_filter_func_vector,
+		.nchildren = M,
+	};
+	starpu_data_partition(f_handle, &filter);
+
+	/* Compute which portion we will work on */
+        ret = starpu_insert_task(&which_index, STARPU_W, x_handle, 0);
+	if (ret == -ENODEV) goto enodev;
+
+	/* And submit the corresponding task */
+#ifdef __GCC__
+	STARPU_DATA_ACQUIRE_CB(
+			x_handle,
+			STARPU_R,
+			starpu_insert_task(&work, STARPU_W, starpu_data_get_sub_data(f_handle, 1, x), 0)
+			);
+#else
+	starpu_data_acquire_cb(x_handle, STARPU_W, callback, NULL);
+#endif
+
+	starpu_task_wait_for_all();
+	starpu_data_unpartition(f_handle, 0);
+	starpu_data_unregister(f_handle);
+	starpu_data_unregister(x_handle);
+
+        FPRINTF(stderr, "VALUES: %d", x);
+
+        for(i=0 ; i<N ; i++) {
+		FPRINTF(stderr, " %f", f[i]);
+        }
+
+	STARPU_ASSERT(f[X*(N/M)] == 1);
+	STARPU_ASSERT(f[X*(N/M)+1] == 2);
+	STARPU_ASSERT(f[X*(N/M)+2] == 3);
+	STARPU_ASSERT(f[X*(N/M)+3] == 4);
+
+	FPRINTF(stderr, "\n");
+
+	starpu_shutdown();
+	return 0;
+
+enodev:
+	fprintf(stderr, "WARNING: No one can execute this task\n");
+	/* yes, we do not perform the computation but we did detect that no one
+ 	 * could perform the kernel, so this is not an error from StarPU */
+	return 77;
+}

+ 5 - 3
tests/datawizard/acquire_release.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * 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
@@ -17,6 +17,8 @@
 
 #include <starpu.h>
 
+#define FPRINTF(ofile, fmt, args ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ##args); }} while(0)
+
 static unsigned ntasks = 10000;
 
 #ifdef STARPU_USE_CUDA
@@ -63,7 +65,7 @@ int main(int argc, char **argv)
         starpu_init(NULL);
 	starpu_variable_data_register(&token_handle, 0, (uintptr_t)&token, sizeof(unsigned));
 
-        fprintf(stderr, "Token: %d\n", token);
+        FPRINTF(stderr, "Token: %u\n", token);
 
 	for(i=0; i<ntasks; i++)
 	{
@@ -79,7 +81,7 @@ int main(int argc, char **argv)
 
 	starpu_data_unregister(token_handle);
 
-        fprintf(stderr, "Token: %d\n", token);
+        FPRINTF(stderr, "Token: %u\n", token);
         STARPU_ASSERT(token==ntasks*2);
 
 	starpu_shutdown();

+ 9 - 3
tests/datawizard/acquire_release2.c

@@ -16,6 +16,8 @@
 
 #include <starpu.h>
 
+#define FPRINTF(ofile, fmt, args ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ##args); }} while(0)
+
 static unsigned ntasks = 40000;
 
 #ifdef STARPU_USE_CUDA
@@ -55,7 +57,7 @@ void callback(void *arg __attribute__ ((unused)))
         starpu_data_release(token_handle);
 }
 
-#warning add threads
+#warning TODO add threads
 
 int main(int argc, char **argv)
 {
@@ -64,7 +66,11 @@ int main(int argc, char **argv)
         starpu_init(NULL);
 	starpu_variable_data_register(&token_handle, 0, (uintptr_t)&token, sizeof(unsigned));
 
-        fprintf(stderr, "Token: %d\n", token);
+        FPRINTF(stderr, "Token: %u\n", token);
+
+#ifdef STARPU_SLOW_MACHINE
+	ntasks /= 10;
+#endif
 
 	for(i=0; i<ntasks; i++)
 	{
@@ -74,7 +80,7 @@ int main(int argc, char **argv)
 	}
 
 	starpu_data_unregister(token_handle);
-        fprintf(stderr, "Token: %d\n", token);
+        FPRINTF(stderr, "Token: %u\n", token);
         assert(token==ntasks);
 
 	starpu_shutdown();

+ 235 - 0
tests/datawizard/data_lookup.c

@@ -0,0 +1,235 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2011  Institut National de Recherche en Informatique et Automatique
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+#undef NDEBUG
+#include <assert.h>
+
+#include <starpu.h>
+#include <stdlib.h>
+#include <sys/types.h>
+
+static void task(void **buffers, void *args)
+{
+	float *numbers;
+	size_t size, i;
+
+	numbers = (float *) STARPU_VECTOR_GET_PTR(buffers[0]);
+	starpu_unpack_cl_args (args, &size);
+	for(i = 0; i < size; i++)
+	{
+		numbers[i] = i;
+	}
+}
+
+static starpu_codelet cl = {
+	.where = STARPU_CPU,
+	.cpu_func = task,
+	.nbuffers = 1
+};
+
+static int test_lazy_allocation()
+{
+	static const size_t count = 123;
+
+	size_t i;
+	void *pointer;
+	starpu_data_handle handle;
+	int ret;
+
+	/* Lazily-allocated vector.  */
+	starpu_vector_data_register(&handle, -1, 0 /* NULL */,
+				    count, sizeof(float));
+
+	ret = starpu_insert_task(&cl,
+				 STARPU_W, handle,
+				 STARPU_VALUE, &count, sizeof(size_t),
+				 0);
+	if (ret == -ENODEV) return ret;
+	/* yes, we do not perform the computation but we did detect that no one
+	 * could perform the kernel, so this is not an error from StarPU */
+
+	/* Acquire the handle, forcing a local allocation.  */
+	starpu_data_acquire(handle, STARPU_R);
+
+	/* Make sure we have a local pointer to it.  */
+	pointer = starpu_handle_get_local_ptr(handle);
+	assert(pointer != NULL);
+	for(i = 0; i < count; i++)
+	{
+		float *numbers = (float *)pointer;
+		assert(numbers[i] == i);
+	}
+
+	/* Make sure the pointer/handle mapping is up-to-date.  */
+	assert(starpu_data_lookup(pointer) == handle);
+
+	starpu_data_release(handle);
+	starpu_data_unregister(handle);
+
+	assert(starpu_data_lookup(pointer) == NULL);
+	return 0;
+}
+
+#define VECTOR_COUNT    12
+#define VARIABLE_COUNT  42
+
+#define VECTOR_SIZE     123
+
+static void test_filters()
+{
+#define CHILDREN_COUNT 10
+	int err, i;
+	void *ptr, *children_pointers[CHILDREN_COUNT];
+	starpu_data_handle handle;
+
+	err = starpu_malloc(&ptr, VECTOR_SIZE * sizeof(*ptr));
+	assert(err == 0);
+
+	starpu_vector_data_register(&handle, 0, (uintptr_t)ptr,
+				    VECTOR_SIZE, sizeof(*ptr));
+
+	struct starpu_data_filter f =
+	{
+		.filter_func = starpu_block_filter_func_vector,
+		.nchildren = CHILDREN_COUNT
+	};
+	starpu_data_partition(handle, &f);
+	assert(starpu_data_get_nb_children(handle) == CHILDREN_COUNT);
+
+	for (i = 0; i < CHILDREN_COUNT; i++)
+	{
+                starpu_data_handle child;
+
+		child = starpu_data_get_sub_data(handle, 1, i);
+		children_pointers[i] = starpu_handle_get_local_ptr(child);
+		assert(children_pointers[i] != NULL);
+
+		/* Make sure we have a pointer -> handle mapping for CHILD.  */
+		assert(starpu_data_lookup(children_pointers[i]) == child);
+	}
+
+	starpu_data_unpartition(handle, 0);
+
+	for (i = 0; i < CHILDREN_COUNT; i++)
+	{
+		if (children_pointers[i] != ptr)
+			/* Make sure the pointer -> handle mapping is gone.  */
+			assert(starpu_data_lookup(children_pointers[i]) == NULL);
+	}
+
+	/* Make sure the parent's mapping is back.  */
+	assert(starpu_data_lookup(ptr) == handle);
+
+	starpu_data_unregister(handle);
+	starpu_free(ptr);
+
+#undef CHILDREN_COUNT
+}
+
+int main(int argc, char *argv[])
+{
+	int err;
+	size_t i;
+	void *vectors[VECTOR_COUNT], *variables[VARIABLE_COUNT];
+	starpu_data_handle vector_handles[VECTOR_COUNT];
+	starpu_data_handle variable_handles[VARIABLE_COUNT];
+
+	starpu_init(NULL);
+
+	/* Register data regions.  */
+
+	for(i = 0; i < VARIABLE_COUNT; i++)
+	{
+		err = starpu_malloc(&variables[i], sizeof(float));
+		assert(err == 0);
+		starpu_variable_data_register(&variable_handles[i], 0,
+					      (uintptr_t)variables[i],
+					      sizeof(float));
+	}
+
+	for(i = 0; i < VECTOR_COUNT; i++)
+	{
+		err = starpu_malloc(&vectors[i], VECTOR_SIZE * sizeof(float));
+		assert(err == 0);
+		starpu_vector_data_register(&vector_handles[i], 0,
+					    (uintptr_t)vectors[i],
+					    VECTOR_SIZE, sizeof(float));
+	}
+
+	/* Look them up.  */
+
+	for(i = 0; i < VARIABLE_COUNT; i++)
+	{
+		starpu_data_handle handle;
+
+		handle = starpu_data_lookup(variables[i]);
+		assert(handle == variable_handles[i]);
+	}
+
+	for(i = 0; i < VECTOR_COUNT; i++)
+	{
+		starpu_data_handle handle;
+
+		handle = starpu_data_lookup(vectors[i]);
+		assert(handle == vector_handles[i]);
+	}
+
+	/* Unregister them.  */
+
+	for(i = 0; i < VARIABLE_COUNT; i++)
+	{
+		starpu_data_unregister(variable_handles[i]);
+	}
+
+	for(i = 0; i < VECTOR_COUNT; i++)
+	{
+		starpu_data_unregister(vector_handles[i]);
+	}
+
+	/* Make sure we can no longer find them.  */
+
+	for(i = 0; i < VARIABLE_COUNT; i++)
+	{
+		starpu_data_handle handle;
+
+		handle = starpu_data_lookup(variables[i]);
+		assert(handle == NULL);
+		starpu_free(variables[i]);
+	}
+
+	for(i = 0; i < VECTOR_COUNT; i++)
+	{
+		starpu_data_handle handle;
+
+		handle = starpu_data_lookup(vectors[i]);
+		assert(handle == NULL);
+		starpu_free(vectors[i]);
+	}
+
+	err = test_lazy_allocation();
+	if (err == -ENODEV) goto enodev;
+	test_filters();
+
+	starpu_shutdown();
+
+	return EXIT_SUCCESS;
+
+enodev:
+	fprintf(stderr, "WARNING: No one can execute this task\n");
+	/* yes, we do not perform the computation but we did detect that no one
+ 	 * could perform the kernel, so this is not an error from StarPU */
+	return 77;
+}

+ 124 - 0
tests/datawizard/handle_to_pointer.c

@@ -0,0 +1,124 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2011  Institut National de Recherche en Informatique et Automatique
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+#undef NDEBUG
+#include <assert.h>
+
+#include <starpu.h>
+#include <stdlib.h>
+
+static void cpu_task(void **buffers, void *args)
+{
+	int *numbers;
+	int i;
+	size_t size;
+
+	numbers = (int *) STARPU_VECTOR_GET_PTR(buffers[0]);
+	starpu_unpack_cl_args (args, &size);
+
+	for(i = 0; i < size; i++)
+	{
+		numbers[i] = i;
+	}
+}
+
+#ifdef STARPU_USE_CUDA
+static void cuda_task(void **buffers, void *args)
+{
+	int *numbers;
+	int i;
+	size_t size;
+
+	numbers = (int *)STARPU_VECTOR_GET_PTR(buffers[0]);
+	starpu_unpack_cl_args (args, &size);
+
+	for(i = 0; i < size; i++)
+	{
+		cudaMemcpy(&numbers[i], &i, sizeof(int), cudaMemcpyHostToDevice);
+	}
+}
+#endif
+
+static starpu_codelet cl = {
+	.where = STARPU_CPU | STARPU_CUDA,
+	.cpu_func = cpu_task,
+#ifdef STARPU_USE_CUDA
+	.cuda_func = cuda_task,
+#endif
+	.nbuffers = 1
+};
+
+int main(int argc, char *argv[])
+{
+	int err;
+	size_t i;
+	int *pointer;
+	starpu_data_handle handle;
+	static const size_t count = 123;
+
+	starpu_init(NULL);
+
+	err = starpu_malloc((void **)&pointer, count * sizeof(int));
+	assert((err == 0) && (pointer != NULL));
+
+	starpu_variable_data_register(&handle, 0, (uintptr_t)pointer,
+				      sizeof(int));
+	assert(starpu_handle_to_pointer(handle, 0) == pointer);
+	starpu_data_unregister(handle);
+
+	starpu_vector_data_register(&handle, 0, (uintptr_t)pointer,
+				    count, sizeof(int));
+	assert(starpu_handle_to_pointer(handle, 0) == pointer);
+	starpu_data_unregister(handle);
+
+	starpu_matrix_data_register(&handle, 0, (uintptr_t)pointer, 0,
+				    count, 1, sizeof(int));
+	assert(starpu_handle_to_pointer(handle, 0) == pointer);
+	starpu_data_unregister(handle);
+
+	starpu_free(pointer);
+	pointer = NULL;
+
+	/* Lazy allocation.  */
+	starpu_vector_data_register(&handle, -1, 0 /* NULL */,
+				    count, sizeof(int));
+	assert(starpu_handle_to_pointer(handle, 0) == NULL);
+
+	/* Pass the handle to a task.  */
+	starpu_insert_task(&cl,
+			   STARPU_W, handle,
+			   STARPU_VALUE, &count, sizeof(count),
+			   0);
+
+	/* Acquire the handle, forcing a local allocation.  */
+	starpu_data_acquire(handle, STARPU_R);
+
+	/* Make sure we have a local pointer to it.  */
+	pointer = starpu_handle_to_pointer(handle, 0);
+	assert(pointer != NULL);
+	for(i = 0; i < count; i++)
+	{
+		int *numbers = (int *)pointer;
+		assert(numbers[i] == i);
+	}
+	starpu_data_release(handle);
+
+	starpu_data_unregister(handle);
+
+	starpu_shutdown();
+
+	return EXIT_SUCCESS;
+}

+ 125 - 0
tests/datawizard/lazy_allocation.c

@@ -0,0 +1,125 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2010  Université de Bordeaux 1
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <errno.h>
+#include <starpu.h>
+#include <starpu_cuda.h>
+#include <stdlib.h>
+
+#define VECTORSIZE	1024
+#define FPRINTF(ofile, fmt, args ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ##args); }} while(0)
+
+static starpu_data_handle v_handle;
+
+/*
+ *	Memset
+ */
+
+#ifdef STARPU_USE_CUDA
+static void cuda_memset_codelet(void *descr[], __attribute__ ((unused)) void *_args)
+{
+	char *buf = (char *)STARPU_VECTOR_GET_PTR(descr[0]);
+	unsigned length = STARPU_VECTOR_GET_NX(descr[0]);
+
+	cudaMemsetAsync(buf, 42, length, starpu_cuda_get_local_stream());
+	cudaStreamSynchronize(starpu_cuda_get_local_stream());
+}
+#endif
+
+static void cpu_memset_codelet(void *descr[], __attribute__ ((unused)) void *_args)
+{
+	char *buf = (char *)STARPU_VECTOR_GET_PTR(descr[0]);
+	unsigned length = STARPU_VECTOR_GET_NX(descr[0]);
+
+	memset(buf, 42, length);
+}
+
+static starpu_codelet memset_cl = {
+	.where = STARPU_CPU|STARPU_CUDA,
+	.cpu_func = cpu_memset_codelet,
+#ifdef STARPU_USE_CUDA
+	.cuda_func = cuda_memset_codelet,
+#endif
+	.nbuffers = 1
+};
+
+/*
+ *	Check content
+ */
+
+static void cpu_check_content_codelet(void *descr[], __attribute__ ((unused)) void *_args)
+{
+	char *buf = (char *)STARPU_VECTOR_GET_PTR(descr[0]);
+	unsigned length = STARPU_VECTOR_GET_NX(descr[0]);
+
+	unsigned i;
+	for (i = 0; i < length; i++)
+	{
+		if (buf[i] != 42)
+		{
+			FPRINTF(stderr, "buf[%u] is %c while it should be %c\n", i, buf[i], 42);
+			exit(-1);
+		}
+	}
+}
+
+#ifdef STARPU_USE_CUDA
+static void cuda_check_content_codelet(void *descr[], __attribute__ ((unused)) void *_args)
+{
+	char *buf = (char *)STARPU_VECTOR_GET_PTR(descr[0]);
+	unsigned length = STARPU_VECTOR_GET_NX(descr[0]);
+
+	unsigned i;
+	for (i = 0; i < length; i++)
+	{
+		char dst;
+		cudaMemcpy(&dst, &buf[i], sizeof(char), cudaMemcpyDeviceToHost);
+		if (dst != 42)
+		{
+			FPRINTF(stderr, "buf[%u] is %c while it should be %c\n", i, dst, 42);
+			exit(-1);
+		}
+	}
+}
+#endif
+
+static starpu_codelet check_content_cl = {
+	.where = STARPU_CPU|STARPU_CUDA,
+	.cpu_func = cpu_check_content_codelet,
+#ifdef STARPU_USE_CUDA
+	.cuda_func = cuda_check_content_codelet,
+#endif
+	.nbuffers = 1
+};
+
+
+int main(int argc, char **argv)
+{
+	starpu_init(NULL);
+	starpu_vector_data_register(&v_handle, (uint32_t)-1, (uintptr_t)NULL, VECTORSIZE, sizeof(char));
+
+	starpu_insert_task(&memset_cl, STARPU_W, v_handle, 0);
+        starpu_task_wait_for_all();
+
+	starpu_insert_task(&check_content_cl, STARPU_R, v_handle, 0);
+        starpu_task_wait_for_all();
+
+	starpu_data_unregister(v_handle);
+	starpu_shutdown();
+	return 0;
+}