<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1458" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>The problem appears when pwscf is run in an ibm_aix
cluster in restart mode without a "*.save" file. </FONT></DIV>
<DIV><FONT face=Arial size=2>symptoms: after successfully exiting electron and
after the first call to move_ions </FONT><FONT face=Arial size=2>seqopn tries to
use a unit already open and stops.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I trace the problem back to the restart module
subroutine readfile_new. Specifically at this section of the code</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> !<BR> ! ... end of
declarations<BR> !<BR> !<BR> ! read configuration from
.save file<BR> !<BR> ierr = 0<BR> filename = trim( prefix
)//'.save'<BR> WRITE( stdout, '(/,5x,"Reading file ",a14)')
filename<BR> !<BR> if( ionode ) THEN<BR> call
seqopn (ndr, filename, 'unformatted', exst)<BR> write(*,*) 'Inside
ions'</FONT></DIV>
<DIV><FONT face=Arial size=2><BR> if ( .not. exst )
then<BR> close (unit = ndr, status =
'delete')<BR> ierr = 1<BR>
endif</FONT></DIV>
<DIV><FONT face=Arial size=2> rewind ndr</FONT></DIV>
<DIV><FONT face=Arial size=2> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The error apears with in an ibm_aix (I do not know
if in other machines as well) tries to rewind a file that does not exist or has
been just deleted.</FONT></DIV>
<DIV><FONT face=Arial size=2>In that case the rewind command opens a unit and
creates a file fort.$ndr in the working directory. That file remains open until
it causes the CRASH when the restart information is saved.</FONT></DIV>
<DIV><FONT face=Arial size=2>The solution is</FONT></DIV>
<DIV><FONT face=Arial size=2> if ( .not. exst )
then<BR> close (unit = ndr, status =
'delete')<BR> ierr = 1<BR>
else
<DIV><FONT face=Arial size=2> rewind
ndr</FONT></DIV>
<DIV> endif</DIV></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have been using the code for a month now. Nicely
done!.</FONT></DIV>
<DIV><FONT face=Arial size=2>Regards to all</FONT></DIV>
<DIV><FONT face=Arial size=2>Fernando Reboredo</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>