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 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 examples/advection/advectionProblem_impl.h +4 −4 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ advectionProblem< Mesh, BoundaryCondition, RightHandSide, DifferentialOperator > setInitialCondition( const Config::ParameterContainer& parameters, const MeshPointer& mesh, DofVectorPointer& dofs, MeshDependentDataType& meshDependentData ) MeshDependentDataPointer& meshDependentData ) { std::cout << "vaules adding"; typedef typename MeshType::Cell Cell; Loading Loading @@ -223,7 +223,7 @@ makeSnapshot( const RealType& time, const IndexType& step, const MeshPointer& mesh, DofVectorPointer& dofs, MeshDependentDataType& meshDependentData ) MeshDependentDataPointer& meshDependentData ) { std::cout << std::endl << "Writing output at time " << time << " step " << step << "." << std::endl; this->bindDofs( mesh, dofs ); Loading @@ -247,7 +247,7 @@ getExplicitRHS( const RealType& time, const MeshPointer& mesh, DofVectorPointer& _u, DofVectorPointer& _fu, MeshDependentDataType& meshDependentData ) MeshDependentDataPointer& meshDependentData ) { /**** * If you use an explicit solver like Euler or Merson, you Loading Loading @@ -314,7 +314,7 @@ assemblyLinearSystem( const RealType& time, DofVectorPointer& _u, Matrix& matrix, DofVectorPointer& b, MeshDependentDataType& meshDependentData ) MeshDependentDataPointer& meshDependentData ) { /*LinearSystemAssembler< Mesh, MeshFunctionType, Loading examples/inviscid-flow/1d/EulerPressureGetter.h +1 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ class EulerPressureGetter public: typedef Mesh MeshType; typedef typename MeshType::DeviceType DeviceType; typedef Real RealType; typedef Index IndexType; typedef Functions::MeshFunction< MeshType > MeshFunctionType; Loading examples/inviscid-flow/1d/EulerVelGetter.h +1 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ class EulerVelGetter public: typedef Mesh MeshType; typedef typename MeshType::DeviceType DeviceType; typedef Real RealType; typedef Index IndexType; typedef Functions::MeshFunction< MeshType > MeshFunctionType; 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
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
examples/advection/advectionProblem_impl.h +4 −4 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ advectionProblem< Mesh, BoundaryCondition, RightHandSide, DifferentialOperator > setInitialCondition( const Config::ParameterContainer& parameters, const MeshPointer& mesh, DofVectorPointer& dofs, MeshDependentDataType& meshDependentData ) MeshDependentDataPointer& meshDependentData ) { std::cout << "vaules adding"; typedef typename MeshType::Cell Cell; Loading Loading @@ -223,7 +223,7 @@ makeSnapshot( const RealType& time, const IndexType& step, const MeshPointer& mesh, DofVectorPointer& dofs, MeshDependentDataType& meshDependentData ) MeshDependentDataPointer& meshDependentData ) { std::cout << std::endl << "Writing output at time " << time << " step " << step << "." << std::endl; this->bindDofs( mesh, dofs ); Loading @@ -247,7 +247,7 @@ getExplicitRHS( const RealType& time, const MeshPointer& mesh, DofVectorPointer& _u, DofVectorPointer& _fu, MeshDependentDataType& meshDependentData ) MeshDependentDataPointer& meshDependentData ) { /**** * If you use an explicit solver like Euler or Merson, you Loading Loading @@ -314,7 +314,7 @@ assemblyLinearSystem( const RealType& time, DofVectorPointer& _u, Matrix& matrix, DofVectorPointer& b, MeshDependentDataType& meshDependentData ) MeshDependentDataPointer& meshDependentData ) { /*LinearSystemAssembler< Mesh, MeshFunctionType, Loading
examples/inviscid-flow/1d/EulerPressureGetter.h +1 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ class EulerPressureGetter public: typedef Mesh MeshType; typedef typename MeshType::DeviceType DeviceType; typedef Real RealType; typedef Index IndexType; typedef Functions::MeshFunction< MeshType > MeshFunctionType; Loading
examples/inviscid-flow/1d/EulerVelGetter.h +1 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ class EulerVelGetter public: typedef Mesh MeshType; typedef typename MeshType::DeviceType DeviceType; typedef Real RealType; typedef Index IndexType; typedef Functions::MeshFunction< MeshType > MeshFunctionType; Loading