We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20ac119 commit 5960a3fCopy full SHA for 5960a3f
lib/benchmark_1.5.1/googletest/googletest/src/gtest_main.cc
@@ -29,6 +29,7 @@
29
30
#include <cstdio>
31
#include "gtest/gtest.h"
32
+#include <stan/math/prim/functor/mpi_cluster.hpp>
33
34
#if GTEST_OS_ESP8266 || GTEST_OS_ESP32
35
#if GTEST_OS_ESP8266
@@ -47,6 +48,16 @@ void loop() { RUN_ALL_TESTS(); }
47
48
#else
49
50
GTEST_API_ int main(int argc, char **argv) {
51
+
52
+#ifdef STAN_MPI
53
+ // for MPI testing we test with all workers in listen mode.
54
+ // No output is generated from the workers.
55
+ stan::math::mpi_cluster cluster;
56
+ cluster.listen();
57
+ if (cluster.rank_ != 0)
58
+ return 0;
59
+#endif
60
61
printf("Running main() from %s\n", __FILE__);
62
testing::InitGoogleTest(&argc, argv);
63
return RUN_ALL_TESTS();
0 commit comments