Commit b6a987d5 authored by coulaud's avatar coulaud

Now compile with Intel compiler and MKL library. Add new options in...

Now compile with Intel compiler and MKL library. Add new options in CMakeLists.ixt SCALFMM_USE_CBLAS and  SCALFMM_USE_MKL

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@50 2616d619-271b-44dc-8df4-d4a8f33a7222
parent dc9000d7
......@@ -8,13 +8,26 @@ STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource)
IF(insource)
MESSAGE(FATAL_ERROR "${PROJECT_NAME} requires an out of source build. Goto ./Build and tapes cmake ../")
ENDIF(insource)
#
# Options
OPTION( SCALFMM_USE_CBLAS "Set to ON to build ScaFMM with BLAS" ON )
OPTION( BUILD_TESTS "Set to ON to build fonctionnalities Tests" ON )
OPTION( BUILD_UTESTS "Set to ON to build UTests" ON )
#
if(SCALFMM_USE_CBLAS )
OPTION( SCALFMM_USE_MKL "Set to ON to build MKL CBLAS" OFF )
IF ( SCALFMM_USE_MKL )
SET(CBLAS_LIBRARIES "-L$ENV{MKLROOT}/lib -lmkl_intel_lp64 -lmkl_sequential -lmkl_core")
ELSE ( SCALFMM_USE_MKL )
FIND_PACKAGE(BLAS)
SET(CBLAS_LIBRARIES "-lcblas")
ENDIF ( SCALFMM_USE_MKL)
ENDIF(SCALFMM_USE_CBLAS)
#
ADD_DEFINITIONS(-O2 -Wall -Wshadow -Wpointer-arith -Wcast-qual)
CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/Sources/ScalFMM_config.h.cmake
${CMAKE_BINARY_DIR}/Sources/ScalFMM_config.h )
# Build - lib
add_subdirectory(Sources)
......
......@@ -15,3 +15,7 @@ add_library(
STATIC
${source_lib_files}
)
INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR}/Sources
)
#ifndef FBLAS_HPP
#define FBLAS_HPP
#include "ScalFMM_config.h"
#ifdef SCALFMM_USE_MKL
#include <mkl_cblas.h>
#else
#include <cblas.h>
//#include <mkl.h>
#endif
///////////////////////////////////////////////////////
// GEMV
......
......@@ -10,8 +10,8 @@ if(OPENMP_FOUND)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
#add blass
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lcblas")
#add CBLAS
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CBLAS_LIBRARIES}")
#ADD_DEFINITIONS(-Wl,--start-group $(MKLROOT)/lib/ia32/libmkl_intel.a $(MKLROOT)/lib/ia32/libmkl_sequential.a $(MKLROOT)/lib/ia32/libmkl_core.a -Wl,--end-group -lpthread)
#test
......@@ -29,6 +29,9 @@ file(
source_tests_files
./*.cpp
)
INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR}/Sources
)
# Add execs - 1 cpp = 1 exec
foreach(exec ${source_tests_files})
......
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