1 |
#/usr/bin/python |
2 |
# $Id:$ |
3 |
|
4 |
# |
5 |
# COPYRIGHT ACcESS 2004 - All Rights Reserved |
6 |
# |
7 |
# This software is the property of ACcESS. No part of this code |
8 |
# may be copied in any form or by any means without the expressed written |
9 |
# consent of ACcESS. Copying, use or modification of this software |
10 |
# by any unauthorised person is illegal unless that |
11 |
# person has a software license agreement with ACcESS. |
12 |
# |
13 |
|
14 |
""" |
15 |
some benchmarks for tetsing the finley solver. The idea is to develop a set of standart benchmarks |
16 |
|
17 |
* Laplace2Dorder1_?k |
18 |
* Laplace3Dorder2_?k |
19 |
|
20 |
where ? is approximatively the number of unknowns in 1000. |
21 |
|
22 |
@var __author__: name of author |
23 |
@var __licence__: licence agreement |
24 |
var __url__: url entry point on documentation |
25 |
@var __version__: version |
26 |
@var __date__: date of the version |
27 |
""" |
28 |
|
29 |
__author__="Lutz Gross, l.gross@uq.edu.au" |
30 |
__licence__="contact: esys@access.uq.edu.au" |
31 |
__url__="http://www.iservo.edu.au/esys/escript" |
32 |
__version__="$Revision:$" |
33 |
__date__="$Date:$" |
34 |
|
35 |
from esys.finley.finleybench import * |
36 |
from esys.escript.benchmark import BenchmarkSuite,Benchmark |
37 |
|
38 |
thlist=[1,2,4,8,16,32] |
39 |
# thlist=[1,2,4,8,16,32,64,128] |
40 |
# thlist=[1,2,4,8,16,32,64,128] |
41 |
show=True |
42 |
ff=FinleyFilter() |
43 |
|
44 |
opt1=FinleyOptions(solver_method=LinearPDE.PCG,preconditioner=LinearPDE.JACOBI,verbose=show) |
45 |
opt2=FinleyOptions(solver_method=LinearPDE.PCG,preconditioner=LinearPDE.ILU0,verbose=show) |
46 |
|
47 |
bm_L2Do1=Benchmark(name="Laplace 2D (order 1)") |
48 |
bm_L2Do1.addProblem(Laplace2DOrder1_30k()) |
49 |
bm_L2Do1.addProblem(Laplace2DOrder1_60k()) |
50 |
bm_L2Do1.addProblem(Laplace2DOrder1_120k()) |
51 |
bm_L2Do1.addProblem(Laplace2DOrder1_240k()) |
52 |
bm_L2Do1.addProblem(Laplace2DOrder1_480k()) |
53 |
bm_L2Do1.addProblem(Laplace2DOrder1_960k()) |
54 |
bm_L2Do1.addProblem(Laplace2DOrder1_1920k()) |
55 |
bm_L2Do1.addProblem(Laplace2DOrder1_3840k()) |
56 |
bm_L2Do1.addProblem(Laplace2DOrder1_7680k()) |
57 |
bm_L2Do1.addProblem(Laplace2DOrder1_15360k()) |
58 |
bm_L2Do1.addOptions(opt1) |
59 |
bm_L2Do1.addOptions(opt2) |
60 |
|
61 |
bm_L2Do2=Benchmark("Laplace 2D (order 2)") |
62 |
bm_L2Do2.addProblem(Laplace2DOrder2_30k()) |
63 |
bm_L2Do2.addProblem(Laplace2DOrder2_60k()) |
64 |
bm_L2Do2.addProblem(Laplace2DOrder2_120k()) |
65 |
bm_L2Do2.addProblem(Laplace2DOrder2_240k()) |
66 |
bm_L2Do2.addProblem(Laplace2DOrder2_480k()) |
67 |
bm_L2Do2.addProblem(Laplace2DOrder2_960k()) |
68 |
bm_L2Do2.addProblem(Laplace2DOrder2_1920k()) |
69 |
bm_L2Do2.addProblem(Laplace2DOrder2_3840k()) |
70 |
bm_L2Do2.addProblem(Laplace2DOrder2_7680k()) |
71 |
bm_L2Do2.addProblem(Laplace2DOrder2_15360k()) |
72 |
bm_L2Do2.addOptions(opt1) |
73 |
bm_L2Do2.addOptions(opt2) |
74 |
|
75 |
bm_L3Do1=Benchmark("Laplace 3D (order 1)") |
76 |
bm_L3Do1.addProblem(Laplace3DOrder1_30k()) |
77 |
bm_L3Do1.addProblem(Laplace3DOrder1_60k()) |
78 |
bm_L3Do1.addProblem(Laplace3DOrder1_120k()) |
79 |
bm_L3Do1.addProblem(Laplace3DOrder1_240k()) |
80 |
bm_L3Do1.addProblem(Laplace3DOrder1_480k()) |
81 |
bm_L3Do1.addProblem(Laplace3DOrder1_960k()) |
82 |
bm_L3Do1.addProblem(Laplace3DOrder1_1920k()) |
83 |
bm_L3Do1.addProblem(Laplace3DOrder1_3840k()) |
84 |
bm_L3Do1.addProblem(Laplace3DOrder1_7680k()) |
85 |
bm_L3Do1.addProblem(Laplace3DOrder1_15360k()) |
86 |
bm_L3Do1.addOptions(opt1) |
87 |
bm_L3Do1.addOptions(opt2) |
88 |
|
89 |
bm_L3Do2=Benchmark("Laplace 3D (order 2)") |
90 |
bm_L3Do2.addProblem(Laplace3DOrder2_30k()) |
91 |
bm_L3Do2.addProblem(Laplace3DOrder2_60k()) |
92 |
bm_L3Do2.addProblem(Laplace3DOrder2_120k()) |
93 |
bm_L3Do2.addProblem(Laplace3DOrder2_240k()) |
94 |
bm_L3Do2.addProblem(Laplace3DOrder2_480k()) |
95 |
bm_L3Do2.addProblem(Laplace3DOrder2_960k()) |
96 |
bm_L3Do2.addProblem(Laplace3DOrder2_1920k()) |
97 |
bm_L3Do2.addProblem(Laplace3DOrder2_3840k()) |
98 |
bm_L3Do2.addProblem(Laplace3DOrder2_7680k()) |
99 |
bm_L3Do2.addProblem(Laplace3DOrder2_15360k()) |
100 |
bm_L3Do2.addOptions(opt1) |
101 |
bm_L3Do2.addOptions(opt2) |
102 |
|
103 |
|
104 |
|
105 |
bms=BenchmarkSuite("Paso/Finley") |
106 |
bms.addBenchmark(bm_L2Do1) |
107 |
bms.addBenchmark(bm_L2Do2) |
108 |
bms.addBenchmark(bm_L3Do1) |
109 |
bms.addBenchmark(bm_L3Do2) |
110 |
bms.run(scale=thlist) |
111 |
print bms.getHTML(filter=ff) |