The intent was to use sparse matrix (vector) with very large indices, expressed as 64-bit integers.

use strict; use warnings; use feature 'say'; use Math::GSL::SparseMatrix ':all'; my $m = gsl_spmatrix_alloc( 1, 1 ); die if gsl_spmatrix_set( $m, 0, 0, 1 ); say gsl_spmatrix_nnz( $m ); die if gsl_spmatrix_set( $m, 123 + 1 << 32, 0, 1 ); say gsl_spmatrix_nnz( $m ); die if gsl_spmatrix_set( $m, 456 + 1 << 32, 0, 1 ); say gsl_spmatrix_nnz( $m );

The "OK" output is "1 2 3" (newlines instead of spaces), failure, as observed, is "1 1 1".

I used to be able to do "OK" with 5.26 "Strawberry Perl PDL Edition", with relevant PDL, Math::GSL, Alien::GSL, etc., of a few years ago. Now (hours of tests and frustration skipped), output is "OK" with

Failure is with

I don't know whose bug is that. Only issue with Math::GSL, in my view, is it doesn't test against such failure, can't anticipate everything, maybe they'll add it in retrospect. Issue with PDL is it's in title of Perl distribution that fails, can't blame them. If it's issue with "Strawberry" pack, don't know how to prove it's their issue, besides unfortunately looks like it's nobody to prove it to anymore. Whew, at least it's documented here now and could save some poor soul hours of bug hunting.


In reply to Math::GSL::SparseMatrix is broken if installed on latest 5.32.1.1 "Strawberry Perl PDL edition", whom to report this issue to? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.