- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to run program,eik.In the first place I got SIGSEGV segmentation fault.Following Ron's advice,I have changed a makefile.But now I am having this:
forrtl: severe (71): integer divide by zero
Image PC Routine Line Source
eik 000000000040475E pfpz_ 257 eik.f
eik 0000000000403B5A MAIN__ 123 eik.f
eik 000000000040311C Unknown Unknown Unknown
libc.so.6 00002B34EE3515A6 Unknown Unknown Unknown
eik 0000000000403019 Unknown Unknown Unknown
257 do 10 j=j1,j2,key
123 call pfpz(i,j1,j2,dh,key,is,js)
From the screen output I don't get which argument is zero.
Anybody has idea?
forrtl: severe (71): integer divide by zero
Image PC Routine Line Source
eik 000000000040475E pfpz_ 257 eik.f
eik 0000000000403B5A MAIN__ 123 eik.f
eik 000000000040311C Unknown Unknown Unknown
libc.so.6 00002B34EE3515A6 Unknown Unknown Unknown
eik 0000000000403019 Unknown Unknown Unknown
257 do 10 j=j1,j2,key
123 call pfpz(i,j1,j2,dh,key,is,js)
From the screen output I don't get which argument is zero.
Anybody has idea?
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
is key 0?
The Fortran DO does something like this
integer :: nIterations = (iEnd - iStart + 1) / iStep
do {
your statements
} while(--nIterations > 0)
.or.
while(--nIterations > 0) {
your statements }
choice of method dependent on compiler opton (do once)
I suspect your iStep value (key) is 0
Jim
The Fortran DO does something like this
integer :: nIterations = (iEnd - iStart + 1) / iStep
do {
your statements
} while(--nIterations > 0)
.or.
while(--nIterations > 0) {
your statements }
choice of method dependent on compiler opton (do once)
I suspect your iStep value (key) is 0
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Exectly,but it is in FORTRAN77.
c1=abs(t(i,j-1)-t(i+1,j-1))/(s(i,j-1)*dh)
bUT s(i,j-1)*dh can not be zero,regarding the input files I gave.
c1=abs(t(i,j-1)-t(i+1,j-1))/(s(i,j-1)*dh)
bUT s(i,j-1)*dh can not be zero,regarding the input files I gave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you tested?
256 if(key == 0) write(*,*) "(key == 0)"
257 do 10 j=j1,j2,key
123 call pfpz(i,j1,j2,dh,key,is,js)
The only logical explinations are for key to be 0, or compiler bug, or line number pointing at wrong line.
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are right,idb gives me:
Program received signal SIGFPE
pfpz (i=3, j1=7084408, j2=, dh=6.45473082e+37, key=0, is=2, js=2) at /home/milenko/eik1/eik.f:258
258 do 10 j=j1,j2,key
(idb)
Program received signal SIGFPE
pfpz (i=3, j1=7084408, j2=
258 do 10 j=j1,j2,key
(idb)

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