<div>Dear Paolo, Thanks for sharing the information!<br> </div>
<div>I followed your way and recompiled the code. However, the code still crashed</div>
<div>after the second scf iteration, same as before.</div>
<div> </div>
<div>When I used damped dynamics, the code crashed after the first scf iteration.</div>
<div>This behavior is also same as before.</div>
<div> </div>
<div>I'll sent my pwscf input file to your email address for a test (it is a bit long to be</div>
<div>posted here).</div>
<div> </div>
<div>I was using cp.x these days for relatively large system with no problem. But</div>
<div>still, it would be nice if I could run pw.x and compare the cp.x result with the</div>
<div>pw.x result.</div>
<div> </div>
<div>Thanks! </div>
<div> </div>
<div><span class="gmail_quote">On 5/28/07, <b class="gmail_sendername">Paolo Giannozzi</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:giannozz@nest.sns.it" target="_blank">giannozz@nest.sns.it
</a>> wrote:</span><br> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I recently encountered a similar problem (with 200 atoms; no problem<br>in a smaller cell). Apparently the code crashes in the three following 
<br>lines of update_inverse_hessian, in Modules/bfgs_modules.f90 :<br><br>      inv_hess = inv_hess + 1.D0 / sdoty * &<br>                 ( ( 1.D0 + ( y .dot. Hy ) / sdoty ) * matrix( s,<br>s ) - &<br>                  ( matrix( s, yH ) +  matrix( Hy, s ) ) ) 
<br><br>If you replace the three lines above with old-style fortran:<br><br>      ydotHy = ( y .dot. Hy )<br>      do j=1,n<br>         do i=1,n<br>            inv_hess(i,j) = inv_hess(i,j) + 1.D0 / sdoty * &<br>                      ( ( 
1.D0 + ydotHy / sdoty ) * s(i) * s(j) - &<br>                         ( s(i)*yH(j) + Hy(i)*s(j) ) )<br>         end do<br>      end do<br><br>it works (ifort on a PC cluster). I cannot see any good reason<br>for such a behavior. 
<br><br>By the way: in case of trouble with bfgs, one can always<br>try damped dynamics.<br><br>Paolo</blockquote>