51 #ifdef HAVE_TEUCHOSCORE_KOKKOSCORE
56 # include <type_traits>
57 #endif // HAVE_TEUCHOSCORE_KOKKOSCORE
74 int globalSumSuccessInt = -1;
75 int localSuccessInt = (success ? 0 : 1);
76 MPI_Allreduce(&localSuccessInt, &globalSumSuccessInt, 1,
77 MPI_INT, MPI_SUM, MPI_COMM_WORLD);
87 ECHO(::MPI_Comm_size(MPI_COMM_WORLD, &numProcs));
90 ECHO(::MPI_Comm_rank(MPI_COMM_WORLD, &procRank));
103 out <<
"*** Just make sure the basic barrier does not hang or something.\n";
130 for (
int k = 0; k < numProcs; ++k) {
131 allInts_expected[k] = k+1;
140 #ifdef HAVE_TEUCHOSCORE_KOKKOSCORE
149 auto argvCopy = GlobalMPISession::getArgv ();
150 const auto numArgs = argvCopy.size ();
151 static_assert (std::is_integral<std::decay<decltype (numArgs)>::type>::value,
152 "The return type of getArgv has a size() method, "
153 "but it does not return an integer.");
156 const auto arg0 = argvCopy[0];
157 static_assert (std::is_convertible<std::decay<decltype (arg0)>::type,
159 "The return type of getArgv must have an operator[](int) "
160 "that returns a type convertible to std::string.");
163 #endif // HAVE_TEUCHOSCORE_KOKKOSCORE