- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to use EPDECOL code to solve PDEs. When I run the code with an exmaple driver provided with the code, I recive error msgs. I was told that the code is working well with others, but not with me. I didn't alter anything in the code . The error I get isas follow:
30,4 ====> [these are the values of NINT and KORD requested as READ]
NO. OF SUBINTERVALS = 30 KORD = 4 EPS = 0.10D-03
T = 0.100E-02 DT = 0.340E-03 TOTAL STEPS = 11
forrtl: severe (161): Program Exception - array bounds exceeded
Image PC Routine Line Source
EXAMPLE_EPDECOL_S 00415B71 Unknown Unknown Unknown
EXAMPLE_EPDECOL_S 0040156A Unknown Unknown Unknown
EXAMPLE_EPDECOL_S 0044B569 Unknown Unknown Unknown
EXAMPLE_EPDECOL_S 0043F514 Unknown Unknown Unknown
kernel32.dll 77E814C7 Unknown Unknown Unknown
NO. OF SUBINTERVALS = 30 KORD = 4 EPS = 0.10D-03
T = 0.100E-02 DT = 0.340E-03 TOTAL STEPS = 11
forrtl: severe (161): Program Exception - array bounds exceeded
Image PC Routine Line Source
EXAMPLE_EPDECOL_S 00415B71 Unknown Unknown Unknown
EXAMPLE_EPDECOL_S 0040156A Unknown Unknown Unknown
EXAMPLE_EPDECOL_S 0044B569 Unknown Unknown Unknown
EXAMPLE_EPDECOL_S 0043F514 Unknown Unknown Unknown
kernel32.dll 77E814C7 Unknown Unknown Unknown
Incrementally linked image--PC correlation disabled.
Hope some one have a clue
Thank you
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
NO. OF SUBINTERVALS = 30 KORD = 4 EPS = 0.10D-03
T = 0.100E-02 DT = 0.340E-03 TOTAL STEPS = 11
Judging from the values of EPS & T I am guessing you are using EPS as the step variable in a DO loop (or are iteratively adding it) and testing for equality against T.
The problem here is that certain decimal values cannot be expressed exactly using binary so as an example the loop
DO i=0.1,1.0,0.1
end do
is likely to iterate 11 times and not 10 as might be expected - the 10th iteration will result in a value of something like 0.9999999 and not 1.0
A better loop would be
DO j=1,10
i=j/10.0
END DO
This will perform its terminating test on an integer variable which can be expressed exactly and will end on its 10th iteration

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page