Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
BradReesWork committed May 7, 2020
1 parent 3f78243 commit 66d3afd
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 41 deletions.
10 changes: 7 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ cuGraph, and all of RAPIDS in general, is an open-source project where we encour
If you are ready to contribute, jump right to the [Contribute Code](#code) section.


__Style Formating Tools:__
* `clang-format` version 8.01+
* `flake8` version 3.5.0


<a name="issue"></a>
## 1) File an Issue for the RAPIDS cuGraph team to work
To file an issue, go to the RAPIDS cuGraph [issue](https://github.com/rapidsai/cugraph/issues/new/choose) page an select the appropiate issue type. Once an issue is filed the RAPIDS cuGraph team will evaluate and triage the issue. If you believe the issue needs priority attention, please include that in the issue to notify the team.
Expand Down Expand Up @@ -49,10 +54,9 @@ We love when people want to get involved, and if you have a suggestion for a new

If you need more context on a particular issue, please ask.


----
<a name="code"></a>

# So You Want to Contribute Code
# So you want to contribute code

**TL;DR General Development Process**
1. Read the documentation on [building from source](SOURCEBUILD.md) to learn how to setup, and validate, the development environment
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ cuGraph provides an auto-renumbering feature, enabled by default, during Graph c

cuGraph is constantly being updatred and improved. Please see the [Transition Guide](TRANSITIONGUIDE.md) if errors are encountered with newer versions

## Graph Sizes and GPU Memory Size
As a simple rule of thumb, the amount of GPU memory should be about twice the size of the data size. That gives overhead for the CSV reader and other transform functions. There are ways around the rule but using smaller data chunks.

| Size | Recomended GPU Memory |
|-------------------|-----------------------|
| 1 Billion edges | 32GB |
| 500 million edges | 16 GB |




## Getting cuGraph
Expand Down
102 changes: 64 additions & 38 deletions SOURCEBUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,33 @@ The following instructions are for users wishing to build cuGraph from source co

The cuGraph package include both a C/C++ CUDA portion and a python portion. Both libraries need to be installed in order for cuGraph to operate correctly.

### Prerequisites
## Prerequisites

Compiler requirement:

* `gcc` version 5.4+
* `nvcc` version 10.0+
* `cmake` version 3.12

CUDA requirement:
__Compiler__:
* `gcc` version 5.4+
* `nvcc` version 10.0+
* `cmake` version 3.12

__CUDA:__
* CUDA 10.0+
* NVIDIA driver 396.44+
* Pascal architecture or better

__Other__
* `git`



You can obtain CUDA from [https://developer.nvidia.com/cuda-downloads](https://developer.nvidia.com/cuda-downloads).

### Build and Install the C/C++ CUDA components

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

1) A cloned version of the repository
## Building cuGraph
To install cuGraph from source, ensure the dependencies are met.


### Clone Repo and Configure Conda Environment
__GIT clone a version of the repository__

```bash
# Set the localtion to cuGraph in an environment variable CUGRAPH_HOME
Expand All @@ -36,7 +42,7 @@ To install cuGraph from source, ensure the dependencies are met and follow the s
cd $CUGRAPH_HOME
```

2) Create the conda development environment
__Create the conda development environment__

```bash
# create the conda environment (assuming in base `cugraph` directory)
Expand Down Expand Up @@ -74,9 +80,50 @@ conda env update --name cugraph_dev --file conda/environments/cugraph_dev_cuda10
conda activate cugraph_dev
```

3) Build and install `libcugraph`. 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:
### Build and Install Using the `build.sh` Script
Using the `build.sh` script make compiling and installig cuGraph a breeze. To build and install, simply do:

```bash
$ cd $CUGRAPH_HOME
$ ./build.sh clean
$ ./build.sh libcugraph
$ ./build.sh cugraph
```

There are several other options available on the build script for advanced users.
`build.sh` options:
```bash
build.sh [<target> ...] [<flag> ...]
clean - remove all existing build artifacts and configuration (start over)
libcugraph - build the cugraph C++ code
cugraph - build the cugraph Python package

and <flag> is:
-v - verbose build mode
-g - build for debug
-n - no install step
--show_depr_warn - show cmake deprecation warnings
-h - print this text

examples:
$ ./build.sh clean # remove prior build artifacts (start over)
$ ./build.sh libcugraph -v # compile and install libcugraph with verbose output
$ ./build.sh libcugraph -g # compile and install libcugraph for debug
$ ./build.sh libcugraph -n # compile libcugraph but do not install

# make parallelism options can also be defined: Example build jobs to 4 (make -j4)
$ PARALLEL_LEVEL=4 ./build.sh libcugraph

Note that the libraries will be installed to the location set in `$PREFIX` if set (i.e. `export PREFIX=/install/path`), otherwise to `$CONDA_PREFIX`.
```
## Building each section independently
#### Build and Install the C/CUDA `libcugraph` Library
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:
```bash
# Set the localtion to cuGraph in an environment variable CUGRAPH_HOME
Expand All @@ -94,16 +141,10 @@ conda activate cugraph_dev
```
The default installation locations are `$CMAKE_INSTALL_PREFIX/lib` and `$CMAKE_INSTALL_PREFIX/include/cugraph` respectively.
As a convenience, a `build.sh` script is provided in `$CUGRAPH_HOME`. To execute the same build commands above, run the script as shown below. Note that the libraries will be installed to the location set in `$PREFIX` if set (i.e. `export PREFIX=/install/path`), otherwise to `$CONDA_PREFIX`.
```bash
$ cd $CUGRAPH_HOME
$ ./build.sh libcugraph # build the cuGraph libraries and install them to
# $PREFIX if set, otherwise $CONDA_PREFIX
```
### Building and installing the Python package
5. Install the Python package to your Python path:
2) Install the Python package to your Python path:
```bash
cd $CUGRAPH_HOME
Expand All @@ -112,26 +153,11 @@ python setup.py build_ext --inplace
python setup.py install # install cugraph python bindings
```
Like the `libcugraph` build step above, `build.sh` can also be used to build the `cugraph` python package, as shown below:
```bash
$ cd $CUGRAPH_HOME
$ ./build.sh cugraph # build the cuGraph python bindings and install them
# to $PREFIX if set, otherwise $CONDA_PREFIX
```
Note: other `build.sh` options include:
```bash
$ cd $CUGRAPH_HOME
$ ./build.sh clean # remove any prior build artifacts and configuration (start over)
$ ./build.sh libcugraph -v # compile and install libcugraph with verbose output
$ ./build.sh libcugraph -g # compile and install libcugraph for debug
$ PARALLEL_LEVEL=4 ./build.sh libcugraph # compile and install libcugraph limiting parallel build jobs to 4 (make -j4)
$ ./build.sh libcugraph -n # compile libcugraph but do not install
```
### Run tests
## Run tests
6. Run either the C++ or the Python tests with datasets
Run either the C++ or the Python tests with datasets
- **Python tests with datasets**
Expand Down

0 comments on commit 66d3afd

Please sign in to comment.