Bounds checking in Fortran [message #1732532] |
Tue, 17 May 2016 21:53  |
Eclipse User |
|
|
|
Hello,
I'm a newbie in Eclipse and in programming in general.
I'm running mathematical codes, and I'm getting the error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x10490c092
#1 0x10490b3b0
#2 0x7fff8da12ea9
#3 0x1047f061d
#4 0x1047f7688
#5 0x1047f77b8
My professor said the next best thing to do is to look into bounds checking. I think he's saying to check if I have something like this:
program main
Real*8,dimension(3) :: a
Real*parameter :: b=3
a(1)=3*b ;a(2)=4*b ; a(3)=4*b ; a(4)=9*b
end
Can anyone help me how I can set up eclipse so that when it runs, it performs bounds checking and tells, for the above example, that I'm out of bounds with
a(4)
|
|
|
Re: Bounds checking in Fortran [message #1732543 is a reply to message #1732532] |
Wed, 18 May 2016 03:28  |
Eclipse User |
|
|
|
This is a property of the Fortran compiler and runtime you're using.
If you are using the GNU Fortran, Google for it.
There are also some tools, depending on the operating system you're running under. Google for Valgrind.
|
|
|
Powered by
FUDForum. Page generated in 0.09026 seconds