Commit 10c87720 authored by Swann Perarnau's avatar Swann Perarnau
Browse files

[ci] activate valgrind for benchmarks

Limit the size of the memory tested to avoid tricky overflows.
parent ec6b114f
......@@ -18,12 +18,8 @@ AM_CFLAGS += $(HWLOC_CFLAGS)
AM_LDFLAGS += $(HWLOC_LIBS)
endif
if HAVE_CUDA
LIBS += $(CUDA_CFLAGS)
LIBS += $(CUDA_LIBS)
AM_CFLAGS += $(CUDA_CFLAGS)
AM_LDFLAGS += $(CUDA_LIBS)
endif
# valgrind support
@VALGRIND_CHECK_RULES@
noinst_LIBRARIES = libkernel.a
libkernel_a_SOURCES = utils.c utils.h blas_l1_kernel.c blas_l1_kernel.h verify_blas_l1.c verify_blas_l1.h
......
......@@ -25,7 +25,7 @@
/* Look into another way to define these parameters */
#define DEFAULT_ARRAY_SIZE (1UL << 20)
#define DEFAULT_ARRAY_SIZE (1UL << 15)
#ifdef NTIMES
#if NTIMES <= 1
......@@ -44,8 +44,6 @@
#define MAX(x, y) ((x) > (y) ? (x) : (y))
#endif
extern int omp_get_num_threads(void);
static double *a, *b, *c;
typedef double (*r)(size_t, double *, double *, double *, double);
......
......@@ -10,7 +10,6 @@
#include <assert.h>
#include <errno.h>
#include <omp.h>
#include <stdio.h>
#include <unistd.h>
......@@ -49,8 +48,6 @@
#define abs(a) ((a) >= 0 ? (a) : -(a))
#endif
extern int omp_get_num_threads(void);
static double *pt;
double run_dasum(size_t tilesize,
......@@ -227,7 +224,7 @@ double run_idmax(size_t tilesize,
#pragma omp parallel
{
double local_max;
double local_max = -DBL_MAX;
size_t local_maxid;
#pragma omp parallel for
for (size_t i = 0; i < ntiles; i++) {
......
......@@ -17,6 +17,12 @@
#ifndef AML_BENCHS_UTILS_H
#define AML_BENCHS_UTILS_H 1
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_num_threads() 1
#endif
void log_init(const char *nm);
void log_msg(const char *level, unsigned int line, const char *fmt, ...);
double mysecond(void);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment