[CP2K-user] [CP2K:16837] Re: Error while force fitting (Tutorial)

Jürg Hutter hutter at chem.uzh.ch
Mon Apr 11 15:58:43 UTC 2022


Thank you. Your proposed fix is correct and we will include it in the next version.

best regards

Juerg Hutter

________________________________________
From: cp2k at googlegroups.com <cp2k at googlegroups.com> on behalf of Hervé Bulou <herve.bulou at gmail.com>
Sent: Thursday, April 7, 2022 4:04 PM
To: cp2k
Subject: [CP2K:16824] Re: Error while force fitting (Tutorial)

Hello,

I got a similar message and identified that the problem was with line 222 in the optimize_input.F file.

...
214 IF (ASSOCIATED(cell_traj_read)) ALLOCATE (cell_traj(3, 3, n_frames))
215
216 n_frames = 0
217 DO i_frame = oi_env%fm_env%frame_start, oi_env%fm_env%frame_stop, oi_env%fm_env%frame_stride
218 n_frames = n_frames + 1
219 force_traj(:, :, n_frames) = force_traj_read(:, :, i_frame)
220 pos_traj(:, :, n_frames) = pos_traj_read(:, :, i_frame)
221 energy_traj(n_frames) = energy_traj_read(i_frame)
222 IF (ASSOCIATED(cell_traj)) cell_traj(:, :, n_frames) = cell_traj_read(:, :, i_frame)
223 ENDDO
...


In the above version of the code, line 214 allows cell_traj to be allocated if cell_traj_read is allocated.
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)
I fixed the problem by adding cell_traj to the NULLIFY command line 200 :
...
 200 NULLIFY (cell_traj_read, force_traj_read, pos_traj_read, energy_traj_read,cell_traj)
...

regards,

Hervé Bulou
IPCMS-DSI
23 rue du Loess
BP43
F-67034 Strasbourg Cedex 2 (FRANCE)
tel +33 (0)3 88 10 70 95
herve... at ipcms.unistra.fr<https://groups.google.com/>
http://www.ipcms.unistra.fr/?page_id=9707&lang=en <http://www.ipcms.unistra.fr/?page_id=9707&lang=en><http://www.ipcms.unistra.fr/?page_id=9707&lang=en>



Le mercredi 23 juin 2021 à 18:14:04 UTC+2, gogoiab... at gmail.com a écrit :
Dear All,
              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

https://www.cp2k.org/exercises:2014_uzh_molsim:h2o_ff

When I run the script for force fitting to get the force field parameters for water I got the following error

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x4a30eaf in ???
#1  0xa2c83b in ???
#2  0x6005b2 in ???
#3  0x603cac in ???
#4  0x5fea46 in ???
#5  0x5fb1dc in ???
#6  0x4aec673 in ???
#7  0x4aec7b1 in ???
#8  0x5fe2eb in ???


I am attaching the input scripts and the error file to this mail.

I am using cp2k6.1 (ssmp) which is a binary file I downloaded from CP2K webpage.

Could anyone please help me out with this?

Sincerely
Abhijit Gogoi

--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com<mailto:cp2k+unsubscribe at googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/28bc0818-fce9-4d5d-8f49-0842164d45c1n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/28bc0818-fce9-4d5d-8f49-0842164d45c1n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/ZR0P278MB07597A139DE551237991A3889FEA9%40ZR0P278MB0759.CHEP278.PROD.OUTLOOK.COM.


More information about the CP2K-user mailing list