Skip to content
Snippets Groups Projects
Commit 71484ae8 authored by Recolic Keghart's avatar Recolic Keghart
Browse files

debug update

parent d907c4ec
No related branches found
No related tags found
No related merge requests found
*.txt
NVCC = /usr/local/cuda/bin/nvcc
NVCC = /usr/local/cuda-10.2/bin/nvcc
# 75 for Turing architecture.
gpma_bfs_demo:
$(NVCC) -I./ -O3 -std=c++11 -w -gencode arch=compute_61,code=sm_61 -odir "." -M -o "gpma_bfs_demo.d" "./gpma_bfs_demo.cu"
$(NVCC) -I./ -O3 -std=c++11 -w --compile --relocatable-device-code=true -gencode arch=compute_61,code=compute_61 -gencode arch=compute_61,code=sm_61 -x cu -o "gpma_bfs_demo.o" "gpma_bfs_demo.cu"
$(NVCC) --cudart static --relocatable-device-code=true -gencode arch=compute_61,code=compute_61 -gencode arch=compute_61,code=sm_61 -link -o "gpma_bfs_demo" ./gpma_bfs_demo.o
$(NVCC) -I./ -O3 -std=c++11 -w -gencode arch=compute_75,code=sm_75 -odir "." -M -o "gpma_bfs_demo.d" "./gpma_bfs_demo.cu"
$(NVCC) -I./ -O3 -std=c++11 -w --compile --relocatable-device-code=true -gencode arch=compute_75,code=compute_75 -gencode arch=compute_75,code=sm_75 -x cu -o "gpma_bfs_demo.o" "gpma_bfs_demo.cu"
$(NVCC) --cudart static --relocatable-device-code=true -gencode arch=compute_75,code=compute_75 -gencode arch=compute_75,code=sm_75 -link -o "gpma_bfs_demo" ./gpma_bfs_demo.o
clean:
rm ./gpma_bfs_demo.o ./gpma_bfs_demo.d gpma_bfs_demo
#!/usr/bin/env python
import os
import random
#!/bin/bash
# download dataset
print('downloading graph dataset...')
os.system('wget https://snap.stanford.edu/data/soc-pokec-relationships.txt.gz')
os.system('gunzip soc-pokec-relationships.txt.gz')
if [[ ! -f soc-pokec-relationships.txt ]]; then
echo 'downloading graph dataset...'
wget https://snap.stanford.edu/data/soc-pokec-relationships.txt.gz &&
gzip -d soc-pokec-relationships.txt.gz || exit $?
fi
echo "
import os
import random
# reformat and shuffle
print('re-formating and shuffling graph dataset...')
node_size = 0
......@@ -24,11 +27,9 @@ with open('pokec.txt', 'w') as f:
f.write('{} {}\n'.format(node_size, edge_size))
for a, b in edges:
f.write('{} {}\n'.format(a - 1, b - 1))
os.system('rm soc-pokec-relationships.txt')
print('pokec.txt done.')
" > /tmp/gpma-tmp.py
python /tmp/gpma-tmp.py
exit $?
# download CUB v1.8.0
print('downloading CUB...')
os.system('wget https://github.com/NVlabs/cub/archive/1.8.0.zip')
os.system('unzip 1.8.0.zip')
os.system('cp -rf cub-1.8.0/cub .')
os.system('rm -rf cub-1.8.0')
......@@ -7,8 +7,12 @@
inline int64_t get_time_in_us() {
struct timespec t;
static int64_t prev_time = 0;
clock_gettime(CLOCK_MONOTONIC, &t);
return ((int64_t)(t.tv_sec) * (int64_t)1000000000 + (int64_t)(t.tv_nsec)) / 1000;
auto this_time = ((int64_t)(t.tv_sec) * (int64_t)1000000000 + (int64_t)(t.tv_nsec)) / 1000;
auto delta_time = this_time - prev_time;
prev_time = this_time;
return delta_time;
}
#define LOG_TIME(msg) printf("T+%lld - " msg "\n", get_time_in_us());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment