Quantcast
Viewing all articles
Browse latest Browse all 3270

intrinsinc REAL & ifort 16.0.2 - bug?

Here is a small code:

PROGRAM test
IMPLICIT NONE
 INTEGER, PARAMETER :: wp=KIND(1.0d0)
 REAL(wp), ALLOCATABLE, DIMENSION(:) :: rr
 COMPLEX(wp), ALLOCATABLE, DIMENSION(:)  :: cc
 INTEGER :: n

 n=1000000 !<= this value is OK
 n=1100000 !<= this value causes error

   ALLOCATE(cc(n))
   cc=(1.0_wp, 1.0_wp)
   ALLOCATE(rr(n))
   rr(:)=REAL(cc(:), KIND=wp)  !<= here is runtime error
   ! rr(:)=REAL(cc(:))    !<= it's OK

END PROGRAM

When I compile  without any switch under ifort 16.0.2 program crashes. It runs well under -O3 optimization level and crushes under the

-O0, -O1 -O2 optimization levels.

It run well if one switch the working precision (wp) from DOUBLE PRECISION to SINGLE PRECISION (i.e. wp=KIND(1.0) )

Under ifort 16.0.1 everything is OK.


Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>