Did you compile it from shell, created with portableshell.bat of Strawberry Perl 5.32.1-PDL?

Yes.
---------------------------------------------- Welcome to Strawberry Perl PDL Edition! * URL - http://strawberryperl.com + http://pdl.perl.org * to launch perl script run: perl c:\my\scripts\pdl-test.pl * to start PDL console run: pdl2 * to update PDL run: cpanm PDL * to install extra module run: cpanm PDL::Any::Module or if previous fails: ppm PDL::Any::Module * or you can use dev tools like: gcc, g++, gfortran, gmake * see README.TXT for more info ---------------------------------------------- Perl executable: D:\sp\_64\sp-5.32.1-PDL\perl\bin\perl.exe Perl version : 5.32.1 / MSWin32-x64-multi-thread PDL version : 2.025 D:\sp\_64\sp-5.32.1-PDL>cd \C D:\C>gcc -o gsl_spmatrix.exe gsl_spmatrix.c -ID:/sp/_64/sp-5.32.1-PDL/ +c/include -LD:/sp/_64/sp-5.32.1-PDL/c/lib -lgsl -lgslcblas -lm D:\C>gsl_spmatrix.exe size of _size_t is 8 bytes 1: got: 1.500000 1: nnz: 1 will be reported as 'out of range' gsl: getset_source.c:27: ERROR: first index out of range Default GSL error handler invoked. D:\C>

I'm confused about this "25", does it mean anything?

I think that's ok. I'm quite used to seeing dll numberings that don't make any sense.
My SP-5.32.1-PDL certainly ships with c/bin/libgsl-25__.dll and I'm not seeing anything unusual happening (apart from the buggy behaviour.)

Using "gsl-2.7.1 library provided by Alien", there's no such complaint.

Are you sure that it's actually using gsl-2.7.1 ? Here's an improved C program that will output that info:
#include <stdio.h> #include <stdlib.h> #include <gsl/gsl_spmatrix.h> #include <gsl/gsl_version.h> int main(void) { size_t v = 1; v <<= 32; v += 1; printf("gsl header version : %s\n", GSL_VERSION); printf("gsl library version: %s\n", gsl_version); printf("size of _size_t is %d bytes\n", sizeof(size_t)); if(v == 1) printf("WTF\n"); gsl_spmatrix *m = gsl_spmatrix_alloc(1,1); gsl_spmatrix_set( m, 1, 0, 1.5 ); printf("1: got: %f\n", gsl_spmatrix_get( m, 1, 0)); printf("1: nnz: %d\n", gsl_spmatrix_nnz( m )); gsl_spmatrix_set( m, v, 0, 1.75 ); if (v >= m->size1) printf("will be reported as 'out of range'\n"); printf("2: got: %f\n", gsl_spmatrix_get( m, v, 0 )); printf("2: nnz: %d\n", gsl_spmatrix_nnz( m )); return 0; }


If 1st setter sets at index 2, then "v += 2;" leads to "out of range". They both set the same element

I don't understand this.
Are you claiming that v + 2 == 2 ?
While that might be deemed true on a 32-bit system, it's not the case when sizeof(size_t) is 8.
Could you provide the perl -V output of your Strawberry-5.32.1-PDL. (Maybe I've missed something significant.)
D:\C>perl -le "$x = (1 << 32) + 2; print $x; print 'WTF' if $x == 2;" 4294967298

Cheers,
Rob

In reply to Re^6: Math::GSL::SparseMatrix is broken if installed on latest 5.32.1.1 "Strawberry Perl PDL edition", whom to report this issue to? by syphilis
in thread 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.