Silverfrost Forums

Welcome to our forums

LAPACK la_constants will not compile

23 Mar 2025 7:40 #32012

I am unsure at which compiler version this started, but using version 9, la_constants.f90 from LAPACK generates a compiler time error of 'Divide by zero'. The problem is reproduced in the following snippet:

module LA_CONSTANTS
!  Standard constants for 
   integer, parameter :: sp = kind(1.e0)

   real(sp), parameter :: sone = 1.0_sp

!  Scaling constants
   real(sp), parameter :: sulp = epsilon(0._sp)
   real(sp), parameter :: ssafmin = real(radix(0._sp),sp)**max( &
      minexponent(0._sp)-1, &
      1-maxexponent(0._sp) &
   )
   real(sp), parameter :: ssafmax = sone / ssafmin
end module LA_CONSTANTS
24 Mar 2025 7:14 #32013

Simon

This has now been fixed for the next release of FTN95.

In the mean time you can use tiny(sone) instead of ssafmin or use double precision.

Please login to reply.