24int main(
int narg,
char **arg)
26 Tpetra::ScopeGuard tscope(&narg, &arg);
27 Teuchos::RCP<const Teuchos::Comm<int> > tcomm = Tpetra::getDefaultComm();
28 Teuchos::RCP<const Epetra_Comm> ecomm = Xpetra::toEpetra(tcomm);
30 const int nGlobRows = 50;
31 const Epetra_Map emap(nGlobRows, 0, *ecomm);
32 Teuchos::RCP<const Epetra_BlockMap> ebmap = Teuchos::rcpFromRef(emap);
34 typedef Xpetra::EpetraMapT<int, Tpetra::Map<>::node_type> xemap_t;
35 Teuchos::RCP<const xemap_t> xmap(
new xemap_t(ebmap));
37 const Teuchos::RCP<const Teuchos::Comm<int> > &xcomm = xmap->getComm();
39 std::cout <<
"Teuchos: Hello from "
40 << tcomm->getRank() <<
" of "
41 << tcomm->getSize() << std::endl;
42 std::cout <<
"Epetra: Hello from "
43 << ecomm->MyPID() <<
" of "
44 << ecomm->NumProc() << std::endl;
45 std::cout <<
"Xpetra: Hello from "
46 << xcomm->getRank() <<
" of "
47 << xcomm->getSize() << std::endl;