Commit d56842d9 authored by Swann Perarnau's avatar Swann Perarnau

[refactor] Move benchmarks to icc+mkl

parent 2c452094
Pipeline #6952 passed with stage
in 9 minutes and 17 seconds
......@@ -21,9 +21,10 @@ make:generic:
make:knl:
stage: build
script:
- source /opt/intel/compilers_and_libraries/linux/bin/compilervars.sh intel64
- ./autogen.sh
- mkdir build
- ./configure --prefix=`pwd`/build
- CC=icc CFLAGS="-mkl -xhost" ./configure --prefix=`pwd`/build --enable-benchmarks
- make
- make install
- make check
......
#include <assert.h>
#include <cblas.h>
#include <errno.h>
#include <mkl.h>
#include <omp.h>
#include <pthread.h>
#include <stdio.h>
......@@ -38,15 +38,15 @@ unsigned long rdtsc(){
int intelMM(int argc, char* argv[]){
void *aIntel, *bIntel, *cIntel;
double *aIntel, *bIntel, *cIntel;
unsigned int m,n,p;
unsigned long intelNumRows, intelEsize;
intelNumRows = (unsigned long)sqrt(MEMSIZE/8);
intelEsize = intelNumRows * intelNumRows;
m = n = p = intelNumRows;
posix_memalign(&aIntel, 64, m*p*sizeof( double ));
posix_memalign(&bIntel, 64, p*n*sizeof( double ));
posix_memalign(&cIntel, 64, m*n*sizeof( double ));
aIntel = (double *)mkl_malloc( m*p*sizeof( double ), 64 );
bIntel = (double *)mkl_malloc( p*n*sizeof( double ), 64 );
cIntel = (double *)mkl_malloc( m*n*sizeof( double ), 64 );
if (aIntel == NULL || bIntel == NULL || cIntel == NULL) {
printf( "\n ERROR: Can't allocate memory for matrices. Aborting... \n");
free(aIntel);
......
#include <assert.h>
#include <cblas.h>
#include <errno.h>
#include <mkl.h>
#include <omp.h>
#include <pthread.h>
#include <stdio.h>
......
#include <assert.h>
#include <cblas.h>
#include <errno.h>
#include <mkl.h>
#include <omp.h>
#include <pthread.h>
#include <stdio.h>
......
......@@ -43,7 +43,6 @@ AC_ARG_ENABLE(benchmarks,
if [[ "x$benchmarks" = xtrue ]]; then
AX_OPENMP([AC_SUBST(OPENMP_FLAG, $OPENMP_CFLAGS)])
AC_CHECK_LIB(cblas, cblas_dgemm)
AC_CHECK_LIB(m, sqrt)
fi
AM_CONDITIONAL([ADD_BENCHMARKS],[test "x$benchmarks" = xtrue])
......
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