Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67706 - in trunk: boost/graph/distributed boost/graph/distributed/adjlist boost/graph/distributed/detail boost/graph/parallel libs/graph_parallel/src
From: jewillco_at_[hidden]
Date: 2011-01-05 21:27:28


Author: jewillco
Date: 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
New Revision: 67706
URL: http://svn.boost.org/trac/boost/changeset/67706

Log:
Fixed assert issues from inspection report for PBGL
Text files modified:
   trunk/boost/graph/distributed/adjacency_list.hpp | 60 ++++++++++++++++++++--------------------
   trunk/boost/graph/distributed/adjlist/serialization.hpp | 11 ++++---
   trunk/boost/graph/distributed/betweenness_centrality.hpp | 3 +
   trunk/boost/graph/distributed/boman_et_al_graph_coloring.hpp | 8 ++--
   trunk/boost/graph/distributed/compressed_sparse_row_graph.hpp | 9 +++--
   trunk/boost/graph/distributed/connected_components.hpp | 27 +++++++++--------
   trunk/boost/graph/distributed/connected_components_parallel_search.hpp | 9 +++--
   trunk/boost/graph/distributed/crauser_et_al_shortest_paths.hpp | 3 +
   trunk/boost/graph/distributed/depth_first_search.hpp | 3 +
   trunk/boost/graph/distributed/detail/mpi_process_group.ipp | 44 ++++++++++++++--------------
   trunk/boost/graph/distributed/detail/remote_update_set.hpp | 6 ++--
   trunk/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp | 3 +
   trunk/boost/graph/distributed/hohberg_biconnected_components.hpp | 30 ++++++++++----------
   trunk/boost/graph/distributed/named_graph.hpp | 7 ++--
   trunk/boost/graph/distributed/page_rank.hpp | 7 ++--
   trunk/boost/graph/distributed/rmat_graph_generator.hpp | 3 +
   trunk/boost/graph/distributed/shuffled_distribution.hpp | 3 +
   trunk/boost/graph/distributed/strong_components.hpp | 5 ++-
   trunk/boost/graph/parallel/distribution.hpp | 7 ++--
   trunk/libs/graph_parallel/src/mpi_process_group.cpp | 49 ++++++++++++++++----------------
   20 files changed, 156 insertions(+), 141 deletions(-)

Modified: trunk/boost/graph/distributed/adjacency_list.hpp
==============================================================================
--- trunk/boost/graph/distributed/adjacency_list.hpp (original)
+++ trunk/boost/graph/distributed/adjacency_list.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -28,7 +28,7 @@
 #include <boost/graph/parallel/detail/property_holders.hpp>
 #include <boost/mpl/if.hpp>
 #include <boost/type_traits/is_same.hpp>
-#include <cassert>
+#include <boost/assert.hpp>
 #include <list>
 #include <algorithm>
 #include <boost/limits.hpp>
@@ -966,7 +966,7 @@
              && i->e == e.local)
         ++i;
 
- assert(i != in_edges.end());
+ BOOST_ASSERT(i != in_edges.end());
       in_edges.erase(i);
     }
 
@@ -1692,25 +1692,25 @@
     // Directly access a vertex or edge bundle
     vertex_bundled& operator[](vertex_descriptor v)
     {
- assert(v.owner == processor());
+ BOOST_ASSERT(v.owner == processor());
       return base()[v.local];
     }
     
     const vertex_bundled& operator[](vertex_descriptor v) const
     {
- assert(v.owner == processor());
+ BOOST_ASSERT(v.owner == processor());
       return base()[v.local];
     }
     
     edge_bundled& operator[](edge_descriptor e)
     {
- assert(e.owner() == processor());
+ BOOST_ASSERT(e.owner() == processor());
       return base()[e.local];
     }
     
     const edge_bundled& operator[](edge_descriptor e) const
     {
- assert(e.owner() == processor());
+ BOOST_ASSERT(e.owner() == processor());
       return base()[e.local];
     }
 
@@ -2078,7 +2078,7 @@
         detail::parallel::add_local_edge(target(data.e, base()),
                        source(data.e, base()),
                        build_edge_property(data.get_property()), base());
- assert(edge.second);
+ BOOST_ASSERT(edge.second);
       put(edge_target_processor_id, base(), edge.first, other_proc);
 
       if (edge.second && on_add_edge)
@@ -2119,7 +2119,7 @@
 
         remove_local_edge_from_list(src, tgt, undirectedS());
       } else {
- assert(tgt.owner == process_id(process_group_));
+ BOOST_ASSERT(tgt.owner == process_id(process_group_));
         in_edge_list_type& in_edges =
           get(vertex_in_edges, base())[tgt.local];
         typename in_edge_list_type::iterator ei;
@@ -2287,7 +2287,7 @@
   PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_vertex_with_property::
   commit() const
   {
- assert(!this->committed);
+ BOOST_ASSERT(!this->committed);
     this->committed = true;
 
     process_id_type owner
@@ -2391,7 +2391,7 @@
   std::pair<typename PBGL_DISTRIB_ADJLIST_TYPE::edge_descriptor, bool>
   PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge::commit() const
   {
- assert(!committed);
+ BOOST_ASSERT(!committed);
     committed = true;
 
     if (source.owner == self.processor())
@@ -2583,7 +2583,7 @@
   PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge_with_property::
   commit() const
   {
- assert(!this->committed);
+ BOOST_ASSERT(!this->committed);
     this->committed = true;
 
     if (this->source.owner == this->self.processor())
@@ -2683,7 +2683,7 @@
   out_edges(typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v,
             const PBGL_DISTRIB_ADJLIST_TYPE& g)
   {
- assert(v.owner == g.processor());
+ BOOST_ASSERT(v.owner == g.processor());
 
     typedef PBGL_DISTRIB_ADJLIST_TYPE impl;
     typedef typename impl::out_edge_generator generator;
@@ -2705,7 +2705,7 @@
   out_degree(typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v,
              const PBGL_DISTRIB_ADJLIST_TYPE& g)
   {
- assert(v.owner == g.processor());
+ BOOST_ASSERT(v.owner == g.processor());
 
     return out_degree(v.local, g.base());
   }
@@ -2727,7 +2727,7 @@
                          ::vertex_descriptor v,
            const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g)
   {
- assert(v.owner == g.processor());
+ BOOST_ASSERT(v.owner == g.processor());
 
     typedef PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS) impl;
     typedef typename impl::inherited base_graph_type;
@@ -2755,7 +2755,7 @@
                          ::vertex_descriptor v,
            const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g)
   {
- assert(v.owner == g.processor());
+ BOOST_ASSERT(v.owner == g.processor());
 
     typedef PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS) impl;
     typedef typename impl::in_edge_generator generator;
@@ -2778,7 +2778,7 @@
                            ::vertex_descriptor v,
             const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g)
   {
- assert(v.owner == g.processor());
+ BOOST_ASSERT(v.owner == g.processor());
 
     return get(vertex_in_edges, g.base())[v.local].size();
   }
@@ -2792,7 +2792,7 @@
                            ::vertex_descriptor v,
             const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g)
   {
- assert(v.owner == g.processor());
+ BOOST_ASSERT(v.owner == g.processor());
 
     return out_degree(v.local, g.base());
   }
@@ -2809,7 +2809,7 @@
                          ::vertex_descriptor v,
          const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g)
   {
- assert(v.owner == g.processor());
+ BOOST_ASSERT(v.owner == g.processor());
     return out_degree(v.local, g.base());
   }
 
@@ -2823,7 +2823,7 @@
                          ::vertex_descriptor v,
          const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g)
   {
- assert(v.owner == g.processor());
+ BOOST_ASSERT(v.owner == g.processor());
     return out_degree(v, g) + in_degree(v, g);
   }
 
@@ -2893,7 +2893,7 @@
                        ::edge_descriptor edge_descriptor;
 
     // For directed graphs, u must be local
- assert(u.owner == process_id(g.process_group()));
+ BOOST_ASSERT(u.owner == process_id(g.process_group()));
 
     typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)
         ::out_edge_iterator ei, ei_end;
@@ -2930,7 +2930,7 @@
       }
       return std::make_pair(edge_descriptor(), false);
     } else {
- assert(false);
+ BOOST_ASSERT(false);
       exit(1);
     }
   }
@@ -2997,8 +2997,8 @@
   remove_edge(typename PBGL_DISTRIB_ADJLIST_TYPE::edge_descriptor e,
               PBGL_DISTRIB_ADJLIST_TYPE& g)
   {
- assert(source(e, g).owner == g.processor()
- || target(e, g).owner == g.processor());
+ BOOST_ASSERT(source(e, g).owner == g.processor()
+ || target(e, g).owner == g.processor());
 
     if (target(e, g).owner == g.processor())
       detail::parallel::remove_in_edge(e, g, DirectedS());
@@ -3042,7 +3042,7 @@
                 ::out_edge_iterator ei,
               PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)& g)
   {
- assert(source(*ei, g).owner == g.processor());
+ BOOST_ASSERT(source(*ei, g).owner == g.processor());
     remove_edge(ei->local, g.base());
   }
 
@@ -3108,7 +3108,7 @@
     typedef parallel::detail::remove_out_edge_predicate<Graph, Predicate>
       Pred;
 
- assert(u.owner == g.processor());
+ BOOST_ASSERT(u.owner == g.processor());
     remove_out_edge_if(u.local, Pred(g, predicate), g.base());
   }
 
@@ -3169,7 +3169,7 @@
     typedef parallel::detail::remove_in_edge_predicate<Graph, Predicate>
       Pred;
 
- assert(u.owner == g.processor());
+ BOOST_ASSERT(u.owner == g.processor());
     graph_detail::erase_if(get(vertex_in_edges, g.base())[u.local],
                            Pred(g, predicate));
   }
@@ -3336,7 +3336,7 @@
     (typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)::vertex_descriptor u,
       PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)& g)
   {
- assert(u.owner == g.processor());
+ BOOST_ASSERT(u.owner == g.processor());
     clear_out_edges(u.local, g.base());
   }
 
@@ -3401,7 +3401,7 @@
   {
     typedef typename PBGL_DISTRIB_ADJLIST_TYPE::graph_type graph_type;
     typedef typename graph_type::named_graph_mixin named_graph_mixin;
- assert(u.owner == g.processor());
+ BOOST_ASSERT(u.owner == g.processor());
     static_cast<named_graph_mixin&>(static_cast<graph_type&>(g))
       .removing_vertex(u);
     g.distribution().clear();
@@ -3655,7 +3655,7 @@
     if (owner(key) == process_id(g.process_group()))
       return get(p, g.base(), local(key));
     else
- assert(false);
+ BOOST_ASSERT(false);
   }
 
   template<typename Property, PBGL_DISTRIB_ADJLIST_TEMPLATE_PARMS,
@@ -3666,7 +3666,7 @@
     if (owner(key) == process_id(g.process_group()))
       put(p, g.base(), local(key), v);
     else
- assert(false);
+ BOOST_ASSERT(false);
   }
 
   template<PBGL_DISTRIB_ADJLIST_TEMPLATE_PARMS>

Modified: trunk/boost/graph/distributed/adjlist/serialization.hpp
==============================================================================
--- trunk/boost/graph/distributed/adjlist/serialization.hpp (original)
+++ trunk/boost/graph/distributed/adjlist/serialization.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -9,6 +9,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+# include <boost/assert.hpp>
 # include <boost/lexical_cast.hpp>
 # include <boost/foreach.hpp>
 # include <boost/filesystem/path.hpp>
@@ -301,7 +302,7 @@
           if (is_root())
               std::cout << i << " used to be " << old_ids[i] << "\n";
 # endif
- assert(m_id_mapping[old_ids[i]] == -1);
+ BOOST_ASSERT(m_id_mapping[old_ids[i]] == -1);
           m_id_mapping[old_ids[i]] = i;
       }
 
@@ -509,7 +510,7 @@
           detail::parallel::add_local_edge(
               local(u), local(v)
             , m_g.build_edge_property(property), m_g.base());
- assert(inserted.second);
+ BOOST_ASSERT(inserted.second);
       put(edge_target_processor_id, m_g.base(), inserted.first, owner(v));
 
       edge_descriptor e(owner(u), owner(v), true, inserted.first);
@@ -613,7 +614,7 @@
       boost::parallel::inplace_all_to_all(m_pg, m_remote_vertices);
 
       for (int i = 0; i < num_processes(m_pg); ++i)
- assert(m_remote_vertices[i].size() == m_requested_vertices[i].size());
+ BOOST_ASSERT(m_remote_vertices[i].size() == m_requested_vertices[i].size());
   }
 
   template <class Graph, class Archive, class VertexListS>
@@ -663,7 +664,7 @@
           if (i == m_property_ptrs[owner(u)].end()
               || i->first != e.property_ptr)
           {
- assert(false);
+ BOOST_ASSERT(false);
           }
 
           local_edge_descriptor local_edge(local(u), local(v), i->second);
@@ -694,7 +695,7 @@
       if (i == m_requested_vertices[owner(u)].end()
           || *i != local(u))
       {
- assert(false);
+ BOOST_ASSERT(false);
       }
 
       local_vertex_descriptor local =

Modified: trunk/boost/graph/distributed/betweenness_centrality.hpp
==============================================================================
--- trunk/boost/graph/distributed/betweenness_centrality.hpp (original)
+++ trunk/boost/graph/distributed/betweenness_centrality.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -20,6 +20,7 @@
 #include <boost/graph/distributed/concepts.hpp>
 #include <boost/graph/graph_traits.hpp>
 #include <boost/config.hpp>
+#include <boost/assert.hpp>
 
 // For additive_reducer
 #include <boost/graph/distributed/distributed_graph_utility.hpp>
@@ -929,7 +930,7 @@
         for (incoming_iterator vw = el.begin(); vw != el.end(); ++vw) {
           vertex_descriptor v = *vw;
 
- assert(get(path_count, w) != 0);
+ BOOST_ASSERT(get(path_count, w) != 0);
 
           dependency_type factor = dependency_type(get(path_count, v))
             / dependency_type(get(path_count, w));

Modified: trunk/boost/graph/distributed/boman_et_al_graph_coloring.hpp
==============================================================================
--- trunk/boost/graph/distributed/boman_et_al_graph_coloring.hpp (original)
+++ trunk/boost/graph/distributed/boman_et_al_graph_coloring.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -22,7 +22,7 @@
 #include <utility>
 #include <boost/graph/iteration_macros.hpp>
 #include <boost/optional.hpp>
-#include <cassert>
+#include <boost/assert.hpp>
 #include <boost/graph/parallel/container_traits.hpp>
 #include <boost/graph/properties.hpp>
 
@@ -220,7 +220,7 @@
 
         // Receive boundary colors from other processors
         while (optional<std::pair<process_id_type, int> > stp = probe(pg)) {
- assert(stp->second == 17);
+ BOOST_ASSERT(stp->second == 17);
           message_type msg;
           receive(pg, stp->first, stp->second, msg);
           cache(color, msg.first, msg.second);
@@ -279,7 +279,7 @@
 
     // Receive boundary colors from other processors
     while (optional<std::pair<process_id_type, int> > stp = probe(pg)) {
- assert(stp->second == 17);
+ BOOST_ASSERT(stp->second == 17);
       message_type msg;
       receive(pg, stp->first, stp->second, msg);
       cache(color, msg.first, msg.second);
@@ -298,7 +298,7 @@
   color_type num_colors = 0;
   BGL_FORALL_VERTICES_T(v, g, DistributedGraph) {
     color_type k = get(color, v);
- assert(k != no_color);
+ BOOST_ASSERT(k != no_color);
     if (k != no_color) {
       if (k >= (color_type)marked.size()) marked.resize(k + 1, 0); // TBD: perf?
       if (marked[k] != iter_num) {

Modified: trunk/boost/graph/distributed/compressed_sparse_row_graph.hpp
==============================================================================
--- trunk/boost/graph/distributed/compressed_sparse_row_graph.hpp (original)
+++ trunk/boost/graph/distributed/compressed_sparse_row_graph.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -17,6 +17,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+#include <boost/assert.hpp>
 #include <boost/graph/compressed_sparse_row_graph.hpp>
 #include <boost/graph/distributed/selector.hpp>
 #include <boost/mpl/if.hpp>
@@ -366,7 +367,7 @@
   {
     std::pair<process_id_type, vertex_descriptor> locator
       = get(vertex_global, *this, v);
- assert(locator.first == process_id(m_process_group));
+ BOOST_ASSERT(locator.first == process_id(m_process_group));
     return base().m_vertex_properties[locator.second];
   }
 
@@ -374,19 +375,19 @@
   {
     std::pair<process_id_type, vertex_descriptor> locator
       = get(vertex_global, *this, v);
- assert(locator.first == process_id(m_process_group));
+ BOOST_ASSERT(locator.first == process_id(m_process_group));
     return base().m_process_group[locator.second];
   }
 
   edge_bundled& operator[](edge_descriptor e)
   {
- assert(get(vertex_owner, *this, e.src) == process_id(m_process_group));
+ BOOST_ASSERT(get(vertex_owner, *this, e.src) == process_id(m_process_group));
     return base().m_edge_properties[e.idx];
   }
 
   const edge_bundled& operator[](edge_descriptor e) const
   {
- assert(get(vertex_owner, *this, e.src) == process_id(m_process_group));
+ BOOST_ASSERT(get(vertex_owner, *this, e.src) == process_id(m_process_group));
     return base().m_edge_properties[e.idx];
   }
 

Modified: trunk/boost/graph/distributed/connected_components.hpp
==============================================================================
--- trunk/boost/graph/distributed/connected_components.hpp (original)
+++ trunk/boost/graph/distributed/connected_components.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -14,6 +14,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+#include <boost/assert.hpp>
 #include <boost/property_map/property_map.hpp>
 #include <boost/property_map/parallel/caching_property_map.hpp>
 #include <boost/graph/parallel/algorithm.hpp>
@@ -116,7 +117,7 @@
 
         // Receive remote roots and edges
         while (optional<std::pair<process_id_type, int> > m = probe(pg)) {
- assert(m->second == root_adj_msg);
+ BOOST_ASSERT(m->second == root_adj_msg);
 
           std::vector<vertex_descriptor> adjs;
           receive(pg, m->first, m->second, adjs);
@@ -554,12 +555,12 @@
                                adj[*liter].begin(), adj[*liter].end() );
 #ifdef PBGL_IN_PLACE_MERGE
 #ifdef PBGL_SORT_ASSERT
- assert(__gnu_cxx::is_sorted(my_adj.begin(),
- my_adj.end() - adj[*liter].size(),
- std::less<vertex_descriptor>()));
- assert(__gnu_cxx::is_sorted(my_adj.end() - adj[*liter].size(),
- my_adj.end(),
- std::less<vertex_descriptor>()));
+ BOOST_ASSERT(__gnu_cxx::is_sorted(my_adj.begin(),
+ my_adj.end() - adj[*liter].size(),
+ std::less<vertex_descriptor>()));
+ BOOST_ASSERT(__gnu_cxx::is_sorted(my_adj.end() - adj[*liter].size(),
+ my_adj.end(),
+ std::less<vertex_descriptor>()));
 #endif
                 std::inplace_merge(my_adj.begin(),
                                    my_adj.end() - adj[*liter].size(),
@@ -602,12 +603,12 @@
 #ifdef PBGL_IN_PLACE_MERGE
             std::size_t num_incoming_edges = incoming_edges.size();
 #ifdef PBGL_SORT_ASSERT
- assert(__gnu_cxx::is_sorted(my_adj.begin(),
- my_adj.end() - (num_incoming_edges-1),
- std::less<vertex_descriptor>()));
- assert(__gnu_cxx::is_sorted(my_adj.end() - (num_incoming_edges-1),
- my_adj.end(),
- std::less<vertex_descriptor>()));
+ BOOST_ASSERT(__gnu_cxx::is_sorted(my_adj.begin(),
+ my_adj.end() - (num_incoming_edges-1),
+ std::less<vertex_descriptor>()));
+ BOOST_ASSERT(__gnu_cxx::is_sorted(my_adj.end() - (num_incoming_edges-1),
+ my_adj.end(),
+ std::less<vertex_descriptor>()));
 #endif
             std::inplace_merge(my_adj.begin(),
                                my_adj.end() - (num_incoming_edges - 1),

Modified: trunk/boost/graph/distributed/connected_components_parallel_search.hpp
==============================================================================
--- trunk/boost/graph/distributed/connected_components_parallel_search.hpp (original)
+++ trunk/boost/graph/distributed/connected_components_parallel_search.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -14,6 +14,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+#include <boost/assert.hpp>
 #include <boost/property_map/property_map.hpp>
 #include <boost/graph/parallel/algorithm.hpp>
 #include <boost/pending/indirect_cmp.hpp>
@@ -111,7 +112,7 @@
       // a mapping for that component number (which would be bad)
       void add(const component_value_type &a)
       {
- assert(collisions.count(a) == 0);
+ BOOST_ASSERT(collisions.count(a) == 0);
         collisions[a] = a;
       }
 
@@ -147,8 +148,8 @@
       // Used to resolve mapping at end of run.
       component_value_type update(component_value_type a)
       {
- assert(num_unique > 0);
- assert(collisions.count(a) != 0);
+ BOOST_ASSERT(num_unique > 0);
+ BOOST_ASSERT(collisions.count(a) != 0);
         return collisions[a];
       }
 
@@ -174,7 +175,7 @@
       // components in the graph.
       int unique(void)
       {
- assert(num_unique > 0);
+ BOOST_ASSERT(num_unique > 0);
         return num_unique;
       }
 

Modified: trunk/boost/graph/distributed/crauser_et_al_shortest_paths.hpp
==============================================================================
--- trunk/boost/graph/distributed/crauser_et_al_shortest_paths.hpp (original)
+++ trunk/boost/graph/distributed/crauser_et_al_shortest_paths.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -30,6 +30,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+#include <boost/assert.hpp>
 #include <boost/graph/distributed/detail/dijkstra_shortest_paths.hpp>
 #include <boost/graph/parallel/algorithm.hpp>
 #include <functional>
@@ -330,7 +331,7 @@
         crauser_et_al_shortest_paths_stats.deleted_vertices.push_back(deletions);
       }
       local_deletions = 0;
- assert(deletions > 0);
+ BOOST_ASSERT(deletions > 0);
 #endif
 
       return min_distance == (std::numeric_limits<distance_type>::max)();

Modified: trunk/boost/graph/distributed/depth_first_search.hpp
==============================================================================
--- trunk/boost/graph/distributed/depth_first_search.hpp (original)
+++ trunk/boost/graph/distributed/depth_first_search.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -19,6 +19,7 @@
 #include <boost/graph/properties.hpp>
 #include <boost/graph/distributed/concepts.hpp>
 #include <boost/static_assert.hpp>
+#include <boost/assert.hpp>
 #include <boost/graph/parallel/process_group.hpp>
 #include <boost/graph/parallel/container_traits.hpp>
 
@@ -163,7 +164,7 @@
             break;
 
           default:
- assert(false);
+ BOOST_ASSERT(false);
           }
         }
       }

Modified: trunk/boost/graph/distributed/detail/mpi_process_group.ipp
==============================================================================
--- trunk/boost/graph/distributed/detail/mpi_process_group.ipp (original)
+++ trunk/boost/graph/distributed/detail/mpi_process_group.ipp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -18,7 +18,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
-#include <cassert>
+#include <boost/assert.hpp>
 #include <algorithm>
 #include <boost/graph/parallel/detail/untracked_pair.hpp>
 #include <numeric>
@@ -166,7 +166,7 @@
 mpi_process_group::send_impl(int dest, int tag, const T& value,
                              mpl::true_ /*is_mpi_datatype*/) const
 {
- assert(tag < msg_reserved_first || tag > msg_reserved_last);
+ BOOST_ASSERT(tag < msg_reserved_first || tag > msg_reserved_last);
 
   impl::outgoing_messages& outgoing = impl_->outgoing[dest];
 
@@ -197,7 +197,7 @@
 mpi_process_group::send_impl(int dest, int tag, const T& value,
                              mpl::false_ /*is_mpi_datatype*/) const
 {
- assert(tag < msg_reserved_first || tag > msg_reserved_last);
+ BOOST_ASSERT(tag < msg_reserved_first || tag > msg_reserved_last);
 
   impl::outgoing_messages& outgoing = impl_->outgoing[dest];
 
@@ -246,7 +246,7 @@
 mpi_process_group::
 array_send_impl(int dest, int tag, const T values[], std::size_t n) const
 {
- assert(tag < msg_reserved_first || tag > msg_reserved_last);
+ BOOST_ASSERT(tag < msg_reserved_first || tag > msg_reserved_last);
 
   impl::outgoing_messages& outgoing = impl_->outgoing[dest];
 
@@ -454,7 +454,7 @@
 template<typename Type, typename Handler>
 void mpi_process_group::trigger(int tag, const Handler& handler)
 {
- assert(block_num);
+ BOOST_ASSERT(block_num);
   install_trigger(tag,my_block_number(),shared_ptr<trigger_base>(
     new trigger_launcher<Type, Handler>(*this, tag, handler)));
 }
@@ -462,7 +462,7 @@
 template<typename Type, typename Handler>
 void mpi_process_group::trigger_with_reply(int tag, const Handler& handler)
 {
- assert(block_num);
+ BOOST_ASSERT(block_num);
   install_trigger(tag,my_block_number(),shared_ptr<trigger_base>(
     new reply_trigger_launcher<Type, Handler>(*this, tag, handler)));
 }
@@ -570,7 +570,7 @@
             << " receive from source " << source << " and tag " << tag
         << " in block " << (block == -1 ? self.my_block_number() : block) << std::endl;
 #endif
- assert(context == trc_out_of_band);
+ BOOST_ASSERT(context == trc_out_of_band);
 
   boost::parallel::detail::untracked_pair<int, Type> data;
 
@@ -631,7 +631,7 @@
   if (context == trc_out_of_band) {
     return;
   }
- assert (context == trc_irecv_out_of_band);
+ BOOST_ASSERT (context == trc_irecv_out_of_band);
 
   // force posting of new MPI_Irecv, even though buffer is already allocated
   boost::mpi::packed_iarchive ia(self.impl_->comm,self.impl_->buffers[tag]);
@@ -656,7 +656,7 @@
     self.impl_->buffers[tag].resize(buffer_size);
     force = true;
   }
- assert(static_cast<int>(self.impl_->buffers[tag].size()) >= buffer_size);
+ BOOST_ASSERT(static_cast<int>(self.impl_->buffers[tag].size()) >= buffer_size);
   
   //BOOST_MPL_ASSERT(mpl::not_<is_mpi_datatype<Type> >);
   if (force) {
@@ -677,7 +677,7 @@
                         value, boost::mpi::is_mpi_datatype<T>()))
       return source;
   }
- assert (false);
+ BOOST_ASSERT (false);
 }
 
 template<typename T>
@@ -694,7 +694,7 @@
     if (result)
       return std::make_pair(source, n);
   }
- assert(false);
+ BOOST_ASSERT(false);
 }
 
 template<typename T>
@@ -708,7 +708,7 @@
                               values, n))
       return std::make_pair(source, n);
   }
- assert(false);
+ BOOST_ASSERT(false);
 }
 
 template<typename T>
@@ -724,7 +724,7 @@
             "Process %d failed to receive a message from process %d with tag %d in block %d.\n",
             process_id(pg), source, tag, pg.my_block_number());
 
- assert(false);
+ BOOST_ASSERT(false);
     exit(1);
   }
 }
@@ -745,7 +745,7 @@
             "Process %d failed to receive a message from process %d with tag %d in block %d.\n",
             process_id(pg), source, tag, pg.my_block_number());
 
- assert(false);
+ BOOST_ASSERT(false);
     exit(1);
   }
 }
@@ -837,7 +837,7 @@
   int result = MPI_Allgather(&size, 1, MPI_INT,
                              &sizes[0], 1, MPI_INT,
                              communicator(pg));
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
 
   // Adjust sizes based on the number of bytes
   std::transform(sizes.begin(), sizes.end(), sizes.begin(),
@@ -860,7 +860,7 @@
                             &out[0], &sizes[0], &displacements[0], MPI_BYTE,
                             communicator(pg));
   }
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
 }
 
 template<typename InputIterator>
@@ -878,25 +878,25 @@
 
   MPI_Group current_group;
   int result = MPI_Comm_group(communicator(pg), &current_group);
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
 
   MPI_Group new_group;
   result = MPI_Group_incl(current_group, ranks.size(), &ranks[0], &new_group);
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
 
   MPI_Comm new_comm;
   result = MPI_Comm_create(communicator(pg), new_group, &new_comm);
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
 
   result = MPI_Group_free(&new_group);
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
   result = MPI_Group_free(&current_group);
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
 
   if (new_comm != MPI_COMM_NULL) {
     mpi_process_group result_pg(boost::mpi::communicator(new_comm,boost::mpi::comm_attach));
     result = MPI_Comm_free(&new_comm);
- assert(result == 0);
+ BOOST_ASSERT(result == 0);
     return result_pg;
   } else {
     return mpi_process_group(mpi_process_group::create_empty());

Modified: trunk/boost/graph/distributed/detail/remote_update_set.hpp
==============================================================================
--- trunk/boost/graph/distributed/detail/remote_update_set.hpp (original)
+++ trunk/boost/graph/distributed/detail/remote_update_set.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -16,7 +16,7 @@
 #include <boost/graph/parallel/process_group.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 #include <vector>
-#include <cassert>
+#include <boost/assert.hpp>
 #include <boost/optional.hpp>
 #include <queue>
 
@@ -110,7 +110,7 @@
       case msg_updates:
         {
           updates_size_type num_updates = update_sizes[source];
- assert(num_updates);
+ BOOST_ASSERT(num_updates);
 
           // Receive the actual updates
           std::vector<updates_pair_type> updates(num_updates);
@@ -207,7 +207,7 @@
     void operator()(process_id_type source, int tag)
     {
       // Receive the # of updates
- assert(tag == msg_update);
+ BOOST_ASSERT(tag == msg_update);
       update_pair_type update;
       receive(self->process_group, source, tag, update);
       

Modified: trunk/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp
==============================================================================
--- trunk/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp (original)
+++ trunk/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -22,6 +22,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+#include <boost/assert.hpp>
 #include <boost/graph/distributed/detail/dijkstra_shortest_paths.hpp>
 #include <boost/property_map/parallel/caching_property_map.hpp>
 #include <boost/pending/indirect_cmp.hpp>
@@ -284,7 +285,7 @@
         eager_dijkstra_shortest_paths_stats.deleted_vertices
           .push_back(deletions);
       local_deletions = 0;
- assert(deletions > 0);
+ BOOST_ASSERT(deletions > 0);
 #endif
 
       return min_distance == (std::numeric_limits<distance_type>::max)();

Modified: trunk/boost/graph/distributed/hohberg_biconnected_components.hpp
==============================================================================
--- trunk/boost/graph/distributed/hohberg_biconnected_components.hpp (original)
+++ trunk/boost/graph/distributed/hohberg_biconnected_components.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -39,7 +39,7 @@
 #include <boost/graph/iteration_macros.hpp>
 #include <boost/optional.hpp>
 #include <utility> // for std::pair
-#include <cassert>
+#include <boost/assert.hpp>
 #include <algorithm> // for std::find, std::mismatch
 #include <vector>
 #include <boost/graph/parallel/algorithm.hpp>
@@ -136,9 +136,9 @@
   template<typename T>
   T branch_point(const std::vector<T>& p1, const std::vector<T>& p2)
   {
- assert(!p1.empty());
- assert(!p2.empty());
- assert(p1.front() == p2.front());
+ BOOST_ASSERT(!p1.empty());
+ BOOST_ASSERT(!p2.empty());
+ BOOST_ASSERT(p1.front() == p2.front());
 
     typedef typename std::vector<T>::const_iterator iterator;
 
@@ -385,7 +385,7 @@
   template<typename Archiver>
   void serialize(Archiver&, const unsigned int /*version*/)
   {
- assert(false);
+ BOOST_ASSERT(false);
   }
 };
 
@@ -523,7 +523,7 @@
 
   default:
 // std::cerr << "Phase is " << int(phase) << "\n";
- assert(false);
+ BOOST_ASSERT(false);
   }
 }
 
@@ -579,7 +579,7 @@
     break;
 
   default:
- assert(false);
+ BOOST_ASSERT(false);
   }
 }
 
@@ -596,7 +596,7 @@
             << name << "), phase = " << (int)phase << std::endl;
 #endif
 
- assert(phase == 4);
+ BOOST_ASSERT(phase == 4);
 
   typename property_map<Graph, vertex_owner_t>::const_type
     owner = get(vertex_owner, g);
@@ -684,7 +684,7 @@
 {
   using namespace hohberg_detail;
 
- assert(phase == 4);
+ BOOST_ASSERT(phase == 4);
 
   typename property_map<Graph, vertex_owner_t>::const_type
     owner = get(vertex_owner, g);
@@ -870,7 +870,7 @@
     if (source(e, g) == target(oe, g)) return result;
     ++result;
   }
- assert(false);
+ BOOST_ASSERT(false);
 }
 
 template<typename Graph>
@@ -883,7 +883,7 @@
     if (target(e, g) == v) return result;
     ++result;
   }
- assert(false);
+ BOOST_ASSERT(false);
 }
 
 template<typename Graph, typename InputIterator, typename ComponentMap,
@@ -952,7 +952,7 @@
           // Receive the path header
           path_header<edge_descriptor> header;
           receive(pg, msg->first, msg->second, header);
- assert(path_length == header.path_length);
+ BOOST_ASSERT(path_length == header.path_length);
 
           // Receive the path itself
           path_t path(path_length);
@@ -966,7 +966,7 @@
       case msg_path_vertices:
         // Should be handled in msg_path_header case, unless we're going
         // stateless.
- assert(false);
+ BOOST_ASSERT(false);
         break;
 
       case msg_tree_header:
@@ -989,7 +989,7 @@
       case msg_tree_vertices:
         // Should be handled in msg_tree_header case, unless we're
         // going stateless.
- assert(false);
+ BOOST_ASSERT(false);
         break;
 
       case msg_name:
@@ -1002,7 +1002,7 @@
         break;
 
       default:
- assert(false);
+ BOOST_ASSERT(false);
       }
     }
     ++path_length;

Modified: trunk/boost/graph/distributed/named_graph.hpp
==============================================================================
--- trunk/boost/graph/distributed/named_graph.hpp (original)
+++ trunk/boost/graph/distributed/named_graph.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -14,6 +14,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+#include <boost/assert.hpp>
 #include <boost/graph/named_graph.hpp>
 #include <boost/functional/hash.hpp>
 #include <boost/variant.hpp>
@@ -393,7 +394,7 @@
 BGL_NAMED_GRAPH::lazy_add_vertex::commit() const
 {
   typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type;
- assert (!committed);
+ BOOST_ASSERT (!committed);
   committed = true;
 
   process_id_type owner = self.named_distribution()(name);
@@ -530,7 +531,7 @@
   typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type;
   using boost::parallel::detail::make_untracked_pair;
 
- assert(!committed);
+ BOOST_ASSERT(!committed);
   committed = true;
 
   /// The result we will return, if we are sending a message to
@@ -729,7 +730,7 @@
 {
   using boost::detail::parallel::make_pair_with_property;
   typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type;
- assert(!committed);
+ BOOST_ASSERT(!committed);
   committed = true;
 
   /// The result we will return, if we are sending a message to

Modified: trunk/boost/graph/distributed/page_rank.hpp
==============================================================================
--- trunk/boost/graph/distributed/page_rank.hpp (original)
+++ trunk/boost/graph/distributed/page_rank.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -15,6 +15,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+#include <boost/assert.hpp>
 #include <boost/graph/overloading.hpp>
 #include <boost/graph/page_rank.hpp>
 #include <boost/graph/distributed/concepts.hpp>
@@ -53,7 +54,7 @@
                              1, MPI_DOUBLE,
                              get(owner, v), local(v),
                              1, MPI_DOUBLE, MPI_SUM, to_win);
- assert(MPI_SUCCESS == ret);
+ BOOST_ASSERT(MPI_SUCCESS == ret);
       }
     }
     MPI_Win_fence(0, to_win);
@@ -100,14 +101,14 @@
   process_group_type pg = process_group(g);
   process_id_type id = process_id(pg);
 
- assert(me == id);
+ BOOST_ASSERT(me == id);
 
   rank_type initial_rank = rank_type(rank_type(1) / n);
   BGL_FORALL_VERTICES_T(v, g, Graph) put(rank_map, v, initial_rank);
 
 #ifdef WANT_MPI_ONESIDED
 
- assert(sizeof(rank_type) == sizeof(double));
+ BOOST_ASSERT(sizeof(rank_type) == sizeof(double));
 
   bool to_map_2 = true;
   MPI_Win win, win2;

Modified: trunk/boost/graph/distributed/rmat_graph_generator.hpp
==============================================================================
--- trunk/boost/graph/distributed/rmat_graph_generator.hpp (original)
+++ trunk/boost/graph/distributed/rmat_graph_generator.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -13,6 +13,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+#include <boost/assert.hpp>
 #include <boost/graph/parallel/algorithm.hpp>
 #include <boost/graph/parallel/process_group.hpp>
 #include <math.h>
@@ -51,7 +52,7 @@
                              double d, bool permute_vertices = true)
           : gen(), done(false)
       {
- assert(a + b + c + d == 1);
+ BOOST_ASSERT(a + b + c + d == 1);
           int id = process_id(pg);
 
           this->gen.reset(new uniform_01<RandomGenerator>(gen));

Modified: trunk/boost/graph/distributed/shuffled_distribution.hpp
==============================================================================
--- trunk/boost/graph/distributed/shuffled_distribution.hpp (original)
+++ trunk/boost/graph/distributed/shuffled_distribution.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -9,6 +9,7 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
+# include <boost/assert.hpp>
 # include <boost/iterator/counting_iterator.hpp>
 # include <vector>
 
@@ -36,7 +37,7 @@
     void assign_mapping(InputIterator first, InputIterator last)
     {
         mapping_.assign(first, last);
- assert(mapping_.size() == n);
+ BOOST_ASSERT(mapping_.size() == n);
         reverse_mapping.resize(mapping_.size());
 
         for (std::vector<size_t>::iterator i(mapping_.begin());

Modified: trunk/boost/graph/distributed/strong_components.hpp
==============================================================================
--- trunk/boost/graph/distributed/strong_components.hpp (original)
+++ trunk/boost/graph/distributed/strong_components.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -16,6 +16,7 @@
 
 // #define PBGL_SCC_DEBUG
 
+#include <boost/assert.hpp>
 #include <boost/property_map/property_map.hpp>
 #include <boost/property_map/parallel/distributed_property_map.hpp>
 #include <boost/property_map/parallel/caching_property_map.hpp>
@@ -511,7 +512,7 @@
 
         // Receive predecessor and successor messages and handle them
         while (optional<std::pair<process_id_type, int> > m = probe(pg)) {
- assert(m->second == fhp_succ_size_msg || m->second == fhp_pred_size_msg);
+ BOOST_ASSERT(m->second == fhp_succ_size_msg || m->second == fhp_pred_size_msg);
           std::size_t num_requests;
           receive(pg, m->first, m->second, num_requests);
           VertexPairVec requests(num_requests);
@@ -791,7 +792,7 @@
 
       // Receive edge addition requests and handle them
       while (optional<std::pair<process_id_type, int> > m = probe(pg)) {
- assert(m->second == fhp_edges_size_msg);
+ BOOST_ASSERT(m->second == fhp_edges_size_msg);
         std::size_t num_requests;
         receive(pg, m->first, m->second, num_requests);
         VertexPairVec requests(num_requests);

Modified: trunk/boost/graph/parallel/distribution.hpp
==============================================================================
--- trunk/boost/graph/parallel/distribution.hpp (original)
+++ trunk/boost/graph/parallel/distribution.hpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -18,6 +18,7 @@
 #include <vector>
 #include <algorithm>
 #include <numeric>
+#include <boost/assert.hpp>
 #include <boost/iterator/counting_iterator.hpp>
 #include <boost/random/uniform_int.hpp>
 #include <boost/shared_ptr.hpp>
@@ -194,7 +195,7 @@
   explicit uneven_block(const LinearProcessGroup& pg, const std::vector<std::size_t>& local_sizes)
     : id(process_id(pg)), p(num_processes(pg)), local_sizes(local_sizes)
   {
- assert(local_sizes.size() == p);
+ BOOST_ASSERT(local_sizes.size() == p);
     local_starts.resize(p + 1);
     local_starts[0] = 0;
     std::partial_sum(local_sizes.begin(), local_sizes.end(), &local_starts[1]);
@@ -219,7 +220,7 @@
   template<typename SizeType>
   SizeType operator()(SizeType i) const
   {
- assert (i >= (SizeType) 0 && i < (SizeType) n); // check for valid range
+ BOOST_ASSERT (i >= (SizeType) 0 && i < (SizeType) n); // check for valid range
     size_vector::const_iterator lb = std::lower_bound(local_starts.begin(), local_starts.end(), (std::size_t) i);
     return ((SizeType)(*lb) == i ? lb : --lb) - local_starts.begin();
   }
@@ -402,7 +403,7 @@
 
     std::cerr << "global(" << i << "@" << id << ") = " << result
               << " =? " << local(result) << std::endl;
- assert(i == local(result));
+ BOOST_ASSERT(i == local(result));
     return result;
   }
 

Modified: trunk/libs/graph_parallel/src/mpi_process_group.cpp
==============================================================================
--- trunk/libs/graph_parallel/src/mpi_process_group.cpp (original)
+++ trunk/libs/graph_parallel/src/mpi_process_group.cpp 2011-01-05 21:27:26 EST (Wed, 05 Jan 2011)
@@ -9,6 +9,7 @@
 // Authors: Douglas Gregor
 // Andrew Lumsdaine
 // Matthias Troyer
+#include <boost/assert.hpp>
 #include <boost/graph/use_mpi.hpp>
 #include <boost/graph/distributed/mpi_process_group.hpp>
 #include <boost/mpi/environment.hpp>
@@ -172,7 +173,7 @@
   std::size_t stage = static_cast<std::size_t>(
     ++self.impl_->synchronizing_stage[source]);
 
- assert(source != process_id(self));
+ BOOST_ASSERT(source != process_id(self));
 
 #ifdef DEBUG
   std::ostringstream out;
@@ -183,7 +184,7 @@
 
   // record how many still have messages to be sent
   if (self.impl_->synchronizing_unfinished.size()<=stage) {
- assert(self.impl_->synchronizing_unfinished.size() == stage);
+ BOOST_ASSERT(self.impl_->synchronizing_unfinished.size() == stage);
     self.impl_->synchronizing_unfinished.push_back(val >= 0 ? 1 : 0);
   }
   else
@@ -191,7 +192,7 @@
 
   // record how many are in that stage
   if (self.impl_->processors_synchronizing_stage.size()<=stage) {
- assert(self.impl_->processors_synchronizing_stage.size() == stage);
+ BOOST_ASSERT(self.impl_->processors_synchronizing_stage.size() == stage);
     self.impl_->processors_synchronizing_stage.push_back(1);
   }
   else
@@ -346,7 +347,7 @@
 
 int mpi_process_group::allocate_block(bool out_of_band_receive)
 {
- assert(!block_num);
+ BOOST_ASSERT(!block_num);
   block_iterator i = impl_->blocks.begin();
   while (i != impl_->blocks.end() && *i) ++i;
 
@@ -372,7 +373,7 @@
 {
   std::pair<int, int> decoded = decode_tag(encoded_tag);
 
- assert (decoded.first < static_cast<int>(impl_->blocks.size()));
+ BOOST_ASSERT (decoded.first < static_cast<int>(impl_->blocks.size()));
 
   block_type* block = impl_->blocks[decoded.first];
   if (!block) {
@@ -384,7 +385,7 @@
       if (impl_->blocks[i])
         std::cerr << i << ' ';
     std::cerr << std::endl;
- assert(block);
+ BOOST_ASSERT(block);
   }
   
   if (decoded.second < static_cast<int>(block->triggers.size())
@@ -414,7 +415,7 @@
 
   // Find the block that will receive this message
   block_type* block = impl_->blocks[decoded.first];
- assert(block);
+ BOOST_ASSERT(block);
   if (decoded.second < static_cast<int>(block->triggers.size())
       && block->triggers[decoded.second])
     // We have a trigger for this message; use it
@@ -526,7 +527,7 @@
   // we increment the number of batches sent
   ++impl_->number_sent_batches[dest];
   // and send the batch
- assert(outgoing.headers.size() <= impl_->batch_header_number);
+ BOOST_ASSERT(outgoing.headers.size() <= impl_->batch_header_number);
   if (id != dest) {
 #ifdef NO_ISEND_BATCHES
     impl::batch_request req;
@@ -559,7 +560,7 @@
       MPI_Isend(const_cast<void*>(oa.address()), oa.size(),
                 MPI_PACKED, dest, tag, impl_->comm,
                 &req.request);
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
     impl_->max_sent = (std::max)(impl_->max_sent,impl_->sent_batches.size());
 #ifdef NO_ISEND_BATCHES
     int done=0;
@@ -794,10 +795,10 @@
        ++impl_->synchronizing_stage[id];
        if (impl_->synchronizing_stage[id] != stage)
          std::cerr << "Expected stage " << stage << ", got " << impl_->synchronizing_stage[id] << std::endl;
- assert(impl_->synchronizing_stage[id]==stage);
+ BOOST_ASSERT(impl_->synchronizing_stage[id]==stage);
       // record how many still have messages to be sent
       if (static_cast<int>(impl_->synchronizing_unfinished.size())<=stage) {
- assert(static_cast<int>(impl_->synchronizing_unfinished.size()) == stage);
+ BOOST_ASSERT(static_cast<int>(impl_->synchronizing_unfinished.size()) == stage);
         impl_->synchronizing_unfinished.push_back(no_new_messages ? 0 : 1);
       }
       else
@@ -805,7 +806,7 @@
 
       // record how many are in that stage
       if (static_cast<int>(impl_->processors_synchronizing_stage.size())<=stage) {
- assert(static_cast<int>(impl_->processors_synchronizing_stage.size()) == stage);
+ BOOST_ASSERT(static_cast<int>(impl_->processors_synchronizing_stage.size()) == stage);
         impl_->processors_synchronizing_stage.push_back(1);
       }
       else
@@ -841,7 +842,7 @@
 
       // check that everyone is at least here
       for (int source=0; source<p ; ++source)
- assert(impl_->synchronizing_stage[source] >= stage);
+ BOOST_ASSERT(impl_->synchronizing_stage[source] >= stage);
 
       // receive any batches sent in the meantime
       // all have to be available already
@@ -857,7 +858,7 @@
       
 #ifndef NO_IMMEDIATE_PROCESSING
       for (int source=0; source<p ; ++source)
- assert(impl_->number_received_batches[source] >= 0);
+ BOOST_ASSERT(impl_->number_received_batches[source] >= 0);
 #endif
 
       impl_->synchronizing = false;
@@ -888,7 +889,7 @@
                 << source << ", got " << impl_->synchronizing_stage[source]
                 << std::endl;
     }
- assert(impl_->synchronizing_stage[source]==stage);
+ BOOST_ASSERT(impl_->synchronizing_stage[source]==stage);
   }
 #endif
   std::fill(impl_->synchronizing_stage.begin(),
@@ -900,10 +901,10 @@
   impl_->synchronizing_unfinished.clear();
 
   for (process_id_type dest = 0; dest < p; ++dest)
- assert (impl_->outgoing[dest].headers.empty());
+ BOOST_ASSERT (impl_->outgoing[dest].headers.empty());
 #ifndef NO_IMMEDIATE_PROCESSING
       for (int source=0; source<p ; ++source)
- assert (impl_->number_received_batches[source] == 0);
+ BOOST_ASSERT (impl_->number_received_batches[source] == 0);
 #endif
 
   impl_->free_sent_batches();
@@ -952,7 +953,7 @@
       std::pair<int, int> decoded = decode_tag(statuses[i].MPI_TAG);
       block_type* block = impl_->blocks[decoded.first];
       
- assert (decoded.second < static_cast<int>(block->triggers.size()) && block->triggers[decoded.second]);
+ BOOST_ASSERT (decoded.second < static_cast<int>(block->triggers.size()) && block->triggers[decoded.second]);
         // We have a trigger for this message; use it
       trigger_receive_context old_context = impl_->trigger_context;
       impl_->trigger_context = trc_irecv_out_of_band;
@@ -1033,7 +1034,7 @@
   int result;
   while(it != sent_batches.end()) {
     result = MPI_Test(&it->request,&flag,MPI_STATUS_IGNORE);
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
     iterator next=it;
     ++next;
     if (flag)
@@ -1044,7 +1045,7 @@
   for (std::size_t i=0; i< batch_pool.size();++i) {
     if(batch_pool[i].request != MPI_REQUEST_NULL) {
       result = MPI_Test(&batch_pool[i].request,&flag,MPI_STATUS_IGNORE);
- assert(result == MPI_SUCCESS);
+ BOOST_ASSERT(result == MPI_SUCCESS);
       if (flag) {
         free_batches.push(i);
         batch_pool[i].request = MPI_REQUEST_NULL;
@@ -1060,7 +1061,7 @@
       shared_ptr<trigger_base> const& launcher)
 {
   block_type* my_block = impl_->blocks[block];
- assert(my_block);
+ BOOST_ASSERT(my_block);
 
   // Make sure we have enough space in the structure for this trigger.
   if (launcher->tag() >= static_cast<int>(my_block->triggers.size()))
@@ -1073,7 +1074,7 @@
               << " already has a trigger for tag " << launcher->tag()
               << std::endl;
   }
- assert(!my_block->triggers[launcher->tag()]);
+ BOOST_ASSERT(!my_block->triggers[launcher->tag()]);
 
   // Attach a new trigger launcher
   my_block->triggers[launcher->tag()] = launcher;
@@ -1091,8 +1092,8 @@
   void* ptr;
   if (!message_buffer.empty()) {
     MPI_Buffer_detach(&ptr,&sz);
- assert(ptr == &message_buffer.front());
- assert(static_cast<std::size_t>(sz) == message_buffer.size());
+ BOOST_ASSERT(ptr == &message_buffer.front());
+ BOOST_ASSERT(static_cast<std::size_t>(sz) == message_buffer.size());
   }
   else if (old_buffer != 0)
     MPI_Buffer_detach(&old_buffer,&old_buffer_size);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk