Skip to content

Code accompanying the paper of Arabas, Jarecka, Jaruga & Fijałkowski published in Scientific Programming in 2014

Notifications You must be signed in to change notification settings

igfuw/mpdata-oop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 

About

Code accompanying the paper of Arabas, Jarecka, Jaruga & Fijałkowski published in Scientific Programming in 2014

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published