Segmentation fault with Hirshfeld CDFT

254 views
Skip to first unread message
Assigned to chris...@gmail.com by me

Chris Ahart

unread,
Mar 19, 2020, 2:31:58 PM3/19/20
to cp2k
Dear all,

When performing CDFT with Hirshfeld I am getting the following error: "Program received signal SIGSEGV: Segmentation fault - invalid memory reference." This appears to be an issue reported previously (https://github.com/cp2k/cp2k/issues/560), however I am encountering it again in CP2K 7.1. This error occurs on both my local machine and on a cluster.

I have found this error to be sensitive to the system and to the atoms included in &ATOM_GROUP, as for certain combinations of atoms CP2K runs while with other combinations it crashes. Becke constraint runs in all cases, so this is isolated to Hirshfeld. I have attached two example input and output files, one with an atom combination that runs while another which fails. I have confirmed that Hirshfeld runs for the input files included in the CP2K CDFT tutorial.

Any guidance or insight to resolve this problem would be greatly appreciated.

Thank you for your help and time.

Regards,
Chris
fail.inp
fail.out
sucess.inp
sucess.out
fail.error
input.xyz

Chris Ahart

unread,
Mar 31, 2020, 12:21:31 PM3/31/20
to cp2k
This bug has now been fixed in the latest development version of CP2K. See https://github.com/cp2k/cp2k/issues/847

Leili Rassouli

unread,
Dec 1, 2022, 6:13:27 PM12/1/22
to cp2k
Dear all,
I am using 2022.1 version of cp2k. But I have the same problem as Chris. I want to optimize the geometry of a periodic system using cDFT. I received Segmentation fault error ("Program received signal SIGSEGV: Segmentation fault - invalid memory reference.") with Hirshfeld constraints. Same as Chris, it is sensitive to the combinations of atoms I use in &ATOM_GROUP. In my case, it only works fine for one combination of atoms and not any other combinations. The input and output files for the successful and unsuccessful jobs are attached. Only the ATOM GROUP in the input files was altered.
I Changed the number of nodes, cores, and memory, but it didn't solve the problem.
Any advice or tips on how to solve this issue would be greatly valued.
Best regards,
Lili
Error.out
input_unsuccessful.inp
output_successful.log
output_unsuccessful.log
input_successful.inp

uca...@ucl.ac.uk

unread,
Dec 2, 2022, 9:05:52 AM12/2/22
to cp2k
Hi Lili,

I had a look at your input files and the issue is likely related to the use of 2 constraints (your unsuccessful job) instead of 1 constraint (your successful job). Optimising multiple constraints is very challenging, and therefore this has not been tested extensively.

If you provide your structure 'ex1-geo.xyz' then I can check your job and perhaps implement a bug fix if needed.

Regards,
Chris 

Leili Rassouli

unread,
Dec 2, 2022, 10:49:13 AM12/2/22
to cp2k
Dear Chris,
Thanks for your reply.
Finally, I need to apply 7 constraints. The energy calculation with seven constraints has been tested, and it worked fine. However, the final spins in Hirshfeld analysis are not quite what I have defined as constraints. The files related to this calculation are attached.
I read the " Electron and Hole Mobilities in Bulk Hematite from Spin- Constrained Density Functional Theory" paper by Christian S. Ahart, Kevin M. Rosso, and Jochen Blumberger. And it seems they employed 2 constraints for geometry optimization using cDFT. I am not sure why it doesn't work for my case.
As you requested, I have attached the xyz file.
Thank you so much for your assistance, I really appreciate it.
Please let me know if you need any other information.
Lili
subsys.inc
hirshfeld_qs.inc
energy.bash
ex1-geo.xyz
energy.inp
energy_run.inp
dft-common-params.inc

Leili Rassouli

unread,
Dec 2, 2022, 10:56:06 AM12/2/22
to cp2k
I forgot to attach the output file of the energy calculation. Here is the file:
ex1-geo-cdft-state1-shapefn-gaussian.out
Reply all
Reply to author
Forward
0 new messages