Browse Source

merge trunk

Nathalie Furmento 11 years ago
parent
commit
2b8c1894c6

+ 3 - 0
ChangeLog

@@ -344,6 +344,9 @@ Small changes:
   * Use C99 variadic macro support, not GNU.
   * Fix performance regression: dmda queues were inadvertently made
     LIFOs in r9611.
+  * By default, StarPU FFT examples are not compiled and checked, the
+    configure option --enable-starpufft-examples needs to be specified
+    to change this behaviour.
 
 StarPU 1.0.3 (svn revision 7379)
 ==============================================

+ 7 - 0
configure.ac

@@ -2241,6 +2241,11 @@ if test x$enable_starpufft = xyes -a \( \( x$enable_cpu = xyes -a x$have_fftw =
 fi
 AM_CONDITIONAL(BUILD_STARPUFFT, [test x$fft_support = xyes])
 
+AC_ARG_ENABLE(starpufft-examples, [AS_HELP_STRING([--enable-starpufft-examples],
+			[disable execution of StarPU FFT examples])],
+			enable_starpufft_examples=$enableval, enable_starpufft_examples=no)
+AM_CONDITIONAL(BUILD_STARPUFFT_EXAMPLES, [test x$enable_starpufft_examples = xyes])
+
 ##########################################
 # hwloc                                  #
 ##########################################
@@ -2473,6 +2478,8 @@ AC_OUTPUT([
 	mpi/starpumpi-1.1.pc
 	mpi/starpumpi-1.2.pc
 	starpufft/Makefile
+	starpufft/src/Makefile
+	starpufft/tests/Makefile
 	starpufft/libstarpufft.pc
 	starpufft/starpufft-1.0.pc
 	starpufft/starpufft-1.1.pc

+ 8 - 0
doc/doxygen/chapters/41configure_options.doxy

@@ -426,6 +426,14 @@ library has to be 'atlas' or 'goto'.
 Disable the build of libstarpufft, even if <c>fftw</c> or <c>cuFFT</c> is available.
 </dd>
 
+<dt>--enable-starpufft-examples</dt>
+<dd>
+\anchor enable-starpufft-examples
+\addindex __configure__--enable-starpufft-examples
+Enable the compilation and the execution of the libstarpufft examples.
+By default, they are neither compiled nor checked.
+</dd>
+
 <dt>--with-magma=<c>prefix</c></dt>
 <dd>
 \anchor with-magma

+ 1 - 1
doc/doxygen/doxygen-config.cfg.in

@@ -57,7 +57,7 @@ INPUT                  = @top_srcdir@/doc/doxygen/chapters \
 			 @top_srcdir@/include/starpu_worker.h \
 			 @top_srcdir@/include/starpu_sched_component.h \
 			 @top_srcdir@/mpi/include/ \
-			 @top_srcdir@/starpufft/starpufft.h \
+			 @top_srcdir@/starpufft/include/starpufft.h \
 			 @top_srcdir@/sc_hypervisor/include
 
 EXAMPLE_PATH           = @top_srcdir@/doc/doxygen \

+ 2 - 2
examples/sched_ctx/parallel_code.c

@@ -74,7 +74,7 @@ void *th(void* p)
 int main(int argc, char **argv)
 {
 	int ntasks = NTASKS;
-	int ret;
+	int ret, j, k;
 
 	ret = starpu_init(NULL);
 	if (ret == -ENODEV)
@@ -94,7 +94,7 @@ int main(int argc, char **argv)
 
 	nprocs1 = ncpus/2;
 	nprocs2 =  nprocs1;
-	int j, k = 0;
+	k = 0;
 	for(j = nprocs1; j < nprocs1+nprocs2; j++)
 		procs2[k++] = j;
 #else

+ 9 - 9
mpi/examples/Makefile.am

@@ -120,7 +120,7 @@ mpi_lu_plu_example_float_SOURCES =	\
 	mpi_lu/plu_solve_float.c	\
 	mpi_lu/pslu_kernels.c		\
 	mpi_lu/pslu.c			\
-	$(top_srcdir)/examples/common/blas.c
+	../../examples/common/blas.c
 
 mpi_lu_plu_example_double_LDADD =	\
 	../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la	\
@@ -132,7 +132,7 @@ mpi_lu_plu_example_double_SOURCES =	\
 	mpi_lu/plu_solve_double.c  	\
 	mpi_lu/pdlu_kernels.c	    	\
 	mpi_lu/pdlu.c		    	\
-	$(top_srcdir)/examples/common/blas.c
+	../../examples/common/blas.c
 
 mpi_lu_plu_implicit_example_float_LDADD =	\
 	../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la	\
@@ -144,7 +144,7 @@ mpi_lu_plu_implicit_example_float_SOURCES =	\
 	mpi_lu/plu_solve_float.c		\
 	mpi_lu/pslu_kernels.c			\
 	mpi_lu/pslu_implicit.c			\
-	$(top_srcdir)/examples/common/blas.c
+	../../examples/common/blas.c
 
 mpi_lu_plu_implicit_example_double_LDADD =	\
 	../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la	\
@@ -156,7 +156,7 @@ mpi_lu_plu_implicit_example_double_SOURCES =	\
 	mpi_lu/plu_solve_double.c		\
 	mpi_lu/pdlu_kernels.c			\
 	mpi_lu/pdlu_implicit.c			\
-	$(top_srcdir)/examples/common/blas.c
+	../../examples/common/blas.c
 
 mpi_lu_plu_outofcore_example_float_LDADD =	\
 	../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la	\
@@ -168,7 +168,7 @@ mpi_lu_plu_outofcore_example_float_SOURCES =	\
 	mpi_lu/plu_solve_float.c		\
 	mpi_lu/pslu_kernels.c			\
 	mpi_lu/pslu_implicit.c			\
-	$(top_srcdir)/examples/common/blas.c
+	../../examples/common/blas.c
 
 mpi_lu_plu_outofcore_example_double_LDADD =	\
 	../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la	\
@@ -180,7 +180,7 @@ mpi_lu_plu_outofcore_example_double_SOURCES =	\
 	mpi_lu/plu_solve_double.c		\
 	mpi_lu/pdlu_kernels.c			\
 	mpi_lu/pdlu_implicit.c			\
-	$(top_srcdir)/examples/common/blas.c
+	../../examples/common/blas.c
 endif
 
 
@@ -200,7 +200,7 @@ matrix_decomposition_mpi_cholesky_SOURCES	=		\
 	matrix_decomposition/mpi_cholesky_codelets.c	\
 	matrix_decomposition/mpi_decomposition_params.c	\
 	matrix_decomposition/mpi_decomposition_matrix.c	\
-	$(top_srcdir)/examples/common/blas.c
+	../../examples/common/blas.c
 
 matrix_decomposition_mpi_cholesky_LDADD =			\
 	../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la	\
@@ -213,7 +213,7 @@ matrix_decomposition_mpi_cholesky_distributed_SOURCES =	\
 	matrix_decomposition/mpi_cholesky_codelets.c	\
 	matrix_decomposition/mpi_decomposition_params.c	\
 	matrix_decomposition/mpi_decomposition_matrix.c	\
-	$(top_srcdir)/examples/common/blas.c
+	../../examples/common/blas.c
 
 matrix_decomposition_mpi_cholesky_distributed_LDADD =	\
 	../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la	\
@@ -233,7 +233,7 @@ examplebin_PROGRAMS +=			\
 
 complex_mpi_complex_SOURCES =		\
 	complex/mpi_complex.c		\
-	$(top_srcdir)/examples/interface/complex_interface.c
+	../../examples/interface/complex_interface.c
 
 complex_mpi_complex_LDADD =		\
 	../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la

+ 2 - 2
mpi/tests/Makefile.am

@@ -212,10 +212,10 @@ endif
 mpi_reduction_SOURCES = mpi_reduction.c
 mpi_reduction_SOURCES += mpi_reduction_kernels.c
 user_defined_datatype_SOURCES = user_defined_datatype.c
-user_defined_datatype_SOURCES += $(top_srcdir)/examples/interface/complex_interface.c
+user_defined_datatype_SOURCES += ../../examples/interface/complex_interface.c
 
 mpi_earlyrecv2_SOURCES = mpi_earlyrecv2.c
-mpi_earlyrecv2_SOURCES += $(top_srcdir)/examples/interface/complex_interface.c
+mpi_earlyrecv2_SOURCES += ../../examples/interface/complex_interface.c
 
 showcheck:
 	-cat $(TEST_LOGS) /dev/null

+ 1 - 1
sc_hypervisor/examples/Makefile.am

@@ -40,7 +40,7 @@ cholesky_cholesky_implicit_SOURCES =		\
 	cholesky/cholesky_models.c		\
 	cholesky/cholesky_kernels.c		\
 	sched_ctx_utils/sched_ctx_utils.c	\
-	$(top_srcdir)/examples/common/blas.c
+	../../examples/common/blas.c
 
 cholesky_cholesky_implicit_LDADD =		\
 	$(top_builddir)/sc_hypervisor/src/libsc_hypervisor.la \

+ 8 - 99
starpufft/Makefile.am

@@ -15,111 +15,20 @@
 # See the GNU Lesser General Public License in COPYING.LGPL for more details.
 #
 
-AM_CFLAGS = $(GLOBAL_AM_CFLAGS) $(HWLOC_CFLAGS)
-AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_builddir)/include $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS)
+SUBDIRS=src
 
-lib_LTLIBRARIES = libstarpufft-@STARPU_EFFECTIVE_VERSION@.la
-
-EXTRA_DIST =			\
-	starpufft-float.h	\
-	starpufft-double.h	\
-	cudax_kernels.h		\
-	starpufftx.c		\
-	starpufftx1d.c		\
-	starpufftx2d.c		\
-	cuda_kernels.cu		\
-	cudaf_kernels.cu	\
-	cudax_kernels.cu	\
-	examples/testx.c	\
-	examples/testx_threads.c\
-	examples/testf_threads.c\
-	examples/test_threads.c
+if BUILD_STARPUFFT_EXAMPLES
+SUBDIRS += tests
+endif
 
 versincludedir = $(includedir)/starpu/$(STARPU_EFFECTIVE_VERSION)
 versinclude_HEADERS = 				\
-	starpufft.h
+	include/starpufft.h
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libstarpufft.pc starpufft-1.0.pc starpufft-1.1.pc starpufft-1.2.pc
 
-libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_SOURCES = starpufft.c starpufftf.c starpufft_common.c
-libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_LIBADD = $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la $(FFTW_LIBS) $(FFTWF_LIBS) $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_CUFFT_LDFLAGS)
-libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_CFLAGS = $(FFTWF_CFLAGS)
-libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_LDFLAGS = $(ldflags) -no-undefined					\
-  -version-info $(LIBSTARPUFFT_INTERFACE_CURRENT):$(LIBSTARPUFFT_INTERFACE_REVISION):$(LIBSTARPUFFT_INTERFACE_AGE)
-
-if STARPU_USE_CUDA
-NVCCFLAGS += -Xcompiler -fPIC -Xlinker -fPIC
-
-cudaf_kernels.o: cudaf_kernels.cu
-	$(NVCC) $(AM_CPPFLAGS) $< -c -o $@ --compiler-options -fno-strict-aliasing  $(NVCCFLAGS) -I${includedir}
-
-libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += cudaf_kernels.cu
-am_libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_OBJECTS = cudaf_kernels.o starpufft.lo starpufftf.lo starpufft_common.lo
-
-if STARPU_HAVE_CUFFTDOUBLECOMPLEX
-cuda_kernels.o: cuda_kernels.cu
-	$(NVCC) $(AM_CPPFLAGS) $< -c -o $@ --compiler-options -fno-strict-aliasing  $(NVCCFLAGS) -I${includedir}
-
-libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += cuda_kernels.cu
-am_libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_OBJECTS += cuda_kernels.o
-endif
-
-libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_LIBADD +=  $(STARPU_CUDA_LDFLAGS)
-endif
-
-CLEANFILES = starpu_idle_microsec.log
-examplebindir = $(libdir)/starpu/examples/starpufft
-
-if STARPU_HAVE_WINDOWS
-check_PROGRAMS	=	$(STARPU_FFT_EXAMPLES)
-else
-check_PROGRAMS	=	$(LOADER) $(STARPU_FFT_EXAMPLES)
-endif
-
-if !STARPU_HAVE_WINDOWS
-## test loader program
-LOADER			=	loader
-loader_CPPFLAGS 	=  	$(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
-LOADER_BIN		=	$(abs_top_builddir)/starpufft/$(LOADER)
-loader_SOURCES		=	../tests/loader.c
-
-if STARPU_HAVE_AM111
-TESTS_ENVIRONMENT	=	top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
-LOG_COMPILER		=	$(LOADER_BIN)
-else
-TESTS_ENVIRONMENT	=	top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN)
-endif
-
-endif
-
-examplebin_PROGRAMS =
-if BUILD_EXAMPLES
-examplebin_PROGRAMS +=				\
-	examples/testf \
-	examples/test
-endif
-STARPU_FFT_EXAMPLES = examples/testf
-examples_testf_LDADD = libstarpufft-@STARPU_EFFECTIVE_VERSION@.la $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la $(FFTWF_LIBS)
-
-# If we don't have CUDA, we assume that we have fftw available in double
-# precision anyway, we just want to make sure that if CUFFT is used, it also
-# supports double precision.
-if !STARPU_USE_CUDA
-STARPU_FFT_EXAMPLES += examples/test
-else
-if STARPU_HAVE_CUFFTDOUBLECOMPLEX
-STARPU_FFT_EXAMPLES += examples/test
-endif
-endif
-examples_test_LDADD = libstarpufft-@STARPU_EFFECTIVE_VERSION@.la $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la $(FFTW_LIBS)
-
-TESTS = $(STARPU_FFT_EXAMPLES)
-
-
-#check_PROGRAMS += examples/test_threads examples/testf_threads
-#examples_test_threads_LDADD = libstarpufft-@STARPU_EFFECTIVE_VERSION@.la $(top_builddir)/src/libstarpu.la -lfftw3_threads
-#examples_testf_threads_LDADD = libstarpufft-@STARPU_EFFECTIVE_VERSION@.la $(top_builddir)/src/libstarpu.la -lfftw3f_threads
-
 showcheck:
-	-cat $(TEST_LOGS) /dev/null
+	for i in $(SUBDIRS) ; do \
+		make -C $$i showcheck ; \
+	done

starpufft/starpufft.h → starpufft/include/starpufft.h


+ 61 - 0
starpufft/src/Makefile.am

@@ -0,0 +1,61 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2009-2013  Université de Bordeaux 1
+# Copyright (C) 2010, 2011, 2012, 2013, 2014  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.
+#
+
+AM_CFLAGS = $(GLOBAL_AM_CFLAGS) $(HWLOC_CFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/starpufft/include/ -I$(top_builddir)/include $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS)
+
+lib_LTLIBRARIES = libstarpufft-@STARPU_EFFECTIVE_VERSION@.la
+
+EXTRA_DIST =			\
+	starpufft-float.h	\
+	starpufft-double.h	\
+	cudax_kernels.h		\
+	starpufftx.c		\
+	starpufftx1d.c		\
+	starpufftx2d.c		\
+	cuda_kernels.cu		\
+	cudaf_kernels.cu	\
+	cudax_kernels.cu
+
+libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_SOURCES = starpufft.c starpufftf.c starpufft_common.c
+libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_LIBADD = $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la $(FFTW_LIBS) $(FFTWF_LIBS) $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_CUFFT_LDFLAGS)
+libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_CFLAGS = $(FFTWF_CFLAGS)
+libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_LDFLAGS = $(ldflags) -no-undefined					\
+  -version-info $(LIBSTARPUFFT_INTERFACE_CURRENT):$(LIBSTARPUFFT_INTERFACE_REVISION):$(LIBSTARPUFFT_INTERFACE_AGE)
+
+if STARPU_USE_CUDA
+NVCCFLAGS += -Xcompiler -fPIC -Xlinker -fPIC
+
+cudaf_kernels.o: cudaf_kernels.cu
+	$(NVCC) $(AM_CPPFLAGS) $< -c -o $@ --compiler-options -fno-strict-aliasing  $(NVCCFLAGS) -I${includedir}
+
+libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += cudaf_kernels.cu
+am_libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_OBJECTS = cudaf_kernels.o starpufft.lo starpufftf.lo starpufft_common.lo
+
+if STARPU_HAVE_CUFFTDOUBLECOMPLEX
+cuda_kernels.o: cuda_kernels.cu
+	$(NVCC) $(AM_CPPFLAGS) $< -c -o $@ --compiler-options -fno-strict-aliasing  $(NVCCFLAGS) -I${includedir}
+
+libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += cuda_kernels.cu
+am_libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_OBJECTS += cuda_kernels.o
+endif
+
+libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_LIBADD +=  $(STARPU_CUDA_LDFLAGS)
+endif
+
+showcheck:
+	-cat /dev/null

starpufft/cuda_kernels.cu → starpufft/src/cuda_kernels.cu


starpufft/cudaf_kernels.cu → starpufft/src/cudaf_kernels.cu


starpufft/cudax_kernels.cu → starpufft/src/cudax_kernels.cu


starpufft/cudax_kernels.h → starpufft/src/cudax_kernels.h


starpufft/starpufft-double.h → starpufft/src/starpufft-double.h


starpufft/starpufft-float.h → starpufft/src/starpufft-float.h


starpufft/starpufft.c → starpufft/src/starpufft.c


starpufft/starpufft_common.c → starpufft/src/starpufft_common.c


starpufft/starpufftf.c → starpufft/src/starpufftf.c


starpufft/starpufftx.c → starpufft/src/starpufftx.c


starpufft/starpufftx1d.c → starpufft/src/starpufftx1d.c


starpufft/starpufftx2d.c → starpufft/src/starpufftx2d.c


+ 84 - 0
starpufft/tests/Makefile.am

@@ -0,0 +1,84 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2009-2013  Université de Bordeaux 1
+# Copyright (C) 2010, 2011, 2012, 2013, 2014  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.
+#
+
+CLEANFILES = starpu_idle_microsec.log
+examplebindir = $(libdir)/starpu/examples/starpufft
+
+EXTRA_DIST =		\
+	testx.c		\
+	testx_threads.c	\
+	testf_threads.c	\
+	test_threads.c
+
+if STARPU_HAVE_WINDOWS
+check_PROGRAMS	=	$(STARPU_FFT_EXAMPLES)
+else
+check_PROGRAMS	=	$(LOADER) $(STARPU_FFT_EXAMPLES)
+endif
+
+if !STARPU_HAVE_WINDOWS
+## test loader program
+LOADER			=	loader
+loader_CPPFLAGS 	=  	$(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
+LOADER_BIN		=	$(abs_top_builddir)/starpufft/tests/$(LOADER)
+loader_SOURCES		=	../../tests/loader.c
+
+if STARPU_HAVE_AM111
+TESTS_ENVIRONMENT	=	top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
+LOG_COMPILER		=	$(LOADER_BIN)
+else
+TESTS_ENVIRONMENT	=	top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN)
+endif
+
+endif
+
+AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) $(GLOBAL_AM_CFLAGS) -Wno-unused
+LIBS = $(top_builddir)/src/@LIBSTARPU_LINK@ @LIBS@ $(FXT_LIBS) $(MAGMA_LIBS)
+AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_builddir)/include -I$(top_srcdir)/starpufft/include -I$(top_srcdir)/starpufft/src
+AM_LDFLAGS = $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(FXT_LDFLAGS)
+
+examplebin_PROGRAMS =
+if BUILD_EXAMPLES
+examplebin_PROGRAMS +=	\
+	testf 		\
+	test
+endif
+STARPU_FFT_EXAMPLES = testf
+testf_LDADD = ../src/libstarpufft-@STARPU_EFFECTIVE_VERSION@.la $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la $(FFTWF_LIBS)
+
+# If we don't have CUDA, we assume that we have fftw available in double
+# precision anyway, we just want to make sure that if CUFFT is used, it also
+# supports double precision.
+if !STARPU_USE_CUDA
+STARPU_FFT_EXAMPLES += test
+else
+if STARPU_HAVE_CUFFTDOUBLECOMPLEX
+STARPU_FFT_EXAMPLES += test
+endif
+endif
+test_LDADD = ../src/libstarpufft-@STARPU_EFFECTIVE_VERSION@.la $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la $(FFTW_LIBS)
+
+TESTS = $(STARPU_FFT_EXAMPLES)
+
+
+#check_PROGRAMS += examples/test_threads examples/testf_threads
+#examples_test_threads_LDADD = libstarpufft-@STARPU_EFFECTIVE_VERSION@.la $(top_builddir)/src/libstarpu.la -lfftw3_threads
+#examples_testf_threads_LDADD = libstarpufft-@STARPU_EFFECTIVE_VERSION@.la $(top_builddir)/src/libstarpu.la -lfftw3f_threads
+
+
+showcheck:
+	-cat $(TEST_LOGS) /dev/null

starpufft/examples/test.c → starpufft/tests/test.c


starpufft/examples/test_threads.c → starpufft/tests/test_threads.c


starpufft/examples/testf.c → starpufft/tests/testf.c


starpufft/examples/testf_threads.c → starpufft/tests/testf_threads.c


starpufft/examples/testx.c → starpufft/tests/testx.c


starpufft/examples/testx_threads.c → starpufft/tests/testx_threads.c


+ 15 - 1
tools/starpu_paje_draw_histogram.R

@@ -102,8 +102,22 @@ if (nrow(df)==0)
   stop("Result is empty!")
 
 # Plotting histograms
-plot <- ggplot(df, aes(x=Duration, fill=..count..)) + geom_histogram(binwidth = diff(range(df$Duration))/30)
+plot <- ggplot(df, aes(x=Duration)) + geom_histogram(aes(y=..count.., fill=..count..),binwidth = diff(range(df$Duration))/30)
 plot <- plot + theme_bw()  + scale_fill_gradient(high = "#132B43", low = "#56B1F7") + ggtitle("Histograms for state distribution") + ylab("Count") + xlab("Time [ms]") + theme(legend.position="none") + facet_grid(Origin~Value,scales = "free_y")
+
+# Adding text for total duration
+ad<-ggplot_build(plot)$data[[1]]
+al<-ggplot_build(plot)$panel$layout
+ad<-merge(ad,al)
+anno1 <- ddply(ad, .(ROW), summarise, x = max(x)*0.7, y = max(y)*0.9)
+anno1<-merge(anno1,al)
+anno2 <- ddply(df, .(Origin,Value), summarise, tot=as.integer(sum(Duration)))
+anno2$PANEL <- row.names(anno2)
+anno2$lab <- sprintf("Total duration: \n%ims",anno2$tot)
+anno <- merge(anno1,anno2)
+plot <- plot + geom_text(data = anno, aes(x=x, y=y, label=lab, colour="red"))
+
+# Printing plot
 plot
 
 # End