Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug in zheevd #43

Open
Open
@jkd2016

Description

@jkd2016

There is an issue with the routine zheevd when compiled with Intel fortran using the optimization-O2 or-O3.

The problem occurs at line 285 of dlaed4:

DELTA( J ) = ( D( J )-D( I ) ) - TAU

which evaluates to zero because of the compiler not respecting the parenthesis. This results in a division-by-zero later on. Including-assume protect_parens fixes the problem.

Here is a simple program which produces the error:

program testimplicit noneinteger, parameter :: n=27integer i,jinteger liwork,lrwork,lwork,infointeger, allocatable :: iwork(:)real(8), allocatable :: w(:),rwork(:)complex(8), allocatable :: a(:,:),work(:)liwork=5*n+3lrwork=2*n**2+5*n+1lwork=n**2+2*nallocate(w(n),a(n,n))allocate(iwork(liwork),rwork(lrwork),work(lwork))a(:,:)=0.d0do i=1,n  a(i,i)=1.d0  do j=i+1,n    a(i,j)=cos(dble(i))  end doend docall zheevd('V','U',n,a,n,w,work,lwork,rwork,lrwork,iwork,liwork,info)print *,'info',infoend program

I'm not sure whether this is a compiler, LAPACK or user issue. I've added-assume protect_parens to our code (elk.sourceforge.net) and made zheev as the default eigenvalue solver for the moment.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp