hdiff output

r29858/MLPB3.f90 2016-01-29 09:30:05.926165207 +0000 r29857/MLPB3.f90 2016-01-29 09:30:06.126167789 +0000
  1: SUBROUTINE MLPB3(X,V,ENERGY,GTEST,SECT)  1: SUBROUTINE MLPB3(X,V,ENERGY,GTEST,SECT)
  2: USE KEY  2: USE KEY
  3: USE MODHESS  3: USE MODHESS
  4: USE COMMONS, ONLY : DEBUG  4: USE COMMONS, ONLY : DEBUG
  5: IMPLICIT NONE  5: IMPLICIT NONE
  6: LOGICAL GTEST,SECT  6: LOGICAL GTEST,SECT
  7: DOUBLE PRECISION X(NMLP), V(NMLP), ENERGY, DUMMY1, DUMMY2, DUMMY3, DUMMY4, SUMINPUTS  7: DOUBLE PRECISION X(NMLP), V(NMLP), ENERGY, DUMMY1, DUMMY2, DUMMY3, DUMMY4, SUMINPUTS
  8: DOUBLE PRECISION Y(MLPOUT), PROB(MLPOUT), PMLPOUTJ1, DMAX  8: DOUBLE PRECISION Y(MLPOUT), PROB(MLPOUT), PMLPOUTJ1, DMAX
  9: DOUBLE PRECISION DYW1G(MLPHIDDEN), DPCW1BG(MLPOUT,MLPHIDDEN)  9: DOUBLE PRECISION DYW1G(MLPHIDDEN), DPCW1BG(MLPOUT,MLPHIDDEN)
 10: DOUBLE PRECISION DYW2G(MLPOUT,MLPHIDDEN,MLPIN), DPCW2BG(MLPHIDDEN,MLPIN), TANHSUM(MLPHIDDEN), SECH2(MLPHIDDEN) 10: DOUBLE PRECISION DYW2G(MLPOUT,MLPHIDDEN,MLPIN), DPCW2BG(MLPHIDDEN,MLPIN), TANHSUM(MLPHIDDEN), SECH2(MLPHIDDEN)
 11: DOUBLE PRECISION DYCDBHID(MLPOUT), DPCDBHID(MLPOUT), DPCDBHIDOUTJ1, D2PCDBHID2, D2YCDBHID2(MLPOUT) 11: DOUBLE PRECISION DYCDBHID(MLPOUT), DPCDBHID(MLPOUT), DPCDBHIDOUTJ1, D2PCDBHID2, D2YCDBH2(MLPOUT)
 12: DOUBLE PRECISION DPCDW2BG(MLPOUT,MLPHIDDEN,MLPIN), D2YCDBHIDDW2BG, D2PCDBHIDDW2BG 12: DOUBLE PRECISION DPCDW2BG(MLPOUT,MLPHIDDEN,MLPIN), D2YCDBHIDDW2BG, D2PCDBHIDDW2BG
 13: DOUBLE PRECISION DPCDBHIDDW1BG(MLPOUT,MLPHIDDEN) 13: DOUBLE PRECISION DPCDBHIDDW1BG(MLPOUT,MLPHIDDEN)
 14: INTEGER MLPOUTJ1, MLPOFFSET, BOFFSET 14: INTEGER MLPOUTJ1, MLPOFFSET, BOFFSET
 15: INTEGER GETUNIT, LUNIT, J1, J2, J3, J4, K4, K2, K3, J5 15: INTEGER GETUNIT, LUNIT, J1, J2, J3, J4, K4, K2, K3, J5
 16:  16: 
 17: ! 17: !
 18: ! Variables are ordered  18: ! Variables are ordered 
 19: ! w^2_{jk} at (j-1)*MLPIN+k 19: ! w^2_{jk} at (j-1)*MLPIN+k
 20: !   up to MLPHIDDEN*MLPIN, then 20: !   up to MLPHIDDEN*MLPIN, then
 21: ! w^1_{ij} at MLPHIDDEN*MLPIN + (i-1)*MLPHIDDEN+j 21: ! w^1_{ij} at MLPHIDDEN*MLPIN + (i-1)*MLPHIDDEN+j
157: !     b hidden with w^1 beta gamma157: !     b hidden with w^1 beta gamma
158: !158: !
159:       DO J2=1,MLPHIDDEN ! J2 is gamma159:       DO J2=1,MLPHIDDEN ! J2 is gamma
160:          DO J4=1,MLPOUT ! J4 is beta 160:          DO J4=1,MLPOUT ! J4 is beta 
161:             HESS(BOFFSET+1,MLPOFFSET+(J4-1)*MLPHIDDEN+J2)= &161:             HESS(BOFFSET+1,MLPOFFSET+(J4-1)*MLPHIDDEN+J2)= &
162:   &         HESS(BOFFSET+1,MLPOFFSET+(J4-1)*MLPHIDDEN+J2) + DPCDBHIDOUTJ1*DPCW1BG(J4,J2)/PMLPOUTJ1**2  &162:   &         HESS(BOFFSET+1,MLPOFFSET+(J4-1)*MLPHIDDEN+J2) + DPCDBHIDOUTJ1*DPCW1BG(J4,J2)/PMLPOUTJ1**2  &
163:   &                                -DPCDBHIDDW1BG(J4,J2)/PMLPOUTJ1163:   &                                -DPCDBHIDDW1BG(J4,J2)/PMLPOUTJ1
164:          ENDDO164:          ENDDO
165:       ENDDO165:       ENDDO
166: 166: 
167: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
168:  
169:       DO J4=1,MLPOUT ! J4 is input epsilon167:       DO J4=1,MLPOUT ! J4 is input epsilon
170:          DUMMY1=0.0D0168:          DUMMY1=0.0D0
171:          DO J2=1,MLPHIDDEN ! J2 is gamma169:          DO J2=1,MLPHIDDEN ! J2 is gamma
172:             DUMMY1=DUMMY1+SECH2(J2)*TANHSUM(J2)*(X(MLPHIDDEN*MLPIN + (J4-1)*MLPHIDDEN+J2)+X(BOFFSET+2))170:             DUMMY1=DUMMY1+SECH2(J2)*TANHSUM(J2)*(X(MLPHIDDEN*MLPIN + (J4-1)*MLPHIDDEN+J2)+X(BOFFSET+2))
173:          ENDDO171:          ENDDO
174:          D2YCDBHID2(J4)=-2.0D0*SUMINPUTS**2*DUMMY1172:          D2YCDBH2(J4)=-2.0D0*SUMINPUTS**2*DUMMY1
175:       ENDDO173:       ENDDO
176: 174: 
177:       DUMMY1=0.0D0175:       DUMMY1=0.0D0
178:       DUMMY3=0.0D0176:       DUMMY2=0.0D0
179:       DO J4=1,MLPOUT177:       DO J4=1,MLPOUT
180:          DUMMY1=DUMMY1+PROB(J4)*D2YCDBHID2(J4)+DPCDBHID(J4)*DYCDBHID(J4)178:          DUMMY1=DUMMY1+PROB(J4)*DYCDBHID(J4)
181:          DUMMY3=DUMMY3+PROB(J4)*DYCDBHID(J4)179:          DUMMY2=DUMMY2+DPCDBHID(J4)*DYCDBHID(J4)+PROB(J4)*D2YCDBH2(J4)
182:       ENDDO180:       ENDDO
183: 181: 
184:       D2PCDBHID2=DPCDBHID(MLPOUTJ1)*(DYCDBHID(MLPOUTJ1)-DUMMY3) + PMLPOUTJ1*(D2YCDBHID2(MLPOUTJ1)-DUMMY1)182:       D2PCDBHID2=DPCDBHID(MLPOUTJ1)**2+PMLPOUTJ1*D2YCDBH2(MLPOUTJ1)-DPCDBHID(MLPOUTJ1)*DUMMY1 &
 183:   &               -PMLPOUTJ1*DUMMY2
185: 184: 
186:       HESS(BOFFSET+1,BOFFSET+1)=HESS(BOFFSET+1,BOFFSET+1)+DPCDBHID(MLPOUTJ1)**2/PMLPOUTJ1**2-D2PCDBHID2/PMLPOUTJ1185:       HESS(BOFFSET+1,BOFFSET+1)=HESS(BOFFSET+1,BOFFSET+1)+DPCDBHID(MLPOUTJ1)**2/PMLPOUTJ1**2-D2PCDBHID2/PMLPOUTJ1
187: !186: !
188: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
189: ! 
190: !     b hidden with w^2 beta gamma187: !     b hidden with w^2 beta gamma
191: !188: !
192:       DUMMY3=0.0D0 
193:       DO J4=1,MLPOUT 
194:          DUMMY3=DUMMY3+PROB(J4)*DYCDBHID(J4) 
195:       ENDDO 
196:       DO J4=1,MLPOUT189:       DO J4=1,MLPOUT
197:          DPCDBHID(J4)=PROB(J4)*(DYCDBHID(J4)-DUMMY2)190:          DPCDBHID(J4)=PROB(J4)*(DYCDBHID(J4)-DUMMY2)
198:       ENDDO191:       ENDDO
199: 192: 
200:       DUMMY1=0.0D0193:       DUMMY1=0.0D0
201:       DO J4=1,MLPOUT194:       DO J4=1,MLPOUT
202:          DUMMY1=DUMMY1+PROB(J4)*DYCDBHID(J4)195:          DUMMY1=DUMMY1+PROB(J4)*DYCDBHID(J4)
203:       ENDDO196:       ENDDO
204: 197: 
205:       DO J2=1,MLPHIDDEN ! J2 is beta198:       DO J2=1,MLPHIDDEN ! J2 is beta
206:          DO J3=1,MLPIN  ! J3 is gamma199:          DO J3=1,MLPIN  ! J3 is gamma
 200:             DUMMY2=0.0D0
 201:             DUMMY3=0.0D0
207:             DUMMY4=0.0D0202:             DUMMY4=0.0D0
208:             DO J4=1,MLPOUT203:             DO J4=1,MLPOUT
209:                DUMMY4=DUMMY4+PROB(J4)*(X(MLPOFFSET+(J4-1)*MLPHIDDEN+J2)+X(BOFFSET+2))204:                DUMMY4=DUMMY4+PROB(J4)*DYW2G(J4,J2,J3)
210:             ENDDO205:             ENDDO
211:             DO J4=1,MLPOUT206:             DO J4=1,MLPOUT
212:                DPCDW2BG(J4,J2,J3)=PROB(J4)*MLPDAT(J1,J3)*SECH2(J2)*(X(MLPOFFSET+(J4-1)*MLPHIDDEN+J2)+X(BOFFSET+2)-DUMMY4)207:                DPCDW2BG(J4,J2,J3)=PROB(J4)*(DYW2G(J4,J2,J3)-DUMMY4)
213:             ENDDO208:             ENDDO
214:             DUMMY2=0.0D0 
215:             DUMMY3=0.0D0 
216:             DO J4=1,MLPOUT209:             DO J4=1,MLPOUT
217:                DUMMY2=DUMMY2+DYCDBHID(J4)*DPCDW2BG(J4,J2,J3)210:                DUMMY2=DUMMY2+DYCDBHID(J4)*DPCDW2BG(J4,J2,J3)
218:                DUMMY3=DUMMY3-2.0D0*PROB(J4)*MLPDAT(J1,J3)*SUMINPUTS*(X(MLPOFFSET+(J4-1)*MLPHIDDEN+J2)+X(BOFFSET+2))*SECH2(J2)*TANHSUM(J2)211:                DUMMY3=DUMMY3-2.0D0*PROB(J4)*MLPDAT(J1,J3)*SUMINPUTS*(X(MLPOFFSET+(J4-1)*MLPHIDDEN+J2)+X(BOFFSET+2))*SECH2(J2)*TANHSUM(J2)
219:             ENDDO212:             ENDDO
220: 213: 
221:             D2YCDBHIDDW2BG=-2.0D0*PMLPOUTJ1*MLPDAT(J1,J3)*SUMINPUTS*(X(MLPOFFSET+(MLPOUTJ1-1)*MLPHIDDEN+J2)+X(BOFFSET+2))*SECH2(J2)*TANHSUM(J2) &214:             D2YCDBHIDDW2BG=-2.0D0*MLPDAT(J1,J3)*SUMINPUTS*(X(MLPOFFSET+(MLPOUTJ1-1)*MLPHIDDEN+J2)+X(BOFFSET+2))*SECH2(J2)*TANHSUM(J2)
222:   &         + DPCDW2BG(MLPOUTJ1,J2,J3)*(DYCDBHID(MLPOUTJ1)-DUMMY1)-PMLPOUTJ1*(DUMMY2+DUMMY3) 215:             D2PCDBHIDDW2BG=DPCDW2BG(MLPOUTJ1,J2,J3)*(DYCDBHID(MLPOUTJ1)-DUMMY1)+PMLPOUTJ1*(D2YCDBHIDDW2BG-DUMMY2-DUMMY3) 
223:             HESS(BOFFSET+1,(J3-1)*MLPHIDDEN+J2)= &216:             HESS(BOFFSET+1,(J3-1)*MLPHIDDEN+J2)= &
224:   &         HESS(BOFFSET+1,(J3-1)*MLPHIDDEN+J2) + DPCDBHID(MLPOUTJ1)*DPCDW2BG(MLPOUTJ1,J2,J3)/PMLPOUTJ1**2 - D2PCDBHIDDW2BG/PMLPOUTJ1217:   &         HESS(BOFFSET+1,(J3-1)*MLPHIDDEN+J2) + DPCDBHID(MLPOUTJ1)*DPCDW2BG(MLPOUTJ1,J2,J3)/PMLPOUTJ1**2 - D2PCDBHIDDW2BG/PMLPOUTJ1
225:          ENDDO218:          ENDDO
226:       ENDDO219:       ENDDO
227: !220: !
228: ! This block w^1 with w^1 is locally symmetric221: ! This block w^1 with w^1 is locally symmetric
229: !222: !
230:       DO J4=1,MLPOUT ! J4 is beta 223:       DO J4=1,MLPOUT ! J4 is beta 
231:          DO J2=1,MLPHIDDEN ! J2 is gamma224:          DO J2=1,MLPHIDDEN ! J2 is gamma
232:             DO K4=1,J4 ! K4 is alpha225:             DO K4=1,J4 ! K4 is alpha


legend
Lines Added 
Lines changed
 Lines Removed

hdiff - version: 2.1.0