Forráskód Böngészése

Fix gotoblas detection

Samuel Thibault 14 éve
szülő
commit
2668a39263

+ 2 - 2
configure.ac

@@ -1118,9 +1118,9 @@ AC_ARG_WITH(goto-dir, [AS_HELP_STRING([--with-goto-dir=<dir>], [specify GotoBLAS
 if test x$blas_lib = xgoto; then
 STARPU_CHECK_LIB(BLAS, gfortran, main,,)
 # Perhaps that GotoBLAS2 is available instead (so that we have libgotoblas2.{so,a})
-STARPU_CHECK_LIB(BLAS, goto2, sgemm_,, [havegoto2=no])
+STARPU_CHECK_LIB(BLAS, goto2, sgemm_,, [havegoto2=no], [$STARPU_BLAS_LDFLAGS])
 if test x$havegoto2 = xno; then
-STARPU_CHECK_LIB(BLAS, goto, sgemm_,,AC_MSG_ERROR([cannot find goto lib]))
+STARPU_CHECK_LIB(BLAS, goto, sgemm_,,AC_MSG_ERROR([cannot find goto lib]), [$STARPU_BLAS_LDFLAGS])
 fi
 AC_DEFINE(STARPU_GOTO, [1], [use STARPU_GOTO library])
 fi

+ 6 - 1
examples/basic_examples/vector_scal.c

@@ -27,7 +27,7 @@
 #include <starpu_opencl.h>
 #include <stdio.h>
 
-#define	NX	2048
+#define	NX	128
 #define FPRINTF(ofile, fmt, args ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ##args); }} while(0)
 
 extern void scal_cpu_func(void *buffers[], void *_args);
@@ -67,6 +67,9 @@ struct starpu_opencl_program opencl_program;
 
 int main(int argc, char **argv)
 {
+
+		simInitLibrary();
+
 	/* We consider a vector of float that is initialized just as any of C
  	 * data */
 	float vector[NX];
@@ -139,5 +142,7 @@ int main(int argc, char **argv)
 	FPRINTF(stderr, "AFTER: First element is %f\n", vector[0]);
 	FPRINTF(stderr, "AFTER: Last element is %f\n", vector[NX-1]);
 
+	closeThreads();
+
 	return 0;
 }

+ 2 - 0
examples/basic_examples/vector_scal_opencl_kernel.cl

@@ -14,6 +14,8 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#include "intrinsics.h"
+
 __kernel void vector_mult_opencl(__global float* val, int nx, float factor)
 {
         const int i = get_global_id(0);

+ 3 - 0
examples/spmv/spmv.c

@@ -106,6 +106,7 @@ static starpu_codelet spmv_cl = {
 
 int main(int argc, char **argv)
 {
+	simInitLibrary();
 	int ret;
 	unsigned part;
 	double timing;
@@ -266,5 +267,7 @@ int main(int argc, char **argv)
 	FPRINTF(stderr, "Computation took (in ms)\n");
 	FPRINTF(stdout, "%2.2f\n", timing/1000);
 
+	closeThreads();
+
 	return 0;
 }

+ 2 - 0
examples/spmv/spmv_opencl.cl

@@ -14,6 +14,8 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#include "intrinsics.h"
+
 __kernel void spmv(unsigned nnz, unsigned nrow,
                    __global float* nzval, __global unsigned* colind,
                    __global unsigned* rowptr, unsigned firstentry,

+ 1 - 1
src/core/perfmodel/perfmodel_bus.c

@@ -41,7 +41,7 @@
 #include <windows.h>
 #endif
 
-#define SIZE	(32*1024*1024*sizeof(char))
+#define SIZE	(32*1024*sizeof(char))
 #define NITER	128
 
 #define MAXCPUS	32

+ 3 - 0
tools/starpu_machine_display.c

@@ -72,6 +72,7 @@ static void display_all_combined_workers(void)
 
 int main(int argc, char **argv)
 {
+	simInitLibrary();
 	starpu_init(NULL);
 
 	unsigned ncpu = starpu_cpu_worker_get_count();
@@ -93,5 +94,7 @@ int main(int argc, char **argv)
 
 	starpu_shutdown();
 
+	closeThreads();
+
 	return 0;
 }