Loading CMakeLists.txt +12 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ 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_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 Loading @@ -55,6 +55,16 @@ 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() ##### Loading build +3 −0 Original line number Diff line number Diff line Loading @@ -31,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 @@ -66,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 @@ -91,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 +1 −2 Original line number Diff line number Diff line Loading @@ -14,8 +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 -DHAVE_MIC ) # TARGET_COMPILE_DEFINITIONS( tnl-heat-equation-eoc-test${debugExt} PUBLIC -DHAVE_MIC ) TARGET_COMPILE_DEFINITIONS( tnl-heat-equation${debugExt} PUBLIC ${MIC_CXX_FLAGS} ) ENDIF( BUILD_CUDA ) Loading netbeans_build.sh +1 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,6 @@ module load gcc-5.3.0 cmake-3.4.3 intel_parallel_studio_ex-2016.1 cd Debug #make -j 6 tnlMICArrayTest-dbg make -j 6 tnlMICArrayTest-dbg #make -j 6 tnlMICVectorTest-dbg make -j 6 tnl-heat-equation-dbg No newline at end of file src/TNL/Devices/MIC.h +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <TNL/Timer.h> #include <TNL/Devices/Cuda.h> #include <TNL/Debugging/StackBacktrace.h> namespace TNL { Loading Loading
CMakeLists.txt +12 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ 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_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 Loading @@ -55,6 +55,16 @@ 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() ##### Loading
build +3 −0 Original line number Diff line number Diff line Loading @@ -31,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 @@ -66,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 @@ -91,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 +1 −2 Original line number Diff line number Diff line Loading @@ -14,8 +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 -DHAVE_MIC ) # TARGET_COMPILE_DEFINITIONS( tnl-heat-equation-eoc-test${debugExt} PUBLIC -DHAVE_MIC ) TARGET_COMPILE_DEFINITIONS( tnl-heat-equation${debugExt} PUBLIC ${MIC_CXX_FLAGS} ) ENDIF( BUILD_CUDA ) Loading
netbeans_build.sh +1 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,6 @@ module load gcc-5.3.0 cmake-3.4.3 intel_parallel_studio_ex-2016.1 cd Debug #make -j 6 tnlMICArrayTest-dbg make -j 6 tnlMICArrayTest-dbg #make -j 6 tnlMICVectorTest-dbg make -j 6 tnl-heat-equation-dbg No newline at end of file
src/TNL/Devices/MIC.h +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <TNL/Timer.h> #include <TNL/Devices/Cuda.h> #include <TNL/Debugging/StackBacktrace.h> namespace TNL { Loading