[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58795] ode15i and ode15s fail for Windows 32b

From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #58795] ode15i and ode15s fail for Windows 32bit
Date: Thu, 3 Sep 2020 09:17:27 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36 Edg/85.0.564.44

Follow-up Comment #48, bug #58795 (project octave):

You wrote in comment #35 that "sunindextype" is used to interface to
BLAS/LAPACK functions inside SUNDIALS. You concluded that this means that
"sunindextype" must match the integer type used by the BLAS/LAPACK libraries,
and must hence match "octave_f77_int_type".
I agree with that conclusion.

I think there is only one place where we have to check on conversion from
"octave_idx_type" to "octave_f77_int_type".
I'm attaching an updated patch.

The following lines look fishy wrt integer overflow (in particular
"m_num*m_num" --- "m_num" is of type "octave_f77_int_type"):

        // FIXME : one should not allocate space for a full Jacobian
        // when using a sparse format.  Consider allocating less space
        // then possibly using SUNSparseMatrixReallocate to increase it.
        m_sunJacMatrix = SUNSparseMatrix (m_num, m_num, m_num*m_num,

The prototype of that function is "SUNMatrix SUNSparseMatrix(sunindextype M,
sunindextype N, sunindextype NNZ, int sparsetype)".

Is there something similarly straight-forward that we can do to avoid an
integer overflow?

(file #49737)

Additional Item Attachment:

File name: bug58795_ode15_integer_types_v2.patch Size:9 KB


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]