Gentoo Archives: gentoo-soc

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-soc@l.g.o
Subject: Re: [gentoo-soc] Benchmark suite project
Date: Mon, 23 May 2011 21:00:55
Message-Id: 1306184427.2454.137.camel@big_daddy.dol-sen.ca
In Reply to: [gentoo-soc] Benchmark suite project by Andrea Arteaga
1 On Mon, 2011-05-23 at 21:21 +0200, Andrea Arteaga wrote:
2 > Hello all.
3 > My name is Andrea Arteaga and I'm working on the project "Automated
4 > benchmark suite for numerical libraries in Gentoo" for this year's
5 > Summer of Code.
6 >
7 > Very shortly: many implementations for numerical library standards
8 > such as BLAS, CBLAS, LAPACK, exist and are supported by Gentoo. My
9 > project aims to construct a benchmark suite which can detect the best
10 > suited one for the user's system and needs by performing a comparative
11 > benchmark analysis. This will also take into account packages emerged
12 > with special CFLAGS, FFLAGS, compilers, compiler versions...
13 >
14 > The benchmarks will be written in C or C++, re-using existing code
15 > when possible; the main part will consist of Python scripts. The
16 > project design is already defined and will be the following:
17 >
18 > * The main script will perform common tasks and will drive the user
19 > through the different steps
20 > * A special portage interface will use the portage APIs [I will need
21 > soime help here, see later] in order to provide a simple way for
22 > emerging and removing packages with special flags or environment
23 > * An interface-dependant module will tell the portage API which
24 > packages to emerge (e.g.: install blas-reference-20070226 using
25 > gcc-4.5.2), use them for the benchmarks and interpret the result. At
26 > the end it will also be responsible for a report.
27 > * An interface-dependant benchmarks program which is coupled with the
28 > module and will test the BLAS, CBLAS, LAPACK implementations.
29 >
30 > The program will do operations like "CFLAGS="-O3" emerge -B
31 > cblas-reference-20030223-r4" and similars, with some environments
32 > changes and building binary packages in special directories. I see
33 > that different threads already treat the portage APIs. I would like to
34 > ask which API is the best suited for this type of operations and where
35 > to find documentation for them (apart from pydoc).
36 >
37 > I still don't have a git repository, which I asked Robin to set up a
38 > few days ago, but the actual work is really starting.
39 >
40 > --
41 > Best
42 > Andrea Arteaga
43 >
44
45 Andrea, use the public_api branch of the portage git repo as much as
46 possible. If there is additional functionality you need, then ask. I
47 will gladly try to get it for you if possible. I am just now adding
48 emerge capability to the api, so you should be able to use it later in
49 the project for emerging. I would however set up your code to be able
50 to run emerge from a subprocess. You should find the most common
51 information gathering functions in the api now. They should be fairly
52 straightforward to use. Keep in mind that the api is likely to change
53 somewhat yet as it is used more and improved.
54
55 start by creating a portage.api.settings.PortageSettings instance
56
57 Hopefully it will be merged into regular portage releases by the end of
58 this years gsoc.
59
60 As for custom CFLAGS and other
61 variables, /etc/portage/env/$CAT/$pkg/files are used for individual pkg
62 overrides. As I've never used them I can't give you more detail about
63 it or where to look.
64
65 If you need to write to those files, I would like to establish some code
66 in the api to standardize it and make it available for use. In the
67 meantime you can look if the one I use in porthole is suitable. I run
68 it as root from a terminal call or import it and use it directly the
69 importing code has the right privileges.
70
71 http://porthole.git.sourceforge.net/git/gitweb.cgi?p=porthole/porthole;a=blob;f=porthole/backends/set_config.py;h=8e78126377f8fc79fc51f9d17499df48a2e0270e;hb=HEAD
72
73 And if you need to keep an internal db of all those:
74
75 http://porthole.git.sourceforge.net/git/gitweb.cgi?p=porthole/porthole;a=blob;f=porthole/db/user_configs.py;h=7f1c61459f26c6856f80d02cbdfb81ac3c04d7e2;hb=HEAD
76
77 --
78 Brian Dolbec <brian.dolbec@×××××.com>

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-soc] Benchmark suite project Andrea Arteaga <andyspiros@×××××.com>