     {
         typedef cusp::relaxation::polynomial<ValueType,MemorySpace> Smoother;
         std::cout << "\nSolving with smoothed aggregation preconditioner and polynomial smoother" << std::endl;
+
+        timer t0;
+        cusp::precond::aggregation::smoothed_aggregation<IndexType, ValueType, MemorySpace, Smoother> M(A);
+        std::cout << "constructed hierarchy in " << t0.milliseconds_elapsed() << " ms " << std::endl;
+
+        run_amg(A,M);
+    }
+
+    // solve with smoothed aggregation algebraic multigrid preconditioner and gauss-seidel smoother
+    {
+        typedef cusp::relaxation::gauss_seidel<ValueType,MemorySpace> Smoother;
+        std::cout << "\nSolving with smoothed aggregation preconditioner and gauss-seidel smoother" << std::endl;
 
         timer t0;
         cusp::precond::aggregation::smoothed_aggregation<IndexType, ValueType, MemorySpace, Smoother> M(A);

#include <cusp/relaxation/jacobi.h>
#include <cusp/relaxation/polynomial.h>
#include <cusp/precond/aggregation/smoothed_aggregation.h>
#include <cusp/krylov/cg.h>
#include <cusp/gallery/poisson.h>
#include <cusp/csr_matrix.h>

#include <iostream>


        monitor.print();
    }

    // solve with smoothed aggregation algebraic multigrid preconditioner and jacobi smoother
    {
        std::cout << "\nSolving with smoothed aggregation preconditioner and jacobi smoother" << std::endl;

