[Wien] Possible bug in SRC_lapw0/efg.f
Laurence Marks
L-marks at northwestern.edu
Wed Nov 5 17:10:04 CET 2014
It is a compiler bug of some sort, but I also think that piece of code is
not completely safe. My version (which has an extra trap for
TENS(1)=TENS(2)=TENS(3) and I think is safe) is:
!...........DEFINE VXX,VYY,VZZ ACCORDING ABS( TENS)
JMAX=1
ABSMAX=abs(TENS(1))
JMIN=1
ABSMIN=ABSMAX
!
DO 62 JT=2,3
IF( ABS(TENS(JT)).GT.ABSMAX ) THEN
JMAX=JT
ABSMAX=ABS(TENS(JT))
ENDIF
IF( ABS(TENS(JT)).LT.ABSMIN ) THEN
JMIN=JT
ABSMIN=ABS(TENS(JT))
ENDIF
62 CONTINUE
if(jmax .eq. jmin)then
JMIDDL=jmax
else
JMIDDL=6-JMAX-JMIN
endif
___________________________
Professor Laurence Marks
Department of Materials Science and Engineering
Northwestern University
www.numis.northwestern.edu
MURI4D.numis.northwestern.edu
Co-Editor, Acta Cryst A
"Research is to see what everybody else has seen, and to think what nobody
else has thought"
Albert Szent-Gyorgi
On Nov 5, 2014 12:59 AM, "Peter Blaha" <pblaha at theochem.tuwien.ac.at> wrote:
> I don't understand that.
>
> It can only be a compiler bug (due to optimization), where it
> executes the code AFTER the do-loop BEFORE it finishes the do-loop ???
> (or you have values for TENS() which are gt. 1000000 or not defined,
> since the diagonalization in EIGEN3 went wrong and the test of "RES"
> did not catch it ??
>
>
>
> Am 04.11.2014 21:52, schrieb Laurence Marks:
> > I am getting a sigsev in efg.f with the version on the web (today). I
> think it is the trap for max/min values, so after
> >
> >
> > !...........DEFINE VXX,VYY,VZZ ACCORDING ABS( TENS)
> > ABSMAX=-1.
> > ABSMIN=1000000.
> >
> > I added:
> > !
> > JMAX=1
> > ABSMAX=abs(TENS(1))
> > JMIN=1
> > ABSMIN=abs(TENS(1))
> >
> > (I seem to remember this one from earlier).
> >
> > --
> > Professor Laurence Marks
> > Department of Materials Science and Engineering
> > Northwestern University
> > www.numis.northwestern.edu <http://www.numis.northwestern.edu>
> > Corrosion in 4D: MURI4D.numis.northwestern.edu <
> http://MURI4D.numis.northwestern.edu>
> > Co-Editor, Acta Cryst A
> > "Research is to see what everybody else has seen, and to think what
> nobody else has thought"
> > Albert Szent-Gyorgi
> >
> >
> > _______________________________________________
> > Wien mailing list
> > Wien at zeus.theochem.tuwien.ac.at
> > http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
> > SEARCH the MAILING-LIST at:
> http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
> >
>
> --
> -----------------------------------------
> Peter Blaha
> Inst. Materials Chemistry, TU Vienna
> Getreidemarkt 9, A-1060 Vienna, Austria
> Tel: +43-1-5880115671
> Fax: +43-1-5880115698
> email: pblaha at theochem.tuwien.ac.at
> -----------------------------------------
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
> SEARCH the MAILING-LIST at:
> http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20141105/84a2ec69/attachment.html>
More information about the Wien
mailing list