Skip to content

Commit

Permalink
Fixed merge conflict in change log
Browse files Browse the repository at this point in the history
  • Loading branch information
jwyles committed Apr 10, 2020
2 parents 647bb17 + 8acb743 commit 420d467
Show file tree
Hide file tree
Showing 63 changed files with 1,476 additions and 1,080 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,23 @@
## Improvements
- PR #764 Updated sssp and bfs with GraphCSR, removed gdf_column, added nullptr weights test for sssp
- PR #765 Remove gdf_column from connected components
- PR #780 Remove gdf_column from cuhornet features
- PR #781 Fix compiler argument syntax for ccache
- PR #782 Use Cython's `new_build_ext` (if available)
- PR #788 Added options and config file to enable codecov
- PR #793 Fix legacy cudf imports/cimports
- PR #802 Removed use of gdf_column from db code
- PR #798 Edit return graph type in algorithms return graphs
- PR #803 Enable Ninja build
- PR #804 Cythonize in parallel
- PR #807 Updating the Python docs
- PR #820 OPG infra and all-gather smoke test

## Bug Fixes
- PR #763 Update RAPIDS conda dependencies to v0.14
- PR #795 Fix some documentation
- PR #800 Fix bfs error in optimization path


# cuGraph 0.13.0 (Date TBD)

Expand Down
1 change: 1 addition & 0 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ conda install -c nvidia -c rapidsai -c rapidsai-nightly -c conda-forge -c defaul
distributed>=2.12.0 \
dask-cudf=${MINOR_VERSION} \
dask-cuda=${MINOR_VERSION} \
nccl>=2.5 \
libcypher-parser \
ipython=7.3* \
jupyterlab
Expand Down
1 change: 1 addition & 0 deletions conda/environments/cugraph_dev_cuda10.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies:
- distributed>=2.12.0
- dask-cuda=0.14*
- dask-cudf=0.14*
- nccl>=2.5
- scipy
- networkx
- python-louvain
Expand Down
1 change: 1 addition & 0 deletions conda/environments/cugraph_dev_cuda10.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies:
- distributed>=2.12.0
- dask-cuda=0.14*
- dask-cudf=0.14*
- nccl>=2.5
- scipy
- networkx
- python-louvain
Expand Down
1 change: 1 addition & 0 deletions conda/environments/cugraph_dev_cuda10.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies:
- distributed>=2.12.0
- dask-cuda=0.14*
- dask-cudf=0.14*
- nccl>=2.5
- scipy
- networkx
- python-louvain
Expand Down
1 change: 1 addition & 0 deletions conda/recipes/cugraph/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ requirements:
- python x.x
- libcugraph={{ version }}
- cudf={{ minor_version }}
- nccl>=2.5

#test:
# commands:
Expand Down
2 changes: 2 additions & 0 deletions conda/recipes/libcugraph/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ requirements:
- cudatoolkit {{ cuda_version }}.*
- boost-cpp>=1.66
- libcypher-parser
- nccl>=2.5
run:
- libcudf={{ minor_version }}
- {{ pin_compatible('cudatoolkit', max_pin='x.x') }}
- nccl>=2.5

#test:
# commands:
Expand Down
23 changes: 20 additions & 3 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ set(CMAKE_EXE_LINKER_FLAGS "-Wl,--disable-new-dtags")
option(BUILD_TESTS "Configure CMake to build tests"
ON)

option(BUILD_MPI "Build with MPI" OFF)
if (BUILD_MPI)
find_package(MPI REQUIRED)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_C_COMPILE_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MPI_CXX_COMPILE_FLAGS}")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MPI_CXX_LINK_FLAGS}")
endif(BUILD_MPI)
###################################################################################################
# - cmake modules ---------------------------------------------------------------------------------

Expand Down Expand Up @@ -293,6 +300,7 @@ ExternalProject_Add(cugunrock
-DGPU_ARCHS=""
-DGUNROCK_BUILD_SHARED_LIBS=OFF
-DGUNROCK_BUILD_TESTS=OFF
BUILD_BYPRODUCTS ${CUGUNROCK_DIR}/lib/libgunrock.a
)

add_library(gunrock STATIC IMPORTED)
Expand All @@ -301,6 +309,15 @@ add_dependencies(gunrock cugunrock)

set_property(TARGET gunrock PROPERTY IMPORTED_LOCATION ${CUGUNROCK_DIR}/lib/libgunrock.a)

# - NCCL
if(NOT NCCL_PATH)
find_package(NCCL REQUIRED)
else()
message("-- Manually set NCCL PATH to ${NCCL_PATH}")
set(NCCL_INCLUDE_DIRS ${NCCL_PATH}/include)
set(NCCL_LIBRARIES ${NCCL_PATH}/lib/libnccl.so)
endif(NOT NCCL_PATH)

###################################################################################################
# - library targets -------------------------------------------------------------------------------

Expand All @@ -317,7 +334,6 @@ add_library(cugraph SHARED
src/db/db_object.cu
src/db/db_parser_integration_test.cu
src/db/db_operators.cu
src/utilities/degree.cu
src/utilities/cusparse_helper.cu
src/structure/cugraph.cu
src/structure/graph.cu
Expand Down Expand Up @@ -383,7 +399,6 @@ add_dependencies(cugraph cugunrock)

###################################################################################################
# - include paths ---------------------------------------------------------------------------------

target_include_directories(cugraph
PRIVATE
"${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}"
Expand All @@ -399,6 +414,8 @@ target_include_directories(cugraph
"${CUHORNET_INCLUDE_DIR}/primitives"
"${CMAKE_CURRENT_SOURCE_DIR}/src"
"${CUGUNROCK_DIR}/include"
"${NCCL_INCLUDE_DIRS}"
"${MPI_CXX_INCLUDE_PATH}"
PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/include"
)
Expand All @@ -407,7 +424,7 @@ target_include_directories(cugraph
# - link libraries --------------------------------------------------------------------------------

target_link_libraries(cugraph PRIVATE
${CUDF_LIBRARY} ${RMM_LIBRARY} gunrock ${NVSTRINGS_LIBRARY} cublas cusparse curand cusolver cudart cuda ${LIBCYPHERPARSER_LIBRARY})
${CUDF_LIBRARY} ${RMM_LIBRARY} gunrock ${NVSTRINGS_LIBRARY} cublas cusparse curand cusolver cudart cuda ${LIBCYPHERPARSER_LIBRARY} ${MPI_CXX_LIBRARIES} ${NCCL_LIBRARIES})
if(OpenMP_CXX_FOUND)
target_link_libraries(cugraph PRIVATE
###################################################################################################
Expand Down
116 changes: 116 additions & 0 deletions cpp/cmake/Modules/FindNCCL.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Based on FindPNG.cmake from cmake 3.14.3

#[=======================================================================[.rst:
FindNCCL
--------
Find libnccl, the NVIDIA Collective Communication Library. A hint to find NCCL
can be provided by setting NCCL_INSTALL_DIR.
Imported targets
^^^^^^^^^^^^^^^^
This module defines the following :prop_tgt:`IMPORTED` target:
``NCCL::NCCL``
The libnccl library, if found.
Result variables
^^^^^^^^^^^^^^^^
This module will set the following variables in your project:
``NCCL_INCLUDE_DIRS``
where to find nccl.h , etc.
``NCCL_LIBRARIES``
the libraries to link against to use NCCL.
``NCCL_FOUND``
If false, do not try to use NCCL.
``NCCL_VERSION_STRING``
the version of the NCCL library found
#]=======================================================================]

find_path(NCCL_NCCL_INCLUDE_DIR nccl.h HINTS ${NCCL_INSTALL_DIR} PATH_SUFFIXES include)

#TODO: Does this need to support finding the static library?

list(APPEND NCCL_NAMES nccl libnccl)
set(_NCCL_VERSION_SUFFIXES 2)

foreach(v IN LISTS _NCCL_VERSION_SUFFIXES)
list(APPEND NCCL_NAMES nccl${v} libnccl${v})
endforeach()
unset(_NCCL_VERSION_SUFFIXES)
# For compatibility with versions prior to this multi-config search, honor
# any NCCL_LIBRARY that is already specified and skip the search.
if(NOT NCCL_LIBRARY)
find_library(NCCL_LIBRARY_RELEASE NAMES ${NCCL_NAMES} HINTS ${NCCL_INSTALL_DIR} PATH_SUFFIXES lib)
include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
select_library_configurations(NCCL)
mark_as_advanced(NCCL_LIBRARY_RELEASE)
endif()
unset(NCCL_NAMES)

# Set by select_library_configurations(), but we want the one from
# find_package_handle_standard_args() below.
unset(NCCL_FOUND)

if (NCCL_LIBRARY AND NCCL_NCCL_INCLUDE_DIR)
set(NCCL_INCLUDE_DIRS ${NCCL_NCCL_INCLUDE_DIR} )
set(NCCL_LIBRARY ${NCCL_LIBRARY})

if(NOT TARGET NCCL::NCCL)
add_library(NCCL::NCCL UNKNOWN IMPORTED)
set_target_properties(NCCL::NCCL PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${NCCL_INCLUDE_DIRS}")
if(EXISTS "${NCCL_LIBRARY}")
set_target_properties(NCCL::NCCL PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${NCCL_LIBRARY}")
endif()
endif()
endif ()

if (NCCL_NCCL_INCLUDE_DIR AND EXISTS "${NCCL_NCCL_INCLUDE_DIR}/nccl.h")
file(STRINGS "${NCCL_NCCL_INCLUDE_DIR}/nccl.h" nccl_major_version_str REGEX "^#define[ \t]+NCCL_MAJOR[ \t]+[0-9]+")
string(REGEX REPLACE "^#define[ \t]+NCCL_MAJOR[ \t]+([0-9]+)" "\\1" nccl_major_version_str "${nccl_major_version_str}")

file(STRINGS "${NCCL_NCCL_INCLUDE_DIR}/nccl.h" nccl_minor_version_str REGEX "^#define[ \t]+NCCL_MINOR[ \t]+[0-9]+")
string(REGEX REPLACE "^#define[ \t]+NCCL_MINOR[ \t]+([0-9]+)" "\\1" nccl_minor_version_str "${nccl_minor_version_str}")

file(STRINGS "${NCCL_NCCL_INCLUDE_DIR}/nccl.h" nccl_patch_version_str REGEX "^#define[ \t]+NCCL_PATCH[ \t]+[0-9]+")
string(REGEX REPLACE "^#define[ \t]+NCCL_PATCH[ \t]+([0-9]+)" "\\1" nccl_patch_version_str "${nccl_patch_version_str}")

file(STRINGS "${NCCL_NCCL_INCLUDE_DIR}/nccl.h" nccl_suffix_version_str REGEX "^#define[ \t]+NCCL_SUFFIX[ \t]+\".*\"")
string(REGEX REPLACE "^#define[ \t]+NCCL_SUFFIX[ \t]+\"(.*)\"" "\\1" nccl_suffix_version_str "${nccl_suffix_version_str}")

set(NCCL_VERSION_STRING "${nccl_major_version_str}.${nccl_minor_version_str}.${nccl_patch_version_str}${nccl_suffix_version_str}")

unset(nccl_major_version_str)
unset(nccl_minor_version_str)
unset(nccl_patch_version_str)
unset(nccl_suffix_version_str)
endif ()

include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(NCCL
REQUIRED_VARS NCCL_LIBRARY NCCL_NCCL_INCLUDE_DIR
VERSION_VAR NCCL_VERSION_STRING)

mark_as_advanced(NCCL_NCCL_INCLUDE_DIR NCCL_LIBRARY)
74 changes: 0 additions & 74 deletions cpp/include/algorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,79 +144,5 @@ void snmg_pagerank (gdf_column **src_col_ptrs,
const size_t n_gpus,
const float damping_factor,
const int n_iter);
/**
* @Synopsis Compute the Katz centrality for the nodes of the graph G
*
* @Param[in] *graph cuGRAPH graph descriptor with a valid edgeList or adjList
*
* @Param[out] *katz_centrality If set to a valid column, this is populated by the katz centrality of every vertex in the graph
*
* @Param[in] alpha Attenuation factor with a default value of 0.1. Alpha is set to
1/(lambda_max) if it is greater where lambda_max is the maximum degree
of the graph.
*
* @Param[in] max_iter The maximum number of iterations before an answer is returned. This can
be used to limit the execution time and do an early exit before the
solver reaches the convergence tolerance.
If this value is lower or equal to 0 cuGraph will use the default
value, which is 100.
*
* @Param[in] tol Set the tolerance the approximation, this parameter should be a small
magnitude value.
The lower the tolerance the better the approximation. If this value is
0.0f, cuGraph will use the default value which is 1.0E-5.
Setting too small a tolerance can lead to non-convergence due to
numerical roundoff. Usually values between 0.01 and 0.00001 are
acceptable.
*
* @Param[in] has_guess Flag to determine whether \p katz_centrality contains an initial guess for katz centrality values
*
* @Param[in] normalized If True normalize the resulting katz centrality values
*
* @throws cugraph::logic_error when an error occurs.
*/
/* ----------------------------------------------------------------------------*/
void katz_centrality(Graph* graph,
gdf_column *katz_centrality,
double alpha,
int max_iter,
double tol,
bool has_guess,
bool normalized);

/**
* @Synopsis Compute the Core Number for the nodes of the graph G
*
* @Param[in] *graph cuGRAPH graph descriptor with a valid edgeList or adjList
*
* @Param[out] *core_number If set to a valid column, this is populated by the core number of every vertex in the graph
*
* @throws cugraph::logic_error when an error occurs.
*/
/* ----------------------------------------------------------------------------*/
void core_number(Graph* graph,
gdf_column *core_number);

/**
* @Synopsis Compute K Core of the graph G
*
* @Param[in] *in_graph cuGRAPH graph descriptor with a valid edgeList or adjList
*
* @Param[in] k Order of the core. This value must not be negative.
*
* @Param[in] *vertex_id User specified vertex identifiers for which core number values are supplied
*
* @Param[in] *core_number User supplied core number values corresponding to vertex_id
*
* @Param[out] *out_graph K Core subgraph
*
* @throws cugraph::logic_error when an error occurs.
*/
/* ----------------------------------------------------------------------------*/
void k_core(Graph* in_graph,
int k,
gdf_column *vertex_id,
gdf_column *core_number,
Graph* out_graph);

} //namespace cugraph
Loading

0 comments on commit 420d467

Please sign in to comment.