Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Comunicados
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussões

forrtl: severe (71): integer divide by zero

milenko1976
Principiante
3.843 Visualizações
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?
0 Kudos
4 Respostas
jimdempseyatthecove
Colaborador honorário III
3.843 Visualizações
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
milenko1976
Principiante
3.843 Visualizações
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.
jimdempseyatthecove
Colaborador honorário III
3.843 Visualizações

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

milenko1976
Principiante
3.843 Visualizações
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)

Responder