Skip to content
Snippets Groups Projects
Commit 46b89dbc authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Fixing performance test

parent 48918e57
No related branches found
No related tags found
No related merge requests found
......@@ -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.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
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
......@@ -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.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_ */
......@@ -10,9 +10,33 @@
#include "VCluster/VCluster.hpp"
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); }
~ut_start() { BOOST_TEST_MESSAGE("Delete global VClster"); openfpm_finalize(); }
const char * test_dir;
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();
}
};
//____________________________________________________________________________//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment