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

Merge branch 'master' into arithmetics

parents 554d890d 8f89a95f
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -44,8 +44,8 @@ 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_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" )
set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -mtune=native -DNDEBUG" )
#set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -mtune=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" )
@@ -91,7 +91,7 @@ if( WITH_CUDA STREQUAL "yes" )
                set( CUDA_ARCH_SOURCE ${PROJECT_SOURCE_DIR}/src/Tools/tnl-cuda-arch.cu)
                message( "Compiling tnl-cuda-arch ..." )
                file( MAKE_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} )
                execute_process( COMMAND nvcc ${CUDA_ARCH_SOURCE} -o ${CUDA_ARCH_EXECUTABLE}
                execute_process( COMMAND nvcc --compiler-bindir ${CUDA_HOST_COMPILER} ${CUDA_ARCH_SOURCE} -o ${CUDA_ARCH_EXECUTABLE}
                                 RESULT_VARIABLE CUDA_ARCH_RESULT
                                 OUTPUT_VARIABLE CUDA_ARCH_OUTPUT
                                 ERROR_VARIABLE CUDA_ARCH_OUTPUT )
@@ -171,6 +171,7 @@ if( WITH_CUDA STREQUAL "yes" )
    endif( CUDA_FOUND )
endif( WITH_CUDA STREQUAL "yes" )


####
# Check for OpenMP
#
@@ -360,8 +361,7 @@ CONFIGURE_FILE( "tnlConfig.h.in" "${PROJECT_BUILD_PATH}/TNL/tnlConfig.h" )
INSTALL( FILES ${PROJECT_BUILD_PATH}/TNL/tnlConfig.h DESTINATION include/tnl-${tnlVersion}/TNL )
if( PYTHONINTERP_FOUND )
    CONFIGURE_FILE( "Config.py.in" "${PROJECT_BUILD_PATH}/TNL/Config.py" )
    INSTALL( FILES ${PROJECT_BUILD_PATH}/TNL/Config.py DESTINATION lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/TNL )
    CONFIGURE_FILE( "python-version.in" "${PROJECT_TOOLS_PATH}/../python-version" )
    INSTALL( FILES ${PROJECT_BUILD_PATH}/TNL/Config.py DESTINATION lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/TNL )
endif( PYTHONINTERP_FOUND )

#Nastavime cesty k hlavickovym souborum a knihovnam
+6 −1
Original line number Diff line number Diff line
- pridet execution policy https://github.com/harrism/hemi/blob/master/hemi/execution_policy.h
- prejmenova Assert na TNL_ASSERT a rozsirit asserce podobne jako v GTest
- odstranit paramee lazy ze smart pointeru

TODO:
 - implementovat tnlMixedGridBoundaryConditions, kde by se pro kazdou stranu gridu definoval jiny zvlastni typ
   okrajovych podminek
 - dalo by se tim resit i skladani zpetnych a doprednych diferenci u nelinearni difuze, kdy je potreba napr. dopredne diference
   vycislit i na leve a dolni hranici 2D gridu
   - tohle resit spis primym rozepsanim schematu

TODO:
 - implementovat tuple pro snazsi a snad efektoivnejsi prenos dat na GPU
 - implementovat tuple pro snazsi a snad efektivnejsi prenos dat na GPU
 - nebylo by nutne definovat pomocne datove structury pro traverser
 - data by se na hostu preskupila do souvisleho bloku dat a ten se prenesl najednou

+18 −4
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ HELP="no"
VERBOSE=""
ROOT_DIR="."
DCMTK_DIR="/usr/include/dcmtk"
BUILD_JOBS=`grep -c processor /proc/cpuinfo`
BUILD_JOBS=""

for option in "$@"
do
@@ -112,9 +112,23 @@ then
    exit 1
fi

if [[ -n ${BUILD_JOBS} ]]; then
    # override $MAKEFLAGS from parent environment
    export MAKEFLAGS=-j${BUILD_JOBS}
elif [[ -z ${MAKEFLAGS} ]]; then
    # $BUILD_JOBS and $MAKEFLAGS are not set => set default value
    BUILD_JOBS=$(grep "core id" /proc/cpuinfo | sort -u | wc -l)
    export MAKEFLAGS=-j${BUILD_JOBS}
fi

if [[ -n ${BUILD_JOBS} ]]; then
    echo "Building ${BUILD} $TARGET using $BUILD_JOBS processors ..."
else
    # number of processors is unknown - it is encoded in $MAKEFLAGS from parent environment
    echo "Building ${BUILD} $TARGET ..."
fi

make -j${BUILD_JOBS} ${VERBOSE}
make ${VERBOSE}
if test $? != 0; then
    echo "Error: Build process failed."
    exit 1
@@ -123,7 +137,7 @@ fi

if test WITH_TESTS = "yes";
then
    make -j${BUILD_JOBS} test
    make test
    if test $? != 0; then
        echo "Error: Some test did not pass successfuly."
    fi
+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ class advectionProblem:
      void bindDofs( const MeshPointer& mesh,
                     DofVectorPointer& dofs );

      void getExplicitRHS( const RealType& time,
      void getExplicitUpdate( const RealType& time,
                           const RealType& tau,
                           const MeshPointer& mesh,
                           DofVectorPointer& _u,
+1 −1
Original line number Diff line number Diff line
@@ -242,7 +242,7 @@ template< typename Mesh,
          typename DifferentialOperator >
void
advectionProblem< Mesh, BoundaryCondition, RightHandSide, DifferentialOperator >::
getExplicitRHS( const RealType& time,
getExplicitUpdate( const RealType& time,
                const RealType& tau,
                const MeshPointer& mesh,
                DofVectorPointer& _u,
Loading