[mesa-users] Array out of bounds

Rob.Farmer Rob.Farmer at open.ac.uk
Wed Oct 30 08:03:40 EDT 2013


Hi Bill

Thanks for the explanation and the fix

Rob
________________________________________
From: Bill Paxton [paxton at kitp.ucsb.edu]
Sent: 29 October 2013 02:54
To: Rob.Farmer
Cc: mesa-users at lists.sourceforge.net
Subject: Re: [mesa-users] Array out of bounds

Hi Rob,

We have several solvers from Ernst Hairer who is one of the very top people in the area of numerical methods for solving partial differential equations.   He has literally written "THE" book -- actually, books -- with co-author Wanner.
Solving Ordinary Differential Equations I: Nonstiff Problems
Solving Ordinary Differential Equations II: Stiff and Differential-Algebraic Problems
The code in num/private that you are looking into is based on code downloaded from his website (see http://www.unige.ch/~hairer/).  The algorithms are brilliant, but the code goes back to the good-old-days of common blocks and implicit reals.   I've rewritten lots, but not all.  There are some cases that are supported in Hairer's version that we don't include as options in mesa/num.  The code you've run into is for one of the unsupported cases.  I'll delete it so it doesn't cause the compiler error when you turn on checking.

Cheers,
Bill



On Oct 28, 2013, at 4:23 PM, Rob.Farmer wrote:


Hi
Doing some debugging with gfortran compiler options turns out there's an out of bounds array:

MESA version 5527

file num/private/slvrod.dek line 117

ptr(1:n) => ak(m1+1:m1+n)

ak is size 4, m1=2 and n=4 thus we go between 3 and 6

This breaks the compile test suite

Not really sure what's going on in this code

slvrod.dek is called by num/private/mod_rosenbrock.f line 955 which has n and ns passed into it by line 584 (roscor) and now i'm losing track of what sets n or ns, or could it be m1 should be 0 somehow?

testing without the -fbounds-check shows the same issue just without throwing any errors

Any ideas?
Rob
-- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302).

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
mesa-users mailing list
mesa-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa-users





More information about the Mesa-users mailing list