Skip to content
Snippets Groups Projects
Commit a262e2e7 authored by Tom Fischer's avatar Tom Fischer
Browse files

Use mpi routines only if mpi is initialized.

parent 752a92ff
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include "NumLib/NumericsConfig.h" #include "NumLib/NumericsConfig.h"
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
// Parse CLI arguments. // Parse CLI arguments.
...@@ -123,7 +122,6 @@ int main(int argc, char *argv[]) ...@@ -123,7 +122,6 @@ int main(int argc, char *argv[])
#endif // _WIN32 #endif // _WIN32
BaseLib::RunTime run_time; BaseLib::RunTime run_time;
run_time.start();
{ {
auto const start_time = std::chrono::system_clock::now(); auto const start_time = std::chrono::system_clock::now();
...@@ -145,6 +143,8 @@ int main(int argc, char *argv[]) ...@@ -145,6 +143,8 @@ int main(int argc, char *argv[])
controller->Initialize(&argc, &argv, 1); controller->Initialize(&argc, &argv, 1);
vtkMPIController::SetGlobalController(controller); vtkMPIController::SetGlobalController(controller);
#endif #endif
run_time.start();
auto project_config = BaseLib::makeConfigTree( auto project_config = BaseLib::makeConfigTree(
project_arg.getValue(), !nonfatal_arg.getValue(), project_arg.getValue(), !nonfatal_arg.getValue(),
"OpenGeoSysProject"); "OpenGeoSysProject");
...@@ -189,6 +189,8 @@ int main(int argc, char *argv[]) ...@@ -189,6 +189,8 @@ int main(int argc, char *argv[])
if (isInsituConfigured) if (isInsituConfigured)
InSituLib::Finalize(); InSituLib::Finalize();
#endif #endif
INFO("[time] Execution took %g s.", run_time.elapsed());
#if defined(USE_PETSC) #if defined(USE_PETSC)
controller->Finalize(1) ; controller->Finalize(1) ;
#endif #endif
...@@ -210,7 +212,5 @@ int main(int argc, char *argv[]) ...@@ -210,7 +212,5 @@ int main(int argc, char *argv[])
INFO("OGS terminated on %s.", time_str.c_str()); INFO("OGS terminated on %s.", time_str.c_str());
} }
INFO("[time] Execution took %g s.", run_time.elapsed());
return ogs_status; return ogs_status;
} }
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