diff --git a/test/unit/linear_algebra/test_lapacke.cpp b/test/unit/linear_algebra/test_lapacke.cpp index 5ebbf002..01a6b15f 100644 --- a/test/unit/linear_algebra/test_lapacke.cpp +++ b/test/unit/linear_algebra/test_lapacke.cpp @@ -37,7 +37,7 @@ const std::size_t number_of_runs = 100; /// sizes to check consistency TEST(LapackeTest, SinglePrecision) { - std::size_t sizes[5] = { 500, 1000, 10000, 100000, 1000000 }; + std::size_t sizes[5] = { 1000, 10000, 100000, 1000000, 10000000 }; vecf errors(5, 0); vecd times(5, 0); @@ -91,8 +91,7 @@ TEST(LapackeTest, SinglePrecision) /// sizes to check consistency TEST(LapackeTest, DoublePrecision) { - std::size_t sizes[5] = { 500, 1000, 10000, 100000, 1000000 }; - + std::size_t sizes[5] = { 1000, 10000, 100000, 1000000, 10000000 }; vecd errors(5, 0); vecd times(5, 0); for (std::size_t i = 0; i < 5; i++) diff --git a/test/unit/linear_algebra/test_tridiagonal_solver.cpp b/test/unit/linear_algebra/test_tridiagonal_solver.cpp index c4a7d21a..bd046f81 100644 --- a/test/unit/linear_algebra/test_tridiagonal_solver.cpp +++ b/test/unit/linear_algebra/test_tridiagonal_solver.cpp @@ -36,7 +36,7 @@ const std::size_t number_of_runs = 100; /// sizes to check consistency TEST(TridiagSolveTest, SinglePrecision) { - std::size_t sizes[5] = { 500, 1000, 10000, 100000, 1000000 }; + std::size_t sizes[5] = { 1000, 10000, 100000, 1000000, 10000000 }; float error = 0; vecd errors(5, 0); vecd times(5, 0); @@ -81,7 +81,7 @@ TEST(TridiagSolveTest, SinglePrecision) /// sizes to check consistency TEST(TridiagSolveTest, DoublePrecision) { - std::size_t sizes[5] = { 500, 1000, 10000, 100000, 1000000 }; + std::size_t sizes[5] = { 1000, 10000, 100000, 1000000, 10000000 }; vecd errors(5, 0); vecd times(5, 0); for (std::size_t i = 0; i < 5; i++) diff --git a/tool/numerical_analysis/tridiagonal_solver/double.png b/tool/numerical_analysis/tridiagonal_solver/double.png new file mode 100644 index 00000000..0da8ea95 Binary files /dev/null and b/tool/numerical_analysis/tridiagonal_solver/double.png differ diff --git a/tool/numerical_analysis/tridiagonal_solver/double_errors.png b/tool/numerical_analysis/tridiagonal_solver/double_errors.png new file mode 100644 index 00000000..14f0c418 Binary files /dev/null and b/tool/numerical_analysis/tridiagonal_solver/double_errors.png differ diff --git a/tool/numerical_analysis/tridiagonal_solver/double_precision_errors.png b/tool/numerical_analysis/tridiagonal_solver/double_precision_errors.png index 0c79fe93..58298705 100644 Binary files a/tool/numerical_analysis/tridiagonal_solver/double_precision_errors.png and b/tool/numerical_analysis/tridiagonal_solver/double_precision_errors.png differ diff --git a/tool/numerical_analysis/tridiagonal_solver/double_precision_times.png b/tool/numerical_analysis/tridiagonal_solver/double_precision_times.png index 91e65d29..74ff3904 100644 Binary files a/tool/numerical_analysis/tridiagonal_solver/double_precision_times.png and b/tool/numerical_analysis/tridiagonal_solver/double_precision_times.png differ diff --git a/tool/numerical_analysis/tridiagonal_solver/lapacke_double_precision.dat b/tool/numerical_analysis/tridiagonal_solver/lapacke_double_precision.dat index 80997c5b..c9bdc9ec 100644 --- a/tool/numerical_analysis/tridiagonal_solver/lapacke_double_precision.dat +++ b/tool/numerical_analysis/tridiagonal_solver/lapacke_double_precision.dat @@ -1,5 +1,5 @@ -3.30626e-17 0.417286 -3.28675e-17 0.0167708 -3.29103e-17 0.168244 -3.2997e-17 1.69772 -3.29721e-17 17.5553 +3.29913e-17 0.0176367 +3.30137e-17 0.175568 +3.29986e-17 1.73411 +3.29744e-17 17.864 +3.29784e-17 188.188 diff --git a/tool/numerical_analysis/tridiagonal_solver/lapacke_single_precision.dat b/tool/numerical_analysis/tridiagonal_solver/lapacke_single_precision.dat index 21b54045..9d22993d 100644 --- a/tool/numerical_analysis/tridiagonal_solver/lapacke_single_precision.dat +++ b/tool/numerical_analysis/tridiagonal_solver/lapacke_single_precision.dat @@ -1,5 +1,5 @@ -1.61305e-08 0.0735512 -1.63403e-08 0.031625 -1.62899e-08 0.315323 -1.62863e-08 3.16128 -1.62782e-08 19.8034 +1.63141e-08 0.0319062 +1.62981e-08 0.315242 +1.63017e-08 3.15343 +1.62755e-08 18.4041 +1.63076e-08 166.735 diff --git a/tool/numerical_analysis/tridiagonal_solver/plot_analysis.jl b/tool/numerical_analysis/tridiagonal_solver/plot_analysis.jl index a8bbbe43..2c9f6099 100644 --- a/tool/numerical_analysis/tridiagonal_solver/plot_analysis.jl +++ b/tool/numerical_analysis/tridiagonal_solver/plot_analysis.jl @@ -1,7 +1,7 @@ using DataFrames, CSV, StatsPlots -sizes = [500, 1000, 10000, 100000, 1000000] +sizes = [1000, 10000, 100000, 1000000, 10000000] f1=DataFrame(CSV.File("lapacke_single_precision.dat", delim=" ", header=false)) f2=DataFrame(CSV.File("lapacke_double_precision.dat", delim=" ", header=false)) @@ -22,11 +22,11 @@ tuvx_errors_double_precision = f4[:, 1] tuvx_times_double_precision = f4[:, 2] #scatter plots -#scatter(lapack_times_single_precision, lapack_errors_single_precision, label="LAPACKE SINGLE PRECISION") -scatter(lapack_times_double_precision, lapack_errors_double_precision, label="LAPACKE DOUBLE PRECISION") -scatter!(tuvx_times_double_precision, tuvx_errors_double_precision, label="TUV-X SINGLE PRECISION") -#scatter!(tuvx_times_single_precision, tuvx_errors_single_precision, label="TUV-X DOUBLE PRECISION") -savefig("scatter.png") +bar(string.(sizes), lapack_errors_single_precision.-tuvx_errors_single_precision) +savefig("single_errors.png") + +bar(string.(sizes), lapack_errors_double_precision.-tuvx_errors_double_precision) +savefig("double_errors.png") # bar plots @@ -40,14 +40,14 @@ data = [lapack_errors_single_precision; tuvx_errors_single_precision] groups = repeat(["LAPACKE", "TUV-X"], inner = 5) plot(groupedbar(nam, data, groups=groups)) title!("Comparing Accuracy (Single Precision)") -xlabel!("System Size") ylabel!("Relative Error") +xlabel!("System Size") savefig("single_precision_errors.png") -data = [lapack_times_single_precision; tuvx_times_single_precision] +data = [lapack_times_single_precision ./ sizes; tuvx_times_single_precision ./ sizes] groups = repeat(["LAPACKE", "TUV-X"], inner = 5) plot(groupedbar(nam, data, groups=groups), yaxis=:log) -title!("Comparing Speed (Double Precision)") +title!("Comparing Speed (Single Precision)") xlabel!("System Size") ylabel!("Run Time (ms)") savefig("single_precision_times.png") @@ -60,7 +60,7 @@ xlabel!("System Size") ylabel!("Relative Error") savefig("double_precision_errors.png") -data = [lapack_times_double_precision; tuvx_times_double_precision] +data = [lapack_times_double_precision ./ sizes; tuvx_times_double_precision ./ sizes] groups = repeat(["LAPACKE", "TUV-X"], inner = 5) plot(groupedbar(nam, data, groups=groups), yaxis=:log) title!("Comparing Speed (Double Precision)") diff --git a/tool/numerical_analysis/tridiagonal_solver/scatter.png b/tool/numerical_analysis/tridiagonal_solver/scatter.png index 0c20bf76..f8bfec27 100644 Binary files a/tool/numerical_analysis/tridiagonal_solver/scatter.png and b/tool/numerical_analysis/tridiagonal_solver/scatter.png differ diff --git a/tool/numerical_analysis/tridiagonal_solver/single.png b/tool/numerical_analysis/tridiagonal_solver/single.png new file mode 100644 index 00000000..3d4d0b78 Binary files /dev/null and b/tool/numerical_analysis/tridiagonal_solver/single.png differ diff --git a/tool/numerical_analysis/tridiagonal_solver/single_errors.png b/tool/numerical_analysis/tridiagonal_solver/single_errors.png new file mode 100644 index 00000000..843e6c77 Binary files /dev/null and b/tool/numerical_analysis/tridiagonal_solver/single_errors.png differ diff --git a/tool/numerical_analysis/tridiagonal_solver/single_precision_errors.png b/tool/numerical_analysis/tridiagonal_solver/single_precision_errors.png index b4aeccf9..1c39ea09 100644 Binary files a/tool/numerical_analysis/tridiagonal_solver/single_precision_errors.png and b/tool/numerical_analysis/tridiagonal_solver/single_precision_errors.png differ diff --git a/tool/numerical_analysis/tridiagonal_solver/single_precision_times.png b/tool/numerical_analysis/tridiagonal_solver/single_precision_times.png index ea32d75e..b2e9fa43 100644 Binary files a/tool/numerical_analysis/tridiagonal_solver/single_precision_times.png and b/tool/numerical_analysis/tridiagonal_solver/single_precision_times.png differ diff --git a/tool/numerical_analysis/tridiagonal_solver/tuvx_double_precision.dat b/tool/numerical_analysis/tridiagonal_solver/tuvx_double_precision.dat index 5f27d44c..edd516e8 100644 --- a/tool/numerical_analysis/tridiagonal_solver/tuvx_double_precision.dat +++ b/tool/numerical_analysis/tridiagonal_solver/tuvx_double_precision.dat @@ -1,5 +1,5 @@ -3.25666e-17 0.00575997 -3.27243e-17 0.0106145 -3.30318e-17 0.108197 -3.29515e-17 1.66856 -3.29829e-17 15.1904 +3.30033e-17 0.0106112 +3.29421e-17 0.108319 +3.29942e-17 1.68017 +3.29831e-17 15.0755 +3.29797e-17 146.831 diff --git a/tool/numerical_analysis/tridiagonal_solver/tuvx_single_precision.dat b/tool/numerical_analysis/tridiagonal_solver/tuvx_single_precision.dat index 0382c116..c4b647b2 100644 --- a/tool/numerical_analysis/tridiagonal_solver/tuvx_single_precision.dat +++ b/tool/numerical_analysis/tridiagonal_solver/tuvx_single_precision.dat @@ -1,5 +1,5 @@ -1.61895e-08 0.00851904 -1.61348e-08 0.0169347 -1.63005e-08 0.221691 -1.62871e-08 2.28039 -1.62731e-08 14.3214 +1.61746e-08 0.016908 +1.62785e-08 0.227215 +1.62936e-08 2.232 +1.62759e-08 16.4258 +1.63053e-08 107.242