********> bugfix.11 Author: James Caldwell Date: 4/25/95, amended 5/29/95 by Petr Mejzlik, changing 'atwork' to 'awork' (distributed source was correct) Programs: resp Severity: moderate Problem: Lapack routine detects singular matrix Affects: multiple molecule fits Cause: elements on matrix diagonal are 0 An earlier implementation using Numerical Recipes routines set these elements to 'very small'; this was lost in converting to Lapack. Fix: Make the following change to resp.f ------------------------------------------------------------------------ *** OLD resp.f --- NEW resp.f *************** *** 2407,2412 c c the solution "x" is returned in "b" (bwork) c call DGETRF( NATPL1,NATPL1,awork,maxq,iscr1,istat) if(istat.lt. 0) then write(6,'('' chgopt: LU decomp has an illegal value'')') --- 2407,2419 ----- c c the solution "x" is returned in "b" (bwork) c + c -- condition the matrix diagonal to avoid DGETRF() detecting + c singularity + c + do jn = 1,natpl1 + if (abs(awork(jn,jn)).lt. 1.d-10) awork(jn,jn) = 1.d-10 + enddo + c call DGETRF( NATPL1,NATPL1,awork,maxq,iscr1,istat) if(istat.lt. 0) then write(6,'('' chgopt: LU decomp has an illegal value'')') ------------------------------------------------------------------------ Temporary workarounds: none