[MOAB-dev] r5141 - MOAB/trunk/test/obb

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Tue Aug 30 16:30:00 CDT 2011


Author: kraftche
Date: 2011-08-30 16:30:00 -0500 (Tue, 30 Aug 2011)
New Revision: 5141

Modified:
   MOAB/trunk/test/obb/Makefile.am
   MOAB/trunk/test/obb/obb_test.cpp
Log:
yet another test that needs to call MPI_Init and MPI_Finalize even though it doesn't do anything parallel

Modified: MOAB/trunk/test/obb/Makefile.am
===================================================================
--- MOAB/trunk/test/obb/Makefile.am	2011-08-30 18:14:08 UTC (rev 5140)
+++ MOAB/trunk/test/obb/Makefile.am	2011-08-30 21:30:00 UTC (rev 5141)
@@ -5,7 +5,8 @@
 
 AM_CPPFLAGS += -DSRCDIR=$(srcdir) \
                -DMESHDIR=$(MESHDIR) \
-               -I$(top_srcdir)/src -I$(top_builddir)/src -I.. 
+               -I$(top_srcdir)/src -I$(top_builddir)/src -I.. \
+               -I$(top_srcdir)/src/parallel -I$(top_builddir)/src/parallel
 
 LDADD = $(top_builddir)/src/libMOAB.la
 

Modified: MOAB/trunk/test/obb/obb_test.cpp
===================================================================
--- MOAB/trunk/test/obb/obb_test.cpp	2011-08-30 18:14:08 UTC (rev 5140)
+++ MOAB/trunk/test/obb/obb_test.cpp	2011-08-30 21:30:00 UTC (rev 5141)
@@ -6,6 +6,10 @@
 #include "moab/GeomUtil.hpp"
 #include "moab/CN.hpp"
 
+#ifdef USE_MPI
+#include "moab_mpi.h"
+#endif
+
 #include <iostream>
 #include <sstream>
 #include <stdlib.h>
@@ -119,6 +123,11 @@
 
 int main( int argc, char* argv[] )
 {
+#ifdef USE_MPI
+  int fail = MPI_Init(&argc, &argv);
+  if (fail) return fail;
+#endif
+
   std::vector<const char*> file_names;
   bool flags = true;
   for (int i = 1; i < argc; ++i) {
@@ -204,6 +213,11 @@
   for (unsigned j = 0; j < file_names.size(); ++j)
     if (!do_file( file_names[j] ))
       ++exit_val;
+
+#ifdef USE_MPI
+  fail = MPI_Finalize();
+  if (fail) return fail;
+#endif


More information about the moab-dev mailing list