-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME
113 lines (90 loc) · 4.82 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
The following sequence of commands should result in reproduction
of all tests and plots discussed in the paper.
The commands were tested to work with the following software versions
(Debian/Ubuntu package names given in parenthesis):
- Blitz++ 0.10 http://sf.net/projects/blitz/ (libblitz0-dev)
- GCC 4.8 http://gcc.gnu.org/ (gcc-snapshot or gcc-4.8)
- PyPy 1.9 http://pypy.org/ (pypy)
- NumPy 1.7 http://numpy.org/ (python-numpy)
- CPython 2.7 http://python.org/ (python)
- Clang 3.2 http://clang.llvm.org/ (clang)
- Boost 1.49 http://boost.org/ (libboost-dev)
- CMake 2.8 http://cmake.org/ (cmake)
- perf 3.2 http://perf.wiki.kernel.org/ (linux-tools)
- time 1.7 http://gnu.org/software/time/ (time)
- gnuplot 4.6 http://gnuplot.info/ (gnuplot)
- gnuplot-iostream http://www.stahlke.org/dan/gnuplot-iostream/
(gnuplot-iostream)
Known strict version requirements:
- Blitz++ >= 0.10
- GCC >= 4.8
- CMake != 2.8.10 (see note below)
To compile the C++ and Fortran programs, please start with running the cmake
optionally pointing it to any custom compiler or library locations:
$ cmake . \
-DCMAKE_CXX_COMPILER=/usr/lib/gcc-snapshot/bin/g++ \
-DCMAKE_Fortran_COMPILER=/usr/lib/gcc-snapshot/bin/gfortran
Successful CMake run should generate Makefile files to be used with GNU make.
A single "make" call should suffice (and produce, among other binaries:
./cpp/inout-cpp, ./cpp/test-cpp-gnucxx and ./for/test-for):
$ make
In order to reproduce the tests comparing GCC and Clang, a second CMake run
is needed (beware this will clear all custom CMake settings - if the first
CMake run needed any additional options, these have to be repeated again):
$ cmake . \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_Fortran_COMPILER=/usr/lib/gcc-snapshot/bin/gfortran
(CMake 2.8.10 has a bug causing it to enter an infinite loop here,
erasing CMakeFiles directory helps)
A second make run will compile ./cpp/test-cpp-nongnu with clang
$ make
To check correctness of all five set-ups (GCC, Clang, gfortran,
CPython and PyPy), one may run sanity tests:
$ cd tests/sanity
$ make test
$ cd ../../
In order to run the timing tests discussed in the paper, it is needed
first to generate the test data by calling:
$ ./testgen.sh
CMake has to be called again to add the new files to its list of tests:
$ cmake .
Finally, to start the timing tests, type "make test" in tests/timing:
$ cd tests/timing
$ make test
Plots presented in the paper (as well as several other plots showing
cache usage statistics) can be generated with gnuplot by typing:
$ gnuplot plot.gpi
-----------------------------------------------------------------------
List of files with brief description
.
├── CMakeLists.txt
├── README
├── cpp
│ ├── CMakeLists.txt
│ ├── inout.cpp ........ C++ program generating data for timing tests
│ ├── listings.hpp ...... C++ code presented in listings in the paper
│ ├── plot.cpp ...................... C++ program generating Figure 2
│ └── test.cpp ....... C++ program performing sanity and timing tests
├── for
│ ├── CMakeLists.txt
│ ├── listings.f ................ Fortran code presented in the paper
│ ├── test_arrvec.f ............... a unit test for the arrvec_t type
│ └── test.f ..... Fortran program performing sanity and timing tests
├── pyt
│ ├── listings.py ................ Python code presented in the paper
│ └── test.py ..... Python program performing sanity and timing tests
├── testgen.sh ........... bash script generating data for timing tests
└── tests
├── CMakeLists.txt
├── sanity
│ ├── CMakeLists.txt
│ ├── *:in .......................... input data for sanity tests
│ └── *:out .............. data for verifying sanity tests output
└── timing
├── CMakeLists.txt
├── filter0.awk .. 0-th stage of AWK scripts parsing CMake logs
├── filter1.awk .. 1-st stage of AWK scripts parsing CMake logs
├── filter2.awk .. 2-nd stage of AWK scripts parsing CMake logs
├── filter3.awk .. 3-rd stage of AWK scripts parsing CMake logs
├── filter.sh ...... bash script invoking the above AWK scripts
└── plot.gpi ............ gnuplot script generating Figures 3-5