Commit d56842d9 authored by Swann Perarnau's avatar Swann Perarnau
Browse files

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