Commit 136c00ea authored by Pietro Incardona's avatar Pietro Incardona

Small changes on VCluster

parent 2ca8f85c
...@@ -6,4 +6,4 @@ Vcluster * global_v_cluster = NULL; ...@@ -6,4 +6,4 @@ Vcluster * global_v_cluster = NULL;
bool global_mpi_init = false; bool global_mpi_init = false;
// number of vcluster instances // number of vcluster instances
//size_t n_vcluster = 0; size_t n_vcluster = 0;
...@@ -144,11 +144,14 @@ public: ...@@ -144,11 +144,14 @@ public:
#ifdef SE_CLASS2 #ifdef SE_CLASS2
check_delete(this); check_delete(this);
#endif #endif
// n_vcluster--; n_vcluster--;
// if there are no other vcluster instances finalize // if there are no other vcluster instances finalize
// if (n_vcluster == 0) if (n_vcluster == 0)
{
std::cout << "Finalize\n";
MPI_Finalize(); MPI_Finalize();
}
} }
//! \brief Virtual cluster constructor //! \brief Virtual cluster constructor
...@@ -159,7 +162,7 @@ public: ...@@ -159,7 +162,7 @@ public:
check_new(this,8,VCLUSTER_EVENT,PRJ_VCLUSTER); check_new(this,8,VCLUSTER_EVENT,PRJ_VCLUSTER);
#endif #endif
// n_vcluster++; n_vcluster++;
// Check if MPI is already initialized // Check if MPI is already initialized
if (global_mpi_init == false) if (global_mpi_init == false)
......
...@@ -11,9 +11,11 @@ ...@@ -11,9 +11,11 @@
#include "VCluster.hpp" #include "VCluster.hpp"
struct ut_start { 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);std::cout << "Init\n";} 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"); ~ut_start() { BOOST_TEST_MESSAGE("Delete global VClster");
std::cout << "Finalize\n";
delete_global_v_cluster(); } 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