Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check Error Fortran

Status
Not open for further replies.

alcantara20

Programmer
Oct 1, 2012
3
I'm write code in Fortran language for Computation Optimization when compile my program I got error message :

forrtl: severe (71): integer divide by zero
Image PC Routine Line Source
f0511 00000000007536A5 Unknown Unknown Unknown
f0511 00000000007538C8 Unknown Unknown Unknown
f0511 000000000040347C Unknown Unknown Unknown
libc.so.6 000000338101ECDD Unknown Unknown Unknown
f0511 0000000000403379 Unknown Unknown Unknown
make: *** [all] Error 71

How I can fix this problem if the error message didn't give the line that indicates error? I don't have idea to solve this.
 
Re-compile the program, but first add flags to help runtime error reporting.


 
I tried put the flags to help runtime error reporting but still didn't show me the line that indicates error.
 
Hi alcantara20

In a case like this I usually put in a number of write statements in the program (here and there):
write (*,*) '01'
write (*,*) '02'
write (*,*) '03'
....
and continue to do so until I have located the statement where the error is.
 
Hi again
Well, what I said above only applies to programs that I have already compiled, but got "divide by zoro" during runtime ...
but I see now that you got this during compilation ...
 
which compiler are you using and what flags? Please post the compilation command. Is it true that you are getting the "divide by zero" error at compilation time? I thought that would be a run time error...maybe the compiler is smart enough to realize that a variable in the denominator, somewhere, has not been initialized at all before its use.
 
This would be a hell of a compiler if it checks division by zero at compilation time.

forrtl = fortran run time library !
Seems to be the intel compiler for the look of the error message.
severe (71): integer divide by zero is a runtime error there.

alcantara:
place a write-statement every 20 lines or such giving you the output 'I am in line xxx'. Then see which is the last message you receive and narrow down on the line in question in the section before the next write.

Norbert


The optimist believes we live in the best of all possible worlds - the pessimist fears this might be true.
 
I'm using intel fortran compiler with version 12. I create makefile to compile my code. I will follow your suggestion and try to compile again my code. Thanks guys[smile2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top