Skip to content

SimonHeybrock/lib-hadron-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

324 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note 2025: This is a reupload of my work in the state it was in when I changed jobs in June 2015 — the old link found in some publications referencing my university account is no longer working. This is likely out of date, please contact whoever has referenced LibHadronAnalysis. I am not supporting this.

LibHadronAnalysis

This library provides routines for computing Baryon Disribution Amplitudes (BDA), Meson Distribution Amplitudes (MDA), and Baryon Spectra (Light and Heavy). It was written to replace the (Regensburg-)Chroma-internal implementation, which was very slow. The corresponding functions in Chroma are

  • mda_prop(), bdacomp(), and bdaopen() in chroma/lib/meas/hadron/mda_prop_w.h, chroma/lib/meas/hadron/bdacomp_w.h, and chroma/lib/meas/hadron/bdaopen_w.h

for the distribution amplitudes and

  • barhqlq_qcdsf() and barhqsqlq_qcdsf() in barhqlq_qcdsf_w.h and barhqsqlq_qcdsf_w.h

for the baryon spectra.

Authors

Advisory:

Features

  • double precision
  • both icc and gcc seem to manage decent auto-vectorization (due to according changes in the C++ code)
  • optional: Chroma compatible interface for direct calls to the library from Chroma
  • optional: testing with Google Test

Performance

With icc on processors with AVX support, we observe a speedup of 5x or more with respect to the QDP++-based implementation in (Regensburg-)Chroma.

How to...

  1. Dependencies:

    • cmake
    • MPI
    • on the MIC: Intel Compiler
    • optional: Chroma to build the interface
    • optional: Google Test
    • optional: QDP++ for all tests
    • optional: Chroma for some tests
    • The C++ compiler must support C++11 to some extent, for example gcc 4.6 or later should be fine.
  2. Get the code:

git clone git@rqcd.ur.de:hes10653/lib-hadron-analysis
  1. Set compiler:
export CXX=mpicxx

or, when compiling for the MIC, the Intel Compiler:

export CXX=mpiicpc
  1. We recommend an out-of-source build, run cmake with (or without) optional flags according to your requirements:
    mkdir build && cd build
    cmake \
        -DCMAKE_INSTALL_PREFIX:PATH=/install/path/for/this/library \
        -DQDPXX:PATH=/path/to/qdpxx/root/directory \
        -DCHROMA_SOURCE:PATH=/path/to/chroma_source/root/directory \
        ../lib-hadron-analysis
- Add `-DBUILD_MIC_VERSION=on` to build for the MIC.
- Add `-DBUILD_OPENMP_VERSION=off` to disable compilation with OpenMP.
- Add `-DGTEST:PATH=/path/to/googletest/root/directory` if you wish to build the tests.
- Add `-DCHROMA:PATH=/path/to/chroma/root/directory` to build tests of the Chroma interface. When linking to Chroma for the test programs, make sure to use a Chroma version that is **not** built with this library, otherwise the test would compare the result to itself.
- The recommended way to build this library with Chroma interface is to use `-DQDPXX` and `-DCHROMA_SOURCE`.
  1. Available targets are:
make # builds intermediate libraries and the library with Chroma interface (if possible)
make test # builds all tests (apart from the Chroma-dependent ones), needs gtest and QDP++
make test-chroma # builds tests for the Chroma interface
  1. The default target builds the Chroma interface if Chroma was found, you can then install it with:
make install
  1. If you are using a recent version of the "Regensburg" Chroma code, chances are that the library has already been included, the only thing you might need to do is to run the Chroma configure with the option --with-lib-hadron-analysis=/install/path/of/lib-hadron-analysis and (re-)compile.

    If this is not the case, to use this library in your Chroma program use, e.g., for an MDA (function signature chosen identical to mda_prop() in chroma/lib/meas/hadron/mda_prop_w.h):

    #include "chroma_meson_distribution_amplitude.h"

    LibHadronAnalysis::MDA::compute(
        multi2d<MesonDA>& mdaprop,
        const LatticePropagator& quark_propagator_1,
        const LatticePropagator& quark_propagator_2,
        const SftMom& phases,
        int t0);

Similarly for an BDA or baryon spectrum, see the corresponding header files provided by this library for details: - MDA: chroma_meson_distribution_amplitude.h - BDA: chroma_baryon_distribution_amplitude.h - Baryon spectrum: chroma_baryon_spectrum.h

About

Routines for computing Baryon Disribution Amplitudes (BDA), Meson Distribution Amplitudes (MDA), and Baryon Spectra (Light and Heavy)

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages