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

adjust outputs and add script for report writing

parent 978a252c
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,8 @@ TEST_DEV ?= GPU
OMP_FLAGS = -Xcompiler -fopenmp
NVFLAGS = -I. -O3 -std=c++14 -DCUDA_SM=$(SM) -arch sm_$(SM) --relocatable-device-code=true --extended-lambda $(OMP_FLAGS) -g
EXTRA_FLAGS ?= -g
NVFLAGS = -I. -O3 -std=c++14 -DCUDA_SM=$(SM) -arch sm_$(SM) --relocatable-device-code=true --extended-lambda $(OMP_FLAGS) $(EXTRA_FLAGS)
default:
$(NVCC) $(NVFLAGS) gpma_bfs_demo.cu -o gpma_bfs_demo -lgomp
......
......@@ -969,7 +969,7 @@ template <dev_type_t DEV>
__host__ void update_gpma(GPMA<DEV> &gpma, NATIVE_VEC_KEY<DEV> &update_keys, NATIVE_VEC_VALUE<DEV> &update_values) {
DEBUG_PRINTFLN("DBG: (ENTER UPDATE)update_gpma args, update_keys={}, values={}", rlib::printable_iter(update_keys), rlib::printable_iter(values_for_print(update_values)));
gpma.print_status("ENTER update_gpma");
rlib::printfln("DBG: tree_height={}, update_size={}", gpma.tree_height, update_keys.size());
// rlib::printfln("DBG: tree_height={}, update_size={}", gpma.tree_height, update_keys.size());
//LOG_TIME("enter_update_gpma")
......@@ -1046,5 +1046,5 @@ __host__ void update_gpma(GPMA<DEV> &gpma, NATIVE_VEC_KEY<DEV> &update_keys, NAT
anySync<DEV>();
gpma.print_status("LEAVE update_gpma");
rlib::printfln("DBG: (LEAVE UPDATE) =====================================================================================");
//rlib::printfln("DBG: (LEAVE UPDATE) =====================================================================================");
}
......@@ -62,7 +62,11 @@ int main(int argc, char **argv) {
LOG_TIME("before init_csr_gpma")
constexpr size_t cpu_count = 4;
GPMA_multidev<cpu_count-1, 1> gpma(node_size);
#ifndef TEST_CPUS
#define TEST_CPUS cpu_count-1
#define TEST_GPUS 1
#endif
GPMA_multidev<TEST_CPUS, TEST_GPUS> gpma(node_size);
cudaDeviceSynchronize();
LOG_TIME("before update_gpma 1")
......@@ -71,9 +75,11 @@ int main(int argc, char **argv) {
cudaDeviceSynchronize();
LOG_TIME("before first bfs")
#ifndef _DISABLE_BFS
gpma_bfs(gpma, node_size, edge_size, bfs_start_node, RAW_PTR(bfs_result));
int reach_nodes = node_size - thrust::count(bfs_result.begin(), bfs_result.end(), 0);
printf("start from node %d, number of reachable nodes: %d\n", bfs_start_node, reach_nodes);
#endif
LOG_TIME("before main loop")
for (int i = 0; i < num_slide; i++) {
......@@ -99,9 +105,11 @@ int main(int argc, char **argv) {
printf("Graph is updated.\n");
LOG_TIME("before second bfs")
#ifndef _DISABLE_BFS
gpma_bfs(gpma, node_size, edge_size, bfs_start_node, RAW_PTR(bfs_result));
reach_nodes = node_size - thrust::count(bfs_result.begin(), bfs_result.end(), 0);
printf("start from node %d, number of reachable nodes: %d\n", bfs_start_node, reach_nodes);
#endif
LOG_TIME("after second bfs")
return 0;
......
#!/usr/bin/fish
for i in (seq 8)
echo CPUS=$i ===========================================
make EXTRA_FLAGS="-DTEST_CPUS=$i -DTEST_GPUS=0 -DTEST_DISABLE_BFS"
and time ./gpma_bfs_demo /tmp/999999999.pokec.txt 0
end
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