Loading CMakeLists.txt +14 −4 Original line number Diff line number Diff line Loading @@ -43,9 +43,9 @@ endif() # set Debug/Release options set( CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unused-local-typedefs -Wno-unused-variable" ) set( CMAKE_CXX_FLAGS_DEBUG "-g" ) set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -mtune=native -DNDEBUG" ) #set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -mtune=native -DNDEBUG -ftree-vectorizer-verbose=1 -ftree-vectorize -fopt-info-vec-missed -funroll-loops" ) set( CMAKE_CXX_FLAGS_DEBUG "-g -rdynamic" ) set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -DNDEBUG" ) #set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -DNDEBUG -ftree-vectorizer-verbose=1 -ftree-vectorize -fopt-info-vec-missed -funroll-loops" ) # pass -rdynamic only in Debug mode set( CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "" ) set( CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_DEBUG "-rdynamic" ) Loading @@ -54,7 +54,17 @@ 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 "${CXXFLAGS} -DHAVE_ICPC ") 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() ##### Loading build +6 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,9 @@ WITH_CUDA="yes" WITH_TESTS="yes" WITH_CUDA_ARCH="auto" WITH_TEMPLATE_INSTANTIATION="yes" WITH_TEMPLATE_INSTANTIATION="no" INSTANTIATE_LONG_INT="no" INSTANTIATE_INT="yes" INSTANTIATE_LONG_DOUBLE="no" Loading @@ -29,6 +31,7 @@ do --build=* ) BUILD="${option#*=}" ;; --with-clang=* ) WITH_CLANG="${option#*=}" ;; --with-tests=* ) WITH_TESTS="${option#*=}" ;; --with-mic=* ) WITH_MIC="${option#*=}" ;; --with-cuda=* ) WITH_CUDA="${option#*=}" ;; --with-cuda-arch=* ) WITH_CUDA_ARCH="${option#*=}";; --with-templates-instantiation=* ) WITH_TEMPLATE_INSTANTIATION="${option#*=}" ;; Loading Loading @@ -64,6 +67,7 @@ then echo " --prefix=PATH Prefix for the installation directory. ${HOME}/local by default." echo " --build=Debug/Release Build type." echo " --with-tests=yes/no Enable unit tests. 'yes' by default (libcppunit-dev is required)." 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." echo " --with-templates-instantiation=yes/no Some TNL templates are precompiled during the build. 'yes' by default." Loading @@ -89,6 +93,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} \ Loading examples/heat-equation/CMakeLists.txt +2 −1 Original line number Diff line number Diff line Loading @@ -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 ) Loading src/TNL/Assert.h +11 −11 Original line number Diff line number Diff line Loading @@ -48,10 +48,10 @@ { \ std::cerr << "Assertion '" << __STRING( ___tnl__assert_condition ) << "' failed !!!" << std::endl \ << "File: " << __FILE__ << std::endl \ << "Function: " << TNL_PRETTY_FUNCTION << std::endl \ << "Function: " << __PRETTY_FUNCTION__ << std::endl \ << "Line: " << __LINE__ << std::endl \ << "Diagnostics: "; \ ___tnl__assert_command; \ /*___tnl__assert_command; TODO: this is because of MIC*/ \ throw EXIT_FAILURE; \ } #endif // __CUDA_ARCH__ Loading src/TNL/CMakeLists.txt +2 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,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 Loading
CMakeLists.txt +14 −4 Original line number Diff line number Diff line Loading @@ -43,9 +43,9 @@ endif() # set Debug/Release options set( CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unused-local-typedefs -Wno-unused-variable" ) set( CMAKE_CXX_FLAGS_DEBUG "-g" ) set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -mtune=native -DNDEBUG" ) #set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -mtune=native -DNDEBUG -ftree-vectorizer-verbose=1 -ftree-vectorize -fopt-info-vec-missed -funroll-loops" ) set( CMAKE_CXX_FLAGS_DEBUG "-g -rdynamic" ) set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -DNDEBUG" ) #set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -DNDEBUG -ftree-vectorizer-verbose=1 -ftree-vectorize -fopt-info-vec-missed -funroll-loops" ) # pass -rdynamic only in Debug mode set( CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "" ) set( CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_DEBUG "-rdynamic" ) Loading @@ -54,7 +54,17 @@ 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 "${CXXFLAGS} -DHAVE_ICPC ") 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() ##### Loading
build +6 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,9 @@ WITH_CUDA="yes" WITH_TESTS="yes" WITH_CUDA_ARCH="auto" WITH_TEMPLATE_INSTANTIATION="yes" WITH_TEMPLATE_INSTANTIATION="no" INSTANTIATE_LONG_INT="no" INSTANTIATE_INT="yes" INSTANTIATE_LONG_DOUBLE="no" Loading @@ -29,6 +31,7 @@ do --build=* ) BUILD="${option#*=}" ;; --with-clang=* ) WITH_CLANG="${option#*=}" ;; --with-tests=* ) WITH_TESTS="${option#*=}" ;; --with-mic=* ) WITH_MIC="${option#*=}" ;; --with-cuda=* ) WITH_CUDA="${option#*=}" ;; --with-cuda-arch=* ) WITH_CUDA_ARCH="${option#*=}";; --with-templates-instantiation=* ) WITH_TEMPLATE_INSTANTIATION="${option#*=}" ;; Loading Loading @@ -64,6 +67,7 @@ then echo " --prefix=PATH Prefix for the installation directory. ${HOME}/local by default." echo " --build=Debug/Release Build type." echo " --with-tests=yes/no Enable unit tests. 'yes' by default (libcppunit-dev is required)." 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." echo " --with-templates-instantiation=yes/no Some TNL templates are precompiled during the build. 'yes' by default." Loading @@ -89,6 +93,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} \ Loading
examples/heat-equation/CMakeLists.txt +2 −1 Original line number Diff line number Diff line Loading @@ -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 ) Loading
src/TNL/Assert.h +11 −11 Original line number Diff line number Diff line Loading @@ -48,10 +48,10 @@ { \ std::cerr << "Assertion '" << __STRING( ___tnl__assert_condition ) << "' failed !!!" << std::endl \ << "File: " << __FILE__ << std::endl \ << "Function: " << TNL_PRETTY_FUNCTION << std::endl \ << "Function: " << __PRETTY_FUNCTION__ << std::endl \ << "Line: " << __LINE__ << std::endl \ << "Diagnostics: "; \ ___tnl__assert_command; \ /*___tnl__assert_command; TODO: this is because of MIC*/ \ throw EXIT_FAILURE; \ } #endif // __CUDA_ARCH__ Loading
src/TNL/CMakeLists.txt +2 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,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