diff --git a/src/Grid/performance/grid_dist_performance.hpp b/src/Grid/performance/grid_dist_performance.hpp index 7e3ac79625ddd371ebbded31a1d79fa104876969..e1e528e11789caaaa1a45fbc5a96f1906bc2f795 100644 --- a/src/Grid/performance/grid_dist_performance.hpp +++ b/src/Grid/performance/grid_dist_performance.hpp @@ -195,7 +195,7 @@ template<unsigned int dim> void grid_iterator_benchmark(openfpm::vector<size_t> openfpm::vector<double> & time_iterator_stencil_dev) { std::string str("Testing " + std::to_string(dim) + "D grid iterator stencil and normal"); - print_test_v(str); + print_test_v(str,0); { //For different grid sizes diff --git a/src/Makefile.am b/src/Makefile.am index 077a83d00a84ce17ee13253e70e5eb4f5fa5412a..94fb6991d7ff66d2f6104e327500ee884ba64495 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ LINKLIBS = $(HDF5_LDFLAGS) $(HDF5_LIBS) $(OPENMP_LDFLAGS) $(LIBHILBERT_LIB) $(METIS_LIB) $(PTHREAD_LIBS) $(OPT_LIBS) $(BOOST_LDFLAGS) $(BOOST_IOSTREAMS_LIB) $(CUDA_LIBS) $(PETSC_LIB) $(PARMETIS_LIB) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(BOOST_CHRONO_LIB) $(BOOST_TIMER_LIB) $(BOOST_SYSTEM_LIB) $(LIBIFCORE) noinst_PROGRAMS = pdata -pdata_SOURCES = main.cpp Grid/tests/grid_dist_id_HDF5_chckpnt_restart_test.cpp Grid/tests/grid_dist_id_unit_test.cpp Grid/tests/staggered_grid_dist_unit_test.cpp Vector/tests/vector_dist_cell_list_tests.cpp Vector/tests/vector_dist_complex_prp_unit_test.cpp Vector/tests/vector_dist_HDF5_chckpnt_restart_test.cpp Vector/tests/vector_dist_MP_unit_tests.cpp Vector/tests/vector_dist_NN_tests.cpp Vector/tests/vector_dist_unit_test.cpp pdata_performance.cpp Decomposition/tests/CartDecomposition_unit_test.cpp Decomposition/tests/shift_vect_converter_tests.cpp lib/pdata.cpp test_multiple_o.cpp ../openfpm_devices/src/memory/HeapMemory.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp +pdata_SOURCES = main.cpp Grid/tests/grid_dist_id_HDF5_chckpnt_restart_test.cpp Grid/tests/grid_dist_id_unit_test.cpp Grid/tests/staggered_grid_dist_unit_test.cpp Vector/tests/vector_dist_cell_list_tests.cpp Vector/tests/vector_dist_complex_prp_unit_test.cpp Vector/tests/vector_dist_HDF5_chckpnt_restart_test.cpp Vector/tests/vector_dist_MP_unit_tests.cpp Vector/tests/vector_dist_NN_tests.cpp Vector/tests/vector_dist_unit_test.cpp pdata_performance.cpp Decomposition/tests/CartDecomposition_unit_test.cpp Decomposition/tests/shift_vect_converter_tests.cpp Vector/performance/vector_dist_performance_util.cpp lib/pdata.cpp test_multiple_o.cpp ../openfpm_devices/src/memory/HeapMemory.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp pdata_CXXFLAGS = $(HDF5_CPPFLAGS) $(OPENMP_CFLAGS) $(AM_CXXFLAGS) $(LIBHILBERT_INCLUDE) $(PETSC_INCLUDE) $(CUDA_CFLAGS) $(INCLUDES_PATH) $(PARMETIS_INCLUDE) $(METIS_INCLUDE) $(BOOST_CPPFLAGS) $(H5PART_INCLUDE) -DPARALLEL_IO -Wno-unused-local-typedefs pdata_CFLAGS = $(CUDA_CFLAGS) pdata_LDADD = $(LINKLIBS) -lparmetis -lmetis diff --git a/src/Vector/performance/cell_list_comp_reorder.hpp b/src/Vector/performance/cell_list_comp_reorder.hpp index cf0cd10c6cfd1b53d8cb40344d780d575c2bdbea..010450a10d1b01abc7ec297fc60b811140f2300e 100644 --- a/src/Vector/performance/cell_list_comp_reorder.hpp +++ b/src/Vector/performance/cell_list_comp_reorder.hpp @@ -66,7 +66,7 @@ template<unsigned int dim> void cell_list_comp_reorder_random_benchmark(size_t c cl_time_create_rand_dev.resize(cl_r_cutoff.size()); std::string str("Testing " + std::to_string(dim) + "D vector, no order, cell-list"); - print_test_v(str); + print_test_v(str,0); { //For different r_cut @@ -105,7 +105,7 @@ template<unsigned int dim> void cell_list_comp_reorder_random_benchmark(size_t c for (size_t i = 0; i < dim; i++) bc[i] = PERIODIC; - vector_dist<dim,float, aggregate<float[dim]>, CartDecomposition<dim,float> > vd(k_int,box,bc,Ghost<dim,float>(r_cut)); + vector_dist<dim,float, aggregate<float[dim]> > vd(k_int,box,bc,Ghost<dim,float>(r_cut)); // Initialize a dist vector vd_initialize<dim>(vd, v_cl, k_int); @@ -165,7 +165,7 @@ template<unsigned int dim> void cell_list_comp_reorder_hilbert_benchmark(size_t cl_time_create_dev.resize(cl_r_cutoff.size()); std::string str("Testing " + std::to_string(dim) + "D vector, Hilbert comp reorder, cell list"); - print_test_v(str); + print_test_v(str,0); { //For different r_cut @@ -204,7 +204,7 @@ template<unsigned int dim> void cell_list_comp_reorder_hilbert_benchmark(size_t for (size_t i = 0; i < dim; i++) bc[i] = PERIODIC; - vector_dist<dim,float, aggregate<float[dim]>, CartDecomposition<dim,float> > vd(k_int,box,bc,Ghost<dim,float>(r_cut)); + vector_dist<dim,float, aggregate<float[dim]> > vd(k_int,box,bc,Ghost<dim,float>(r_cut)); // Initialize a dist vector vd_initialize<dim>(vd, v_cl, k_int); diff --git a/src/Vector/performance/cell_list_part_reorder.hpp b/src/Vector/performance/cell_list_part_reorder.hpp index 9828ede43ed341a3e1b1ec106d9deb2e4029d7d9..b9ccc904ae21d60212862b3061c9c27a0065f083 100644 --- a/src/Vector/performance/cell_list_part_reorder.hpp +++ b/src/Vector/performance/cell_list_part_reorder.hpp @@ -15,6 +15,7 @@ #include "cl_part_performance_graph.hpp" #include <functional> + BOOST_AUTO_TEST_SUITE( celllist_part_reorder_performance_test ) ///////////////////// INPUT DATA ////////////////////// @@ -66,7 +67,7 @@ template<unsigned int dim> void cell_list_part_reorder_random_benchmark(size_t c cl_time_rand_dev.resize(cl_r_cutoff.size()); std::string str("Testing " + std::to_string(dim) + "D vector, no-order, Cell-list"); - print_test_v(str); + print_test_v(str,0); { //For different r_cut @@ -105,7 +106,7 @@ template<unsigned int dim> void cell_list_part_reorder_random_benchmark(size_t c for (size_t i = 0; i < dim; i++) bc[i] = PERIODIC; - vector_dist<dim,float, aggregate<float[dim]>, CartDecomposition<dim,float> > vd(k_int,box,bc,Ghost<dim,float>(r_cut)); + vector_dist<dim,float, aggregate<float[dim]> > vd(k_int,box,bc,Ghost<dim,float>(r_cut)); // Initialize a dist vector vd_initialize<dim>(vd, v_cl, k_int); @@ -184,7 +185,7 @@ template<unsigned int dim> void cell_list_part_reorder_hilbert_benchmark(size_t // Print test std::string str("Testing " + std::to_string(dim) + "D vector, Hilbert curve reordering, Cell-List"); - print_test_v(str); + print_test_v(str,0); // For different r_cut for (size_t r = 0; r < cl_r_cutoff.size(); r++ ) @@ -221,7 +222,7 @@ template<unsigned int dim> void cell_list_part_reorder_hilbert_benchmark(size_t for (size_t i = 0; i < dim; i++) bc[i] = PERIODIC; - vector_dist<dim,float, aggregate<float[dim]>, CartDecomposition<dim,float> > vd(k_int,box,bc,Ghost<dim,float>(r_cut)); + vector_dist<dim,float, aggregate<float[dim]> > vd(k_int,box,bc,Ghost<dim,float>(r_cut)); // Initialize a dist vector vd_initialize<dim>(vd, v_cl, k_int); diff --git a/src/Vector/performance/verlet_performance_tests.hpp b/src/Vector/performance/verlet_performance_tests.hpp index 7e0ba43f75a72f8fa495ec99f9720a59648997a7..ec49a1649729f2c8c8c548ecb7056cd03026e23f 100644 --- a/src/Vector/performance/verlet_performance_tests.hpp +++ b/src/Vector/performance/verlet_performance_tests.hpp @@ -8,6 +8,18 @@ #ifndef SRC_VECTOR_VECTOR_DIST_VERLET_PERFORMANCE_TESTS_HPP_ #define SRC_VECTOR_VECTOR_DIST_VERLET_PERFORMANCE_TESTS_HPP_ +/*! \brief Print a string about the test + * + * \param test string to print + * \param sz size + * + */ +void print_test_v(std::string test, size_t sz) +{ + if (create_vcluster().getProcessUnitID() == 0) + std::cout << test << " " << sz << "\n"; +} + BOOST_AUTO_TEST_SUITE( verletlist_part_reorder_performance_test ) ///////////////////// INPUT DATA ////////////////////// @@ -55,7 +67,7 @@ template<unsigned int dim> void vd_verlet_random_benchmark(size_t k_start, time_create_dev.resize(r_cutoff.size()); std::string str("Testing " + std::to_string(dim) + "D vector no-order, Verlet-list"); - print_test_v(str); + print_test_v(str,0); { //For different r_cut @@ -92,7 +104,7 @@ template<unsigned int dim> void vd_verlet_random_benchmark(size_t k_start, for (size_t i = 0; i < dim; i++) bc[i] = PERIODIC; - vector_dist<dim,float, aggregate<float[dim]>, CartDecomposition<dim,float> > vd(k_int,box,bc,Ghost<dim,float>(r_cut)); + vector_dist<dim,float, aggregate<float[dim]> > vd(k_int,box,bc,Ghost<dim,float>(r_cut)); // Initialize a dist vector vd_initialize<dim>(vd, v_cl, k_int); @@ -158,7 +170,7 @@ template<unsigned int dim> void vd_verlet_hilbert_benchmark(size_t k_start, size } std::string str("Testing " + std::to_string(dim) + "D vector, Hilbert curve reordering, Verlet-list"); - print_test_v(str); + print_test_v(str,0); // For different r_cut for (size_t r = 0; r < r_cutoff.size(); r++ ) diff --git a/src/pdata_performance.cpp b/src/pdata_performance.cpp index 1077f059c3d70f4334e20b84f19fa84e5e0fd46e..92c6bce0aaf65d10ddf7ce6d604ef9974a63c554 100644 --- a/src/pdata_performance.cpp +++ b/src/pdata_performance.cpp @@ -31,9 +31,11 @@ boost::property_tree::ptree pt; #ifdef PERFORMANCE_TEST +#include "Vector/performance/vector_dist_performance_util.hpp" + BOOST_AUTO_TEST_SUITE( performance ) -#include "Vector/performance/vector_dist_performance_util.hpp" + #include "Vector/performance/verlet_performance_tests.hpp" #include "Vector/performance/cell_list_part_reorder.hpp" #include "Vector/performance/cell_list_comp_reorder.hpp"