diff --git a/programs/Hadrons/Application.cc b/programs/Hadrons/Application.cc index c8c44adc..5eb43363 100644 --- a/programs/Hadrons/Application.cc +++ b/programs/Hadrons/Application.cc @@ -42,10 +42,7 @@ Application::Application(const std::string parameterFileName) // destructor ////////////////////////////////////////////////////////////////// Application::~Application(void) -{ - LOG(Message) << "Grid is finalizing now" << std::endl; - Grid_finalize(); -} +{} // execute ///////////////////////////////////////////////////////////////////// void Application::run(void) diff --git a/programs/Hadrons/Global.cc b/programs/Hadrons/Global.cc index a560d71f..a8d8f22b 100644 --- a/programs/Hadrons/Global.cc +++ b/programs/Hadrons/Global.cc @@ -26,5 +26,3 @@ HadronsLogger Hadrons::HadronsLogError(1,"Error"); HadronsLogger Hadrons::HadronsLogWarning(1,"Warning"); HadronsLogger Hadrons::HadronsLogMessage(1,"Message"); HadronsLogger Hadrons::HadronsLogDebug(1,"Debug"); - - diff --git a/programs/Hadrons/Hadrons.cc b/programs/Hadrons/Hadrons.cc index 853de83c..d53ca497 100644 --- a/programs/Hadrons/Hadrons.cc +++ b/programs/Hadrons/Hadrons.cc @@ -33,6 +33,8 @@ int main(int argc, char *argv[]) std::exit(EXIT_FAILURE); } parameterFileName = argv[1]; + + // initialization Grid_init(&argc, &argv); HadronsLogError.Active(GridLogError.isActive()); HadronsLogWarning.Active(GridLogWarning.isActive()); @@ -45,5 +47,9 @@ int main(int argc, char *argv[]) application.run(); + // epilogue + LOG(Message) << "Grid is finalizing now" << std::endl; + Grid_finalize(); + return EXIT_SUCCESS; }