diff --git a/packages/panzer/adapters-stk/example/CurlLaplacianExample/main.cpp b/packages/panzer/adapters-stk/example/CurlLaplacianExample/main.cpp index 4e31243504ad..1e0f4c1b5de8 100644 --- a/packages/panzer/adapters-stk/example/CurlLaplacianExample/main.cpp +++ b/packages/panzer/adapters-stk/example/CurlLaplacianExample/main.cpp @@ -159,9 +159,8 @@ int main(int argc,char * argv[]) using panzer::StrPureBasisPair; using panzer::StrPureBasisComp; - Kokkos::initialize(argc,argv); - Teuchos::GlobalMPISession mpiSession(&argc,&argv); + Kokkos::initialize(argc,argv); RCP Comm = Teuchos::rcp(new Epetra_MpiComm(MPI_COMM_WORLD)); Teuchos::RCP > comm = Teuchos::rcp(new Teuchos::MpiComm(MPI_COMM_WORLD)); Teuchos::FancyOStream out(Teuchos::rcpFromRef(std::cout)); diff --git a/packages/panzer/adapters-stk/example/MixedCurlLaplacianExample/main.cpp b/packages/panzer/adapters-stk/example/MixedCurlLaplacianExample/main.cpp index a622c6787d81..357b2c55d956 100644 --- a/packages/panzer/adapters-stk/example/MixedCurlLaplacianExample/main.cpp +++ b/packages/panzer/adapters-stk/example/MixedCurlLaplacianExample/main.cpp @@ -160,9 +160,8 @@ int main(int argc,char * argv[]) using panzer::StrPureBasisPair; using panzer::StrPureBasisComp; - Kokkos::initialize(argc,argv); - Teuchos::GlobalMPISession mpiSession(&argc,&argv); + Kokkos::initialize(argc,argv); RCP Comm = Teuchos::rcp(new Epetra_MpiComm(MPI_COMM_WORLD)); Teuchos::RCP > comm = Teuchos::rcp(new Teuchos::MpiComm(MPI_COMM_WORLD)); Teuchos::FancyOStream out(Teuchos::rcpFromRef(std::cout)); diff --git a/packages/panzer/adapters-stk/example/MixedPoissonExample/main.cpp b/packages/panzer/adapters-stk/example/MixedPoissonExample/main.cpp index 353f194dc6eb..32490fcabed8 100644 --- a/packages/panzer/adapters-stk/example/MixedPoissonExample/main.cpp +++ b/packages/panzer/adapters-stk/example/MixedPoissonExample/main.cpp @@ -119,8 +119,6 @@ int main(int argc,char * argv[]) using panzer::StrPureBasisPair; using panzer::StrPureBasisComp; - Kokkos::initialize(argc,argv); - //panzer::HP::inst().overrideSizes(1,1,1); { @@ -130,6 +128,7 @@ int main(int argc,char * argv[]) Teuchos::GlobalMPISession mpiSession(&argc,&argv); + Kokkos::initialize(argc,argv); RCP Comm = Teuchos::rcp(new Epetra_MpiComm(MPI_COMM_WORLD)); Teuchos::RCP > comm = Teuchos::rcp(new Teuchos::MpiComm(MPI_COMM_WORLD)); Teuchos::FancyOStream out(Teuchos::rcpFromRef(std::cout)); diff --git a/packages/panzer/adapters-stk/example/ModelEvaluator/main_driver.cpp b/packages/panzer/adapters-stk/example/ModelEvaluator/main_driver.cpp index 2dfa6f353e94..8c00720a3952 100644 --- a/packages/panzer/adapters-stk/example/ModelEvaluator/main_driver.cpp +++ b/packages/panzer/adapters-stk/example/ModelEvaluator/main_driver.cpp @@ -108,12 +108,11 @@ int main(int argc, char *argv[]) using Teuchos::rcp; using Teuchos::rcp_dynamic_cast; - Kokkos::initialize(argc,argv); - int status = 0; Teuchos::oblackholestream blackhole; Teuchos::GlobalMPISession mpiSession(&argc, &argv, &blackhole); + Kokkos::initialize(argc,argv); Teuchos::RCP out = Teuchos::rcp(new Teuchos::FancyOStream(Teuchos::rcp(&std::cout,false))); Teuchos::RCP pout = Teuchos::rcp(new Teuchos::FancyOStream(Teuchos::rcp(&std::cout,false))); diff --git a/packages/panzer/adapters-stk/example/PoissonExample/main.cpp b/packages/panzer/adapters-stk/example/PoissonExample/main.cpp index 1b4c7793e842..f0678f48af8a 100644 --- a/packages/panzer/adapters-stk/example/PoissonExample/main.cpp +++ b/packages/panzer/adapters-stk/example/PoissonExample/main.cpp @@ -103,9 +103,8 @@ int main(int argc,char * argv[]) using panzer::StrPureBasisPair; using panzer::StrPureBasisComp; - Kokkos::initialize(argc,argv); - Teuchos::GlobalMPISession mpiSession(&argc,&argv); + Kokkos::initialize(argc,argv); RCP > tComm = Teuchos::rcp(new Teuchos::MpiComm(MPI_COMM_WORLD)); Teuchos::FancyOStream out(Teuchos::rcpFromRef(std::cout)); out.setOutputToRootOnly(0); diff --git a/packages/panzer/adapters-stk/example/PoissonInterfaceExample/main.cpp b/packages/panzer/adapters-stk/example/PoissonInterfaceExample/main.cpp index 20aff33171fc..dd29f68ea5c5 100644 --- a/packages/panzer/adapters-stk/example/PoissonInterfaceExample/main.cpp +++ b/packages/panzer/adapters-stk/example/PoissonInterfaceExample/main.cpp @@ -384,12 +384,11 @@ int main (int argc, char* argv[]) using panzer::StrPureBasisPair; using panzer::StrPureBasisComp; - Kokkos::initialize(argc,argv); - int status = 0; try { Teuchos::GlobalMPISession mpiSession(&argc, &argv); + Kokkos::initialize(argc,argv); RCP > tComm = Teuchos::rcp(new Teuchos::MpiComm(MPI_COMM_WORLD)); Teuchos::FancyOStream out(Teuchos::rcpFromRef(std::cout)); out.setOutputToRootOnly(0); diff --git a/packages/panzer/adapters-stk/example/PoissonInterfaceTpetra/main.cpp b/packages/panzer/adapters-stk/example/PoissonInterfaceTpetra/main.cpp index dac42f02fcab..b6924c2e87e6 100644 --- a/packages/panzer/adapters-stk/example/PoissonInterfaceTpetra/main.cpp +++ b/packages/panzer/adapters-stk/example/PoissonInterfaceTpetra/main.cpp @@ -457,12 +457,11 @@ int main (int argc, char* argv[]) using panzer::StrPureBasisPair; using panzer::StrPureBasisComp; - Kokkos::initialize(argc,argv); - int status = 0; try { Teuchos::GlobalMPISession mpiSession(&argc, &argv); + Kokkos::initialize(argc,argv); RCP > tComm = Teuchos::rcp(new Teuchos::MpiComm(MPI_COMM_WORLD)); Teuchos::FancyOStream out(Teuchos::rcpFromRef(std::cout)); out.setOutputToRootOnly(0); diff --git a/packages/panzer/adapters-stk/example/main_driver/main_driver.cpp b/packages/panzer/adapters-stk/example/main_driver/main_driver.cpp index e132bf5a93b4..317add1bcd88 100644 --- a/packages/panzer/adapters-stk/example/main_driver/main_driver.cpp +++ b/packages/panzer/adapters-stk/example/main_driver/main_driver.cpp @@ -80,12 +80,11 @@ int main(int argc, char *argv[]) { - Kokkos::initialize(argc,argv); - int status = 0; Teuchos::oblackholestream blackhole; Teuchos::GlobalMPISession mpiSession(&argc, &argv, &blackhole); + Kokkos::initialize(argc,argv); Teuchos::RCP out = Teuchos::rcp(new Teuchos::FancyOStream(Teuchos::rcp(&std::cout,false))); Teuchos::RCP pout = Teuchos::rcp(new Teuchos::FancyOStream(Teuchos::rcp(&std::cout,false))); diff --git a/packages/panzer/adapters-stk/tutorial/siamCse17/main.cpp b/packages/panzer/adapters-stk/tutorial/siamCse17/main.cpp index 8de87d28c865..895e14855914 100644 --- a/packages/panzer/adapters-stk/tutorial/siamCse17/main.cpp +++ b/packages/panzer/adapters-stk/tutorial/siamCse17/main.cpp @@ -228,9 +228,9 @@ main( int status(0); // Initialize Kokkos/MPI. - Kokkos::initialize(argc, argv); oblackholestream blackhole; GlobalMPISession mpiSession(&argc, &argv, &blackhole); + Kokkos::initialize(argc, argv); // Set up the fancy output stream. RCP out = rcp(new FancyOStream(rcp(&cout, false))); diff --git a/packages/panzer/adapters-stk/tutorial/step01/main.cpp b/packages/panzer/adapters-stk/tutorial/step01/main.cpp index 1925fbddb2bd..67a160772661 100644 --- a/packages/panzer/adapters-stk/tutorial/step01/main.cpp +++ b/packages/panzer/adapters-stk/tutorial/step01/main.cpp @@ -107,12 +107,11 @@ int main(int argc, char *argv[]) using Teuchos::rcp; using Teuchos::rcp_dynamic_cast; - Kokkos::initialize(argc,argv); - int status = 0; Teuchos::oblackholestream blackhole; Teuchos::GlobalMPISession mpiSession(&argc, &argv, &blackhole); + Kokkos::initialize(argc,argv); Teuchos::RCP out = Teuchos::rcp(new Teuchos::FancyOStream(Teuchos::rcp(&std::cout,false))); Teuchos::RCP pout = Teuchos::rcp(new Teuchos::FancyOStream(Teuchos::rcp(&std::cout,false)));