Commit cf0ef449 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Merge branch 'develop' into hamilton-jacobi

Conflicts:
	CMakeLists.txt
	TODO
	build
	examples/CMakeLists.txt
	examples/hamilton-jacobi-parallel-map/no-Makefile
	examples/hamilton-jacobi-parallel/no-Makefile
	examples/hamilton-jacobi/HamiltonJacobiProblem.h
	examples/hamilton-jacobi/HamiltonJacobiProblemSetter.h
	examples/hamilton-jacobi/Makefile
	examples/hamilton-jacobi/main.cpp
	examples/heat-equation/tnl-heat-equation.h
	examples/inviscid-flow/2d/run-euler
	examples/mean-curvature-flow/Makefile
	examples/navier-stokes/navierStokesBoundaryConditions_impl.h
	examples/navier-stokes/navierStokesSolverMonitor_impl.h
	examples/simple-solver/Makefile
	examples/simple-solver/simpleProblemSetter.h
	src/core/CMakeLists.txt
	src/core/arrays/tnlArray_impl.h
	src/core/arrays/tnlConstSharedArray_impl.h
	src/core/arrays/tnlMultiArray1D_impl.h
	src/core/arrays/tnlMultiArray2D_impl.h
	src/core/arrays/tnlMultiArray3D_impl.h
	src/core/arrays/tnlMultiArray4D_impl.h
	src/core/arrays/tnlSharedArray_impl.h
	src/core/images/tnlPGMImage_impl.h
	src/core/terminal-colors.h
	src/core/tnlCudaDeviceInfo.cpp
	src/core/tnlCudaDeviceInfo.cu
	src/core/tnlCudaDeviceInfo.h
	src/core/tnlFile.h
	src/core/tnlHost.cpp
	src/core/tnlLogger.cpp
	src/core/tnlObject.cpp
	src/core/tnlStaticMultiIndex.h
	src/core/tnlTimerCPU.cpp
	src/core/tnlTimerRT.cpp
	src/core/vectors/tnlMultiVector1D_impl.h
	src/core/vectors/tnlMultiVector2D_impl.h
	src/core/vectors/tnlMultiVector3D_impl.h
	src/core/vectors/tnlMultiVector4D_impl.h
	src/core/vectors/tnlVectorOperationsHost_impl.h
	src/core/vectors/tnlVector_impl.h
	src/functions/CMakeLists.txt
	src/functions/tnlDomain.h
	src/functions/tnlMeshFunction.h
	src/functions/tnlMeshFunctionVTKWriter.h
	src/functions/tnlMeshFunctionVTKWriter_impl.h
	src/functions/tnlMeshFunction_impl.h
	src/functions/tnlTestFunction.h
	src/functions/tnlTestFunction_impl.h
	src/implementation/core/tnlHost.cpp
	src/legacy/benchmarks/tnlSpmvBenchmarkBase_impl.h
	src/legacy/benchmarks/tnlSpmvBenchmarkHybridMatrix.h
	src/legacy/matrices/tnlAdaptiveRgCSRMatrix.h
	src/legacy/matrices/tnlCSRMatrix.h
	src/legacy/matrices/tnlEllpackMatrix.h
	src/legacy/matrices/tnlFastCSRMatrix.h
	src/legacy/matrices/tnlFastRgCSRMatrix.h
	src/legacy/matrices/tnlFastRgCSRMatrixCUDA.h
	src/legacy/matrices/tnlRgCSRMatrix.h
	src/legacy/solvers/tnlMatrixSolver.h
	src/matrices/tnlCSRMatrix_impl.h
	src/matrices/tnlDenseMatrix.h
	src/matrices/tnlDenseMatrix_impl.h
	src/matrices/tnlEllpackMatrix_impl.h
	src/matrices/tnlMultidiagonalMatrix_impl.h
	src/matrices/tnlSlicedEllpackMatrix_impl.h
	src/matrices/tnlTridiagonalMatrix_impl.h
	src/mesh/grids/tnlGrid1D_impl.h
	src/mesh/grids/tnlGrid2D_impl.h
	src/mesh/grids/tnlGrid3D_impl.h
	src/mesh/grids/tnlGridTraverser.h
	src/mesh/grids/tnlGridTraverser_impl.h
	src/mesh/grids/tnlTraverser_Grid1D.h
	src/mesh/initializer/tnlMeshSuperentityStorageInitializer.h
	src/mesh/traits/tnlDimensionsTraits.h
	src/operators/CMakeLists.txt
	src/operators/diffusion/nonlinear-diffusion-operators/tnlFiniteVolumeNonlinearOperator.h
	src/operators/diffusion/nonlinear-diffusion-operators/tnlFiniteVolumeNonlinearOperator_impl.h
	src/operators/diffusion/tnlExactMeanCurvature.h
	src/operators/diffusion/tnlExactNonlinearDiffusion.h
	src/operators/diffusion/tnlLinearDiffusion.h
	src/operators/diffusion/tnlLinearDiffusion_impl.h
	src/operators/diffusion/tnlNonlinearDiffusion_impl.h
	src/operators/diffusion/tnlOneSidedMeanCurvature.h
	src/operators/diffusion/tnlOneSidedNonlinearDiffusion.h
	src/operators/euler/fvm/tnlLaxFridrichs_impl.h
	src/operators/geometric/tnlExactGradientNorm.h
	src/operators/hamilton-jacobi/upwind/CMakeLists.txt~
	src/operators/tnlDirichletBoundaryConditions.h
	src/operators/tnlNeumannBoundaryConditions.h
	src/operators/tnlNeumannBoundaryConditions_impl.h
	src/problems/tnlHeatEquationProblem.h
	src/problems/tnlHeatEquationProblem_impl.h
	src/problems/tnlPDEProblem.h
	src/problems/tnlPDEProblem_impl.h
	src/problems/tnlProblem.h
	src/solvers/linear/CMakeLists.txt
	src/solvers/linear/krylov/tnlBICGStabSolver_impl.h
	src/solvers/linear/krylov/tnlCGSolver_impl.h
	src/solvers/linear/krylov/tnlGMRESSolver_impl.h
	src/solvers/linear/krylov/tnlTFQMRSolver.h
	src/solvers/linear/krylov/tnlTFQMRSolver_impl.h
	src/solvers/linear/stationary/tnlSORSolver_impl.h
	src/solvers/ode/tnlEulerSolver_impl.h
	src/solvers/ode/tnlMersonSolver_impl.h
	src/solvers/ode/tnlODESolverMonitor_impl.h
	src/solvers/pde/tnlExplicitTimeStepper.h
	src/solvers/pde/tnlExplicitTimeStepper_impl.h
	src/solvers/pde/tnlExplicitUpdater.h
	src/solvers/pde/tnlExplicitUpdater_impl.h
	src/solvers/pde/tnlLinearSystemAssembler.h
	src/solvers/pde/tnlPDESolver.h
	src/solvers/pde/tnlPDESolver_impl.h
	src/solvers/pde/tnlSemiImplicitTimeStepper.h
	src/solvers/pde/tnlSemiImplicitTimeStepper_impl.h
	src/solvers/tnlBuildConfigTags.h
	src/solvers/tnlIterativeSolver.h
	src/solvers/tnlIterativeSolverMonitor_impl.h
	src/solvers/tnlIterativeSolver_impl.h
	src/solvers/tnlSolverConfig_impl.h
	src/solvers/tnlSolverStarter_impl.h
	src/solvers/tnlSolver_impl.h
	tests/benchmarks/CMakeLists.txt
	tests/benchmarks/tnl-benchmark-simple-heat-equation.h
	tests/benchmarks/tnl-benchmark-spmv.h
	tests/benchmarks/tnl-cuda-benchmarks.h
	tests/long-time-unit-tests/CMakeLists.txt
	tests/unit-tests/core/arrays/CMakeLists.txt
	tests/unit-tests/matrices/CMakeLists.txt
	tests/unit-tests/matrices/tnlRgCSRMatrixTester.h
	tests/unit-tests/operators/diffusion/CMakeLists.txt
	tests/unit-tests/operators/diffusion/tnlOneSidedMeanCurvatureTest.h
	tools/src/functions-benchmark.h
	tools/src/tnl-view.h
	tools/tnl-compile.in
	tools/tnl-quickstart/tnl-quickstart.py
parents 8a70122d 638ed6c7
Loading
Loading
Loading
Loading

.cproject

deleted100644 → 0
+0 −53
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
	<storageModule moduleId="org.eclipse.cdt.core.settings">
		<cconfiguration id="cdt.managedbuild.toolchain.gnu.base.2134791445">
			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.2134791445" moduleId="org.eclipse.cdt.core.settings" name="Default">
				<externalSettings/>
				<extensions>
					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
				</extensions>
			</storageModule>
			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
				<configuration buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.base.2134791445" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
					<folderInfo id="cdt.managedbuild.toolchain.gnu.base.2134791445.1799170915" name="/" resourcePath="">
						<toolChain id="cdt.managedbuild.toolchain.gnu.base.1762402759" name="cdt.managedbuild.toolchain.gnu.base" superClass="cdt.managedbuild.toolchain.gnu.base">
							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.840154721" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
							<builder id="cdt.managedbuild.target.gnu.builder.base.573876641" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
							<tool id="cdt.managedbuild.tool.gnu.archiver.base.958650307" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
							<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1237330740" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
								<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1856262209" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
							</tool>
							<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.315517693" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.950045328" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
							</tool>
							<tool id="cdt.managedbuild.tool.gnu.c.linker.base.1786292703" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
							<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.1133414639" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
								<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.692614544" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
								</inputType>
							</tool>
							<tool id="cdt.managedbuild.tool.gnu.assembler.base.336757143" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1329383797" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
							</tool>
						</toolChain>
					</folderInfo>
				</configuration>
			</storageModule>
			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
		</cconfiguration>
	</storageModule>
	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
		<project id="tnl.null.219466708" name="tnl"/>
	</storageModule>
	<storageModule moduleId="scannerConfiguration">
		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
	</storageModule>
	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
</cproject>
+4 −40
Original line number Diff line number Diff line

# /
/build
/missing
/Makefile.in
/ltmain.sh
/install-sh
/depcomp
/configure
/config.*
/aclocal.m4
/m4
/autom4te.cache
.settings
/nbproject
/Debug
/Release
.settings

.settings

# /src/
/src/Makefile.in

# /src/core/
/src/core/Makefile.in

# /src/debug/
/src/debug/Makefile.in

# /src/diff/
/src/diff/Makefile.in

# /src/matrix/
/src/matrix/*.in

# /tools/
/tools/Makefile.in

# /tools/share/
/tools/share/Makefile.in

# /tools/src/
/tools/src/Makefile.in
/Testing
/CMakeLists.txt.user
/doc/_build
/Build
+62 −42
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
# Vladimir Klement
# Jakub Klinkovsky

cmake_minimum_required( VERSION 2.8.10 )
cmake_minimum_required( VERSION 3.4 )

project( tnl )

@@ -33,22 +33,28 @@ if( CMAKE_BUILD_TYPE STREQUAL "Debug")
    set( LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/Debug/lib )
    set( EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/Debug/bin )
    set( debugExt -dbg )
    set( CMAKE_CXX_FLAGS "${CXXFLAGS} -g ")
    #AddCompilerFlag( "-g" )
else()
    set( PROJECT_BUILD_PATH ${PROJECT_SOURCE_DIR}/Release/src )
    set( PROJECT_TESTS_PATH ${PROJECT_SOURCE_DIR}/Release/tests )
    set( PROJECT_TOOLS_PATH ${PROJECT_SOURCE_DIR}/Release/tools )
    set( LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/Release/lib)
    set( EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/Release/bin)
    #OptimizeForArchitecture()
    AddCompilerFlag( "-O3 -march=native -DNDEBUG -g" )
endif()

# set Debug/Release options
set( CMAKE_CXX_FLAGS "-std=c++11" )
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" )
# pass -rdynamic only in Debug mode
set( CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "" )
set( CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_DEBUG "-rdynamic" )
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..."    )
   AddCompilerFlag( "-DHAVE_ICPC" )
   set( CMAKE_CXX_FLAGS "${CXXFLAGS} -DHAVE_ICPC ")
endif()

#####
@@ -102,18 +108,29 @@ 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 )
        # TODO: workaround for a bug in cmake 3.5.0 (fixed in 3.5.1)
        set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ; -ccbin "${CMAKE_CXX_COMPILER}" )
        set( CUDA_HOST_COMPILER "" )

        ####
        # Check for cuBLAS
        #
        if( WITH_CUBLAS STREQUAL "yes" ) 
            message( "Enabling CUBLAS." )
            set( HAVE_CUBLAS TRUE)
        if( NOT WITH_CUBLAS STREQUAL "no" )
            find_path( CUBLAS_INCLUDE_DIR cublas_v2.h
                       /usr/local/cuda/include
                       ${CUDA_INCLUDE_DIR}
                       DOC "CUBLAS headers." )
            if( ${CUBLAS_INCLUDE_DIR} STREQUAL "CUBLAS_INCLUDE_DIR-NOTFOUND" )
                message( "CUBLAS not found." )
                set( HAVE_CUBLAS "//#define HAVE_CUBLAS 1" )
            else()
                message( "CUBLAS found. -- ${CUBLAS_INCLUDE_DIR}" )
                set( HAVE_CUBLAS "#define HAVE_CUBLAS 1" )
        endif( WITH_CUBLAS STREQUAL "yes" )       
            endif()
        endif( NOT WITH_CUBLAS STREQUAL "no" )

        ####
        # Check for CUSP
@@ -133,7 +150,6 @@ if( WITH_CUDA STREQUAL "yes" )
        # Check for CUSPARSE
        #
        if( NOT WITH_CUSPARSE STREQUAL "no" )
        
           find_path( CUSPARSE_INCLUDE_DIR cusparse.h
                      /usr/local/cuda/include                   
                      ${CUDA_INCLUDE_DIR}  
@@ -148,15 +164,9 @@ if( WITH_CUDA STREQUAL "yes" )
               set( CUSPARSE_LIBRARY "${CUDA_cusparse_LIBRARY}" )
           endif()            
        endif( NOT WITH_CUSPARSE STREQUAL "no" )        
   
    #else( CUDA_FOUND )
    #  AddCompilerFlag( "-std=c++11" )         
    endif( CUDA_FOUND )
#else( WITH_CUDA STREQUAL "yes" )
   #AddCompilerFlag( "-std=gnu++0x -ftree-vectorizer-verbose=1" )       
   #AddCompilerFlag( "-std=c++11" )       
endif( WITH_CUDA STREQUAL "yes" )
AddCompilerFlag( "-std=c++11" )       


####
# Check for OpenMP
@@ -318,7 +328,6 @@ endif( WITH_TESTS STREQUAL "yes" )
#
if( WITH_TEMPLATE_INSTANTIATION STREQUAL "yes" )
   AddCompilerFlag( "-DTEMPLATE_EXPLICIT_INSTANTIATION " )
endif()   

   if( INSTANTIATE_INT STREQUAL "yes" )
      AddCompilerFlag( "-DINSTANTIATE_INT " )
@@ -339,6 +348,7 @@ endif()
   if( INSTANTIATE_LONG_DOUBLE STREQUAL "yes" )
      AddCompilerFlag( "-DINSTANTIATE_LONG_DOUBLE " )
   endif()
endif()

set( CXX_TEST_FLAGS "-fprofile-arcs -ftest-coverage" )
set( LD_TEST_FLAGS "-lgcov -coverage" )
@@ -388,3 +398,13 @@ set(CPACK_SOURCE_STRIP_FILES "Release")

#set(CPACK_PACKAGE_EXECUTABLES "MyExecutable" "My Executable")
INCLUDE( CPack )

# Print compiler options
message( "-- Compiler options:" )
message( "   CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}" )
message( "   CMAKE_CXX_FLAGS_DEBUG = ${CMAKE_CXX_FLAGS_DEBUG}" )
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_NVCC_FLAGS = ${CUDA_NVCC_FLAGS}" )
+2 −0
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@ TODO:
 - data by se na hostu preskupila do souvisleho bloku dat a ten se prenesl najednou


TODO:

TODO:
 - zavest namespaces

+0 −3
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@ WITH_CUDA="yes"
WITH_TESTS="yes"

WITH_CUDA_ARCH="auto"
WITH_CUBLAS="no"
WITH_TEMPLATE_INSTANTIATION="yes"
INSTANTIATE_LONG_INT="no"
INSTANTIATE_INT="yes"
@@ -28,7 +27,6 @@ do
        --build=*                        ) BUILD="${option#*=}" ;;
        --with-tests=*                   ) WITH_TESTS="${option#*=}" ;;
        --with-cuda=*                    ) WITH_CUDA="${option#*=}" ;;
        --with-cublas=*                  ) WITH_CUBLAS="${option#*=}" ;;
        --with-cuda-arch=*               ) WITH_CUDA_ARCH="${option#*=}";;
        --with-templates-instantiation=* ) WITH_TEMPLATE_INSTANTIATION="${option#*=}" ;;
        --instantiate-long-int=*         ) INSTANTIATE_LONG_INT="${option#*=}" ;;
@@ -82,7 +80,6 @@ ${CMAKE} ${ROOT_DIR} \
         -DCMAKE_INSTALL_PREFIX=${PREFIX} \
         -DWITH_CUDA=${WITH_CUDA} \
         -DWITH_CUDA_ARCH=${WITH_CUDA_ARCH} \
         -DWITH_CUBLAS=${WITH_CUBLAS} \
         -DWITH_TESTS=${WITH_TESTS} \
         -DPETSC_DIR=${PETSC_DIR} \
         -DDCMTK_DIR=${DCMTK_DIR} \
Loading