All results are from my laptop. Your results may differ.

Conclusions first: New code (without running the linear solver) is
faster, by almost 4 seconds. When actually running the solver, the new
code keeps its speed edge until the residual tolerance becomes low
(less than 1e-10). This means that the Dune AMG is a little slower
than SAMG, which is not all that surprising. The surprise is that it
(mostly) keeps pace with SAMG, which was not quite expected.

The codes seem to converge to different solutions, which is
unfortunate, but explainable: The codes use
    a) different approximations to areas, volumes and normals,
    b) different linear systems (related to handling of bdy cond).
The first difference is zero for cartesian grids, testing with a
cartesian grid and heterogenous permeability should shed some light on
this.

The SAMG solver seems to give a little more precision (compared to its
own 1e-16 solution) than the Dune solver. I offer no explanation, but
do not think this necessarily means anything problematic. Will keep an
eye on this, though.


--Atgeirr


Old old code (the code first delivered december 2006).
=====================================================

Command:
--------
atgeirr@elrond:~/gotools/mimetic_statoil$ time app/upscale_test ~/workdir/data/opm_data/grids/wave_orig.grdecl 0
Computing tensor using FIXED boundary conditions.
--------

1) EPS = -1e-16 (negative means absolute residual, not relative!)

156.231510034364	0.00000000000000	0.00000000000000	
0.00000000000000	161.928040253848	0.00000000000000	
0.00000000000000	0.00000000000000	31.6524093079307	

real	0m43.129s
user	0m40.558s
sys	0m2.447s


2) EPS = -1e-8

156.231510034373	0.00000000000000	0.00000000000000	
0.00000000000000	161.928040253847	0.00000000000000	
0.00000000000000	0.00000000000000	31.6524093079313	

real	0m40.681s
user	0m38.129s
sys	0m2.456s


3) EPS = 1e-16 (relative residual)

156.231510034364	0.00000000000000	0.00000000000000	
0.00000000000000	161.928040253848	0.00000000000000	
0.00000000000000	0.00000000000000	31.6524093079307	

real	0m43.110s
user	0m40.551s
sys	0m2.451s


4) EPS = 1e-10

156.231510032888	0.00000000000000	0.00000000000000	
0.00000000000000	161.928040251955	0.00000000000000	
0.00000000000000	0.00000000000000	31.6524093060648	

real	0m37.090s
user	0m34.545s
sys	0m2.426s


5) EPS = 1e-8

156.231510035841	0.00000000000000	0.00000000000000	
0.00000000000000	161.928040509462	0.00000000000000	
0.00000000000000	0.00000000000000	31.6524097342785	

real	0m33.974s
user	0m31.551s
sys	0m2.395s


6) EPS = 1e-5

156.232835862799	0.00000000000000	0.00000000000000	
0.00000000000000	161.927447816447	0.00000000000000	
0.00000000000000	0.00000000000000	31.6513325481661	

real	0m29.270s
user	0m26.752s
sys	0m2.432s


7) EPS = 1e-3

156.289741449408	0.00000000000000	0.00000000000000	
0.00000000000000	161.963502056854	0.00000000000000	
0.00000000000000	0.00000000000000	31.7244015876773	

real	0m26.270s
user	0m23.765s
sys	0m2.426s


8) EPS = 1e-2

155.645697059578	0.00000000000000	0.00000000000000	
0.00000000000000	161.717893480317	0.00000000000000	
0.00000000000000	0.00000000000000	38.3150616056072	

real	0m24.720s
user	0m22.243s
sys	0m2.414s


9) Not running the linear solver (commented out call to SAMG).

real	0m14.999s
user	0m12.867s
sys	0m2.071s

real	0m14.911s
user	0m12.829s
sys	0m2.039s



Old code (delivered december 2008).
==================================

Command:
-------
atgeirr@elrond:~/workdir/trunk/zzz_work_here/upscaling/test_fall_2009$ time ../../../upscaling/upscale_singlephase config.xml
-------

1) tolerance = 1e-10
[      156.192703205124                     0                     0 |
|                     0      159.455859912012                     0 |
|                     0                     0      30.0168798433113 ]

real	1m57.181s
user	1m6.030s
sys	0m50.704s


New code (the dune-cornerpoint module).
======================================

Command:
-------
atgeirr@elrond:~/dune_release/dune-cornerpoint/upscaling/test$ time ./upscaling_test fileformat=eclipse filename=~/workdir/data/opm_data/grids/wave_orig.grdecl use_unique_boundary_ids=false boundary_condition_type=0 residual_tolerance=1e-8
-------


1) Debug mode (all others are in release mode), residual_tolerance = 1e-8
[done to verify results with optimization, result identical => ok]

156.108070493624 0 0 
0 161.812986340526 0 
0 0 31.2464464394367 

real	4m58.007s
user	4m49.991s
sys	0m7.027s


2) residual_tolerance = 1e-16 

156.108072515849 0 0 
0 161.812984342818 0 
0 0 31.2464597239113 

real	0m47.023s
user	0m42.571s
sys	0m4.231s

[again, Dec. 9 2009 - changes in AMG affect solution, I guess I should have run this case in October, too]

156.108072515843 0 0 
0 161.812984342796 0 
0 0 31.2464597239132 

real	0m42.342s
user	0m41.632s
sys	0m0.638s

[again, Apr. 16 2010 - all the changes since last have modified the solution a little]

156.108072515789 0 0 
0 161.812984342748 0 
0 0 31.2464597239119 

real	0m38.425s
user	0m37.649s
sys	0m0.602s


3) residual_tolerance = 1e-10

156.108072556463 0 0 
0 161.812984353691 0 
0 0 31.2464593728902 

real	0m35.906s
user	0m31.487s
sys	0m4.179s


4) residual_tolerance = 1e-8

156.108070493624 0 0 
0 161.812986340526 0 
0 0 31.2464464394367 

real	0m32.599s
user	0m28.111s
sys	0m4.231s

[again, Oct. 8 2009 - changes in AMG affect solution]

156.108070306758 0 0 
0 161.812982946198 0 
0 0 31.2464373309417 

real	0m31.417s
user	0m27.212s
sys	0m4.058s

[again, Oct. 8 2009 - this time with branch version of Incom* and Mimetic*]

156.108070306758 0 0 
0 161.812982946198 0 
0 0 31.2464373309417 

real	0m31.228s
user	0m27.018s
sys	0m4.067s

[again, Dec. 9 2009 - AMG changes again]

156.108068958263 0 0 
0 161.812985066158 0 
0 0 31.2464395640301 

real	0m29.376s
user	0m28.700s
sys	0m0.617s

[again, Mar. 4 2010 - AMG changes again I think, maybe other changes as well. Intersection iterator improvements?]

156.108068958234 0 0 
0 161.812985066163 0 
0 0 31.24643956403 

real	0m26.003s
user	0m24.991s
sys	0m0.597s

[again, Mar. 26 2010 - After changing boundary condition object to deal with Faces instead of boundary ids. Too slow?]

156.108068958234 0 0 
0 161.812985066163 0 
0 0 31.24643956403 

real	0m27.530s
user	0m25.903s
sys	0m0.699s

real	0m25.990s [repeating: faster now, maybe error in experiment before?]
user	0m25.052s
sys	0m0.631s

real	0m25.536s
user	0m24.881s
sys	0m0.602s

[again, Apr. 16 2010 - after refactoring the upscaler to use ...TracerFluid. Apparently no big change.]

156.108068958209 0 0 
0 161.81298506611 0 
0 0 31.2464395640289 

real	0m25.737s
user	0m24.583s
sys	0m0.581s

real	0m25.272s
user	0m24.638s
sys	0m0.584s

[again, Sep. 22 2010 - before trying to skip remaking the preconditioner]

real	0m25.374s
user	0m24.680s
sys	0m0.615s

[again, Nov. 8 2010 - istl updated and gcc 4.5.1]

real	0m25.807s
user	0m25.117s
sys	0m0.621s

[again, Feb. 8 2011 - changes made to Eclipse parser etc.]

real	0m25.789s
user	0m25.096s
sys	0m0.637s

[again, Dec. 6 2011]

real	0m25.907s
user	0m25.119s
sys	0m0.615s

[again, August 22 2014, entirely new computer etc. etc.]


[with linsolver_type=3, the default at this time, AMG/CG with fast
Gauss-Seidel smoothing (or FastAMG)]

156.108075001155 0 0 
0 161.812984474918 0 
0 0 31.2464615138554 

real	0m9.657s
user	0m9.352s
sys	0m0.275s

real	0m9.666s
user	0m9.381s
sys	0m0.279s

[with linsolver_type=0, ILU/CG]

156.108076377805 0 0 
0 161.812980444566 0 
0 0 31.2464680022645 

real	0m10.497s
user	0m10.305s
sys	0m0.186s

[with linsolver_type=1, AMG/CG]

156.108075141632 0 0 
0 161.812991081461 0 
0 0 31.2464628977365 

real	0m10.573s
user	0m10.299s
sys	0m0.274s

[with linsolver_type=2, KAMG/CG]

156.108075238238 0 0 
0 161.812986647314 0 
0 0 31.2464611988944 

real	0m11.666s
user	0m11.370s
sys	0m0.298s


-------------------8<------------------------------8<-------------------

[Again, 2010-05-31 -- Five runs.  Different computer (Ubuntu Linux 10.04)]
{ for i in $(seq 1 5); do
    time ./test/upscaling_test $XML_DATA_FILE;
  done; } 2>&1 | perl -ne 'print if /^Upscaled K/ .. /^sys/'

156.108069013645 0 0 
0 161.812984922129 0 
0 0 31.2464395657857 

real	0m13.860s
user	0m13.740s
sys	0m0.120s
---
156.108069013645 0 0 
0 161.812984922129 0 
0 0 31.2464395657857 

real	0m13.902s
user	0m13.800s
sys	0m0.090s
---
156.108069013645 0 0 
0 161.812984922129 0 
0 0 31.2464395657857 

real	0m13.881s
user	0m13.750s
sys	0m0.130s
---
156.108069013645 0 0 
0 161.812984922129 0 
0 0 31.2464395657857 

real	0m13.939s
user	0m13.750s
sys	0m0.190s
---
156.108069013645 0 0 
0 161.812984922129 0 
0 0 31.2464395657857 

real	0m13.912s
user	0m13.800s
sys	0m0.110s

-------------------8<------------------------------8<-------------------

5) residual_tolerance = 1e-5

156.105632072812 0 0 
0 161.811906903242 0 
0 0 31.2401740405732 

real	0m26.004s
user	0m21.783s
sys	0m4.110s


[again, Mar. 4 2010 - see comments above]

156.109771894298 0 0 
0 161.809594220408 0 
0 0 31.2442748077186 

real	0m20.700s
user	0m20.018s
sys	0m0.593s

[again, Apr. 16 2010]

156.109771894273 0 0 
0 161.809594220355 0 
0 0 31.2442748077174 

real	0m20.157s
user	0m19.561s
sys	0m0.555s


6) residual_tolerance = 1e-3

157.903332537278 0 0 
0 159.271030166896 0 
0 0 32.3461234723618 

real	0m21.946s
user	0m17.519s
sys	0m4.194s

[again, Dec. 9 2009 - AMG changes modify solution a lot]

152.545493422819 0 0 
0 158.642855651543 0 
0 0 27.2903819981729 

real	0m20.066s
user	0m19.440s
sys	0m0.603s


7) residual_tolerance = 1e-2

229.190446701104 0 0 
0 169.760196673778 0 
0 0 56.7072225968723 

real	0m21.105s
user	0m16.524s
sys	0m4.207s


8) Not running the linear solver.

real	0m11.291s
user	0m7.524s
sys	0m3.723s

real	0m11.242s
user	0m7.507s
sys	0m3.710s


[again - after a little optimization in flow solver initialization]

real	0m10.426s
user	0m7.031s
sys	0m3.372s

real	0m10.543s
user	0m7.065s
sys	0m3.428s


[again Dec. 9 2009 - maybe Snow Leopard has some of the credit?]
real	0m5.828s
user	0m5.482s
sys	0m0.334s

9) Mar. 26 2010, residual_tolerance = 1e-8, boundary_condition_type = 2 (periodic)

155.314828184991 -0.0871907368904636 0.165154074915333 
-0.0871902640179007 158.392114140835 0.00515244278494333 
0.165214873343881 0.00515360711329919 29.0905335339699 

real	0m36.793s
user	0m35.756s
sys	0m0.655s


[again Sep. 23 2010, after only creating the preconditioner once]
155.314828185149 -0.0871904408128188 0.165175432424436 
-0.0871902637044509 158.392113699679 0.00515218826296771 
0.165214873352535 0.00515424122176092 29.0905550657203 

real	0m27.099s
user	0m26.587s
sys	0m0.473s

real	0m27.263s
user	0m26.707s
sys	0m0.471s


[again, Feb. 8 2011]

real	0m27.264s
user	0m26.648s
sys	0m0.529s


[again, Jun. 1 2011]

real	0m27.056s
user	0m26.453s
sys	0m0.530s

[again, using clang++, Jun. 7 2011 (but using slightly outdated repo)]

real	0m27.669s
user	0m27.006s
sys	0m0.555s
