<div dir="ltr"><div>Hello,</div><div><br>Finally, I found the possible reasons for this problem:</div><div><br></div><div>It seems that MPI will only read parts of the stdin, only part of the data in the PIPE is consumed.</div><div><br></div><div>THE MPICH2 user guide saied: "the redirection of large amounts of data to stdin is discouraged, and may cause unexpected results"<br></div><div><br></div><div>So I have to write the coordiates to a file in cp2k.py and read the positions from cp2k_shell.F instead of the stdin (codes are shown below)<br></div><div><br></div><div>Now everything loosk correct.</div><div><br></div><div>Geng<br></div><div><div style="background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; overflow-wrap: break-word;" class="prettyprint"><code class="prettyprint"><div class="subprettyprint"><span style="color: #000;" class="styled-by-prettify">        IF </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">para_env</span><span style="color: #660;" class="styled-by-prettify">%</span><span style="color: #000;" class="styled-by-prettify">mepos</span><span style="color: #660;" class="styled-by-prettify">==</span><span style="color: #000;" class="styled-by-prettify">para_env</span><span style="color: #660;" class="styled-by-prettify">%</span><span style="color: #000;" class="styled-by-prettify">source</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> THEN<br>           </span><span style="color: #660;" class="styled-by-prettify">!</span><span style="color: #000;" class="styled-by-prettify">READ </span><span style="color: #660;" class="styled-by-prettify">(*,*,</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> n_atom2<br>           </span><span style="color: #660;" class="styled-by-prettify">!</span><span style="color: #000;" class="styled-by-prettify">IF </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">/=</span><span style="color: #066;" class="styled-by-prettify">0</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> CPABORT</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #080;" class="styled-by-prettify">'setpos read n_atom'</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>           </span><span style="color: #660;" class="styled-by-prettify">!</span><span style="color: #000;" class="styled-by-prettify">IF </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">n_atom2</span><span style="color: #660;" class="styled-by-prettify">/=</span><span style="color: #000;" class="styled-by-prettify">SIZE</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">pos</span><span style="color: #660;" class="styled-by-prettify">))</span><span style="color: #000;" class="styled-by-prettify"> THEN<br>           </span><span style="color: #660;" class="styled-by-prettify">!</span><span style="color: #000;" class="styled-by-prettify">   CALL my_assert</span><span style="color: #660;" class="styled-by-prettify">(.</span><span style="color: #000;" class="styled-by-prettify">FALSE</span><span style="color: #660;" class="styled-by-prettify">.,</span><span style="color: #080;" class="styled-by-prettify">'setpos invalid number of atoms'</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">failure</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>           </span><span style="color: #660;" class="styled-by-prettify">!</span><span style="color: #000;" class="styled-by-prettify">   DO i</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #066;" class="styled-by-prettify">1</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">n_atom<br>           </span><span style="color: #660;" class="styled-by-prettify">!</span><span style="color: #000;" class="styled-by-prettify">      READ</span><span style="color: #660;" class="styled-by-prettify">(*,</span><span style="color: #080;" class="styled-by-prettify">'(a)'</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> cmdStr<br>           </span><span style="color: #660;" class="styled-by-prettify">!</span><span style="color: #000;" class="styled-by-prettify">      CALL compress</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">cmdStr</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">full</span><span style="color: #660;" class="styled-by-prettify">=.</span><span style="color: #000;" class="styled-by-prettify">TRUE</span><span style="color: #660;" class="styled-by-prettify">.)</span><span style="color: #000;" class="styled-by-prettify"><br>           </span><span style="color: #660;" class="styled-by-prettify">!</span><span style="color: #000;" class="styled-by-prettify">      CALL uppercase</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">cmdStr</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>           </span><span style="color: #660;" class="styled-by-prettify">!</span><span style="color: #000;" class="styled-by-prettify">      IF </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">cmdStr</span><span style="color: #660;" class="styled-by-prettify">==</span><span style="color: #080;" class="styled-by-prettify">'*END'</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> EXIT<br>           </span><span style="color: #660;" class="styled-by-prettify">!</span><span style="color: #000;" class="styled-by-prettify">   </span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> DO<br>           </span><span style="color: #660;" class="styled-by-prettify">!</span><span style="color: #000;" class="styled-by-prettify">   GOTO </span><span style="color: #066;" class="styled-by-prettify">10</span><span style="color: #000;" class="styled-by-prettify"><br>           </span><span style="color: #660;" class="styled-by-prettify">!</span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> IF<br>           </span><span style="color: #660;" class="styled-by-prettify">!</span><span style="color: #000;" class="styled-by-prettify">READ </span><span style="color: #660;" class="styled-by-prettify">(*,*,</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> pos<br>           </span><span style="color: #660;" class="styled-by-prettify">!</span><span style="color: #000;" class="styled-by-prettify">IF </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">/=</span><span style="color: #066;" class="styled-by-prettify">0</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> CPABORT</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #080;" class="styled-by-prettify">'setpos read coord'</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>           inquire</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">unit</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #066;" class="styled-by-prettify">201</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">opened</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify">unitalive</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>           </span><span style="color: #008;" class="styled-by-prettify">if</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">unitalive</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> CPABORT</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #080;" class="styled-by-prettify">'UNIT 201 is being used'</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>           inquire</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">file</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #080;" class="styled-by-prettify">"CP2K_POSITIONS"</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">exist</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify">filepresence</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>           </span><span style="color: #008;" class="styled-by-prettify">if</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">(.</span><span style="color: #008;" class="styled-by-prettify">not</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify"> filepresence</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> CPABORT</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #080;" class="styled-by-prettify">'FILE CP2K_POSITIONS NOT EXIST'</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify">                 </span><span style="color: #000;" class="styled-by-prettify">open</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #066;" class="styled-by-prettify">201</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">action</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #080;" class="styled-by-prettify">'READ'</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">file</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #080;" class="styled-by-prettify">"CP2K_POSITIONS"</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">status</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #080;" class="styled-by-prettify">'OLD'</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">form</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #080;" class="styled-by-prettify">'FORMATTED'</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">ACCESS</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #080;" class="styled-by-prettify">'SEQUENTIAL'</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>           </span><span style="color: #008;" class="styled-by-prettify">if</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">/=</span><span style="color: #066;" class="styled-by-prettify">0</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> CPABORT</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #080;" class="styled-by-prettify">'read CP2K_POSITIONS'</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>           READ</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #066;" class="styled-by-prettify">201</span><span style="color: #660;" class="styled-by-prettify">,*,</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> n_atom2<br>           IF </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">/=</span><span style="color: #066;" class="styled-by-prettify">0</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> CPABORT</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #080;" class="styled-by-prettify">'setpos read n_atom2'</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>           IF </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">n_atom2</span><span style="color: #660;" class="styled-by-prettify">/=</span><span style="color: #000;" class="styled-by-prettify">SIZE</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">pos</span><span style="color: #660;" class="styled-by-prettify">))</span><span style="color: #000;" class="styled-by-prettify"> THEN<br>              CALL my_assert</span><span style="color: #660;" class="styled-by-prettify">(.</span><span style="color: #000;" class="styled-by-prettify">FALSE</span><span style="color: #660;" class="styled-by-prettify">.,</span><span style="color: #080;" class="styled-by-prettify">'setpos invalid number of atoms'</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">failure</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>              DO i</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #066;" class="styled-by-prettify">1</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">n_atom<br>                 READ</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #066;" class="styled-by-prettify">201</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #080;" class="styled-by-prettify">'(a)'</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> cmdStr<br>                 CALL compress</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">cmdStr</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">full</span><span style="color: #660;" class="styled-by-prettify">=.</span><span style="color: #000;" class="styled-by-prettify">TRUE</span><span style="color: #660;" class="styled-by-prettify">.)</span><span style="color: #000;" class="styled-by-prettify"><br>                 CALL uppercase</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">cmdStr</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>                 IF </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">cmdStr</span><span style="color: #660;" class="styled-by-prettify">==</span><span style="color: #080;" class="styled-by-prettify">'*END'</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> EXIT<br>              </span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> DO<br>              GOTO </span><span style="color: #066;" class="styled-by-prettify">10</span><span style="color: #000;" class="styled-by-prettify"><br>           </span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> IF<br>           READ </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #066;" class="styled-by-prettify">201</span><span style="color: #660;" class="styled-by-prettify">,*,</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> pos<br>           CLOSE</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #066;" class="styled-by-prettify">201</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>           IF </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">/=</span><span style="color: #066;" class="styled-by-prettify">0</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> CPABORT</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #080;" class="styled-by-prettify">'setpos read coord'</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>           pos</span><span style="color: #660;" class="styled-by-prettify">(:)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> pos</span><span style="color: #660;" class="styled-by-prettify">(:)/</span><span style="color: #000;" class="styled-by-prettify">pos_fact<br>           READ</span><span style="color: #660;" class="styled-by-prettify">(*,</span><span style="color: #080;" class="styled-by-prettify">'(a)'</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify">iostat</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> cmdStr<br>           CALL compress</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">cmdStr</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">full</span><span style="color: #660;" class="styled-by-prettify">=.</span><span style="color: #000;" class="styled-by-prettify">TRUE</span><span style="color: #660;" class="styled-by-prettify">.)</span><span style="color: #000;" class="styled-by-prettify"><br>           CALL uppercase</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">cmdStr</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>           CALL my_assert</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">cmdStr</span><span style="color: #660;" class="styled-by-prettify">==</span><span style="color: #080;" class="styled-by-prettify">'*END'</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #080;" class="styled-by-prettify">' missing *END'</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify">failure</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>        </span><span style="color: #008;" class="styled-by-prettify">END</span><span style="color: #000;" class="styled-by-prettify"> IF<br><br></span></div></code></div><br><br></div><div> <br></div><div> <br></div><br>在 2018年12月4日星期二 UTC-8下午12:59:20,Ole Schütt写道:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hi Geng,
<br>
<br>are you using MPI? Then this is probably where the buffering happens. 
<br>Depending on which MPI implementation you are using there might be a way 
<br>to tweak its stdin/out forwarding.
<br>
<br>Out of curiosity, how many atoms does your system have? Maybe the 
<br>Fortran side simple tries to read too many values?
<br>
<br>-Ole
<br>
<br>
<br>On 2018-12-04 21:27, Geng Sun wrote:
<br>> Hello Ole,
<br>> 
<br>> Thank you very much for your reply:
<br>> I changed the code as you suggested (below), but the problem is still
<br>> present in the test.
<br>> 
<br>> Best
<br>> 
<br>> Geng
<br>> 
<br>>     def send(self, line):
<br>>         """Send a line to the cp2k_shell"""
<br>>         assert self._child.poll() is None  # child process still
<br>> alive?
<br>>         if self._debug:
<br>>             #print('Sending: ' + line)
<br>>             sys.stderr.write("Sending: {}\n".format(line))
<br>>             sys.stderr.flush()
<br>> 
<br>>         if self.version < 2.1 and len(line) >= 80:
<br>>             raise Exception('Buffer overflow, upgrade CP2K to r16779
<br>> or later')
<br>>         assert(len(line) < 800)  # new input buffer size
<br>>         self.isready = False
<br>>         self._child.stdin.write(line + '\n')
<br>>         self._child.stdin.flush()
<br>> 
<br>> 在 2018年12月4日星期二 UTC-8上午11:05:43,Ole
<br>> Schütt写道:
<br>> 
<br>>> Hi Geng,
<br>>> 
<br>>> this sounds indeed like a buffering issue. Could you once try to add
<br>>> a
<br>>> flush() on the python side.
<br>>> 
<br>>> Basically add the following line after cp2k.py:498.
<br>>> 
<br>>> self._child.stdin.write(line + '\n')
<br>>> +       self._child.stdin.flush()
<br>>> 
<br>>> This is probably quite inefficient. So, if it works I'll add some
<br>>> logic
<br>>> to flush only when recv() follows a send().
<br>>> 
<br>>> -Ole
<br>>> 
<br>>> On 2018-12-04 18:08, Geng Sun wrote:
<br>>>> Dear CP2K users,
<br>>>> 
<br>>>> In the past several weeks, I frequently faced a problem when I
<br>>> use
<br>>>> the CP2K -ASE interface.
<br>>>> 
<br>>>> The calculations frequently got stuck during the calculations.
<br>>>> 
<br>>>> 1) Firstly I switched on the debug=True option in the ASE-CP2K
<br>>>> calculator and I found that the calculation always gets stuck at a
<br>>> 
<br>>>> line with *END after sending the positions to the subroutine
<br>>>> cp2k_shell.popt  (I printed the information to the standard error,
<br>>> so
<br>>>> they are not buffered)
<br>>>> 
<br>>>> 2) Then, I modified the cp2k_shell.F to print a lot of "labels".
<br>>> Then
<br>>>> I found that the code may get stuck at the line of "READ
<br>>>> (*,*,iostat=iostat) pos" like below. I can always get "begin to
<br>>> read
<br>>>> pos" in the standard error, but I can not reach "LABEL-1".
<br>>>> 
<br>>>> WRITE(0,*) "begin to read pos"
<br>>>> CALL m_flush(0)
<br>>>> READ (*,*,iostat=iostat) pos
<br>>>> WRITE(0,*) "LABEL-1"
<br>>>> CALL m_flush(0)
<br>>>> 
<br>>>> I attached the modified cp2k_shell.F and the standard out/error
<br>>>> generated by the slurm batch system with this post. You can see
<br>>> that
<br>>>> the program get stuck at the second optimization step just after
<br>>>> sending the positions.
<br>>>> 
<br>>>> I greatly appreciate your suggestions for fixing this confusing
<br>>> bugs.
<br>>>> 
<br>>>> Thanks in advance.
<br>>>> 
<br>>>> Geng
<br>>>> 
<br>>>> --
<br>>>> You received this message because you are subscribed to the Google
<br>>> 
<br>>>> Groups "cp2k" group.
<br>>>> To unsubscribe from this group and stop receiving emails from it,
<br>>> send
<br>>>> an email to <a>cp2k+...@googlegroups.com</a>.
<br>>>> To post to this group, send email to <a>cp...@googlegroups.com</a>.
<br>>>> Visit this group at <a href="https://groups.google.com/group/cp2k" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/group/cp2k';return true;" onclick="this.href='https://groups.google.com/group/cp2k';return true;">https://groups.google.com/<wbr>group/cp2k</a> [1].
<br>>>> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/<wbr>optout</a> [2].
<br>> 
<br>>  --
<br>> You received this message because you are subscribed to the Google
<br>> Groups "cp2k" group.
<br>> To unsubscribe from this group and stop receiving emails from it, send
<br>> an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="giDjM-5_AAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cp2k+uns...@googlegroups.<wbr>com</a>.
<br>> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="giDjM-5_AAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cp...@googlegroups.com</a>.
<br>> Visit this group at <a href="https://groups.google.com/group/cp2k" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/group/cp2k';return true;" onclick="this.href='https://groups.google.com/group/cp2k';return true;">https://groups.google.com/<wbr>group/cp2k</a>.
<br>> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/<wbr>optout</a>.
<br>> 
<br>> 
<br>> Links:
<br>> ------
<br>> [1] <a href="https://groups.google.com/group/cp2k" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/group/cp2k';return true;" onclick="this.href='https://groups.google.com/group/cp2k';return true;">https://groups.google.com/<wbr>group/cp2k</a>
<br>> [2] <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/<wbr>optout</a>
<br>
<br></blockquote></div>