CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

F-90::Regarding Chk bounds

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   June 7, 2005, 07:02
Default F-90::Regarding Chk bounds
  #1
Arnie
Guest
 
Posts: n/a
hi

i am having some problem regardng compiling my f-90 program in Compaq Visual FORTRAN 6.5. The problem is as follows:: when i compile the program with check bounds option i get some results and when i do it without check bounds option, i get different results. Can anybody help me out with this? I also want to know that what actually "check bounds" means?? and what are the differences in compiling with n without it?

Thanks n waiting 4 positive response

Arnie
  Reply With Quote

Old   June 7, 2005, 11:21
Default Re: F-90::Regarding Chk bounds
  #2
agg
Guest
 
Posts: n/a
When you use "check bounds" option, the compiler checks your program to see if the code is accessing memory locations outside of those assigned. For example, if you have declared an array A of size 10 and your program tries to access A(11) then the compiler will catch this with check bounds option.

Now when you compile with check bounds option, from my experience, the code stops when an outside memory is accessed. But in your case you say that the program runs, but gives a different answer. Do you know which of the two answers are correct? My guess is that your solution without check bounds might be incorrect, but further debugging might be needed.

Good luck.

  Reply With Quote

Old   June 7, 2005, 17:43
Default Re: F-90::Regarding Chk bounds
  #3
Mani
Guest
 
Posts: n/a
I am not sure if this is compiler dependend, but the "check bounds" option with my compilers (absoft, portland group, intel) does not mean that the compiler will check for out-of-bounds indices. In fact, the compiler may not even able to do so, because some array indices may not be evaluated at compile time. More precisely (and maybe this is what you meant, agg), the compiler will produce machine code which checks at runtime for out-of-bound indices. So you really only know if you're out of bounds when you execute your program, not when you compile it. Typically, the program will be interrupted and will print out some statement telling you in which subroutine, which line you went out of bounds on which array.

If your program produces different results depending on compiler options, you might indeed have a segmentation problem. However, it's not necessarily an array "out of bounds". It could be something else, like a pointer to unallocated memory, or some inconsistency in subroutine arguments.
  Reply With Quote

Old   June 10, 2005, 05:07
Default Re: F-90::Regarding Chk bounds
  #4
Arnie
Guest
 
Posts: n/a
Hi agg,

I am sorry to have mistakenly told you that my prog was running with check bounds option. Its running only without chk. bounds. And its giving wrong answers. I got wheres the snag in the program, actually some value calculated, which is used in a subroutine, is causing problems. I dont know why he value is getiing incorrectly calculated. I guess its some modelling error.

Thanks for your support

Arnie
  Reply With Quote

Old   June 10, 2005, 10:40
Default Re: F-90::Regarding Chk bounds
  #5
agg
Guest
 
Posts: n/a
Try using -g option or any debugger your program comes with to track errors.
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
bounds error jai CFX 3 July 3, 2014 06:03
fatal bounds error detected s_baghalian CFX 0 April 28, 2011 11:51
Bounds error detected Felix CFX 2 July 30, 2007 13:35
Solver: Fatal Bounds error detected hagupta CFX 5 March 24, 2006 11:17
*** WARNING #065 *** OUT OF BOUNDS VALUE??? Ted Crilly CD-adapco 4 March 14, 2005 13:28


All times are GMT -4. The time now is 23:34.