...
 
Commits (3)
cmake_minimum_required(VERSION 3.6)
project(ego2)
project(hilbertJoin)
## set gcc compiler, tested with gcc 6.1.0
# export CC=/opt/gcc6.1.0/usr/local/bin/gcc
......@@ -19,7 +19,9 @@ set(SOURCE_FILES_JOIN mainJoin.cpp hilbertjoin/egojoin.cpp hilbertjoin/hilloop.c
# adding MKL include directory
include_directories($ENV{MKLROOT}/include)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -march=knl -mtune=knl -ffast-math -fassociative-math -O3 -fopenmp -lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread -liomp5 -lboost_system")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -march=knl -mtune=knl -ffast-math -fassociative-math -O3 -fopenmp -lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread -liomp5 -lboost_system")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -march=knl -mtune=knl -ffast-math -fassociative-math -O3 -fopenmp -lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread -liomp5")
# xeon-phi
link_directories($ENV{MKLROOT}/lib/intel64)
......@@ -42,28 +44,30 @@ find_library ( mkl_omp_LIB NAMES libiomp5.a
####################
# cmake -DCMAKE_BUILD_TYPE=Debug ..
# and ignore the warning: "Manually-specified variables were not used by the project: CMAKE_BUID_TYPE"
set(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -march=knl -mtune=knl -fpic -ffast-math -O0 -DNDDEBUG -fopenmp -lboost_system -lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread -liomp5")
# set(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -march=knl -mtune=knl -fpic -ffast-math -O0 -DNDDEBUG -fopenmp -lboost_system -lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread -liomp5")
set(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -march=knl -mtune=knl -fpic -ffast-math -O0 -DNDDEBUG -fopenmp -lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread -liomp5")
# add_executable(egoHilb ${SOURCE_FILES})
add_executable(hilbertJoinCardinality ${SOURCE_FILES_JOIN})
add_executable(hilbertSelfJoinCardinality ${SOURCE_FILES_SELF})
add_executable(hilbertJoinCountOnly ${SOURCE_FILES_JOIN})
add_executable(hilbertSelfJoinCountOnly ${SOURCE_FILES_SELF})
target_compile_definitions(hilbertJoinCardinality PRIVATE -DCOUNT_ONLY)
target_compile_definitions(hilbertSelfJoinCardinality PRIVATE -DCOUNT_ONLY)
target_compile_definitions(hilbertJoinCountOnly PRIVATE -DCOUNT_ONLY)
target_compile_definitions(hilbertSelfJoinCountOnly PRIVATE -DCOUNT_ONLY)
## for a more verbose version comment out the next two lines
# target_compile_definitions(hilbertJoinCardinality PRIVATE -DOUTPUT)
# target_compile_definitions(hilbertSelfJoinCardinality PRIVATE -DOUTPUT)
## for a non-verbose version comment out the next two lines
target_compile_definitions(hilbertJoinCountOnly PRIVATE -DOUTPUT)
target_compile_definitions(hilbertSelfJoinCountOnly PRIVATE -DOUTPUT)
if ($ENV{KBLOCK})
target_compile_definitions(hilbertJoinCardinality PRIVATE -DKBLOCK=$ENV{KBLOCK})
target_compile_definitions(hilbertSelfJoinCardinality PRIVATE -DKBLOCK=$ENV{KBLOCK})
target_compile_definitions(hilbertJoinCountOnly PRIVATE -DKBLOCK=$ENV{KBLOCK})
target_compile_definitions(hilbertSelfJoinCountOnly PRIVATE -DKBLOCK=$ENV{KBLOCK})
endif()
if ($ENV{OMP_NUM_THREADS})
target_compile_definitions(hilbertJoinCardinality PRIVATE -DNUM_THREADS=$ENV{OMP_NUM_THREADS})
target_compile_definitions(hilbertSelfJoinCardinality PRIVATE -DNUM_THREADS=$ENV{OMP_NUM_THREADS})
target_compile_definitions(hilbertJoinCountOnly PRIVATE -DNUM_THREADS=$ENV{OMP_NUM_THREADS})
target_compile_definitions(hilbertSelfJoinCountOnly PRIVATE -DNUM_THREADS=$ENV{OMP_NUM_THREADS})
endif()
......
......@@ -17,7 +17,7 @@
#endif
#endif
#include <hbwmalloc.h>
// #include <hbwmalloc.h>
#include <errno.h>
#define ALIGNMENT 64
......