Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added seq_time to analysis.csv. Joined the big analysis data csv's. C…
…reated some R scripts to generate graphs. Got details from nsight.
  • Loading branch information
rjm11010 committed May 3, 2017
1 parent e46e722 commit 8cf890b
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 1 deletion.
26 changes: 26 additions & 0 deletions big_data_analsis.R
@@ -0,0 +1,26 @@
# Plot the data

# Imports
library(reshape2)
library(ggplot2)

# Load the data
# Change path to file
# data_path <- '../parallel/analysis.csv' # You can use this instead
data_path <- '/home/reynaldo/Documents/School/Spring2017/HPC/project/parallel_mcmc/parallel/complete_big_analysis.csv'
perf_data <- read.csv(file=data_path, header=TRUE, sep=",")
melted_data <- melt(perf_data, id=c("trial", "block", "thread"))
five_hundred_trials <- melted_data[which(melted_data$trial == 500), ]
five_hundred_trials$thread = as.factor(five_hundred_trials$thread)


# Find which combination of blocks and threads works best
ours_five_hundred_trials <- five_hundred_trials[which(five_hundred_trials$variable == "our_time"), ]
ours_five_hundred_trials <- ours_five_hundred_trials[which(!is.na(ours_five_hundred_trials$thread)), ]

line_base <- ggplot(ours_five_hundred_trials, aes(x=block, y=value, group=thread, shape=thread, color=thread)) +
geom_line() +
geom_point()
line_base <- line_base + xlab("Blocks") + ylab("Time (seconds)") + labs(colour = "Num Threads", shape="Num Threads")
line_base <- line_base + ggtitle("Blocks vs Time vs Threads") + theme(plot.title = element_text(hjust = 0.5))
line_base
43 changes: 43 additions & 0 deletions data_analysis.R
@@ -0,0 +1,43 @@
# Plot the data

# Imports
library(reshape2)
library(ggplot2)

# Load the data
# Change path to file
# data_path <- '../parallel/analysis.csv' # You can use this instead
data_path <- '/home/reynaldo/Documents/School/Spring2017/HPC/project/parallel_mcmc/parallel/analysis.csv'
perf_data <- read.csv(file=data_path, header=TRUE, sep=",")
melted_data <- melt(perf_data, id=c("trial", "block", "thread"))
five_hundred_trials <- melted_data[which(melted_data$trial == 500), ]

# Generate Plots

# Create Scatter plot (Blocks vs Threads)
base_plot <- ggplot(five_hundred_trials, aes(x=block, y=time, color=variable))
base_plot <- base_plot + geom_point(aes(x=block, y=thread, size=value, color=variable))
base_plot <- base_plot + scale_size(range = c(0, 10))
base_plot <- base_plot + xlab("Threads") + ylab("Time (seconds)")
base_plot <- base_plot + ggtitle("Blocks vs Time") + theme(plot.title = element_text(hjust = 0.5))
base_plot

# Find which combination of blocks and threads works best
five_hundred_trials$thread = as.factor(five_hundred_trials$thread)
ours_five_hundred_trials <- five_hundred_trials[which(five_hundred_trials$variable == "our_time"), ]
ours_five_hundred_trials <- ours_five_hundred_trials[which(!is.na(ours_five_hundred_trials$thread)), ]

line_base <- ggplot(ours_five_hundred_trials, aes(x=block, y=value, group=thread, shape=thread, color=thread)) +
geom_line() +
geom_point()
line_base <- line_base + xlab("Blocks") + ylab("Time (seconds)") + labs(colour = "Num Threads", shape="Num Threads")
line_base <- line_base + ggtitle("Blocks vs Time vs Threads") + theme(plot.title = element_text(hjust = 0.5))
line_base

# Line Plot
line_base <- ggplot(five_hundred_trials, aes(x=block, y=value, group=variable, shape=variable, color=variable)) +
geom_line() +
geom_point()
line_base <- line_base + xlab("Blocks") + ylab("Time (seconds)")
line_base <- line_base + ggtitle("Blocks vs Time") + theme(plot.title = element_text(hjust = 0.5))
line_base
2 changes: 1 addition & 1 deletion parallel/analysis.csv
@@ -1,4 +1,4 @@
trial,block,thread,our_time,their_time
trial,block,thread,seq_time,our_time,their_time
500,1,1,1.32,11.04,5.19
500,1,2,1.25,7.83,5.12
500,1,4,1.23,6.29,5.26
Expand Down
22 changes: 22 additions & 0 deletions parallel/complete_big_analysis.csv
@@ -0,0 +1,22 @@
trial,block,thread,seq_time,our_time,their_time
500,1,1,5519.37,3321.13,18.31
500,1,2,5519.37,3379.05,18.31
500,1,4,5519.37,3533.75,18.31
500,1,8,5519.37,3803.11,18.31
500,1,16,5519.37,4390.35,18.31
500,1,32,5519.37,5553.23,18.31
500,1,64,5519.37,16.49,18.31
500,1,128,5519.37,16.45,18.31
500,1,256,5519.37,16.52,18.31
500,1,512,5519.37,16.45,18.31
500,1,1024,5519.37,16.34,18.31
500,2,64,5519.37,16.40,18.42
500,2,128,5519.37,16.47,18.42
500,2,256,5519.37,16.40,18.42
500,2,512,5519.37,17.03,18.42
500,2,1024,5519.37,16.63,18.42
1000,2,64,20407.01,16.68,18.31
1000,2,128,20407.01,16.35,18.31
1000,2,256,20407.01,16.49,18.31
1000,2,512,20407.01,16.42,18.31
1000,2,1024,20407.01,16.39,18.31
7 changes: 7 additions & 0 deletions parallel/nsight_summary_details.csv
@@ -0,0 +1,7 @@
Name,Start Time(ns),Duration(ns),GridX,GridY,GridZ,BlockX,BlockY,BlockZ,Registers/Thread,Static Shared Memory,Dynamic Shared Memory,Size(bytes),Throughput(bytes/sec),Achieved Occupancy
"Memcpy HtoD [sync]",222838415,3008,,,,,,,,,,12220,4062500000,
"Memcpy HtoD [sync]",222854191,2912,,,,,,,,,,12220,4196428571,
"setup_kernel(curandStateXORWOW*, unsigned int, int)",224295348,3893552,1,1,1,64,1,1,33,0,0,,,0.027
"seqMetroProcess(int, int, int*, float*, curandStateXORWOW*, float*, float*, float, float, float*, float*, int)",228192356,5093374624,1,1,1,8,1,1,43,0,0,,,0.016
"sampleTdot(int, int*, curandStateXORWOW*)",5321570148,6976,1,1,1,8,1,1,13,0,0,,,0.016
"mergePosterior(int, float*, float*, int*, curandStateXORWOW*, int, int, float*, float*)",5321583364,818372125,1,1,1,1,1,1,40,0,0,,,0.016
5 changes: 5 additions & 0 deletions parallel/nsight_summary_details_theirs.csv
@@ -0,0 +1,5 @@
Name,Invocations,Avg. Duration(ns),Registers/Thread,Static Shared Memory,Avg. Dynamic Shared Memory
"sample_theta(curandStateXORWOW*, float*, float*, int*, float*, float, float, int)",500,73326,28,0,0
"void thrust::system::cuda::detail::bulk_::detail::launch_by_value<unsigned int=128, thrust::system::cuda::detail::bulk_::detail::cuda_task<thrust::system::cuda::detail::bulk_::parallel_group<thrust::system::cuda::detail::bulk_::concurrent_group<thrust::system::cuda::detail::bulk_::agent<unsigned long=7>, unsigned long=128>, unsigned long=0>, thrust::system::cuda::detail::bulk_::detail::closure<thrust::system::cuda::detail::reduce_detail::reduce_partitions, thrust::tuple<thrust::system::cuda::detail::bulk_::detail::cursor<unsigned int=1>, thrust::detail::normal_iterator<thrust::pointer<float, thrust::system::cuda::detail::tag, thrust::use_default, thrust::use_default>>, thrust::detail::normal_iterator<thrust::pointer<float, thrust::system::cuda::detail::tag, thrust::use_default, thrust::use_default>>, thrust::detail::normal_iterator<thrust::pointer<float, thrust::sy",1000,548364,58,32,6112
"void thrust::system::cuda::detail::bulk_::detail::launch_by_value<unsigned int=128, thrust::system::cuda::detail::bulk_::detail::cuda_task<thrust::system::cuda::detail::bulk_::parallel_group<thrust::system::cuda::detail::bulk_::concurrent_group<thrust::system::cuda::detail::bulk_::agent<unsigned long=7>, unsigned long=128>, unsigned long=0>, thrust::system::cuda::detail::bulk_::detail::closure<thrust::system::cuda::detail::reduce_detail::reduce_partitions, thrust::tuple<thrust::system::cuda::detail::bulk_::detail::cursor<unsigned int=1>, thrust::device_ptr<float>, thrust::system::cuda::detail::aligned_decomposition<long>, thrust::detail::normal_iterator<thrust::pointer<float, thrust::system::cuda::detail::tag, thrust::use_default, thrust::use_default>>, float, thrust::plus<float>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>>>(unsigned long=7)",1000,713547,74,32,8160
"setup_kernel(curandStateXORWOW*, unsigned int, int)",1,7552158,33,0,0

0 comments on commit 8cf890b

Please sign in to comment.