Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.


code error at exit

code error at exit

When my code completes the iterations , saves the output it gives the following error;
Note: The following floating-point exceptions are signalling: IEEE_UNDERFLOW_FLAG IEEE_DENORMAL
can someone suggest how to remove this and what is its implications.

RE: code error at exit

It means you are getting a number that is smaller than the smallest number that the machine can hold. Why not just run it in the debugger and see where it stops.

This list of possible causes is not exhaustive

1) Uninitialized variables - could be typos (do you have implicit none?)
2) Ill conditioning errors. Can sometimes be fixed by changing real*4 to real*8 or real to double precision
3) Rounding errors - similar to 2
4) Missing variables in common blocks. Can be fixed by putting all common blocks in include files

RE: code error at exit

Dear xwb,
Thanks for the suggestions,
I am using main program with modules. Most of the modules have implicit none but some subroutines.
I use double precision in the compiler settings.
I have common variables in a module called Shared_data.f90. All other modules use shared_data
Should i try putting implicit none in all subroutines

RE: code error at exit

Yes - try putting implicit none in all subroutines, functions and block_data.

It could also be caused by an array running off the end.

How old is the code? Is it Fortran66 vintage? Are they using integer/DP variables to store characters?

RE: code error at exit

It is not Fortran is mentioned modules are being used; and, so, the program is being compiled with at least Fortraion 90.

I don't think the implicit none is going to fix anything.

To be sure, one can always go the old fashion route of bi-section to figure where the problem may be; but given that this is being reported as an IEEE exception, you can do better than need to find out how to make the program stop right when the exception is found and report where it is...

...a few years ago, I remember using G95 and having a similar problem...with G95, you can set a couple of environment variables (G95_FPU_UNDERFLOW, etc.) that, at run time, make the program stop right there and then, instead of continuing.

A quick google search seems to reveal that with gfortran you achieve the trapping with a compile-time flag.

RE: code error at exit

the problem is that the program does not stop. If i give 2000 iterations, it will complete and write the output but before termination this error message is printed.

RE: code error at exit

So... What compiler are you using? Did you even try my suggestions?... Please report compiler being used and command line.

RE: code error at exit

Hi salgerman,
Thanks for the help.
I am using simply fortran version 2.17 gfortran GNU fortran compiler.I have all modules with .f90 but one module with .f extension.
It is windows based. My OS is 64 bit windows 7.
I have added implicit none to all .f90 modules and its subroutines and not to module with .f .
I am not sure how to set the environment variables.

RE: code error at exit

There are instructions in the user's manual, did you look?...try adding the following to the compilation command:


RE: code error at exit

when i give
-ffpe-trap='underflow' or -ffpe-trap='list' or -ffpe-trap=list
in the fortran compiler flags
i get the following
Generating Makefile... Okay
Compiling .\boundary_conditions.f90
Fatal Error: Argument to -ffpe-summary is not valid: 'list'
Error(E42): Last command making (build\boundary_conditions.o) returned a bad status
Error(E02): Make execution terminated

* Failed *

RE: code error at exit

List is not a valid option - if you look at the docs it says


This means that you can put in one or more of the following as a comma separated list. eg




RE: code error at exit

...and they need to be quoted items in the list... should probably also include -g and -fbacktrace flags to the compilation command

RE: code error at exit

I have put the options and run the program for 10 iterations. It givs the same
Note: The following floating-point exceptions are signalling: IEEE_DENORMAL
where and what for should i look now.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close