Loading src/TNL/CMakeLists.txt +1 −5 Original line number Diff line number Diff line Loading @@ -33,8 +33,6 @@ set( headers String.h SystemInfo.h Timer.h TimerCPU.h TimerRT.h UniquePointer.h ) set( common_SOURCES Loading @@ -44,9 +42,7 @@ set( common_SOURCES SmartPointersRegister.cpp String.cpp SystemInfo.cpp Timer.cpp TimerCPU.cpp TimerRT.cpp ) Timer.cpp ) set( tnl_SOURCES ${tnl_config_SOURCES} ${tnl_containers_SOURCES} Loading src/TNL/Containers/Algorithms/cuda-reduction_impl.h +5 −5 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ #include <TNL/Containers/Algorithms/tnlCudaReduction.h> #ifdef CUDA_REDUCTION_PROFILING #include <TNL/TimerRT.h> #include <TNL/Timer.h> #endif namespace TNL { Loading Loading @@ -163,7 +163,7 @@ bool reductionOnCudaDevice( Operation& operation, } #ifdef CUDA_REDUCTION_PROFILING TimerRT timer; Timer timer; timer.reset(); timer.start(); #endif Loading @@ -179,7 +179,7 @@ bool reductionOnCudaDevice( Operation& operation, deviceAux1 ); #ifdef CUDA_REDUCTION_PROFILING timer.stop(); std::cout << " Reduction on GPU to size " << reducedSize << " took " << timer.getTime() << " sec. " << std::endl; std::cout << " Reduction on GPU to size " << reducedSize << " took " << timer.getRealTime() << " sec. " << std::endl; timer.reset(); timer.start(); #endif Loading @@ -193,7 +193,7 @@ bool reductionOnCudaDevice( Operation& operation, #ifdef CUDA_REDUCTION_PROFILING timer.stop(); std::cout << " Transferring data to CPU took " << timer.getTime() << " sec. " << std::endl; std::cout << " Transferring data to CPU took " << timer.getRealTime() << " sec. " << std::endl; #endif #ifdef CUDA_REDUCTION_PROFILING Loading @@ -211,7 +211,7 @@ bool reductionOnCudaDevice( Operation& operation, #ifdef CUDA_REDUCTION_PROFILING timer.stop(); std::cout << " Reduction of small data set on CPU took " << timer.getTime() << " sec. " << std::endl; std::cout << " Reduction of small data set on CPU took " << timer.getRealTime() << " sec. " << std::endl; #endif return checkCudaDevice; Loading src/TNL/Matrices/MatrixReader_impl.h +16 −11 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ #include <TNL/List.h> #include <TNL/String.h> #include <TNL/Containers/Vector.h> #include <TNL/TimerRT.h> #include <TNL/Timer.h> namespace TNL { namespace Matrices { Loading Loading @@ -87,7 +87,8 @@ bool MatrixReader< Matrix >::verifyMtxFile( std::istream& file, String line; bool dimensionsLine( false ); IndexType processedElements( 0 ); TimerRT timer; Timer timer; timer.start(); while( line.getLine( file ) ) { if( line[ 0 ] == '%' ) continue; Loading Loading @@ -117,10 +118,11 @@ bool MatrixReader< Matrix >::verifyMtxFile( std::istream& file, } file.clear(); long int fileSize = file.tellg(); timer.stop(); if( verbose ) std::cout << " Verifying the matrix elements ... " << processedElements << " / " << matrix.getNumberOfMatrixElements() << " -> " << timer.getTime() << " sec. i.e. " << fileSize / ( timer.getTime() * ( 1 << 20 )) << "MB/s." << std::endl; << " -> " << timer.getRealTime() << " sec. i.e. " << fileSize / ( timer.getRealTime() * ( 1 << 20 )) << "MB/s." << std::endl; return true; } Loading @@ -136,7 +138,6 @@ bool MatrixReader< Matrix >::findLineByElement( std::istream& file, bool symmetricMatrix( false ); bool dimensionsLine( false ); lineNumber = 0; TimerRT timer; while( line.getLine( file ) ) { lineNumber++; Loading Loading @@ -264,7 +265,8 @@ bool MatrixReader< Matrix >::computeCompressedRowsLengthsFromMtxFile( std::istre String line; bool dimensionsLine( false ); IndexType numberOfElements( 0 ); TimerRT timer; Timer timer; timer.start(); while( line.getLine( file ) ) { if( line[ 0 ] == '%' ) continue; Loading Loading @@ -303,10 +305,11 @@ bool MatrixReader< Matrix >::computeCompressedRowsLengthsFromMtxFile( std::istre } file.clear(); long int fileSize = file.tellg(); timer.stop(); if( verbose ) std::cout << " Counting the matrix elements ... " << numberOfElements / 1000 << " thousands -> " << timer.getTime() << " sec. i.e. " << fileSize / ( timer.getTime() * ( 1 << 20 )) << "MB/s." << std::endl; << " thousands -> " << timer.getRealTime() << " sec. i.e. " << fileSize / ( timer.getRealTime() * ( 1 << 20 )) << "MB/s." << std::endl; return true; } Loading @@ -321,7 +324,8 @@ bool MatrixReader< Matrix >::readMatrixElementsFromMtxFile( std::istream& file, String line; bool dimensionsLine( false ); IndexType processedElements( 0 ); TimerRT timer; Timer timer; timer.start(); while( line.getLine( file ) ) { if( line[ 0 ] == '%' ) continue; Loading @@ -346,10 +350,11 @@ bool MatrixReader< Matrix >::readMatrixElementsFromMtxFile( std::istream& file, } file.clear(); long int fileSize = file.tellg(); timer.stop(); if( verbose ) std::cout << " Reading the matrix elements ... " << processedElements << " / " << matrix.getNumberOfMatrixElements() << " -> " << timer.getTime() << " sec. i.e. " << fileSize / ( timer.getTime() * ( 1 << 20 )) << "MB/s." << std::endl; << " -> " << timer.getRealTime() << " sec. i.e. " << fileSize / ( timer.getRealTime() * ( 1 << 20 )) << "MB/s." << std::endl; return true; } Loading src/TNL/Problems/HeatEquationProblem_impl.h +3 −3 Original line number Diff line number Diff line Loading @@ -280,13 +280,13 @@ assemblyLinearSystem( const RealType& time, /*cout << "Matrix multiplication test ..." << std::endl; Vector< RealType, DeviceType, IndexType > y; y.setLike( u ); TimerRT timer; Timer timer; timer.reset(); timer.start(); for( int i = 0; i < 100; i++ ) matrix.vectorProduct( u, y ); timer.stop(); std::cout << "The time is " << timer.getTime(); std::cout << "The time is " << timer.getRealTime(); std::cout << "Scalar product test ..." << std::endl; timer.reset(); RealType a; Loading @@ -294,7 +294,7 @@ assemblyLinearSystem( const RealType& time, for( int i = 0; i < 100; i++ ) a = y.scalarProduct( u ); timer.stop(); std::cout << "The time is " << timer.getTime(); std::cout << "The time is " << timer.getRealTime(); std::cout << std::endl; abort();*/ } Loading src/TNL/Solvers/ODE/ExplicitSolver.h +3 −8 Original line number Diff line number Diff line Loading @@ -11,8 +11,7 @@ #pragma once #include <iomanip> #include <TNL/TimerCPU.h> #include <TNL/TimerRT.h> #include <TNL/Timer.h> #include <TNL/core/tnlFlopsCounter.h> #include <TNL/Object.h> #include <TNL/Solvers/IterativeSolverMonitor.h> Loading Loading @@ -69,9 +68,7 @@ class ExplicitSolver : public IterativeSolver< typename Problem::RealType, void setVerbose( IndexType v ); void setTimerCPU( TimerCPU* timer ); void setTimerRT( TimerRT* timer ); void setTimer( Timer* timer ); virtual bool solve( DofVectorPointer& u ) = 0; Loading Loading @@ -106,9 +103,7 @@ protected: IndexType verbosity; TimerCPU* cpu_timer; TimerRT* rt_timer; Timer* timer; bool testingMode; Loading Loading
src/TNL/CMakeLists.txt +1 −5 Original line number Diff line number Diff line Loading @@ -33,8 +33,6 @@ set( headers String.h SystemInfo.h Timer.h TimerCPU.h TimerRT.h UniquePointer.h ) set( common_SOURCES Loading @@ -44,9 +42,7 @@ set( common_SOURCES SmartPointersRegister.cpp String.cpp SystemInfo.cpp Timer.cpp TimerCPU.cpp TimerRT.cpp ) Timer.cpp ) set( tnl_SOURCES ${tnl_config_SOURCES} ${tnl_containers_SOURCES} Loading
src/TNL/Containers/Algorithms/cuda-reduction_impl.h +5 −5 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ #include <TNL/Containers/Algorithms/tnlCudaReduction.h> #ifdef CUDA_REDUCTION_PROFILING #include <TNL/TimerRT.h> #include <TNL/Timer.h> #endif namespace TNL { Loading Loading @@ -163,7 +163,7 @@ bool reductionOnCudaDevice( Operation& operation, } #ifdef CUDA_REDUCTION_PROFILING TimerRT timer; Timer timer; timer.reset(); timer.start(); #endif Loading @@ -179,7 +179,7 @@ bool reductionOnCudaDevice( Operation& operation, deviceAux1 ); #ifdef CUDA_REDUCTION_PROFILING timer.stop(); std::cout << " Reduction on GPU to size " << reducedSize << " took " << timer.getTime() << " sec. " << std::endl; std::cout << " Reduction on GPU to size " << reducedSize << " took " << timer.getRealTime() << " sec. " << std::endl; timer.reset(); timer.start(); #endif Loading @@ -193,7 +193,7 @@ bool reductionOnCudaDevice( Operation& operation, #ifdef CUDA_REDUCTION_PROFILING timer.stop(); std::cout << " Transferring data to CPU took " << timer.getTime() << " sec. " << std::endl; std::cout << " Transferring data to CPU took " << timer.getRealTime() << " sec. " << std::endl; #endif #ifdef CUDA_REDUCTION_PROFILING Loading @@ -211,7 +211,7 @@ bool reductionOnCudaDevice( Operation& operation, #ifdef CUDA_REDUCTION_PROFILING timer.stop(); std::cout << " Reduction of small data set on CPU took " << timer.getTime() << " sec. " << std::endl; std::cout << " Reduction of small data set on CPU took " << timer.getRealTime() << " sec. " << std::endl; #endif return checkCudaDevice; Loading
src/TNL/Matrices/MatrixReader_impl.h +16 −11 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ #include <TNL/List.h> #include <TNL/String.h> #include <TNL/Containers/Vector.h> #include <TNL/TimerRT.h> #include <TNL/Timer.h> namespace TNL { namespace Matrices { Loading Loading @@ -87,7 +87,8 @@ bool MatrixReader< Matrix >::verifyMtxFile( std::istream& file, String line; bool dimensionsLine( false ); IndexType processedElements( 0 ); TimerRT timer; Timer timer; timer.start(); while( line.getLine( file ) ) { if( line[ 0 ] == '%' ) continue; Loading Loading @@ -117,10 +118,11 @@ bool MatrixReader< Matrix >::verifyMtxFile( std::istream& file, } file.clear(); long int fileSize = file.tellg(); timer.stop(); if( verbose ) std::cout << " Verifying the matrix elements ... " << processedElements << " / " << matrix.getNumberOfMatrixElements() << " -> " << timer.getTime() << " sec. i.e. " << fileSize / ( timer.getTime() * ( 1 << 20 )) << "MB/s." << std::endl; << " -> " << timer.getRealTime() << " sec. i.e. " << fileSize / ( timer.getRealTime() * ( 1 << 20 )) << "MB/s." << std::endl; return true; } Loading @@ -136,7 +138,6 @@ bool MatrixReader< Matrix >::findLineByElement( std::istream& file, bool symmetricMatrix( false ); bool dimensionsLine( false ); lineNumber = 0; TimerRT timer; while( line.getLine( file ) ) { lineNumber++; Loading Loading @@ -264,7 +265,8 @@ bool MatrixReader< Matrix >::computeCompressedRowsLengthsFromMtxFile( std::istre String line; bool dimensionsLine( false ); IndexType numberOfElements( 0 ); TimerRT timer; Timer timer; timer.start(); while( line.getLine( file ) ) { if( line[ 0 ] == '%' ) continue; Loading Loading @@ -303,10 +305,11 @@ bool MatrixReader< Matrix >::computeCompressedRowsLengthsFromMtxFile( std::istre } file.clear(); long int fileSize = file.tellg(); timer.stop(); if( verbose ) std::cout << " Counting the matrix elements ... " << numberOfElements / 1000 << " thousands -> " << timer.getTime() << " sec. i.e. " << fileSize / ( timer.getTime() * ( 1 << 20 )) << "MB/s." << std::endl; << " thousands -> " << timer.getRealTime() << " sec. i.e. " << fileSize / ( timer.getRealTime() * ( 1 << 20 )) << "MB/s." << std::endl; return true; } Loading @@ -321,7 +324,8 @@ bool MatrixReader< Matrix >::readMatrixElementsFromMtxFile( std::istream& file, String line; bool dimensionsLine( false ); IndexType processedElements( 0 ); TimerRT timer; Timer timer; timer.start(); while( line.getLine( file ) ) { if( line[ 0 ] == '%' ) continue; Loading @@ -346,10 +350,11 @@ bool MatrixReader< Matrix >::readMatrixElementsFromMtxFile( std::istream& file, } file.clear(); long int fileSize = file.tellg(); timer.stop(); if( verbose ) std::cout << " Reading the matrix elements ... " << processedElements << " / " << matrix.getNumberOfMatrixElements() << " -> " << timer.getTime() << " sec. i.e. " << fileSize / ( timer.getTime() * ( 1 << 20 )) << "MB/s." << std::endl; << " -> " << timer.getRealTime() << " sec. i.e. " << fileSize / ( timer.getRealTime() * ( 1 << 20 )) << "MB/s." << std::endl; return true; } Loading
src/TNL/Problems/HeatEquationProblem_impl.h +3 −3 Original line number Diff line number Diff line Loading @@ -280,13 +280,13 @@ assemblyLinearSystem( const RealType& time, /*cout << "Matrix multiplication test ..." << std::endl; Vector< RealType, DeviceType, IndexType > y; y.setLike( u ); TimerRT timer; Timer timer; timer.reset(); timer.start(); for( int i = 0; i < 100; i++ ) matrix.vectorProduct( u, y ); timer.stop(); std::cout << "The time is " << timer.getTime(); std::cout << "The time is " << timer.getRealTime(); std::cout << "Scalar product test ..." << std::endl; timer.reset(); RealType a; Loading @@ -294,7 +294,7 @@ assemblyLinearSystem( const RealType& time, for( int i = 0; i < 100; i++ ) a = y.scalarProduct( u ); timer.stop(); std::cout << "The time is " << timer.getTime(); std::cout << "The time is " << timer.getRealTime(); std::cout << std::endl; abort();*/ } Loading
src/TNL/Solvers/ODE/ExplicitSolver.h +3 −8 Original line number Diff line number Diff line Loading @@ -11,8 +11,7 @@ #pragma once #include <iomanip> #include <TNL/TimerCPU.h> #include <TNL/TimerRT.h> #include <TNL/Timer.h> #include <TNL/core/tnlFlopsCounter.h> #include <TNL/Object.h> #include <TNL/Solvers/IterativeSolverMonitor.h> Loading Loading @@ -69,9 +68,7 @@ class ExplicitSolver : public IterativeSolver< typename Problem::RealType, void setVerbose( IndexType v ); void setTimerCPU( TimerCPU* timer ); void setTimerRT( TimerRT* timer ); void setTimer( Timer* timer ); virtual bool solve( DofVectorPointer& u ) = 0; Loading Loading @@ -106,9 +103,7 @@ protected: IndexType verbosity; TimerCPU* cpu_timer; TimerRT* rt_timer; Timer* timer; bool testingMode; Loading