Loading CMakeLists.txt +5 −7 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ # Vladimir Klement # Jakub Klinkovsky cmake_minimum_required( VERSION 2.8.10 ) cmake_minimum_required( VERSION 3.0 ) project( tnl ) Loading Loading @@ -100,9 +100,9 @@ if( WITH_CUDA STREQUAL "yes" ) set( CUDA_ARCH -gencode arch=compute_${WITH_CUDA_ARCH},code=sm_${WITH_CUDA_ARCH} ) endif() endif() set( CUDA_ADD_EXECUTABLE_OPTIONS ${CUDA_ARCH} ) set( CUDA_ADD_LIBRARY_OPTIONS ${CUDA_ARCH} -shared ) set( CUDA_LINKER_OPTIONS "-arch sm_20 -shared" ) set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ; ${CUDA_ARCH} ) # TODO: this is necessary only due to a bug in cmake set( CUDA_ADD_LIBRARY_OPTIONS -shared ) #### # Check for cuBLAS Loading Loading @@ -389,6 +389,4 @@ message( " CMAKE_CXX_FLAGS_RELEASE = ${CMAKE_CXX_FLAGS_RELEASE}" ) message( " CMAKE_SHARED_LIBRARY_LINK_C_FLAGS = ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}" ) message( " CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_DEBUG = ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_DEBUG}" ) message( " CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_RELEASE = ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_RELEASE}" ) message( " CUDA_ADD_EXECUTABLE_OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS}" ) message( " CUDA_ADD_LIBRARY_OPTIONS ${CUDA_ADD_LIBRARY_OPTIONS}" ) message( " CUDA_LINKER_OPTIONS ${CUDA_LINKER_OPTIONS}" ) message( " CUDA_NVCC_FLAGS = ${CUDA_NVCC_FLAGS}" ) tests/benchmarks/CMakeLists.txt +5 −16 Original line number Diff line number Diff line ADD_SUBDIRECTORY( share ) IF( BUILD_CUDA ) CUDA_ADD_EXECUTABLE( tnl-cuda-benchmarks${debugExt} tnl-cuda-benchmarks.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) SET_TARGET_PROPERTIES( tnl-cuda-benchmarks${debugExt} PROPERTIES CUDA_COMPILE_FLAGS "${CXX_OPTIMIZE_FLAGS}" ) CUDA_ADD_EXECUTABLE( tnl-cuda-benchmarks${debugExt} tnl-cuda-benchmarks.cu ) TARGET_LINK_LIBRARIES( tnl-cuda-benchmarks${debugExt} tnl${debugExt}-${tnlVersion} ${CUSPARSE_LIBRARY} ) CUDA_ADD_EXECUTABLE( tnl-benchmark-spmv${debugExt} tnl-benchmark-spmv.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) SET_TARGET_PROPERTIES( tnl-benchmark-spmv${debugExt} PROPERTIES CUDA_COMPILE_FLAGS "${CXX_OPTIMIZE_FLAGS}" ) CUDA_ADD_EXECUTABLE( tnl-benchmark-spmv${debugExt} tnl-benchmark-spmv.cu ) TARGET_LINK_LIBRARIES( tnl-benchmark-spmv${debugExt} tnl${debugExt}-${tnlVersion} ${CUSPARSE_LIBRARY} ) CUDA_ADD_EXECUTABLE( tnl-benchmark-linear-solvers${debugExt} tnl-benchmark-linear-solvers.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) SET_TARGET_PROPERTIES( tnl-benchmark-linear-solvers${debugExt} PROPERTIES CUDA_COMPILE_FLAGS "${CXX_OPTIMIZE_FLAGS}" ) CUDA_ADD_EXECUTABLE( tnl-benchmark-linear-solvers${debugExt} tnl-benchmark-linear-solvers.cu ) TARGET_LINK_LIBRARIES( tnl-benchmark-linear-solvers${debugExt} tnl${debugExt}-${tnlVersion} ${CUSPARSE_LIBRARY} ) CUDA_ADD_EXECUTABLE( tnl-benchmark-simple-heat-equation${debugExt} tnl-benchmark-simple-heat-equation.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) SET_TARGET_PROPERTIES( tnl-benchmark-simple-heat-equation${debugExt} PROPERTIES COMPILE_FLAGS "${CXX_OPTIMIZE_FLAGS}" ) CUDA_ADD_EXECUTABLE( tnl-benchmark-simple-heat-equation${debugExt} tnl-benchmark-simple-heat-equation.cu ) TARGET_LINK_LIBRARIES( tnl-benchmark-simple-heat-equation${debugExt} tnl${debugExt}-${tnlVersion} ) ELSE() ADD_EXECUTABLE( tnl-benchmark-spmv${debugExt} tnl-benchmark-spmv.cpp ) SET_TARGET_PROPERTIES( tnl-benchmark-spmv${debugExt} PROPERTIES COMPILE_FLAGS "${CXX_OPTIMIZE_FLAGS}" ) TARGET_LINK_LIBRARIES( tnl-benchmark-spmv${debugExt} tnl${debugExt}-${tnlVersion} ) ADD_EXECUTABLE( tnl-benchmark-linear-solvers${debugExt} tnl-benchmark-linear-solvers.cpp ) SET_TARGET_PROPERTIES( tnl-benchmark-linear-solvers${debugExt} PROPERTIES COMPILE_FLAGS "${CXX_OPTIMIZE_FLAGS}" ) TARGET_LINK_LIBRARIES( tnl-benchmark-linear-solvers${debugExt} tnl${debugExt}-${tnlVersion} ) ADD_EXECUTABLE( tnl-benchmark-simple-heat-equation${debugExt} tnl-benchmark-simple-heat-equation.cpp ) SET_TARGET_PROPERTIES( tnl-benchmark-simple-heat-equation${debugExt} PROPERTIES COMPILE_FLAGS "${CXX_OPTIMIZE_FLAGS}" ) TARGET_LINK_LIBRARIES( tnl-benchmark-simple-heat-equation${debugExt} tnl${debugExt}-${tnlVersion} ) ENDIF() Loading tests/long-time-unit-tests/CMakeLists.txt +4 −5 Original line number Diff line number Diff line Loading @@ -3,8 +3,7 @@ set( ENABLE_CODECOVERAGE ) SET( headers matrix-formats-test.h ) if( BUILD_CUDA ) CUDA_ADD_EXECUTABLE( tnl-test-matrix-formats${mpiExt}${debugExt} ${headers} matrix-formats-test.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) CUDA_ADD_EXECUTABLE( tnl-test-matrix-formats${mpiExt}${debugExt} ${headers} matrix-formats-test.cu ) else() ADD_EXECUTABLE( tnl-test-matrix-formats${mpiExt}${debugExt} ${headers} matrix-formats-test.cpp ) endif() Loading tests/unit-tests/core/arrays/CMakeLists.txt +14 −18 Original line number Diff line number Diff line Loading @@ -23,23 +23,19 @@ TARGET_LINK_LIBRARIES( tnlMultiArrayTest${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES if( BUILD_CUDA ) CUDA_ADD_EXECUTABLE( tnlArrayOperationsTest-cuda${mpiExt}${debugExt} ${headers} tnlArrayOperationsTest.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) CUDA_ADD_EXECUTABLE( tnlArrayOperationsTest-cuda${mpiExt}${debugExt} ${headers} tnlArrayOperationsTest.cu ) TARGET_LINK_LIBRARIES( tnlArrayOperationsTest-cuda${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} tnl${mpiExt}${debugExt}-${tnlVersion} ) CUDA_ADD_EXECUTABLE( tnlArrayTest-cuda${mpiExt}${debugExt} ${headers} tnlArrayTest.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) CUDA_ADD_EXECUTABLE( tnlArrayTest-cuda${mpiExt}${debugExt} ${headers} tnlArrayTest.cu ) TARGET_LINK_LIBRARIES( tnlArrayTest-cuda${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} tnl${mpiExt}${debugExt}-${tnlVersion} ) CUDA_ADD_EXECUTABLE( tnlStaticArrayTest-cuda${mpiExt}${debugExt} ${headers} tnlStaticArrayTest.cu OPTIONS -arch sm_20 -shared ) CUDA_ADD_EXECUTABLE( tnlStaticArrayTest-cuda${mpiExt}${debugExt} ${headers} tnlStaticArrayTest.cu ) TARGET_LINK_LIBRARIES( tnlStaticArrayTest-cuda${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} tnl${mpiExt}${debugExt}-${tnlVersion} ) CUDA_ADD_EXECUTABLE( tnlMultiArrayTest-cuda${mpiExt}${debugExt} ${headers} tnlMultiArrayTest.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) CUDA_ADD_EXECUTABLE( tnlMultiArrayTest-cuda${mpiExt}${debugExt} ${headers} tnlMultiArrayTest.cu ) TARGET_LINK_LIBRARIES( tnlMultiArrayTest-cuda${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} tnl${mpiExt}${debugExt}-${tnlVersion} ) Loading tests/unit-tests/core/cuda/CMakeLists.txt +5 −9 Original line number Diff line number Diff line Loading @@ -2,18 +2,14 @@ set( headers tnlCudaTester.h tnlCudaReductionTester.h ) if( BUILD_CUDA ) CUDA_ADD_EXECUTABLE( tnlCudaTest${mpiExt}${debugExt} ${headers} tnlCudaTest.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) CUDA_ADD_EXECUTABLE( tnlCudaTest${mpiExt}${debugExt} ${headers} tnlCudaTest.cu ) TARGET_LINK_LIBRARIES( tnlCudaTest${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} tnl${mpiExt}${debugExt}-0.1 ) CUDA_ADD_EXECUTABLE( tnl-reduction-test${mpiExt}${debugExt} ${headers} reduction-test.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) CUDA_ADD_EXECUTABLE( tnl-reduction-test${mpiExt}${debugExt} ${headers} reduction-test.cu ) TARGET_LINK_LIBRARIES( tnl-reduction-test${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} tnl${mpiExt}${debugExt}-0.1 ) endif() Loading
CMakeLists.txt +5 −7 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ # Vladimir Klement # Jakub Klinkovsky cmake_minimum_required( VERSION 2.8.10 ) cmake_minimum_required( VERSION 3.0 ) project( tnl ) Loading Loading @@ -100,9 +100,9 @@ if( WITH_CUDA STREQUAL "yes" ) set( CUDA_ARCH -gencode arch=compute_${WITH_CUDA_ARCH},code=sm_${WITH_CUDA_ARCH} ) endif() endif() set( CUDA_ADD_EXECUTABLE_OPTIONS ${CUDA_ARCH} ) set( CUDA_ADD_LIBRARY_OPTIONS ${CUDA_ARCH} -shared ) set( CUDA_LINKER_OPTIONS "-arch sm_20 -shared" ) set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ; ${CUDA_ARCH} ) # TODO: this is necessary only due to a bug in cmake set( CUDA_ADD_LIBRARY_OPTIONS -shared ) #### # Check for cuBLAS Loading Loading @@ -389,6 +389,4 @@ message( " CMAKE_CXX_FLAGS_RELEASE = ${CMAKE_CXX_FLAGS_RELEASE}" ) message( " CMAKE_SHARED_LIBRARY_LINK_C_FLAGS = ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}" ) message( " CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_DEBUG = ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_DEBUG}" ) message( " CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_RELEASE = ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_RELEASE}" ) message( " CUDA_ADD_EXECUTABLE_OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS}" ) message( " CUDA_ADD_LIBRARY_OPTIONS ${CUDA_ADD_LIBRARY_OPTIONS}" ) message( " CUDA_LINKER_OPTIONS ${CUDA_LINKER_OPTIONS}" ) message( " CUDA_NVCC_FLAGS = ${CUDA_NVCC_FLAGS}" )
tests/benchmarks/CMakeLists.txt +5 −16 Original line number Diff line number Diff line ADD_SUBDIRECTORY( share ) IF( BUILD_CUDA ) CUDA_ADD_EXECUTABLE( tnl-cuda-benchmarks${debugExt} tnl-cuda-benchmarks.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) SET_TARGET_PROPERTIES( tnl-cuda-benchmarks${debugExt} PROPERTIES CUDA_COMPILE_FLAGS "${CXX_OPTIMIZE_FLAGS}" ) CUDA_ADD_EXECUTABLE( tnl-cuda-benchmarks${debugExt} tnl-cuda-benchmarks.cu ) TARGET_LINK_LIBRARIES( tnl-cuda-benchmarks${debugExt} tnl${debugExt}-${tnlVersion} ${CUSPARSE_LIBRARY} ) CUDA_ADD_EXECUTABLE( tnl-benchmark-spmv${debugExt} tnl-benchmark-spmv.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) SET_TARGET_PROPERTIES( tnl-benchmark-spmv${debugExt} PROPERTIES CUDA_COMPILE_FLAGS "${CXX_OPTIMIZE_FLAGS}" ) CUDA_ADD_EXECUTABLE( tnl-benchmark-spmv${debugExt} tnl-benchmark-spmv.cu ) TARGET_LINK_LIBRARIES( tnl-benchmark-spmv${debugExt} tnl${debugExt}-${tnlVersion} ${CUSPARSE_LIBRARY} ) CUDA_ADD_EXECUTABLE( tnl-benchmark-linear-solvers${debugExt} tnl-benchmark-linear-solvers.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) SET_TARGET_PROPERTIES( tnl-benchmark-linear-solvers${debugExt} PROPERTIES CUDA_COMPILE_FLAGS "${CXX_OPTIMIZE_FLAGS}" ) CUDA_ADD_EXECUTABLE( tnl-benchmark-linear-solvers${debugExt} tnl-benchmark-linear-solvers.cu ) TARGET_LINK_LIBRARIES( tnl-benchmark-linear-solvers${debugExt} tnl${debugExt}-${tnlVersion} ${CUSPARSE_LIBRARY} ) CUDA_ADD_EXECUTABLE( tnl-benchmark-simple-heat-equation${debugExt} tnl-benchmark-simple-heat-equation.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) SET_TARGET_PROPERTIES( tnl-benchmark-simple-heat-equation${debugExt} PROPERTIES COMPILE_FLAGS "${CXX_OPTIMIZE_FLAGS}" ) CUDA_ADD_EXECUTABLE( tnl-benchmark-simple-heat-equation${debugExt} tnl-benchmark-simple-heat-equation.cu ) TARGET_LINK_LIBRARIES( tnl-benchmark-simple-heat-equation${debugExt} tnl${debugExt}-${tnlVersion} ) ELSE() ADD_EXECUTABLE( tnl-benchmark-spmv${debugExt} tnl-benchmark-spmv.cpp ) SET_TARGET_PROPERTIES( tnl-benchmark-spmv${debugExt} PROPERTIES COMPILE_FLAGS "${CXX_OPTIMIZE_FLAGS}" ) TARGET_LINK_LIBRARIES( tnl-benchmark-spmv${debugExt} tnl${debugExt}-${tnlVersion} ) ADD_EXECUTABLE( tnl-benchmark-linear-solvers${debugExt} tnl-benchmark-linear-solvers.cpp ) SET_TARGET_PROPERTIES( tnl-benchmark-linear-solvers${debugExt} PROPERTIES COMPILE_FLAGS "${CXX_OPTIMIZE_FLAGS}" ) TARGET_LINK_LIBRARIES( tnl-benchmark-linear-solvers${debugExt} tnl${debugExt}-${tnlVersion} ) ADD_EXECUTABLE( tnl-benchmark-simple-heat-equation${debugExt} tnl-benchmark-simple-heat-equation.cpp ) SET_TARGET_PROPERTIES( tnl-benchmark-simple-heat-equation${debugExt} PROPERTIES COMPILE_FLAGS "${CXX_OPTIMIZE_FLAGS}" ) TARGET_LINK_LIBRARIES( tnl-benchmark-simple-heat-equation${debugExt} tnl${debugExt}-${tnlVersion} ) ENDIF() Loading
tests/long-time-unit-tests/CMakeLists.txt +4 −5 Original line number Diff line number Diff line Loading @@ -3,8 +3,7 @@ set( ENABLE_CODECOVERAGE ) SET( headers matrix-formats-test.h ) if( BUILD_CUDA ) CUDA_ADD_EXECUTABLE( tnl-test-matrix-formats${mpiExt}${debugExt} ${headers} matrix-formats-test.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) CUDA_ADD_EXECUTABLE( tnl-test-matrix-formats${mpiExt}${debugExt} ${headers} matrix-formats-test.cu ) else() ADD_EXECUTABLE( tnl-test-matrix-formats${mpiExt}${debugExt} ${headers} matrix-formats-test.cpp ) endif() Loading
tests/unit-tests/core/arrays/CMakeLists.txt +14 −18 Original line number Diff line number Diff line Loading @@ -23,23 +23,19 @@ TARGET_LINK_LIBRARIES( tnlMultiArrayTest${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES if( BUILD_CUDA ) CUDA_ADD_EXECUTABLE( tnlArrayOperationsTest-cuda${mpiExt}${debugExt} ${headers} tnlArrayOperationsTest.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) CUDA_ADD_EXECUTABLE( tnlArrayOperationsTest-cuda${mpiExt}${debugExt} ${headers} tnlArrayOperationsTest.cu ) TARGET_LINK_LIBRARIES( tnlArrayOperationsTest-cuda${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} tnl${mpiExt}${debugExt}-${tnlVersion} ) CUDA_ADD_EXECUTABLE( tnlArrayTest-cuda${mpiExt}${debugExt} ${headers} tnlArrayTest.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) CUDA_ADD_EXECUTABLE( tnlArrayTest-cuda${mpiExt}${debugExt} ${headers} tnlArrayTest.cu ) TARGET_LINK_LIBRARIES( tnlArrayTest-cuda${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} tnl${mpiExt}${debugExt}-${tnlVersion} ) CUDA_ADD_EXECUTABLE( tnlStaticArrayTest-cuda${mpiExt}${debugExt} ${headers} tnlStaticArrayTest.cu OPTIONS -arch sm_20 -shared ) CUDA_ADD_EXECUTABLE( tnlStaticArrayTest-cuda${mpiExt}${debugExt} ${headers} tnlStaticArrayTest.cu ) TARGET_LINK_LIBRARIES( tnlStaticArrayTest-cuda${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} tnl${mpiExt}${debugExt}-${tnlVersion} ) CUDA_ADD_EXECUTABLE( tnlMultiArrayTest-cuda${mpiExt}${debugExt} ${headers} tnlMultiArrayTest.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) CUDA_ADD_EXECUTABLE( tnlMultiArrayTest-cuda${mpiExt}${debugExt} ${headers} tnlMultiArrayTest.cu ) TARGET_LINK_LIBRARIES( tnlMultiArrayTest-cuda${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} tnl${mpiExt}${debugExt}-${tnlVersion} ) Loading
tests/unit-tests/core/cuda/CMakeLists.txt +5 −9 Original line number Diff line number Diff line Loading @@ -2,18 +2,14 @@ set( headers tnlCudaTester.h tnlCudaReductionTester.h ) if( BUILD_CUDA ) CUDA_ADD_EXECUTABLE( tnlCudaTest${mpiExt}${debugExt} ${headers} tnlCudaTest.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) CUDA_ADD_EXECUTABLE( tnlCudaTest${mpiExt}${debugExt} ${headers} tnlCudaTest.cu ) TARGET_LINK_LIBRARIES( tnlCudaTest${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} tnl${mpiExt}${debugExt}-0.1 ) CUDA_ADD_EXECUTABLE( tnl-reduction-test${mpiExt}${debugExt} ${headers} reduction-test.cu OPTIONS ${CUDA_ADD_EXECUTABLE_OPTIONS} ) CUDA_ADD_EXECUTABLE( tnl-reduction-test${mpiExt}${debugExt} ${headers} reduction-test.cu ) TARGET_LINK_LIBRARIES( tnl-reduction-test${mpiExt}${debugExt} ${CPPUNIT_LIBRARIES} tnl${mpiExt}${debugExt}-0.1 ) endif()