Git Product home page Git Product logo

nvgraph's Introduction

nvGraph - NVIDIA graph library

Data analytics is a growing application of high-performance computing. Many advanced data analytics problems can be couched as graph problems. In turn, many of the common graph problems today can be couched as sparse linear algebra. This is the motivation for nvGraph, which harnesses the power of GPUs for linear algebra to handle large graph analytics.

This repository contains the legacy version of nvGraph as it was in the NVIDIA CUDA Toolkit. The aim is to provide a way for nvGraph users to continue using nvGraph after the CUDA Toolkit stops releasing it. While we still accept bug reports, we do not actively develop this product. If you find and can reproduce bugs in nvGRAPH, please report issues on GitHub.

Recently, NVIDIA started developing cuGraph a collection of graph analytics that process data found in GPU Dataframes as part of RAPIDS. Most nvGraph algorithms are now part of cuGraph too. In addition, cuGraph aims to provide a NetworkX-like API that will be familiar to data scientists, so they can now build GPU-accelerated workflows more easily. For more project details, see rapids.ai.

Get nvGrpah

Prerequisites

Compiler requirement:

  • gcc version 5.4+
  • nvcc version 9.2
  • cmake version 3.12

CUDA requirement:

  • CUDA 9.2+
  • NVIDIA driver 396.44+
  • Pascal architecture or better

You can obtain CUDA from https://developer.nvidia.com/cuda-downloads. Compiler requirements:

Using the script

It is easy to install nvGraph from source. As a convenience, a build.sh script is provided. Run the script as shown below to download the source code, build and install the library. Note that the library will be installed to the location set in $CUDA_ROOT (eg. export CUDA_ROOT=/usr/local/cuda). These instructions were tested on Ubuntu 18.04.

git clone https://github.com/rapidsai/nvgraph.git
cd nvgraph
export CUDA_ROOT=/usr/local/cuda
./build.sh  # build the nvGraph library and install it to $CUDA_ROOT (you may need to add the sudo prefix)

Manually build from Source

The following instructions are for developers and contributors to nvGraph development. These instructions were tested on Linux Ubuntu 18.04. Use these instructions to build nvGraph from source and contribute to its development. Other operating systems may be compatible, but are not currently tested.

The nvGraph package is a C/C++ CUDA library. It needs to be installed in order for nvGraph to operate correctly.

The following instructions are tested on Linux systems.

Build and Install the C/C++ CUDA components

To install nvGraph from source, ensure the dependencies are met and follow the steps below:

  1. Clone the repository and submodules
# Set the localtion to nvGraph in an environment variable NVGRAPH_HOME 
export NVGRAPH_HOME=$(pwd)/nvgraph

# Download the nvGraph repo
git clone https://github.com/rapidsai/nvgraph.git $NVGRAPH_HOME

# Next load all the submodules
cd $NVGRAPH_HOME
git submodule update --init --recursive
  1. Build and install libnvgraph_rapids.so. CMake depends on the nvcc executable being on your path or defined in $CUDACXX.

This project uses cmake for building the C/C++ library. To configure cmake, run:

cd $NVGRAPH_HOME
cd cpp	# enter nvgraph's cpp directory
mkdir build   		# create build directory 
cd build     		# enter the build directory
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX 

# now build the code
make -j				# "-j" starts multiple threads
make install		# install the libraries 

The default installation locations are $CMAKE_INSTALL_PREFIX/lib and $CMAKE_INSTALL_PREFIX/include/nvgraph respectively.

C++ stand alone tests

# Run the tests
cd $NVGRAPH_HOME
cd cpp/build
gtests/NVGRAPH_TEST # this is an executable file

These tests verify that the library was properly built and that the graph structure works as expected. We currently do not maintain the algorithm test suite. Most graph analytics features are now developed and tested in cuGraph.

Documentation

The C API documentation can be found in the CUDA Toolkit Documentation.

nvgraph's People

Contributors

afender avatar bradreeswork avatar teju85 avatar

Stargazers

Rajesh Pandian M avatar Dian-Lun (Aaron) Lin avatar  avatar Zhu yuhan avatar  avatar zhenpingfeng avatar Gerad Munsch avatar dupeng avatar Danielle Robinson avatar  avatar  avatar asdas12312weq avatar Xuanteng Huang avatar Jian Ding avatar r48Bit avatar  avatar Fabian Herzog avatar Tug Witt avatar Subhajit Sahu avatar 立党 Lidang avatar X.tructure avatar Danh Le Phuoc avatar Shirokuma (k tanaka) avatar abdul dakkak avatar YUKE WANG avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

nvgraph's Issues

[BUG] nvgraph build fails when trying to build it from inside cuML

Here's how cuml is adding nvgraph to be built from source during its compilation process.

set(NVGRAPH_DIR ${CMAKE_CURRENT_BINARY_DIR}/nvgraph CACHE STRING
  "Path to nvgraph install directory")
ExternalProject_Add(nvgraph
    GIT_REPOSITORY    https://github.com/rapidsai/nvgraph.git
    GIT_TAG           feb0c5721e6e0e27ee51b2f56fd39c7d1e805a64
    PREFIX            ${NVGRAPH_DIR}
    CMAKE_ARGS        -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
                      -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
                      ${NVGRAPH_DIR}/src/nvgraph/cpp
    UPDATE_COMMAND    "")

add_library(nvgraphlib STATIC IMPORTED)

add_dependencies(nvgraphlib nvgraph)

set_property(TARGET nvgraphlib
  PROPERTY IMPORTED_LOCATION ${NVGRAPH_DIR}/lib64/libnvgraph.so)

(please also let us know if in case this usage is correct or not)

Attaching the error log to give more description about the issue. Tagging @afender .
error.log

Failing to install on Google Colab

Hello, I am trying to install nvGraph on Google Colab. It was working fine yesterday, but Colab is now upgraded to CUDA 11.0 from 10.1 and the ./build.sh command is failing with error message from thrust. Similar errors are reported from a number of other source files.

In file included from /usr/local/cuda/targets/x86_64-linux/include/thrust/detail/config/config.h:27:0,
                 from /usr/local/cuda/targets/x86_64-linux/include/thrust/detail/config.h:23,
                 from /usr/local/cuda/targets/x86_64-linux/include/thrust/sequence.h:24,
                 from /root/nvgraph/cpp/src/triangles_counting.cpp:18:
/usr/local/cuda/targets/x86_64-linux/include/thrust/detail/config/cpp_dialect.h:104:13: error: Thrust requires C++14. Please pass -std=c++14 to your compiler. Define THRUST_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message. [-Werror]
   THRUST_COMPILER_DEPRECATION(C++14, pass -std=c++14 to your compiler);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                            


In file included from /usr/local/cuda/targets/x86_64-linux/include/thrust/system/cuda/detail/execution_policy.h:33:0,
                 from /usr/local/cuda/targets/x86_64-linux/include/thrust/iterator/detail/device_system_tag.h:23,
                 from /usr/local/cuda/targets/x86_64-linux/include/thrust/iterator/iterator_traits.h:111,
                 from /usr/local/cuda/targets/x86_64-linux/include/thrust/detail/sequence.inl:24,
                 from /usr/local/cuda/targets/x86_64-linux/include/thrust/sequence.h:295,
                 from /root/nvgraph/cpp/src/triangles_counting.cpp:18:
/usr/local/cuda/targets/x86_64-linux/include/thrust/system/cuda/config.h:78:2: error: #error The version of CUB in your include path is not compatible with this release of Thrust. CUB is now included in the CUDA Toolkit, so you no longer need to use your own checkout of CUB. Define THRUST_IGNORE_CUB_VERSION_CHECK to ignore this.
 #error The version of CUB in your include path is not compatible with this release of Thrust. CUB is now included in the CUDA Toolkit, so you no longer need to use your own checkout of CUB. Define THRUST_IGNORE_CUB_VERSION_CHECK to ignore this.
  ^~~~~


That stops cusparse build and then the identifiers are listed as undefined:

...
/root/nvgraph/cpp/include/matrix.hxx(772): error: identifier "cusparseScsrsm_solve" is undefined
/root/nvgraph/cpp/include/matrix.hxx(775): error: identifier "cusparseSolveAnalysisInfo_t" is undefined
/root/nvgraph/cpp/include/matrix.hxx(776): error: identifier "cusparseDcsrsm_solve" is undefined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.