[Wien] Some (bug ?) in SRC_lapwdm/l2main.frc in determining NEMIN, NEMAX

Tianjiao Zhang tjzhang at phys.ntu.edu.tw
Tue Aug 10 09:45:35 CEST 2004


Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hello,
  It seems that in rare cases (NEMAX+1) would be smaller  than NEMIN, 
which leads  to feed negative 4th argument to zgemm/dgemm, program 
loader refuses to go further and  lapwdm crashes.

According to the following lines of code, I really don't see any logic 
flow to guarantee that (NEMAX+1)>=NEMIN:

 IF(E(NUM).LT.EMIN) NEMIN=NEMIN+1
IF(abs(WEIGHT(NUM)).gt.1d-5) NEMAX=NEMAX+1


So I changed them to
     IF(abs(WEIGHT(NUM)).gt.1d-5) then
        NEMAX=NEMAX+1
        IF(E(NUM).LT.EMIN) NEMIN=NEMIN+1
      ENDIF

And it works and the program does not crash. However, I am not very sure 
whether the correction changes the physics significantly. Or should
we just ignore those parts feeding negative 4th argument to zgemm  ? Or 
better treatment ?
These lines of codes are the same in wien2k and wien2003.

Sincerely,

Tianjiao






More information about the Wien mailing list