<commit_before>kerncraft
=========

Loop Kernel Analysis and Performance Modeling Toolkit

This tool allows automatic analysis of loop kernels using the Execution Cache Memory (ECM) model, 
the Roofline model and actual benchmarks. kerncraft provides a framework to investigate the
data reuse and cache requirements by static code analysis. In combination with the Intel IACA tool
kerncraft can give a good overview of both in-core and memory bottlenecks and use that data to 
apply performance models.

For a detailed documentation see publications in `<doc/>`_.

.. image:: https://travis-ci.org/RRZE-HPC/kerncraft.svg?branch=master
    :target: https://travis-ci.org/RRZE-HPC/kerncraft?branch=master

.. image:: https://codecov.io/github/RRZE-HPC/kerncraft/coverage.svg?branch=master
    :target: https://codecov.io/github/RRZE-HPC/kerncraft?branch=master
    
.. image:: https://landscape.io/github/RRZE-HPC/kerncraft/master/landscape.svg?style=flat
   :target: https://landscape.io/github/RRZE-HPC/kerncraft/master
   :alt: Code Health

Installation
============

On most systems with python pip and setuputils installed, just run:
``pip install --user kerncraft`` for the latest release.

If you want to build from source:
Clone this repository and run ``python ./setup.py install``.

If you are unfamiliar with python, here is a tutorial on how to install python packages: https://packaging.python.org/installing/ . The use of virtual enviornments is usually a good choice.

Additional requirements are:
 * `Intel Achitecture Code Analyzer (IACA) <https://software.intel.com/en-us/articles/intel-architecture-code-analyzer>`_, with (working) ``iaca.sh`` in PATH environment variable (used by ECM, ECMCPU and RooflineIACA models)
 * `likwid <https://github.com/RRZE-HPC/likwid>`_ (used in Benchmark model and by ``likwid_bench_auto.py``)

Usage
=====

1. Get an example kernel and machine file from the examples directory

``wget https://raw.githubusercontent.com/RRZE-HPC/kerncraft/master/examples/machine-files/phinally.yaml``

``wget https://raw.githubusercontent.com/RRZE-HPC/kerncraft/master/examples/kernels/2d-5pt.c``

2. Have a look at the machine file and change it to match your targeted machine (above we downloaded a file for a Sandy Bridge EP machine)

3. Run kerncraft

``kerncraft -p ECM -m phinally.yaml 2d-5pt.c -D N 10000 -D M 10000``<commit_msg>FIXED #47 phinally.yaml not available<commit_after>kerncraft
=========

Loop Kernel Analysis and Performance Modeling Toolkit

This tool allows automatic analysis of loop kernels using the Execution Cache Memory (ECM) model, 
the Roofline model and actual benchmarks. kerncraft provides a framework to investigate the
data reuse and cache requirements by static code analysis. In combination with the Intel IACA tool
kerncraft can give a good overview of both in-core and memory bottlenecks and use that data to 
apply performance models.

For a detailed documentation see publications in `<doc/>`_.

.. image:: https://travis-ci.org/RRZE-HPC/kerncraft.svg?branch=master
    :target: https://travis-ci.org/RRZE-HPC/kerncraft?branch=master

.. image:: https://codecov.io/github/RRZE-HPC/kerncraft/coverage.svg?branch=master
    :target: https://codecov.io/github/RRZE-HPC/kerncraft?branch=master
    
.. image:: https://landscape.io/github/RRZE-HPC/kerncraft/master/landscape.svg?style=flat
   :target: https://landscape.io/github/RRZE-HPC/kerncraft/master
   :alt: Code Health

Installation
============

On most systems with python pip and setuputils installed, just run:
``pip install --user kerncraft`` for the latest release.

If you want to build from source:
Clone this repository and run ``python ./setup.py install``.

If you are unfamiliar with python, here is a tutorial on how to install python packages: https://packaging.python.org/installing/ . The use of virtual enviornments is usually a good choice.

Additional requirements are:
 * `Intel Achitecture Code Analyzer (IACA) <https://software.intel.com/en-us/articles/intel-architecture-code-analyzer>`_, with (working) ``iaca.sh`` in PATH environment variable (used by ECM, ECMCPU and RooflineIACA models)
 * `likwid <https://github.com/RRZE-HPC/likwid>`_ (used in Benchmark model and by ``likwid_bench_auto.py``)

Usage
=====

1. Get an example kernel and machine file from the examples directory

``wget https://raw.githubusercontent.com/RRZE-HPC/kerncraft/master/examples/machine-files/SandyBridgeEP_E5-2680.yml``

``wget https://raw.githubusercontent.com/RRZE-HPC/kerncraft/master/examples/kernels/2d-5pt.c``

2. Have a look at the machine file and change it to match your targeted machine (above we downloaded a file for a Sandy Bridge EP machine)

3. Run kerncraft

``kerncraft -p ECM -m SandyBridgeEP_E5-2680.yml 2d-5pt.c -D N 10000 -D M 10000``
{'fraction_non_alphanumeric': 0.1086048454469507, 'fraction_numerical': 0.00960735171261487, 'mean_word_length': 4.55568445475638, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 22, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3036727', 'n_tokens_mistral': 1507, 'n_tokens_neox': 1418, 'n_words': 499}