<div><span><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 <a>+33 (0)3 88 10 70 95</a>
<br><a href="https://groups.google.com/">herve...@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></span><div><br></div></div><br><br><div class="gmail_quote"><div dir="auto" class="gmail_attr">Le mercredi 23 juin 2021 à 18:14:04 UTC+2, gogoiab...@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 dir="ltr">Dear All,<div> I am very new to the CP2K software. I am trying to learn this software by going through some tutorials provided in the CP2K webpage. However, I ran into trouble while trying out the following tutorial </div><div><br></div><div><a href="https://www.cp2k.org/exercises:2014_uzh_molsim:h2o_ff" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=fr&q=https://www.cp2k.org/exercises:2014_uzh_molsim:h2o_ff&source=gmail&ust=1649426601926000&usg=AOvVaw2Ee4pYQB_js8ZsEhTp7YiF">https://www.cp2k.org/exercises:2014_uzh_molsim:h2o_ff</a><br></div><div><br></div><div>When I run the script for force fitting to get the force field parameters for water I got the following error</div><div><br></div><div>Program received signal SIGSEGV: Segmentation fault - invalid memory reference.<br><br>Backtrace for this error:<br>#0 0x4a30eaf in ???<br>#1 0xa2c83b in ???<br>#2 0x6005b2 in ???<br>#3 0x603cac in ???<br>#4 0x5fea46 in ???<br>#5 0x5fb1dc in ???<br>#6 0x4aec673 in ???<br>#7 0x4aec7b1 in ???<br>#8 0x5fe2eb in ???<br></div><div><br></div><div><br></div><div>I am attaching the input scripts and the error file to this mail.</div><div><br></div><div>I am using cp2k6.1 (ssmp) which is a binary file I downloaded from CP2K webpage.</div><div><br></div><div>Could anyone please help me out with this?</div><div><br></div><div>Sincerely</div><div>Abhijit Gogoi</div></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/28bc0818-fce9-4d5d-8f49-0842164d45c1n%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/28bc0818-fce9-4d5d-8f49-0842164d45c1n%40googlegroups.com</a>.<br />