<div>Hello,<br></div><div><br></div><div>I got a similar message and identified that the problem was with line 222 in the optimize_input.F file. </div><div><br></div><div>...<br></div>214 IF (ASSOCIATED(cell_traj_read)) ALLOCATE (cell_traj(3, 3, n_frames))<br>215<br>216 n_frames = 0<br>217 DO i_frame = oi_env%fm_env%frame_start, oi_env%fm_env%frame_stop, oi_env%fm_env%frame_stride<br>218 n_frames = n_frames + 1<br>219 force_traj(:, :, n_frames) = force_traj_read(:, :, i_frame)<br>220 pos_traj(:, :, n_frames) = pos_traj_read(:, :, i_frame)<br>221 energy_traj(n_frames) = energy_traj_read(i_frame)<br>222 IF (ASSOCIATED(cell_traj)) cell_traj(:, :, n_frames) = cell_traj_read(:, :, i_frame)<br>223 ENDDO<br><div>...</div><div><br></div><div><br></div>In the above version of the code, line 214 allows cell_traj to be allocated if cell_traj_read is allocated.<br>But this doesn't guarantee that if cell_traj_read is not allocated, cell_traj is not allocated, , which leads to a memory access problems line 222 (if cell_traj is allocated then we try to write in an array which is not allocated which leads to the error)<br><div>I fixed the problem by adding cell_traj to the NULLIFY command line 200 :</div><div>...<br></div> 200 NULLIFY (cell_traj_read, force_traj_read, pos_traj_read, energy_traj_read,cell_traj)<br><div>...</div><div><br></div><div>regards,</div><div><br></div><div>Hervé Bulou</div><div>IPCMS-DSI
<br>23 rue du Loess
<br>BP43
<br>F-67034 Strasbourg Cedex 2 (FRANCE)
<br>tel +33 (0)3 88 10 70 95
<br><a href="mailto:herve.bulou@ipcms.unistra.fr">herve.bulou@ipcms.unistra.fr</a>
<br><a href="http://www.ipcms.unistra.fr/?page_id=9707&lang=en">http://www.ipcms.unistra.fr/?page_id=9707&lang=en</a>
<a href="http://www.ipcms.unistra.fr/?page_id=9707&lang=en"><http://www.ipcms.unistra.fr/?page_id=9707&lang=en></a></div><br><div class="gmail_quote"><div dir="auto" class="gmail_attr">Le vendredi 17 décembre 2021 à 11:48:33 UTC+1, rajors...@gmail.com a écrit :<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>Dear All,</div><div>I am trying to run the cp2k exercise on fitting empirical potential for water molecule using Force Fitting. However, I get a 'Program received signal SIGSEGV: Segmentation fault - invalid memory reference" error. The details of my system and simulation are as follows:</div><div><br></div><div>1. Version - cp2k 2.6.2</div><div>2. Input files - attached</div><div>3. Output - <br></div><div>Program received signal SIGSEGV: Segmentation fault - invalid memory reference.<br><br>Backtrace for this error:<br>#0 0x7F8BC0B7CE08<br>#1 0x7F8BC0B7BF90<br>#2 0x7F8BC02AD4BF<br>#3 0xD08D8C<br>#4 0x42D9F9<br>#5 0x4316B5<br>#6 0x42AD3B<br>#7 0x42A47C<br>#8 0x7F8BC029883F<br>#9 0x42A4D8<br>#10 0xFFFFFFFFFFFFFFFF<br>Segmentation fault (core dumped)</div><div><br></div><div>4. Hardware - Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz with 24 CPUs and 2 threads per core (Architecture : x86_64), 32GB RAM and Ubuntu 16.04LTS</div><div><br></div><div>My knowledge of FORTRAN is not good. Any suggestions to get over this error will be very helpful.<br></div><div><br></div></blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "cp2k" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/9365eb32-b944-4350-8155-82142cd87709n%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/9365eb32-b944-4350-8155-82142cd87709n%40googlegroups.com</a>.<br />