PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

FPE problems in 12.5

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
jand



Joined: 17 Aug 2008
Posts: 57

PostPosted: Wed Jun 13, 2012 7:49 pm    Post subject: FPE problems in 12.5 Reply with quote

Hi,

I recently started getting fpe warning messages such as:
Warning: ieee_underflow is signaling
Warning: ieee_inexact is signaling

It's unclear to me why this is happening (I can't seem to find the problem). When I turn on trapping (-Ktrap=inexact,unf), the code stops at lines which seem fine. A couple examples:

Code:

it2 = 1_IB
DO it=1,NT
DO ic=1,NCHAINT(it)
!  beta_pt(it2) = 1._RP/dTlog**REAL(it-1_IB,RP)
  obj(it2)%beta = beta_pt(it2)
  obj(it2)%cpt  = REAL(NCHAINT(it),RP)
  it2 = it2 + 1
ENDDO
ENDDO

If the commented line is uncommented, the code crashes.

Similarly, the following two lines crash the code.
Code:

  minlim = (/ hmin, 0.371_RP, LOG(2.e7_RP), 0.06_RP, LOG(4.53e-5_RP) /)
  maxlim = (/ hmx,  0.900_RP, LOG(8.e8_RP), 0.15_RP, LOG(0.049_RP) /)

When I remove the LOG from the above lines, the code gets past this but the crashes at another line which seems trivial.

The same code compiles fine under 10.1 and does not trigger any FPE warnings. Any ideas why this may be happening now?

Thanks, Jan
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6141
Location: The Portland Group Inc.

PostPosted: Thu Jun 14, 2012 9:23 am    Post subject: Reply with quote

Hi Jan,

Quote:
The same code compiles fine under 10.1 and does not trigger any FPE warnings. Any ideas why this may be happening now?
Thank the F2003 standard. The FPEs were probably occurring when built with 10.1 but are ignored by default. The F2003 standard requires the any FPE (even trival) be reported when a STOP statement is executed. Setting the environment flag "NO_STOP_MESSAGE" will revert to the old behavior of not printing these message.

Optimization will in many cases cause some degree of inexactness relative to IEEE 754. So your options here are to either ignore the warnings or to add the flag "-Kieee" to enforce IEEE 754 compliance. "-Kieee" can reduce performance since the optimizations that may effect precision will not be used and more precision but slower intrinsic routines will be used.

Note that our default optimizations do not stray more than 1 ulp of imprecision. Only if you use "-Mfprelaxed", "-Mpfapprox", or "-O4" do we go above 1 ulp. So if your problem is able to tolerate this degree of inaccuracy, then I would suggest ignoring the warnings.

Hope this helps,
Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group