From 1e2030f516d50988670599a3855337a9ee0830c3 Mon Sep 17 00:00:00 2001 From: Yaroslav <beorn.90@gmail.com> Date: Tue, 2 Aug 2016 16:21:01 +0200 Subject: [PATCH] Added files --- openfpm_data | 2 +- openfpm_vcluster | 2 +- .../vector_dist_cl_hilb_performance_tests.hpp | 68 ++++++++++++++++ .../vector_dist_cl_performance_tests.hpp | 78 +++++++++++++++++++ .../vector_dist_verlet_performance_tests.hpp | 71 +++++++++++++++++ src/pdata_performance.hpp | 20 +++++ 6 files changed, 239 insertions(+), 2 deletions(-) create mode 100644 src/Vector/vector_dist_cl_hilb_performance_tests.hpp create mode 100644 src/Vector/vector_dist_cl_performance_tests.hpp create mode 100644 src/Vector/vector_dist_verlet_performance_tests.hpp create mode 100644 src/pdata_performance.hpp diff --git a/openfpm_data b/openfpm_data index 093b05ee0..b7e3ad46b 160000 --- a/openfpm_data +++ b/openfpm_data @@ -1 +1 @@ -Subproject commit 093b05ee076bb7e4d054a4b5c53ca10353c9d06e +Subproject commit b7e3ad46b9e7c96c32690a01ccfeed9ef209f0e0 diff --git a/openfpm_vcluster b/openfpm_vcluster index dbfbf7ae7..d5e19cdae 160000 --- a/openfpm_vcluster +++ b/openfpm_vcluster @@ -1 +1 @@ -Subproject commit dbfbf7ae71d6d6157ecce6320cd69354c89dc9f0 +Subproject commit d5e19cdaed8d4f7a8129728cf17f84196a940748 diff --git a/src/Vector/vector_dist_cl_hilb_performance_tests.hpp b/src/Vector/vector_dist_cl_hilb_performance_tests.hpp new file mode 100644 index 000000000..7b0c77bde --- /dev/null +++ b/src/Vector/vector_dist_cl_hilb_performance_tests.hpp @@ -0,0 +1,68 @@ +/* + * vector_dist_cl_hilb_performance_tests.hpp + * + * Created on: May 24, 2016 + * Author: Yaroslav Zaluzhnyi + */ + +#ifndef SRC_VECTOR_VECTOR_DIST_CL_HILB_PERFORMANCE_TESTS_HPP_ +#define SRC_VECTOR_VECTOR_DIST_CL_HILB_PERFORMANCE_TESTS_HPP_ + +#include "Vector/vector_dist.hpp" +#include "data_type/aggregate.hpp" +#include "Plot/GoogleChart.hpp" +#include "vector_dist_performance_util.hpp" + +BOOST_AUTO_TEST_SUITE( vector_dist_celllist_hilb_performance_test ) + +///////////////////// INPUT DATA ////////////////////// + +// Cut-off radiuses. Can be put different number of values +openfpm::vector<float> r_cutoff {0.01, 0.02, 0.03}; +// The starting amount of particles (remember that this number is multiplied by number of processors you use for testing) +size_t k_start = 100000; +// The lower threshold for number of particles +size_t k_min = 15000; +// Ghost part of distributed vector +double ghost_part = 0.03; + +/////////////////////////////////////////////////////// + +// Numbers of particles vector +openfpm::vector<size_t> n_particles; +// Vectors to store the data for 2D +openfpm::vector<openfpm::vector<double>> time_rand; +openfpm::vector<openfpm::vector<double>> time_hilb; +openfpm::vector<openfpm::vector<double>> time_total_rand; +openfpm::vector<openfpm::vector<double>> time_total_hilb; +// Vectors to store the data for 3D +openfpm::vector<openfpm::vector<double>> time_rand_2; +openfpm::vector<openfpm::vector<double>> time_hilb_2; +openfpm::vector<openfpm::vector<double>> time_total_rand_2; +openfpm::vector<openfpm::vector<double>> time_total_hilb_2; + + +BOOST_AUTO_TEST_CASE( vector_dist_celllist_random_test ) +{ + //Benchmark test for 2D and 3D + vd_celllist_random_benchmark<2>(k_start,k_min,ghost_part,r_cutoff,n_particles,time_rand,time_total_rand); + vd_celllist_random_benchmark<3>(k_start,k_min,ghost_part,r_cutoff,n_particles,time_rand_2,time_total_rand_2); +} + +BOOST_AUTO_TEST_CASE( vector_dist_celllist_hilbert_test ) +{ + //Benchmark test for 2D and 3D + vd_celllist_hilbert_benchmark<2>(k_start,k_min,ghost_part,r_cutoff,n_particles,time_hilb,time_total_hilb); + vd_celllist_hilbert_benchmark<3>(k_start,k_min,ghost_part,r_cutoff,n_particles,time_hilb_2,time_total_hilb_2); +} + +BOOST_AUTO_TEST_CASE(vector_dist_cl_performance_write_report) +{ + //Write report for 2D and 3D + vd_celllist_performance_write_report<2>(r_cutoff,n_particles,time_hilb,time_rand,time_total_hilb,time_total_rand); + vd_celllist_performance_write_report<3>(r_cutoff,n_particles,time_hilb_2,time_rand_2,time_total_hilb_2,time_total_rand_2); +} + +BOOST_AUTO_TEST_SUITE_END() + +#endif /* SRC_VECTOR_VECTOR_DIST_CL_HILB_PERFORMANCE_TESTS_HPP_ */ diff --git a/src/Vector/vector_dist_cl_performance_tests.hpp b/src/Vector/vector_dist_cl_performance_tests.hpp new file mode 100644 index 000000000..a9f590d73 --- /dev/null +++ b/src/Vector/vector_dist_cl_performance_tests.hpp @@ -0,0 +1,78 @@ +/* + * vector_dist_cl_performance_tests.hpp + * + * + * Created on: Mar 22, 2016 + * Author: Yaroslav Zaluzhnyi + */ + +#ifndef SRC_VECTOR_VECTOR_DIST_CL_PERFORMANCE_TESTS_HPP_ +#define SRC_VECTOR_VECTOR_DIST_CL_PERFORMANCE_TESTS_HPP_ + +#include "Vector/vector_dist.hpp" +#include "data_type/aggregate.hpp" +#include "Vector/vector_dist_unit_test.hpp" +#include "Plot/GoogleChart.hpp" +#include <functional> + +BOOST_AUTO_TEST_SUITE( vector_dist_cl_perf_test ) + +///////////////////// INPUT DATA ////////////////////// + +// Cut-off radiuses. Can be put different number of values +openfpm::vector<float> r_cutoff {0.007,0.02}; +// Orders of a curve. Can be put different number of values +openfpm::vector<size_t> orders = {1,2,3,5,7}; +// Number of steps of moving the particles +size_t n_moving = 8; +// Moving distance (step size) +double dist = 0.1; +// The starting amount of particles (remember that this number is multiplied by number of processors you use for testing) +size_t k_start = 100000; +// The minimal amount of particles +size_t k_min = 15000; +// Ghost part of distributed vector +double ghost_part = 0.01; + +/////////////////////////////////////////////////////// + +// Numbers of particles vector +openfpm::vector<size_t> n_particles; +// Vectors to store the data for 2D +openfpm::vector<openfpm::vector<double>> time_rand; +openfpm::vector<openfpm::vector<openfpm::vector<double>>> time_hilb; +openfpm::vector<openfpm::vector<double>> time_total_rand; +openfpm::vector<openfpm::vector<openfpm::vector<double>>> time_total_hilb; +openfpm::vector<openfpm::vector<openfpm::vector<openfpm::vector<double>>>> time_hilb_moved; +// Vectors to store the data for 3D +openfpm::vector<openfpm::vector<double>> time_rand_2; +openfpm::vector<openfpm::vector<openfpm::vector<double>>> time_hilb_2; +openfpm::vector<openfpm::vector<double>> time_total_rand_2; +openfpm::vector<openfpm::vector<openfpm::vector<double>>> time_total_hilb_2; +openfpm::vector<openfpm::vector<openfpm::vector<openfpm::vector<double>>>> time_hilb_moved_2; + + +BOOST_AUTO_TEST_CASE( vector_dist_cl_random_test ) +{ + //Benchmark test for 2D and 3D + vd_cl_random_benchmark<2>(k_start,k_min,ghost_part,r_cutoff,n_particles,time_rand,time_total_rand); + vd_cl_random_benchmark<3>(k_start,k_min,ghost_part,r_cutoff,n_particles,time_rand_2,time_total_rand_2); +} + +BOOST_AUTO_TEST_CASE( vector_dist_cl_hilbert_test ) +{ + //Benchmark test for 2D and 3D + vd_cl_hilbert_benchmark<2>(k_start,k_min,ghost_part,n_moving,dist,r_cutoff,n_particles,orders,time_hilb,time_total_hilb,time_hilb_moved); + vd_cl_hilbert_benchmark<3>(k_start,k_min,ghost_part,n_moving,dist,r_cutoff,n_particles,orders,time_hilb_2,time_total_hilb_2,time_hilb_moved_2); +} + +BOOST_AUTO_TEST_CASE(vector_dist_cl_performance_write_report) +{ + //Write report for 2D and 3D + vd_cl_performance_write_report<2>(n_moving,r_cutoff,n_particles,orders,time_hilb,time_rand,time_total_hilb,time_total_rand,time_hilb_moved); + vd_cl_performance_write_report<3>(n_moving,r_cutoff,n_particles,orders,time_hilb_2,time_rand_2,time_total_hilb_2,time_total_rand_2,time_hilb_moved_2); +} + +BOOST_AUTO_TEST_SUITE_END() + +#endif /* SRC_VECTOR_VECTOR_DIST_CL_PERFORMANCE_TESTS_HPP_ */ diff --git a/src/Vector/vector_dist_verlet_performance_tests.hpp b/src/Vector/vector_dist_verlet_performance_tests.hpp new file mode 100644 index 000000000..ab23cf9b8 --- /dev/null +++ b/src/Vector/vector_dist_verlet_performance_tests.hpp @@ -0,0 +1,71 @@ +/* + * vector_dist_verlet_performance_tests.hpp + * + * Created on: Mar 9, 2016 + * Author: Yaroslav Zaluzhnyi + */ + +#ifndef SRC_VECTOR_VECTOR_DIST_VERLET_PERFORMANCE_TESTS_HPP_ +#define SRC_VECTOR_VECTOR_DIST_VERLET_PERFORMANCE_TESTS_HPP_ + +#include "Vector/vector_dist.hpp" +#include "data_type/aggregate.hpp" +#include "Plot/GoogleChart.hpp" +#include "vector_dist_performance_util.hpp" + + +BOOST_AUTO_TEST_SUITE( vector_dist_verlet_perf_test ) + +///////////////////// INPUT DATA ////////////////////// + +// Cut-off radiuses. Can be put different number of values +openfpm::vector<float> r_cutoff {0.007,0.02}; +// Orders of a curve. Can be put different number of values +openfpm::vector<size_t> orders = {1,2,3,5,7}; +// The starting amount of particles (remember that this number is multiplied by number of processors you use for testing) +size_t k_start = 100000; +// The minimal amount of particles +size_t k_min = 15000; +// Ghost part of distributed vector +double ghost_part = 0.01; + +/////////////////////////////////////////////////////// + +// Numbers of particles vector +openfpm::vector<size_t> n_particles; +// Vectors to store the data for 2D +openfpm::vector<openfpm::vector<double>> time_rand; +openfpm::vector<openfpm::vector<openfpm::vector<double>>> time_hilb; +openfpm::vector<openfpm::vector<double>> time_total_rand; +openfpm::vector<openfpm::vector<openfpm::vector<double>>> time_total_hilb; +// Vectors to store the data for 3D +openfpm::vector<openfpm::vector<double>> time_rand_2; +openfpm::vector<openfpm::vector<openfpm::vector<double>>> time_hilb_2; +openfpm::vector<openfpm::vector<double>> time_total_rand_2; +openfpm::vector<openfpm::vector<openfpm::vector<double>>> time_total_hilb_2; + + +BOOST_AUTO_TEST_CASE( vector_dist_verlet_random_test ) +{ + //Benchmark test for 2D and 3D + vd_verlet_random_benchmark<2>(k_start,k_min,ghost_part,r_cutoff,n_particles,time_rand,time_total_rand); + vd_verlet_random_benchmark<3>(k_start,k_min,ghost_part,r_cutoff,n_particles,time_rand_2,time_total_rand_2); +} + +BOOST_AUTO_TEST_CASE( vector_dist_verlet_hilbert_test ) +{ + //Benchmark test for 2D and 3D + vd_verlet_hilbert_benchmark<2>(k_start,k_min,ghost_part,r_cutoff,n_particles,orders,time_hilb,time_total_hilb); + vd_verlet_hilbert_benchmark<3>(k_start,k_min,ghost_part,r_cutoff,n_particles,orders,time_hilb_2,time_total_hilb_2); +} + +BOOST_AUTO_TEST_CASE(vector_dist_verlet_performance_write_report) +{ + //Write report for 2D and 3D + vd_verlet_performance_write_report<2>(r_cutoff,n_particles,orders,time_hilb,time_rand,time_total_hilb,time_total_rand); + vd_verlet_performance_write_report<3>(r_cutoff,n_particles,orders,time_hilb_2,time_rand_2,time_total_hilb_2,time_total_rand_2); +} + +BOOST_AUTO_TEST_SUITE_END() + +#endif /* SRC_VECTOR_VECTOR_DIST_VERLET_PERFORMANCE_TESTS_HPP_ */ diff --git a/src/pdata_performance.hpp b/src/pdata_performance.hpp new file mode 100644 index 000000000..d8c74c90f --- /dev/null +++ b/src/pdata_performance.hpp @@ -0,0 +1,20 @@ +/* + * performance.hpp + * + * Created on: Mar 9, 2016 + * Author: yaroslav + */ + +#ifndef SRC_PDATA_PERFORMANCE_HPP_ +#define SRC_PDATA_PERFORMANCE_HPP_ + +BOOST_AUTO_TEST_SUITE( performance ) + +#include "Vector/vector_dist_verlet_performance_tests.hpp" +#include "Vector/vector_dist_cl_performance_tests.hpp" +#include "Vector/vector_dist_cl_hilb_performance_tests.hpp" + + +BOOST_AUTO_TEST_SUITE_END() + +#endif /* SRC_PDATA_PERFORMANCE_HPP_ */ -- GitLab