Commit 46b89dbc authored by incardon's avatar incardon
Browse files

Fixing performance test

parent 48918e57
...@@ -1136,7 +1136,8 @@ template<unsigned int dim> void vd_verlet_performance_write_report(openfpm::vect ...@@ -1136,7 +1136,8 @@ template<unsigned int dim> void vd_verlet_performance_write_report(openfpm::vect
cg.AddLinesGraph(x,y2.get(i),yn2,options2); cg.AddLinesGraph(x,y2.get(i),yn2,options2);
} }
cg.write("Vect_dist_verlet_perf_" + std::to_string(dim) + "D.html"); // Get the directory of the performance test files
cg.write(std::string(test_dir) + "/openfpm_pdata/Vect_dist_verlet_perf_" + std::to_string(dim) + "D.html");
} }
...@@ -1299,7 +1300,7 @@ template<unsigned int dim> void vd_cl_performance_write_report(size_t n_moving,o ...@@ -1299,7 +1300,7 @@ template<unsigned int dim> void vd_cl_performance_write_report(size_t n_moving,o
cg.AddLinesGraph(x3,y3.get(k).get(cl_r_cutoff.size()-1),yn3,options3); cg.AddLinesGraph(x3,y3.get(k).get(cl_r_cutoff.size()-1),yn3,options3);
} }
cg.write("Vect_dist_cl_perf_" + std::to_string(dim) + "D.html"); cg.write(std::string(test_dir) + "/openfpm_pdata/Vect_dist_cl_perf_" + std::to_string(dim) + "D.html");
} }
/*! \brief Function for cell list hilb performance report /*! \brief Function for cell list hilb performance report
...@@ -1393,7 +1394,7 @@ template<unsigned int dim> void vd_celllist_performance_write_report(openfpm::ve ...@@ -1393,7 +1394,7 @@ template<unsigned int dim> void vd_celllist_performance_write_report(openfpm::ve
cg.AddLinesGraph(x,y2.get(i),yn2,options2); cg.AddLinesGraph(x,y2.get(i),yn2,options2);
} }
cg.write("Vect_dist_cl_hilb_perf_" + std::to_string(dim) + "D.html"); cg.write(std::string(test_dir) + "/openfpm_pdata/Vect_dist_cl_hilb_perf_" + std::to_string(dim) + "D.html");
} }
#endif /* SRC_VECTOR_VECTOR_DIST_PERFORMANCE_UTIL_HPP_ */ #endif /* SRC_VECTOR_VECTOR_DIST_PERFORMANCE_UTIL_HPP_ */
...@@ -10,9 +10,33 @@ ...@@ -10,9 +10,33 @@
#include "VCluster/VCluster.hpp" #include "VCluster/VCluster.hpp"
struct ut_start { const char * test_dir;
ut_start() { BOOST_TEST_MESSAGE("Initialize global VCluster"); openfpm_init(&boost::unit_test::framework::master_test_suite().argc,&boost::unit_test::framework::master_test_suite().argv); }
~ut_start() { BOOST_TEST_MESSAGE("Delete global VClster"); openfpm_finalize(); } struct ut_start
{
//!
ut_start()
{
BOOST_TEST_MESSAGE("Initialize global VCluster");
openfpm_init(&boost::unit_test::framework::master_test_suite().argc,&boost::unit_test::framework::master_test_suite().argv);
#ifdef PERFORMANCE_TEST
test_dir = getenv("OPENFPM_PERFORMANCE_TEST_DIR");
if (test_dir == NULL)
{
std::cerr << "Error: " __FILE__ << ":" << __LINE__ << " in order to run the performance test you must set the environment variable $OPENFPM_PERFORMANCE_TEST_DIR to the test or an empty directory";
exit(1);
}
#endif
}
~ut_start()
{
BOOST_TEST_MESSAGE("Delete global VClster");
openfpm_finalize();
}
}; };
//____________________________________________________________________________// //____________________________________________________________________________//
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment