Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "cub"]
path = cub
url = https://github.com/NVIDIA/cub.git
2 changes: 1 addition & 1 deletion IM.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <thrust/execution_policy.h>

#include "kernels.h"
#include "./cub-1.8.0/cub/cub.cuh"
#include "./cub/cub/cub.cuh"

#define MAX_NUMBER_OF_RR_SETS 30000000

Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,23 @@ gIM is a GPU-accelerated RIS-based influence maximization (IM) algorithm.
### CUDA toolkit
To install CUDA toolkit please use [this link](https://developer.nvidia.com/cuda-downloads).

### Repository Preparation

gIM uses cub library for some parallel algorithms like scan. Before compiling the code, initialize submodules using the following command:
```
git submodule update --init
```

### Compilation

Compile the code using the following command:
```
nvcc -std=c++11 -O3 -lcurand *.cu -o gIM
```

If you are using CUDA 7.5 and newer versions on Windows, you can remove the -std flag because these versions include the support for C++11 standard by default. Wildcard expansion does not work in cmd.exe, so you need to use the following command for compiling the code:
```
nvcc -O3 -lcurand kernels.cu IM.cu testgraph.cu -o gIM
```
### Execution

Run the code using the following command:
Expand Down
1 change: 1 addition & 0 deletions cub
Submodule cub added at c3ccea
2 changes: 1 addition & 1 deletion kernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <curand.h>
#include <curand_kernel.h>
#include "./cub-1.8.0/cub/cub.cuh"
#include "./cub/cub/cub.cuh"

__device__ uint32_t mix_hash(uint32_t a, uint32_t b, uint32_t c)
{
Expand Down