Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Problem compiling NAG Library

M__L_
Beginner
1,029 Views

Dear folks,

I am using

>ifort -O3 -xHost -ipo

to compile a huge program package including a NAG Library file and get the following error message:

NAG_TProp.f(8887): remark #7922: The value was too small when converting to REAL(KIND=8); the result is in the denormalized range.   [1.11253692925361D-308]
      DATA X02CON /1.11253692925361D-308 /
-------------------^

The corresponding function in the file in which the error occurs looks like this

      DOUBLE PRECISION FUNCTION X02AMF()
C     MARK 12 RELEASE. NAG COPYRIGHT 1986.
C
C     RETURNS THE 'SAFE RANGE' PARAMETER
C     I.E. THE SMALLEST POSITIVE MODEL NUMBER Z SUCH THAT
C     FOR ANY X WHICH SATISFIES X.GE.Z AND X.LE.1/Z
C     THE FOLLOWING CAN BE COMPUTED WITHOUT OVERFLOW, UNDERFLOW OR OTHER
C     ERROR
C
C        -X
C        1.0/X
C        SQRT(X)
C        LOG(X)
C        EXP(LOG(X))
C        Y**(LOG(X)/LOG(Y)) FOR ANY Y
C
      DOUBLE PRECISION X02CON
      DATA X02CON /1.11253692925361D-308 /
C     .. Executable Statements ..
      X02AMF = X02CON
      RETURN
      END

My ifort version is

>ifort -V
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.1.133 Build 20141023
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

Is this a compiler problem? Are there any option I could try? I also couldn't find a 'newer' version of the NAG Routine online, so I can't tell if this occurs only with this quite old version.

Thank you in advance,

Maja

0 Kudos
2 Replies
mecej4
Honored Contributor III
1,029 Views

The compiler is telling you that the value in question, which is equal to TINY(1d0)/2, is too small to be represented as a normalized number. However, it only issues the comment "x02amf.f(18): remark #7922: The value was too small...", which you are free to ignore. Many hacks can be found in old Fortran 77 code that are going to cause a modern compiler to cough, and new intrinsics such as TINY, EPSILON, etc., make those hacks unnecessary. 

Current versions of the NAG Fortran library are Mark 24 and Mark 25, and what you have predates Fortran 90. I am surprised that you have the source code of the NAG library, which is currently a commercial and copyright-protected product.

0 Kudos
M__L_
Beginner
1,029 Views

Actually, I thought it would stop compiling at this point, but it seems I was just too impatient and you're right, it's actually just taking a while to finish the compilation. Wow, I'm relieved it's going through now. :D Thank you.

0 Kudos
Reply