Loading CMakeLists.txt +17 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ else() endif() # set Debug/Release options set( CMAKE_CXX_FLAGS "-std=c++11" ) 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 -DNDEBUG" ) #set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -DNDEBUG -ftree-vectorizer-verbose=1 -ftree-vectorize -fopt-info-vec-missed -funroll-loops" ) Loading @@ -68,6 +68,10 @@ if( WITH_CUDA STREQUAL "yes" ) set(BUILD_SHARED_LIBS ON) set(CUDA_SEPARABLE_COMPILATION ON) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ;-DHAVE_CUDA) # disable false compiler warnings # reference for the -Xcudafe flag: http://stackoverflow.com/questions/14831051/how-to-disable-compiler-warnings-with-nvcc/17095910#17095910 # list of possible tokens: http://www.ssl.berkeley.edu/~jimm/grizzly_docs/SSL/opt/intel/cc/9.0/lib/locale/en_US/mcpcom.msg set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ; --expt-relaxed-constexpr -Xcudafe "\"--diag_suppress=code_is_unreachable --diag_suppress=implicit_return_from_non_void_function\"") #AddCompilerFlag( "-DHAVE_NOT_CXX11" ) # -U_GLIBCXX_ATOMIC_BUILTINS -U_GLIBCXX_USE_INT128 " ) set( ALL_CUDA_ARCHS -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 Loading Loading @@ -245,6 +249,18 @@ else() set( HAVE_SYS_RESOURCE_H "#define HAVE_SYS_RESOURCE_H 1" ) endif() find_path( SYS_IOCTL_INCLUDE_DIR sys/ioctl.h /usr/include/x86_64-linux-gnu /usr/include DOC "System ioctl headers." ) if( ${SYS_IOCTL_INCLUDE_DIR} STREQUAL "SYS_IOCTL_INCLUDE_DIR-NOTFOUND" ) message( "Missing header file sys/time.h" ) set( HAVE_SYS_IOCTL_H "//#define HAVE_SYS_IOCTL_H 1" ) else() include_directories( ${SYS_IOCTL_INCLUDE_DIR}/tnl-${tnlVersion} ) set( HAVE_SYS_IOCTL_H "#define HAVE_SYS_IOCTL_H 1" ) endif() if( WITH_TESTS STREQUAL "yes" ) find_package( GTest ) if( GTEST_FOUND ) Loading Config.py.in +2 −1 Original line number Diff line number Diff line tnl_install_prefix = ${CMAKE_INSTALL_PREFIX} tnl_install_prefix = "@CMAKE_INSTALL_PREFIX@" tnl_version = "@tnlVersion@" build +1 −1 Original line number Diff line number Diff line #!/bin/bash TARGET=TNL PREFIX=${HOME}/local PREFIX=${HOME}/.local WITH_CLANG="no" WITH_CUDA="yes" WITH_TESTS="yes" Loading examples/advection/advectionBuildConfigTag.h +4 −4 Original line number Diff line number Diff line Loading @@ -35,14 +35,14 @@ template< int Dimensions, typename Real, typename Device, typename Index > /**** * Please, chose your preferred time discretisation here. */ template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlExplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlSemiImplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlImplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, ExplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, SemiImplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, ImplicitTimeDiscretisationTag >{ enum { enabled = true }; }; /**** * Only the Runge-Kutta-Merson solver is enabled by default. */ template<> struct ConfigTagExplicitSolver< advectionBuildConfigTag, Solvers::tnlExplicitEulerSolverTag >{ enum { enabled = true }; }; template<> struct ConfigTagExplicitSolver< advectionBuildConfigTag, Solvers::ExplicitEulerSolverTag >{ enum { enabled = true }; }; } // namespace Solvers } // namespace TNL Loading examples/advection/advectionProblem.h +6 −5 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ class advectionProblem: using typename BaseType::DofVectorType; using typename BaseType::DofVectorPointer; using typename BaseType::MeshDependentDataType; using typename BaseType::MeshDependentDataPointer; static String getTypeStatic(); Loading @@ -51,7 +52,7 @@ class advectionProblem: bool setInitialCondition( const Config::ParameterContainer& parameters, const MeshPointer& mesh, DofVectorPointer& dofs, MeshDependentDataType& meshDependentData ); MeshDependentDataPointer& meshDependentData ); template< typename Matrix > bool setupLinearSystem( const MeshPointer& mesh, Loading @@ -61,7 +62,7 @@ class advectionProblem: const IndexType& step, const MeshPointer& mesh, DofVectorPointer& dofs, MeshDependentDataType& meshDependentData ); MeshDependentDataPointer& meshDependentData ); IndexType getDofs( const MeshPointer& mesh ) const; Loading @@ -73,7 +74,7 @@ class advectionProblem: const MeshPointer& mesh, DofVectorPointer& _u, DofVectorPointer& _fu, MeshDependentDataType& meshDependentData ); MeshDependentDataPointer& meshDependentData ); template< typename Matrix > void assemblyLinearSystem( const RealType& time, Loading @@ -82,7 +83,7 @@ class advectionProblem: DofVectorPointer& dofs, Matrix& matrix, DofVectorPointer& rightHandSide, MeshDependentDataType& meshDependentData ); MeshDependentDataPointer& meshDependentData ); protected: Loading Loading
CMakeLists.txt +17 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ else() endif() # set Debug/Release options set( CMAKE_CXX_FLAGS "-std=c++11" ) 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 -DNDEBUG" ) #set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -DNDEBUG -ftree-vectorizer-verbose=1 -ftree-vectorize -fopt-info-vec-missed -funroll-loops" ) Loading @@ -68,6 +68,10 @@ if( WITH_CUDA STREQUAL "yes" ) set(BUILD_SHARED_LIBS ON) set(CUDA_SEPARABLE_COMPILATION ON) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ;-DHAVE_CUDA) # disable false compiler warnings # reference for the -Xcudafe flag: http://stackoverflow.com/questions/14831051/how-to-disable-compiler-warnings-with-nvcc/17095910#17095910 # list of possible tokens: http://www.ssl.berkeley.edu/~jimm/grizzly_docs/SSL/opt/intel/cc/9.0/lib/locale/en_US/mcpcom.msg set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ; --expt-relaxed-constexpr -Xcudafe "\"--diag_suppress=code_is_unreachable --diag_suppress=implicit_return_from_non_void_function\"") #AddCompilerFlag( "-DHAVE_NOT_CXX11" ) # -U_GLIBCXX_ATOMIC_BUILTINS -U_GLIBCXX_USE_INT128 " ) set( ALL_CUDA_ARCHS -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 Loading Loading @@ -245,6 +249,18 @@ else() set( HAVE_SYS_RESOURCE_H "#define HAVE_SYS_RESOURCE_H 1" ) endif() find_path( SYS_IOCTL_INCLUDE_DIR sys/ioctl.h /usr/include/x86_64-linux-gnu /usr/include DOC "System ioctl headers." ) if( ${SYS_IOCTL_INCLUDE_DIR} STREQUAL "SYS_IOCTL_INCLUDE_DIR-NOTFOUND" ) message( "Missing header file sys/time.h" ) set( HAVE_SYS_IOCTL_H "//#define HAVE_SYS_IOCTL_H 1" ) else() include_directories( ${SYS_IOCTL_INCLUDE_DIR}/tnl-${tnlVersion} ) set( HAVE_SYS_IOCTL_H "#define HAVE_SYS_IOCTL_H 1" ) endif() if( WITH_TESTS STREQUAL "yes" ) find_package( GTest ) if( GTEST_FOUND ) Loading
Config.py.in +2 −1 Original line number Diff line number Diff line tnl_install_prefix = ${CMAKE_INSTALL_PREFIX} tnl_install_prefix = "@CMAKE_INSTALL_PREFIX@" tnl_version = "@tnlVersion@"
build +1 −1 Original line number Diff line number Diff line #!/bin/bash TARGET=TNL PREFIX=${HOME}/local PREFIX=${HOME}/.local WITH_CLANG="no" WITH_CUDA="yes" WITH_TESTS="yes" Loading
examples/advection/advectionBuildConfigTag.h +4 −4 Original line number Diff line number Diff line Loading @@ -35,14 +35,14 @@ template< int Dimensions, typename Real, typename Device, typename Index > /**** * Please, chose your preferred time discretisation here. */ template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlExplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlSemiImplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlImplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, ExplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, SemiImplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, ImplicitTimeDiscretisationTag >{ enum { enabled = true }; }; /**** * Only the Runge-Kutta-Merson solver is enabled by default. */ template<> struct ConfigTagExplicitSolver< advectionBuildConfigTag, Solvers::tnlExplicitEulerSolverTag >{ enum { enabled = true }; }; template<> struct ConfigTagExplicitSolver< advectionBuildConfigTag, Solvers::ExplicitEulerSolverTag >{ enum { enabled = true }; }; } // namespace Solvers } // namespace TNL Loading
examples/advection/advectionProblem.h +6 −5 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ class advectionProblem: using typename BaseType::DofVectorType; using typename BaseType::DofVectorPointer; using typename BaseType::MeshDependentDataType; using typename BaseType::MeshDependentDataPointer; static String getTypeStatic(); Loading @@ -51,7 +52,7 @@ class advectionProblem: bool setInitialCondition( const Config::ParameterContainer& parameters, const MeshPointer& mesh, DofVectorPointer& dofs, MeshDependentDataType& meshDependentData ); MeshDependentDataPointer& meshDependentData ); template< typename Matrix > bool setupLinearSystem( const MeshPointer& mesh, Loading @@ -61,7 +62,7 @@ class advectionProblem: const IndexType& step, const MeshPointer& mesh, DofVectorPointer& dofs, MeshDependentDataType& meshDependentData ); MeshDependentDataPointer& meshDependentData ); IndexType getDofs( const MeshPointer& mesh ) const; Loading @@ -73,7 +74,7 @@ class advectionProblem: const MeshPointer& mesh, DofVectorPointer& _u, DofVectorPointer& _fu, MeshDependentDataType& meshDependentData ); MeshDependentDataPointer& meshDependentData ); template< typename Matrix > void assemblyLinearSystem( const RealType& time, Loading @@ -82,7 +83,7 @@ class advectionProblem: DofVectorPointer& dofs, Matrix& matrix, DofVectorPointer& rightHandSide, MeshDependentDataType& meshDependentData ); MeshDependentDataPointer& meshDependentData ); protected: Loading