Commit 73744cf5 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Merge branch 'MIC-devel' into develop

parents 658c2b59 b873c696
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -48,6 +48,22 @@ set( CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "" )
set( CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_DEBUG "-rdynamic" )
set( CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_RELEASE "" )

get_filename_component( CXX_COMPILER_NAME ${CMAKE_CXX_COMPILER} NAME )
if( CXX_COMPILER_NAME MATCHES "icpc" )
   message( "Intel compiler detected..."    )
   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_ICPC -wd2568 -wd2571 -wd2570")
   #####
   #  Ckeck for MIC 
   #
   if( WITH_MIC STREQUAL "yes" )
       message( "Compile MIC support..."    )
       set( MIC_CXX_FLAGS "-DHAVE_MIC")
       set( WITH_CUDA "no")
   else()
       set( MIC_CXX_FLAGS "")
   endif( )	
endif()

#####
# Check for CUDA
#
+3 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ do
        --verbose                        ) VERBOSE="VERBOSE=1" ;;
        --help                           ) HELP="yes" ;;
        --with-clang=*                   ) WITH_CLANG="${option#*=}" ;;
        --with-mic=*                     ) WITH_MIC="${option#*=}" ;;
        --with-cuda=*                    ) WITH_CUDA="${option#*=}" ;;
        --with-cuda-arch=*               ) WITH_CUDA_ARCH="${option#*=}";;
        --with-tests=*                   ) WITH_TESTS="${option#*=}" ;;
@@ -73,6 +74,7 @@ then
    echo "   --build-jobs=NUM                      Number of processes to be used for the build. It is set to the number of available CPU cores by default."
    echo "   --prefix=PATH                         Prefix for the installation directory. ${HOME}/local by default."
    echo "   --install=yes/no                      Enables the installation of TNL files."
    echo "   --with-mic=yes/no                     Enable MIC (Intel Xeon Phi). 'no' by default (Intel Compiler required)."
    echo "   --with-cuda=yes/no                    Enable CUDA. 'yes' by default (CUDA Toolkit is required)."
    echo "   --with-cuda-arch=all/auto/30/35/...   Choose CUDA architecture. 'auto' by default."
    echo "   --with-tests=yes/no                   Enable unit tests. 'yes' by default."
@@ -99,6 +101,7 @@ echo "Configuring ${BUILD} $TARGET ..."
${CMAKE} ${ROOT_DIR} \
         -DCMAKE_BUILD_TYPE=${BUILD} \
         -DCMAKE_INSTALL_PREFIX=${PREFIX} \
         -DWITH_MIC=${WITH_MIC} \
         -DWITH_CUDA=${WITH_CUDA} \
         -DWITH_CUDA_ARCH=${WITH_CUDA_ARCH} \
         -DWITH_TESTS=${WITH_TESTS} \
+2 −1
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ ELSE( BUILD_CUDA )
   ADD_EXECUTABLE(tnl-heat-equation-eoc-test${debugExt} tnl-heat-equation-eoc.cpp)   
   target_link_libraries (tnl-heat-equation${debugExt} tnl${debugExt}-${tnlVersion})
   target_link_libraries (tnl-heat-equation-eoc-test${debugExt} tnl${debugExt}-${tnlVersion} )
   TARGET_COMPILE_DEFINITIONS( tnl-heat-equation${debugExt} PUBLIC ${MIC_CXX_FLAGS} )
ENDIF( BUILD_CUDA )


+2 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
 * Implemented by: Jakub Klinkovsky
 */

#ifdef NDEBUG
#if defined(NDEBUG) || defined(HAVE_MIC)

// empty macros for optimized build
#define TNL_ASSERT_TRUE( val, msg )
+2 −0
Original line number Diff line number Diff line
@@ -92,6 +92,8 @@ if( BUILD_CUDA )
else( BUILD_CUDA )
   ADD_LIBRARY( tnl${debugExt}-${tnlVersion} SHARED 
                ${tnl_SOURCES} )
#ifMIC
  #TARGET_COMPILE_DEFINITIONS( tnl${debugExt}-${tnlVersion} PUBLIC -DHAVE_MIC )
endif( BUILD_CUDA )                                    
               
SET_TARGET_PROPERTIES( tnl${debugExt}-${tnlVersion} PROPERTIES 
Loading