Skip to content
Snippets Groups Projects
Commit 5ecd6c14 authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

Remove timing using the OpenMP timers

Since ADOL-C is not multi-threaded we will not be using OpenMP
in the foreseeable future.  And on a single-threaded code the
OpenMP timer and the Dune timer return the same values anyway.

[[Imported from SVN: r9431]]
parent aacf53c1
No related branches found
No related tags found
No related merge requests found
...@@ -240,21 +240,16 @@ void RiemannianTrustRegionSolver<GridType,TargetSpace>::solve() ...@@ -240,21 +240,16 @@ void RiemannianTrustRegionSolver<GridType,TargetSpace>::solve()
if (recomputeGradientHessian) { if (recomputeGradientHessian) {
double oldClock = omp_get_wtime();
assembler_->assembleGradient(x_, rhs); assembler_->assembleGradient(x_, rhs);
rhs *= -1; // The right hand side is the _negative_ gradient rhs *= -1; // The right hand side is the _negative_ gradient
std::cout << "gradient assembly took " << gradientTimer.elapsed() << " sec." << std::endl; std::cout << "gradient assembly took " << gradientTimer.elapsed() << " sec." << std::endl;
std::cout << "gradient assembly took " << (omp_get_wtime() - oldClock) << " sec." << std::endl;
gradientTimer.reset(); gradientTimer.reset();
oldClock = omp_get_wtime();
assembler_->assembleMatrix(x_, assembler_->assembleMatrix(x_,
*hessianMatrix_, *hessianMatrix_,
i==0 // assemble occupation pattern only for the first call i==0 // assemble occupation pattern only for the first call
); );
std::cout << "hessian assembly took " << gradientTimer.elapsed() << " sec." << std::endl; std::cout << "hessian assembly took " << gradientTimer.elapsed() << " sec." << std::endl;
std::cout << "hessian assembly took " << (omp_get_wtime() - oldClock) << " sec." << std::endl;
recomputeGradientHessian = false; recomputeGradientHessian = false;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment