Commit 2ca8f85c authored by Pietro Incardona's avatar Pietro Incardona

Finalize mooved

parent 10e84f95
......@@ -6,4 +6,4 @@ Vcluster * global_v_cluster = NULL;
bool global_mpi_init = false;
// number of vcluster instances
size_t n_vcluster = 0;
//size_t n_vcluster = 0;
......@@ -144,10 +144,10 @@ public:
#ifdef SE_CLASS2
check_delete(this);
#endif
n_vcluster--;
// n_vcluster--;
// if there are no other vcluster instances finalize
if (n_vcluster == 0)
// if (n_vcluster == 0)
MPI_Finalize();
}
......@@ -159,7 +159,7 @@ public:
check_new(this,8,VCLUSTER_EVENT,PRJ_VCLUSTER);
#endif
n_vcluster++;
// n_vcluster++;
// Check if MPI is already initialized
if (global_mpi_init == false)
......
......@@ -11,8 +11,10 @@
#include "VCluster.hpp"
struct ut_start {
ut_start() { BOOST_TEST_MESSAGE("Initialize global VCluster"); init_global_v_cluster(&boost::unit_test::framework::master_test_suite().argc,&boost::unit_test::framework::master_test_suite().argv); }
~ut_start() { BOOST_TEST_MESSAGE("Delete global VClster");std::cout << "Finalize\n";delete_global_v_cluster(); }
ut_start() { BOOST_TEST_MESSAGE("Initialize global VCluster"); init_global_v_cluster(&boost::unit_test::framework::master_test_suite().argc,&boost::unit_test::framework::master_test_suite().argv);std::cout << "Init\n";}
~ut_start() { BOOST_TEST_MESSAGE("Delete global VClster");
std::cout << "Finalize\n";
delete_global_v_cluster(); }
};
//____________________________________________________________________________//
......
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