From f03851cf1882e6e723fe71f88552fbac0f5c1bcc Mon Sep 17 00:00:00 2001 From: James Wyles Date: Mon, 4 Feb 2019 12:56:21 -0700 Subject: [PATCH] Reorganized directory structure to match cuDf, added in files to match cudf. Some files are left blank to be filled in later --- .dockerignore | 2 + .gitattributes | 0 .gitmodules | 0 CHANGELOG.md | 0 CONTRIBUTING.md | 53 ++++++++++++ MANIFEST.in | 0 README.md | 1 + conda/environments/builddocs_py35.yml | 0 CMakeLists.txt => cpp/CMakeLists.txt | 0 .../cmake}/Modules/ConfigureArrow.cmake | 0 .../cmake}/Modules/ConfigureGoogleTest.cmake | 0 {cmake => cpp/cmake}/Modules/FindArrow.cmake | 0 .../Templates/Arrow.CMakeLists.txt.cmake | 0 .../Templates/GoogleTest.CMakeLists.txt.cmake | 0 {include => cpp/include}/cugraph.h | 0 {include => cpp/include}/functions.h | 0 {include => cpp/include}/nvgraph_gdf.h | 0 {include => cpp/include}/rmm_utils.h | 0 {include => cpp/include}/types.h | 0 {src => cpp/src}/COOtoCSR.cuh | 0 {src => cpp/src}/bfs.cu | 0 {src => cpp/src}/bfs.cuh | 0 {src => cpp/src}/bfs_kernels.cuh | 0 {src => cpp/src}/cugraph.cu | 0 {src => cpp/src}/graph_utils.cuh | 0 {src => cpp/src}/grmat.cu | 0 {src => cpp/src}/nvgraph_gdf.cu | 0 {src => cpp/src}/pagerank.cu | 0 {src => cpp/src}/pagerank.cuh | 0 {src => cpp/src}/renumber.cuh | 0 {src => cpp/src}/tests/CMakeLists.txt | 0 {src => cpp/src}/tests/datasets.tar.gz | Bin {src => cpp/src}/tests/gdf_graph/gdf_graph.cu | 0 {src => cpp/src}/tests/grmat/grmat_test.cu | 0 {src => cpp/src}/tests/high_res_clock.h | 0 {src => cpp/src}/tests/mmio.c | 0 {src => cpp/src}/tests/mmio.h | 0 .../nvgraph_plugin/nvgraph_gdf_jaccard.cpp | 0 .../nvgraph_plugin/nvgraph_gdf_louvain.cpp | 0 .../tests/nvgraph_plugin/nvgraph_gdf_sssp.cpp | 0 .../src}/tests/pagerank/pagerank_test.cu | 0 .../src}/tests/renumber/renumber_test.cu | 0 {src => cpp/src}/tests/test_utils.h | 0 {src => cpp/src}/utilities/error_utils.h | 0 {src => cpp/src}/utilities/sm_utils.h | 0 print_env.sh | 76 ++++++++++++++++++ readthedocs.yml | 9 +++ setup.cfg | 2 + setup.py | 4 +- setup_pip.py | 0 50 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 .dockerignore create mode 100644 .gitattributes create mode 100644 .gitmodules create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md create mode 100644 MANIFEST.in create mode 100644 conda/environments/builddocs_py35.yml rename CMakeLists.txt => cpp/CMakeLists.txt (100%) rename {cmake => cpp/cmake}/Modules/ConfigureArrow.cmake (100%) rename {cmake => cpp/cmake}/Modules/ConfigureGoogleTest.cmake (100%) rename {cmake => cpp/cmake}/Modules/FindArrow.cmake (100%) rename {cmake => cpp/cmake}/Templates/Arrow.CMakeLists.txt.cmake (100%) rename {cmake => cpp/cmake}/Templates/GoogleTest.CMakeLists.txt.cmake (100%) rename {include => cpp/include}/cugraph.h (100%) rename {include => cpp/include}/functions.h (100%) rename {include => cpp/include}/nvgraph_gdf.h (100%) rename {include => cpp/include}/rmm_utils.h (100%) rename {include => cpp/include}/types.h (100%) rename {src => cpp/src}/COOtoCSR.cuh (100%) rename {src => cpp/src}/bfs.cu (100%) rename {src => cpp/src}/bfs.cuh (100%) rename {src => cpp/src}/bfs_kernels.cuh (100%) rename {src => cpp/src}/cugraph.cu (100%) rename {src => cpp/src}/graph_utils.cuh (100%) rename {src => cpp/src}/grmat.cu (100%) rename {src => cpp/src}/nvgraph_gdf.cu (100%) rename {src => cpp/src}/pagerank.cu (100%) rename {src => cpp/src}/pagerank.cuh (100%) rename {src => cpp/src}/renumber.cuh (100%) rename {src => cpp/src}/tests/CMakeLists.txt (100%) rename {src => cpp/src}/tests/datasets.tar.gz (100%) rename {src => cpp/src}/tests/gdf_graph/gdf_graph.cu (100%) rename {src => cpp/src}/tests/grmat/grmat_test.cu (100%) rename {src => cpp/src}/tests/high_res_clock.h (100%) rename {src => cpp/src}/tests/mmio.c (100%) rename {src => cpp/src}/tests/mmio.h (100%) rename {src => cpp/src}/tests/nvgraph_plugin/nvgraph_gdf_jaccard.cpp (100%) rename {src => cpp/src}/tests/nvgraph_plugin/nvgraph_gdf_louvain.cpp (100%) rename {src => cpp/src}/tests/nvgraph_plugin/nvgraph_gdf_sssp.cpp (100%) rename {src => cpp/src}/tests/pagerank/pagerank_test.cu (100%) rename {src => cpp/src}/tests/renumber/renumber_test.cu (100%) rename {src => cpp/src}/tests/test_utils.h (100%) rename {src => cpp/src}/utilities/error_utils.h (100%) rename {src => cpp/src}/utilities/sm_utils.h (100%) create mode 100644 print_env.sh create mode 100644 readthedocs.yml create mode 100644 setup.cfg create mode 100644 setup_pip.py diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000000..6d29c8e919e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +# Ignore cmake builds from local machine that might have occured before attempting Docker build. Including these files will cause CMake cache conflict issues +/cpp/build \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..e69de29bb2d diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000000..e69de29bb2d diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000000..9f511933620 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,53 @@ +# Contributing to cuGraph + +If you are interested in contributing to cuGraph, your contributions will fall +into three categories: +1. You want to report a bug, feature request, or documentation issue + - File an [issue](https://github.com/rapidsai/cugraph/issues/new/choose) + describing what you encountered or what you want to see changed. + - The RAPIDS team will evaluate the issues and triage them, scheduling + them for a release. If you believe the issue needs priority attention + comment on the issue to notify the team. +2. You want to propose a new Feature and implement it + - Post about your intended feature, and we shall discuss the design and + implementation. + - Once we agree that the plan looks good, go ahead and implement it, using + the [code contributions](#code-contributions) guide below. +3. You want to implement a feature or bug-fix for an outstanding issue + - Follow the [code contributions](#code-contributions) guide below. + - If you need more context on a particular issue, please ask and we shall + provide. + +## Code contributions + +### Your first issue + +1. Read the project's [README.md](https://github.com/rapidsai/cudf/blob/master/README.md) + to learn how to setup the development environment +2. Find an issue to work on. The best way is to look for the [good first issue](https://github.com/rapidsai/cugraph/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) + or [help wanted](https://github.com/rapidsai/cugraph/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) labels +3. Comment on the issue saying you are going to work on it +4. Code! Make sure to update unit tests! +5. When done, [create your pull request](https://github.com/rapidsai/cugraph/compare) +6. Verify that CI passes all [status checks](https://help.github.com/articles/about-status-checks/). Fix if needed +7. Wait for other developers to review your code and update code as needed +8. Once reviewed and approved, a RAPIDS developer will merge your pull request + +Remember, if you are unsure about anything, don't hesitate to comment on issues +and ask for clarifications! + +### Seasoned developers + +Once you have gotten your feet wet and are more comfortable with the code, you +can look at the prioritized issues of our next release in our [project boards](https://github.com/rapidsai/cudf/projects). + +> **Pro Tip:** Always look at the release board with the highest number for +issues to work on. This is where RAPIDS developers also focus their efforts. + +Look at the unassigned issues, and find an issue you are comfortable with +contributing to. Start with _Step 3_ from above, commenting on the issue to let +others know you are working on it. If you have any questions related to the +implementation of the issue, ask them in the issue instead of the PR. + +## Attribution +Portions adopted from https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000000..e69de29bb2d diff --git a/README.md b/README.md index 12af6110011..98b12c1cacc 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ This project uses cmake for building the C/C++ library. To configure cmake, run: ```bash +cd cpp # enter cpp directory mkdir build # create build directory for out-of-source build cd build # enter the build directory cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX diff --git a/conda/environments/builddocs_py35.yml b/conda/environments/builddocs_py35.yml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/CMakeLists.txt b/cpp/CMakeLists.txt similarity index 100% rename from CMakeLists.txt rename to cpp/CMakeLists.txt diff --git a/cmake/Modules/ConfigureArrow.cmake b/cpp/cmake/Modules/ConfigureArrow.cmake similarity index 100% rename from cmake/Modules/ConfigureArrow.cmake rename to cpp/cmake/Modules/ConfigureArrow.cmake diff --git a/cmake/Modules/ConfigureGoogleTest.cmake b/cpp/cmake/Modules/ConfigureGoogleTest.cmake similarity index 100% rename from cmake/Modules/ConfigureGoogleTest.cmake rename to cpp/cmake/Modules/ConfigureGoogleTest.cmake diff --git a/cmake/Modules/FindArrow.cmake b/cpp/cmake/Modules/FindArrow.cmake similarity index 100% rename from cmake/Modules/FindArrow.cmake rename to cpp/cmake/Modules/FindArrow.cmake diff --git a/cmake/Templates/Arrow.CMakeLists.txt.cmake b/cpp/cmake/Templates/Arrow.CMakeLists.txt.cmake similarity index 100% rename from cmake/Templates/Arrow.CMakeLists.txt.cmake rename to cpp/cmake/Templates/Arrow.CMakeLists.txt.cmake diff --git a/cmake/Templates/GoogleTest.CMakeLists.txt.cmake b/cpp/cmake/Templates/GoogleTest.CMakeLists.txt.cmake similarity index 100% rename from cmake/Templates/GoogleTest.CMakeLists.txt.cmake rename to cpp/cmake/Templates/GoogleTest.CMakeLists.txt.cmake diff --git a/include/cugraph.h b/cpp/include/cugraph.h similarity index 100% rename from include/cugraph.h rename to cpp/include/cugraph.h diff --git a/include/functions.h b/cpp/include/functions.h similarity index 100% rename from include/functions.h rename to cpp/include/functions.h diff --git a/include/nvgraph_gdf.h b/cpp/include/nvgraph_gdf.h similarity index 100% rename from include/nvgraph_gdf.h rename to cpp/include/nvgraph_gdf.h diff --git a/include/rmm_utils.h b/cpp/include/rmm_utils.h similarity index 100% rename from include/rmm_utils.h rename to cpp/include/rmm_utils.h diff --git a/include/types.h b/cpp/include/types.h similarity index 100% rename from include/types.h rename to cpp/include/types.h diff --git a/src/COOtoCSR.cuh b/cpp/src/COOtoCSR.cuh similarity index 100% rename from src/COOtoCSR.cuh rename to cpp/src/COOtoCSR.cuh diff --git a/src/bfs.cu b/cpp/src/bfs.cu similarity index 100% rename from src/bfs.cu rename to cpp/src/bfs.cu diff --git a/src/bfs.cuh b/cpp/src/bfs.cuh similarity index 100% rename from src/bfs.cuh rename to cpp/src/bfs.cuh diff --git a/src/bfs_kernels.cuh b/cpp/src/bfs_kernels.cuh similarity index 100% rename from src/bfs_kernels.cuh rename to cpp/src/bfs_kernels.cuh diff --git a/src/cugraph.cu b/cpp/src/cugraph.cu similarity index 100% rename from src/cugraph.cu rename to cpp/src/cugraph.cu diff --git a/src/graph_utils.cuh b/cpp/src/graph_utils.cuh similarity index 100% rename from src/graph_utils.cuh rename to cpp/src/graph_utils.cuh diff --git a/src/grmat.cu b/cpp/src/grmat.cu similarity index 100% rename from src/grmat.cu rename to cpp/src/grmat.cu diff --git a/src/nvgraph_gdf.cu b/cpp/src/nvgraph_gdf.cu similarity index 100% rename from src/nvgraph_gdf.cu rename to cpp/src/nvgraph_gdf.cu diff --git a/src/pagerank.cu b/cpp/src/pagerank.cu similarity index 100% rename from src/pagerank.cu rename to cpp/src/pagerank.cu diff --git a/src/pagerank.cuh b/cpp/src/pagerank.cuh similarity index 100% rename from src/pagerank.cuh rename to cpp/src/pagerank.cuh diff --git a/src/renumber.cuh b/cpp/src/renumber.cuh similarity index 100% rename from src/renumber.cuh rename to cpp/src/renumber.cuh diff --git a/src/tests/CMakeLists.txt b/cpp/src/tests/CMakeLists.txt similarity index 100% rename from src/tests/CMakeLists.txt rename to cpp/src/tests/CMakeLists.txt diff --git a/src/tests/datasets.tar.gz b/cpp/src/tests/datasets.tar.gz similarity index 100% rename from src/tests/datasets.tar.gz rename to cpp/src/tests/datasets.tar.gz diff --git a/src/tests/gdf_graph/gdf_graph.cu b/cpp/src/tests/gdf_graph/gdf_graph.cu similarity index 100% rename from src/tests/gdf_graph/gdf_graph.cu rename to cpp/src/tests/gdf_graph/gdf_graph.cu diff --git a/src/tests/grmat/grmat_test.cu b/cpp/src/tests/grmat/grmat_test.cu similarity index 100% rename from src/tests/grmat/grmat_test.cu rename to cpp/src/tests/grmat/grmat_test.cu diff --git a/src/tests/high_res_clock.h b/cpp/src/tests/high_res_clock.h similarity index 100% rename from src/tests/high_res_clock.h rename to cpp/src/tests/high_res_clock.h diff --git a/src/tests/mmio.c b/cpp/src/tests/mmio.c similarity index 100% rename from src/tests/mmio.c rename to cpp/src/tests/mmio.c diff --git a/src/tests/mmio.h b/cpp/src/tests/mmio.h similarity index 100% rename from src/tests/mmio.h rename to cpp/src/tests/mmio.h diff --git a/src/tests/nvgraph_plugin/nvgraph_gdf_jaccard.cpp b/cpp/src/tests/nvgraph_plugin/nvgraph_gdf_jaccard.cpp similarity index 100% rename from src/tests/nvgraph_plugin/nvgraph_gdf_jaccard.cpp rename to cpp/src/tests/nvgraph_plugin/nvgraph_gdf_jaccard.cpp diff --git a/src/tests/nvgraph_plugin/nvgraph_gdf_louvain.cpp b/cpp/src/tests/nvgraph_plugin/nvgraph_gdf_louvain.cpp similarity index 100% rename from src/tests/nvgraph_plugin/nvgraph_gdf_louvain.cpp rename to cpp/src/tests/nvgraph_plugin/nvgraph_gdf_louvain.cpp diff --git a/src/tests/nvgraph_plugin/nvgraph_gdf_sssp.cpp b/cpp/src/tests/nvgraph_plugin/nvgraph_gdf_sssp.cpp similarity index 100% rename from src/tests/nvgraph_plugin/nvgraph_gdf_sssp.cpp rename to cpp/src/tests/nvgraph_plugin/nvgraph_gdf_sssp.cpp diff --git a/src/tests/pagerank/pagerank_test.cu b/cpp/src/tests/pagerank/pagerank_test.cu similarity index 100% rename from src/tests/pagerank/pagerank_test.cu rename to cpp/src/tests/pagerank/pagerank_test.cu diff --git a/src/tests/renumber/renumber_test.cu b/cpp/src/tests/renumber/renumber_test.cu similarity index 100% rename from src/tests/renumber/renumber_test.cu rename to cpp/src/tests/renumber/renumber_test.cu diff --git a/src/tests/test_utils.h b/cpp/src/tests/test_utils.h similarity index 100% rename from src/tests/test_utils.h rename to cpp/src/tests/test_utils.h diff --git a/src/utilities/error_utils.h b/cpp/src/utilities/error_utils.h similarity index 100% rename from src/utilities/error_utils.h rename to cpp/src/utilities/error_utils.h diff --git a/src/utilities/sm_utils.h b/cpp/src/utilities/sm_utils.h similarity index 100% rename from src/utilities/sm_utils.h rename to cpp/src/utilities/sm_utils.h diff --git a/print_env.sh b/print_env.sh new file mode 100644 index 00000000000..ddb36bc652c --- /dev/null +++ b/print_env.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash +# Reports relevant environment information useful for diagnosing and +# debugging cuGraph issues. +# Usage: +# "./print_env.sh" - prints to stdout +# "./print_env.sh > env.txt" - prints to file "env.txt" + +echo "**git***" +if [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" == "true" ]; then +git log --decorate -n 1 +else +echo "Not inside a git repository" +fi +echo + +echo "***OS Information***" +cat /etc/*-release +uname -a +echo + +echo "***GPU Information***" +nvidia-smi +echo + +echo "***CPU***" +lscpu +echo + +echo "***CMake***" +which cmake && cmake --version +echo + +echo "***g++***" +which g++ && g++ --version +echo + +echo "***nvcc***" +which nvcc && nvcc --version +echo + +echo "***Python***" +which python && python --version +echo + +echo "***Environment Variables***" + +printf '%-32s: %s\n' PATH $PATH + +printf '%-32s: %s\n' LD_LIBRARY_PATH $LD_LIBRARY_PATH + +printf '%-32s: %s\n' NUMBAPRO_NVVM $NUMBAPRO_NVVM + +printf '%-32s: %s\n' NUMBAPRO_LIBDEVICE $NUMBAPRO_LIBDEVICE + +printf '%-32s: %s\n' CONDA_PREFIX $CONDA_PREFIX + +printf '%-32s: %s\n' PYTHON_PATH $PYTHON_PATH + +echo + + +# Print conda packages if conda exists +if type "conda" &> /dev/null; then +echo '***conda packages***' +which conda && conda list +echo +# Print pip packages if pip exists +elif type "pip" &> /dev/null; then +echo "conda not found" +echo "***pip packages***" +which pip && pip list +echo +else +echo "conda not found" +echo "pip not found" +fi diff --git a/readthedocs.yml b/readthedocs.yml new file mode 100644 index 00000000000..a6b53c35a0d --- /dev/null +++ b/readthedocs.yml @@ -0,0 +1,9 @@ + +build: + image: latest + +python: + version: 3.5 + +conda: + file: conda/environments/builddocs_py35.yml diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000000..4adefa346cd --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +exclude = img,notebooks,thirdparty,__init__.py,libgdf,build \ No newline at end of file diff --git a/setup.py b/setup.py index 2f6d4c5b173..ee0abf99dc9 100644 --- a/setup.py +++ b/setup.py @@ -82,8 +82,8 @@ def locate_nvgraph(): cudf_include, NVGRAPH['include'], CUDA['include'], - 'src', - 'include', + 'cpp/src', + 'cpp/include', '../gunrock', '../gunrock/externals/moderngpu/include', '../gunrock/externals/cub'], diff --git a/setup_pip.py b/setup_pip.py new file mode 100644 index 00000000000..e69de29bb2d