42 #include <Tpetra_ConfigDefs.hpp> 49 #ifdef HAVE_TPETRA_MPI 50 # include <Tpetra_MpiPlatform.hpp> 56 comm_ (
Teuchos::createMpiComm<int> (
Teuchos::opaqueWrapper<MPI_Comm> (MPI_COMM_WORLD))),
67 MpiPlatform<Tpetra::Details::DefaultTypes::node_type>::
68 MpiPlatform (
int* argc,
char*** argv) :
82 MpiPlatform<Tpetra::Details::DefaultTypes::node_type>::
83 MpiPlatform (
const Teuchos::RCP<NodeType>& node) :
84 comm_ (
Teuchos::createMpiComm<int> (
Teuchos::opaqueWrapper<MPI_Comm> (MPI_COMM_WORLD))),
99 MpiPlatform<Tpetra::Details::DefaultTypes::node_type>::
100 MpiPlatform (
int* argc,
char*** argv,
const Teuchos::RCP<NodeType>& node) :
114 MpiPlatform<Tpetra::Details::DefaultTypes::node_type>::
115 MpiPlatform (
const Teuchos::RCP<NodeType>& node,
116 const Teuchos::RCP<
const Teuchos::OpaqueWrapper<MPI_Comm> >& rawMpiComm)
120 TEUCHOS_TEST_FOR_EXCEPTION(
121 rawMpiComm.is_null (), std::invalid_argument,
"Tpetra::MpiPlatform " 122 "constructor: The input RCP<OpaqueWrapper<MPI_Comm> > is null. That " 123 "means something different than MPI_COMM_NULL. If you want to give " 124 "MPI_COMM_NULL to this constructor, please wrap MPI_COMM_NULL in a " 125 "nonnull Teuchos::OpaqueWrapper by using the " 126 "Teuchos::opaqueWrapper<MPI_Comm>() nonmember constructor.");
127 comm_ = Teuchos::createMpiComm<int> (rawMpiComm);
136 MpiPlatform<Tpetra::Details::DefaultTypes::node_type>::
137 MpiPlatform (
int* argc,
139 const Teuchos::RCP<NodeType>& node,
140 const Teuchos::RCP<
const Teuchos::OpaqueWrapper<MPI_Comm> >& rawMpiComm)
144 TEUCHOS_TEST_FOR_EXCEPTION(
145 rawMpiComm.is_null (), std::invalid_argument,
"Tpetra::MpiPlatform " 146 "constructor: The input RCP<OpaqueWrapper<MPI_Comm> > is null. That " 147 "means something different than MPI_COMM_NULL. If you want to give " 148 "MPI_COMM_NULL to this constructor, please wrap MPI_COMM_NULL in a " 149 "nonnull Teuchos::OpaqueWrapper by using the " 150 "Teuchos::opaqueWrapper<MPI_Comm>() nonmember constructor.");
151 comm_ = Teuchos::createMpiComm<int> (rawMpiComm);
171 MpiPlatform<Tpetra::Details::DefaultTypes::node_type>::
172 MpiPlatform (
const Teuchos::RCP<NodeType>& node, MPI_Comm rawMpiComm)
173 : comm_ (
Teuchos::createMpiComm<int> (
Teuchos::opaqueWrapper<MPI_Comm> (rawMpiComm))),
183 MpiPlatform<Tpetra::Details::DefaultTypes::node_type>::
184 MpiPlatform (
int* argc,
186 const Teuchos::RCP<NodeType>& node,
201 MpiPlatform<Tpetra::Details::DefaultTypes::node_type>::
204 Teuchos::RCP<const Teuchos::Comm<int> >
205 MpiPlatform<Tpetra::Details::DefaultTypes::node_type>::
207 TEUCHOS_TEST_FOR_EXCEPTION(
208 comm_.is_null (), std::logic_error,
"Tpetra::MpiPlatform::getComm: " 209 "The default communicator is null. This should never happen. " 210 "Please report this bug to the Tpetra developers.");
214 Teuchos::RCP<MpiPlatform<Tpetra::Details::DefaultTypes::node_type>::NodeType>
215 MpiPlatform<Tpetra::Details::DefaultTypes::node_type>::
218 typedef MpiPlatform<NodeType> this_type;
219 if (node_.is_null ()) {
232 const_cast<this_type*
> (
this)->node_ =
233 KokkosClassic::DefaultNode::getDefaultNode ();
234 TEUCHOS_TEST_FOR_EXCEPTION(
235 node_.is_null (), std::logic_error,
"Tpetra::MpiPlatform::getNode: " 236 "KokkosClassic::DefaultNode::getDefaultNode() returned null. " 237 "This should never happen. " 238 "Please report this bug to the Tpetra developers.");
245 #endif // HAVE_TPETRA_MPI void initialize(int *argc, char ***argv)
Initialize Tpetra.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
Teuchos::RCP< const Teuchos::Comm< int > > getDefaultComm()
Get Tpetra's default communicator.