diff --git a/big_data_analsis.R b/big_data_analsis.R new file mode 100644 index 0000000..2b2ccfa --- /dev/null +++ b/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 \ No newline at end of file diff --git a/data_analysis.R b/data_analysis.R new file mode 100644 index 0000000..f3435ab --- /dev/null +++ b/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 diff --git a/parallel/analysis.csv b/parallel/analysis.csv index ce09882..e009fa5 100644 --- a/parallel/analysis.csv +++ b/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 diff --git a/parallel/complete_big_analysis.csv b/parallel/complete_big_analysis.csv new file mode 100644 index 0000000..103b994 --- /dev/null +++ b/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 diff --git a/parallel/nsight_summary_details.csv b/parallel/nsight_summary_details.csv new file mode 100644 index 0000000..715628d --- /dev/null +++ b/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 diff --git a/parallel/nsight_summary_details_theirs.csv b/parallel/nsight_summary_details_theirs.csv new file mode 100644 index 0000000..837e7f0 --- /dev/null +++ b/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 long=128>, unsigned long=0>, thrust::system::cuda::detail::bulk_::detail::closure, thrust::detail::normal_iterator>, thrust::detail::normal_iterator>, thrust::detail::normal_iterator, unsigned long=128>, unsigned long=0>, thrust::system::cuda::detail::bulk_::detail::closure, thrust::device_ptr, thrust::system::cuda::detail::aligned_decomposition, thrust::detail::normal_iterator>, float, thrust::plus, 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