0

I have run the code of minimum degree ordering of boost graph library using the Harwell-boeing formatted matrix (bcsstk01.rsa) as input which is given in the documentation of the code, it also says how to run the code. But when I tried to run another input file, it gives the following error:

boost_1_58_0/boost/pending/bucket_sorter.hpp:119:boost::bucket_sorter<BucketType, ValueType, Bucket, ValueIndexMap>::stack boost::bucket_sorter<BucketType, ValueType, Bucket, ValueIndexMap>::operator[](const BucketType&) [with BucketType = long unsigned int, ValueType = long unsigned int, Bucket = boost::iterator_property_map<int*, boost::vec_adj_list_vertex_id_map<boost::no_property, long unsigned int>, int, int&>, ValueIndexMap = boost::vec_adj_list_vertex_id_map<boost::no_property, long unsigned int>]: Assertion `i < head.size()' failed.
Aborted (core dumped)

I don't understand why this is not running and why this type of error is showing. Please help!

sehe
  • 374,641
  • 47
  • 450
  • 633
  • We won't know either. Your input probably violates some invariant/constraint. Or there could be a bug. How are we gonna know if we don't have the input? Mmm. Looking at ftp://math.nist.gov/pub/MatrixMarket2/Harwell-Boeing/bcsstruc1/bcsstk01.rsa.gz now – sehe Jun 15 '15 at 19:41
  • I have used bcsstk01.rsa and bcsstk02.rsa, both files are formatted in the same way, the first one works but the second one doesn't. Again, I have tried bcsstk14.rsa which works fine. So do you mean that input file has some problem? – Nasrin hakim Mithila Jun 15 '15 at 20:23
  • I have downloaded the files from the site that you have provided. – Nasrin hakim Mithila Jun 15 '15 at 20:24
  • I do _not_ say I know the problem is. I said we cannot begin to look unless we have the input. So, thanks, will take a look – sehe Jun 15 '15 at 20:33
  • `Assertion i < head.size() failed.` makes me think that something is probably empty. – pbible Jun 17 '15 at 18:12
  • many thanks to the moderator who removed my fully contained code example from this question! –  Jun 30 '15 at 21:47
  • here is the example code deleted by some moderator: http://pastebin.com/RnyG094T –  Jul 01 '15 at 16:50

1 Answers1

0

it looks like this routine crashes for fully non-sparse matrices. I can repeat this problem for dimension 2 and 3 with fully non-sparse matrices. As soon as the matrix is sparse, the function works.

The function crashes as well, if there are no other elements than the diagonal elements (no call to add_edge()).

Both cases are trivial cases and don't need to be passed to this function.