Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panzer: Kokkos::initialize after Teuchos::GlobalMPISession #7942

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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<Epetra_Comm> Comm = Teuchos::rcp(new Epetra_MpiComm(MPI_COMM_WORLD));
Teuchos::RCP<const Teuchos::MpiComm<int> > comm = Teuchos::rcp(new Teuchos::MpiComm<int>(MPI_COMM_WORLD));
Teuchos::FancyOStream out(Teuchos::rcpFromRef(std::cout));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Epetra_Comm> Comm = Teuchos::rcp(new Epetra_MpiComm(MPI_COMM_WORLD));
Teuchos::RCP<const Teuchos::MpiComm<int> > comm = Teuchos::rcp(new Teuchos::MpiComm<int>(MPI_COMM_WORLD));
Teuchos::FancyOStream out(Teuchos::rcpFromRef(std::cout));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

{
Expand All @@ -130,6 +128,7 @@ int main(int argc,char * argv[])


Teuchos::GlobalMPISession mpiSession(&argc,&argv);
Kokkos::initialize(argc,argv);
RCP<Epetra_Comm> Comm = Teuchos::rcp(new Epetra_MpiComm(MPI_COMM_WORLD));
Teuchos::RCP<const Teuchos::MpiComm<int> > comm = Teuchos::rcp(new Teuchos::MpiComm<int>(MPI_COMM_WORLD));
Teuchos::FancyOStream out(Teuchos::rcpFromRef(std::cout));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Teuchos::FancyOStream> out = Teuchos::rcp(new Teuchos::FancyOStream(Teuchos::rcp(&std::cout,false)));
Teuchos::RCP<Teuchos::FancyOStream> pout = Teuchos::rcp(new Teuchos::FancyOStream(Teuchos::rcp(&std::cout,false)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<const Teuchos::MpiComm<int> > tComm = Teuchos::rcp(new Teuchos::MpiComm<int>(MPI_COMM_WORLD));
Teuchos::FancyOStream out(Teuchos::rcpFromRef(std::cout));
out.setOutputToRootOnly(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<const Teuchos::MpiComm<int> > tComm = Teuchos::rcp(new Teuchos::MpiComm<int>(MPI_COMM_WORLD));
Teuchos::FancyOStream out(Teuchos::rcpFromRef(std::cout));
out.setOutputToRootOnly(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<const Teuchos::MpiComm<int> > tComm = Teuchos::rcp(new Teuchos::MpiComm<int>(MPI_COMM_WORLD));
Teuchos::FancyOStream out(Teuchos::rcpFromRef(std::cout));
out.setOutputToRootOnly(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Teuchos::FancyOStream> out = Teuchos::rcp(new Teuchos::FancyOStream(Teuchos::rcp(&std::cout,false)));
Teuchos::RCP<Teuchos::FancyOStream> pout = Teuchos::rcp(new Teuchos::FancyOStream(Teuchos::rcp(&std::cout,false)));
Expand Down
2 changes: 1 addition & 1 deletion packages/panzer/adapters-stk/tutorial/siamCse17/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<FancyOStream> out = rcp(new FancyOStream(rcp(&cout, false)));
Expand Down
3 changes: 1 addition & 2 deletions packages/panzer/adapters-stk/tutorial/step01/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Teuchos::FancyOStream> out = Teuchos::rcp(new Teuchos::FancyOStream(Teuchos::rcp(&std::cout,false)));
Teuchos::RCP<Teuchos::FancyOStream> pout = Teuchos::rcp(new Teuchos::FancyOStream(Teuchos::rcp(&std::cout,false)));
Expand Down