KatanaGraph / katana

Other
99 stars 65 forks source link

Overview

C/C++ CI Python CI

Katana is a library and set of applications to work with large graphs efficiently.

Highlights include:

Katana is released under the BSD-3-Clause license.

Installing

The easiest way to get Katana is to install the Conda packages. See the Conda User Guide for details on how to install Conda.

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
conda config --set channel_priority strict

Then, install Katana

conda install -c katanagraph/label/dev -c conda-forge katana-python

Currently, only development versions are available through Conda. These builds reflect the current state of the master branch. Releases of stable versions will be available in the future.

Alternatively, you can build Katana from source.

Building from Source

See the build instructions for details.

Dependencies

Katana is tested on 64-bit Linux, specifically Ubuntu LTS 20.04.

At the minimum, Katana depends on the following software:

Here are the dependencies for the optional features:

Documentation

Documentation is available at https://katanagraph.github.io/katana/.

You can also build the documentation for this project using these instructions.

Using Katana as a Library

There are two common ways to use Katana as a library. One way is to copy this repository into your own CMake project, typically using a git submodule. Then you can put the following in your CMakeLists.txt:

add_subdirectory(katana EXCLUDE_FROM_ALL)
add_executable(app ...)
target_link_libraries(app Katana::graph)

The other common method is to install Katana outside your project and import it as a CMake package.

The Katana CMake package is available through the katana-cpp Conda package, which is a dependency of the katana-python Conda package. You can install both with:

conda install -c katanagraph/label/dev -c conda-forge katana-python

Alternatively, you can install Katana from source. The following command will build and install Katana into INSTALL_DIR:

cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR $SRC_DIR
make install

With Katana installed either from a package or from source, you can put something like the following in your CMakeLists.txt:

list(APPEND CMAKE_PREFIX_PATH ${INSTALL_DIR})
find_package(Katana REQUIRED)
add_executable(app ...)
target_link_libraries(app Katana::graph)

If you are not using CMake, the corresponding basic commands (although the specific commands vary by system) are:

c++ -std=c++14 app.cpp -I$INSTALL_DIR/include -L$INSTALL_DIR/lib -lkatana_graph

Contact Us

For bugs, please raise an issue on GiHub.

If you file an issue, it would help us if you sent (1) the command line and program inputs and outputs and (2) a core dump, preferably from an executable built with the debug build.

You can enable core dumps by setting ulimit -c unlimited before running your program. The location where the core dumps will be stored can be determined with cat /proc/sys/kernel/core_pattern.

To create a debug build, assuming you will build Katana in BUILD_DIR and the source is in SRC_DIR:

cmake -S $SRC_DIR -B $BUILD_DIR -DCMAKE_BUILD_TYPE=Debug
make -C $BUILD_DIR

A simple way to capture relevant debugging details is to use the script command, which will record your terminal input and output. For example,

script debug-log.txt
ulimit -c unlimited
cat /proc/sys/kernel/core_pattern
make -C $BUILD_DIR <my-app> VERBOSE=1
my-app with-failing-input
exit

This will generate a file debug-log.txt, which you can supply when opening a GitHub issue.