1 |
This is the final report of the project “Automated benchmark suite for |
2 |
numerical libraries in Gentoo” for the Google Summer of Code 2011. |
3 |
This report is also available on my blog at the address |
4 |
http://wp.me/pzWEm-8Z. |
5 |
|
6 |
|
7 |
== Project description == |
8 |
The project aims to develop a simple yet powerful automated system of |
9 |
benchmarking for numerical libraries. The Gentoo software system |
10 |
provides many implementations of widely used standards such as BLAS, |
11 |
CBLAS, LAPACK, ScaLAPACK and some other numerical library such as |
12 |
FFTW, MKL. The developed tools will aid the system maintener to choose |
13 |
the best suited implementation with respect to the machine hardware |
14 |
and to test the same implementation or different ones with different |
15 |
compilers, compiler versions and compile flags. |
16 |
|
17 |
|
18 |
== Release == |
19 |
This report refers to the 0.1 release, which is the commit tagged with |
20 |
“0.1″ on the git repository. [1] |
21 |
An ebuild for the 0.1 version will come soon. |
22 |
|
23 |
|
24 |
== Archieved objectives == |
25 |
In the original project description [2], I pointed out that I would |
26 |
have delivered a benchmarking suite and a script, acting respectively |
27 |
as “data provider” for the benchmarking results and as system |
28 |
organizer for the work to do, user interface, base for the |
29 |
customization, … During the summer I decided to adopt the BTL (Bench |
30 |
Template Library) as benchmarking suite, and actually much work has |
31 |
been devoted to this; the BTL was initially designed to be extensible, |
32 |
and I actually used almost all extensible features of the BTL in order |
33 |
to adapt it for my purposes. In facts, I discovered that the BTL is |
34 |
not quite perfect and decided that, after the GSoC, I will spend some |
35 |
time trying to figure out how this very powerful library could improve |
36 |
even more. Anyway, it has performed well for my GSoC project, and the |
37 |
modified version is available on my hg repository. [3] |
38 |
|
39 |
The script is in facts a Python library that: |
40 |
* Uses the featured provided by portage to search, compile, emerge |
41 |
packages in a separate root; resolves the dependencies (this part is |
42 |
still unstable); follows the user’s instruction on the environment to |
43 |
use during the emerge process; stores the generated binary packages |
44 |
for future usage (instruction to the user are printed at the end). |
45 |
* Writes everything onto comprehensive and organized logs. |
46 |
* Interprets an highly customizable configuration file provided by the |
47 |
user to define the tests that have to be run. |
48 |
* Compiles the benchmarking suite with the correct options, flags, libraries,… |
49 |
* Wraps the suite execution and provides user-friendly output; stores |
50 |
its results in an organized fashion. |
51 |
* Collects the results and plots them. |
52 |
* Saves the plots and generates a comprehensive HTML report; the |
53 |
report contains, along with the images, information about the system |
54 |
and the time, the logs, the configuration file and optionally a |
55 |
summary figure. |
56 |
* Cleans the system. |
57 |
|
58 |
The script is modular: for each different library a module has to be |
59 |
provided. The module specifies where the particular benchmarking suite |
60 |
main source is, how to compile it, how to run it, how to interpret the |
61 |
results,… As most of the modules are tested through the modified BTL |
62 |
library, a generic code is present in an abstract BTL module and the |
63 |
specific modules can just inherit this module and add a few |
64 |
information. The following modules make use of the BTL: |
65 |
* blas |
66 |
* cblas |
67 |
* lapack |
68 |
* scalapack |
69 |
* fftw |
70 |
|
71 |
The following modules make instead use of a different benchmarking |
72 |
suite, that is now part of the modified BTL, but follows a different |
73 |
implementation paradigm: |
74 |
* blas_accuracy |
75 |
* lapack_accuracy |
76 |
|
77 |
These test the accuracy of the implementations instead of the |
78 |
computational speed. |
79 |
|
80 |
The following module does not use a benchmarking suite, but relies on |
81 |
the information provided by the executable that is contained in the |
82 |
package: |
83 |
* metis |
84 |
|
85 |
A total of 8 modules are provided. This exceeds the initial |
86 |
expectations; to be honest, I have to say that some of them (in |
87 |
particular blas_accuracy and metis) are very basic modules and lack of |
88 |
some features, while the module scalapack was not tested much and is |
89 |
to be considered unstable. |
90 |
|
91 |
|
92 |
== Documentation == |
93 |
A web page is present at http://soc.dev.gentoo.org/~spiros/. Here some |
94 |
documentation about how to install the numbenc package is present. |
95 |
Since numbench is much Gentoo-specific, only instruction on how to |
96 |
install it on Gentoo are provided. In facts, it is completely useless |
97 |
without the emerge and equery commands. The page also gives an |
98 |
overview on hot to run the script. |
99 |
|
100 |
The package installs a man page numbench(1) that explains in more |
101 |
detail how to configure and run a test, where the logs and the results |
102 |
are and gives some more information. A set of sampl configuration |
103 |
files come with the package, too, and are installed into |
104 |
/usr/share/numbench/samples. |
105 |
|
106 |
The source (which is available on the auto-numerical-bench git |
107 |
repository [4] for the script and on the cited mercurial repository |
108 |
for the benchmarking suite [3]) contains some comments that could be |
109 |
useful for developers that want to write new modules or improve the |
110 |
project. In any case, if you plan adding features, please contact me! |
111 |
|
112 |
|
113 |
== License == |
114 |
The modified BTL has not changed license and is therefore re-released |
115 |
with the GPL -2 license. The same license is adopted for the Python |
116 |
part. |
117 |
|
118 |
|
119 |
== Results == |
120 |
On the web page a set of results are available.[5] They cover almost |
121 |
all available module and also give examples of configuration files. |
122 |
|
123 |
|
124 |
== Acknowledgements == |
125 |
First of all, thanks to Google for sponsorizing the such a programme. |
126 |
This is of course useful for the students that have the possibility to |
127 |
do a real-work job (as student I often feel the need of a similar |
128 |
experience in my academic activities), earn something and, above all, |
129 |
at least for us Gentoo students, to get in touch with the FLOSS |
130 |
community. |
131 |
|
132 |
Thanks to Donnie and the metors that make Gentoo being a perfect |
133 |
choice for a student who wants to participate to the SoC. |
134 |
|
135 |
Many thanks to the whole Gentoo community that is always responsive |
136 |
and helpful. The forums, IRC channels and mailing-lists are full of |
137 |
experts that are ready to help you just as you need. Being a SoC |
138 |
student make you feel like a privileged and very respected person, |
139 |
which is just wonderful. |
140 |
|
141 |
And a very big thank to my mentor Sébastien, who helped me a lot |
142 |
almost daily during the whole summer. Working with Sébastien is very |
143 |
motivating and his testing work has been very helpful. Thanks very |
144 |
much! |
145 |
|
146 |
|
147 |
That’s all! |
148 |
Best regards |
149 |
Andrea Arteaga |
150 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 |
[1] http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=tree;h=40c901a4c2be8bf89e20a45e29130f8488176923;hb=587860cfcdc6845385bc89a7e49bca90caaff4a1 |
157 |
[2] http://www.google-melange.com/gsoc/proposal/review/google/gsoc2011/spiros/1 |
158 |
[3] https://bitbucket.org/spiros/btl |
159 |
[4] http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=summary |
160 |
[5] http://soc.dev.gentoo.org/~spiros/Results/ |