[MOAB-dev] r4139 - MOAB/trunk/itaps/imesh

tautges at mcs.anl.gov tautges at mcs.anl.gov
Wed Sep 22 14:45:05 CDT 2010


Author: tautges
Date: 2010-09-22 14:45:04 -0500 (Wed, 22 Sep 2010)
New Revision: 4139

Added:
   MOAB/trunk/itaps/imesh/MOAB_iMeshP_unit_tests.cpp
Removed:
   MOAB/trunk/itaps/imesh/iMeshP_unit_tests.cpp
Modified:
   MOAB/trunk/itaps/imesh/Makefile.am
Log:
Moving iMeshP_unit_tests.cpp to MOAB_iMeshP_unit_tests.cpp, to avoid confusion
with itaps iMeshP unit test.



Copied: MOAB/trunk/itaps/imesh/MOAB_iMeshP_unit_tests.cpp (from rev 4134, MOAB/trunk/itaps/imesh/iMeshP_unit_tests.cpp)
===================================================================
--- MOAB/trunk/itaps/imesh/MOAB_iMeshP_unit_tests.cpp	                        (rev 0)
+++ MOAB/trunk/itaps/imesh/MOAB_iMeshP_unit_tests.cpp	2010-09-22 19:45:04 UTC (rev 4139)
@@ -0,0 +1,2919 @@
+#include "iMeshP.h"
+#include "moab_mpi.h"
+#include <iostream>
+#include <algorithm>
+#include <vector>
+#include <sstream>
+#include <assert.h>
+#include <math.h>
+#include <map>
+#include <string.h>
+#include <stdio.h> // remove()
+
+#if !defined(_MSC_VER) && !defined(__MINGW32__)
+#include <unistd.h>
+#endif
+
+#define STRINGIFY_(X) #X
+#define STRINGIFY(X) STRINGIFY_(X)
+const char* const FILENAME = "iMeshP_test_file";
+
+
+/**************************************************************************
+                              Error Checking
+ **************************************************************************/
+
+#define CHKERR do { \
+  if (ierr) { \
+    std::cerr << "Error code  " << ierr << " at " << __FILE__ << ":" << __LINE__ << std::endl;\
+    return ierr; \
+  } \
+} while (false) 
+
+#define PCHECK do { ierr = is_any_proc_error(ierr); CHKERR; } while(false)
+
+#define ASSERT(A) do { \
+  if (is_any_proc_error(!(A))) { \
+    int rank = 0; \
+    MPI_Comm_rank( MPI_COMM_WORLD, &rank ); \
+    if (!rank) std::cerr << "Failed assertion: " #A << std::endl \
+                         << "  at " __FILE__ ":" << __LINE__ << std::endl; \
+    return 1; \
+  } } while (false)
+              
+// Test if is_my_error is non-zero on any processor in MPI_COMM_WORLD
+int is_any_proc_error( int is_my_error )
+{


More information about the moab-dev mailing list