bugGNU Octave - Bugs: bug #55905, ode15{i,s} allocate enough memory...

 
 

bug #55905: ode15{i,s} allocate enough memory for a full jacobian when the provided jacobian is sparse

Submitted by:  Carlo de Falco <cdf>
Submitted on:  Wed 13 Mar 2019 08:32:38 AM UTC  
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Performance
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 15 Sep 2020 02:52:32 PM UTC, comment #4: 

Seems to work for me (on Windows) and the buildbots.

Closing as fixed.

Markus Mützel <mmuetzel>
Project Member
Mon 14 Sep 2020 04:33:19 PM UTC, comment #3: 

Response per mail by Bill Greene:

> Looks OK to me. You can associate my name with this change as appropriate.


Thanks for your quick response.

I pushed the patch here:
https://hg.savannah.gnu.org/hgweb/octave/rev/3eb2fab71028

Marking as ready for test.

Markus Mützel <mmuetzel>
Project Member
Sun 13 Sep 2020 06:10:57 PM UTC, comment #2: 

Sorry it took so long before you got any feedback.

I added a commit message and a configure check for the function SUNSparseMatrix_Reallocate and made its usage conditional on the check result. Please, see the attached patch.

Would it be ok to check this in with your name and email address to make it easier to reach out in case some doubts arise in the future?

Would you like to be added to the list of contributors in the manual?

(file #49795)

Markus Mützel <mmuetzel>
Project Member
Fri 20 Sep 2019 06:48:45 PM UTC, comment #1: 

I fixed this bug following the suggestion in the
"FIXME comment". An hg patch file is attached.
Note, one implication of this fix is that SUNDIALS 4 (or greater)
is now required because the function, SUNSparseMatrix_Reallocate,
used in the fix is not available in older versions of SUNDIALS.

(file #47555)

Bill Greene <billgreene>
Wed 13 Mar 2019 08:32:38 AM UTC, original submission:  

The memory allocation for the sparse jacobian
is done in an overly safe way here

The memory is allocated as if the jacobian was full.

It would be more memory efficient to check the actual size of the needed memory before doing the allocation.

I have already added a FIXME comment in the code, I am posting this here as well in order not to forget.

Carlo de Falco <cdf>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #49795:  bug55905_ode15_v2.patch added by mmuetzel (3KiB - application/octet-stream)
file #47555:  ode15.diff added by billgreene (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Updated the item)
  • -email is unavailable- added by billgreene (Updated the item)
  • -email is unavailable- added by cdf (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-09-15 mmuetzel StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2020-09-14 mmuetzel StatusPatch Reviewed => Ready For Test
    2020-09-13 mmuetzel Attached File- => Added bug55905_ode15_v2.patch, #49795
        StatusIn Progress => Patch Reviewed
    2019-09-20 billgreene Attached File- => Added ode15.diff, #47555

    Back to the top


    Powered by Savane 3.5