From 0eb4ec7af53337cc360c78546f549e2ba9501c28 Mon Sep 17 00:00:00 2001 From: martinp16cs Date: Thu, 31 Oct 2019 10:36:54 +0100 Subject: [PATCH] use intel compiler instead of GCC --- cmake/CMakeLists.txt | 5 +++-- cmake/blasJoin/blasJoin.cpp | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index ba38fdc..ae0ac41 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -13,9 +13,10 @@ set(SOURCE_FILES_JOIN mainJoin.cpp blasJoin/blasJoin.cpp ${UTIL_SOURCES}) set(CMAKE_CXX_FLAGS "-std=c++11") if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=knl -mtune=knl -fpic -ffast-math -DNDEBUG -O3 -DNDDEBUG -fopenmp -lboost_system -Wl,--no-as-needed -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl") + # some issues with GNU, use Intel Compiler instead + # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=skylake-avx512 -fpic -ffast-math -DNDEBUG -O3 -DNDDEBUG -fopenmp -lboost_system -Wl,--no-as-needed -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xmic-avx512 -qopenmp -DNDEBUG -O3 -lmkl_intel_thread -liomp5 -lpthread -lmkl_core -lmkl_intel_lp64 -lboost_system") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xCore-AVX512 -qopenmp -DNDEBUG -O3 -lmkl_intel_thread -liomp5 -lpthread -lmkl_core -lmkl_intel_lp64 -lboost_system") # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qopt-report=2") add_definitions(-DDEBUG) endif() diff --git a/cmake/blasJoin/blasJoin.cpp b/cmake/blasJoin/blasJoin.cpp index 905e5fd..638723f 100644 --- a/cmake/blasJoin/blasJoin.cpp +++ b/cmake/blasJoin/blasJoin.cpp @@ -47,6 +47,7 @@ void blasSelfJoinCountOnly(const double *x, const size_t N, const size_t D, cons // perform regular matrix multiplication // C := alpha*A*B' + beta*C + // printf("blockRow: %zu, blockCol: %zu, D:%zu\n", blockRow, blockCol, D); cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasTrans, blockRow, blockCol, D, 1.0, &x[i*BLOCKSIZE*D], D, &x[j*BLOCKSIZE*D], D, 0.0, iresult, blockCol); /* -- GitLab