Skip to content

alinutzal/hackCugraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic Standalone libcudf C++ application

This C++ example demonstrates a basic libcudf use case and provides a minimal example of building your own application based on libcudf using CMake.

The example source code loads a csv file that contains stock prices from 4 companies spanning across 5 days, computes the average of the closing price for each company and writes the result in csv format.

Compile and execute

  1. Run rapidsai developer container
shifter --image=rapidsai/rapidsai-dev:21.06-cuda11.0-devel-ubuntu20.04-py3.8 bash

source /opt/conda/bin/activate rapids
  1. Clone the repository and run cmake.
mkdir build && cd build && cmake ..

If everything works well, compile the code with make -j4.

  1. Test the code in a GPU.
module load cgpu
srun -C gpu -N 1 -G 1 -c 10 -t 4:00:00 -A m1759 --pty /bin/bash -l

shifter --image=rapidsai/rapidsai-dev:21.06-cuda11.0-devel-ubuntu20.04-py3.8 bash

Export the dataset directory export RAPIDS_DATASET_ROOT_DIR=/path/to/hackCugraph/datasets. Change to your actual path. Then go to the build directory to run the following command.

./src/mmio_read

It should print out:

Number of Nodes:34
Number of Edges:156

About

Getting cugraph weakly connected components to work in C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors