cp2k segmentation fault on PDOS

If you get a segfault with cp2k and a backtrace similar to this one:

#0  0x3D9D4ED in _gfortran_backtrace at backtrace.c:258
#1  0x3D78F90 in _gfortrani_backtrace_handler at compile_options.c:129
#2  0x3DD64BF in raise
#3  0x160B925 in __atomic_kind_types_MOD_get_atomic_kind
#4  0xE880ED in __qs_pdos_MOD_calculate_projected_dos
#5  0x9C71E0 in __qs_scf_post_gpw_MOD_write_mo_dependent_results at qs_scf_post_gpw.F:0
#6  0x9D568C in __qs_scf_post_gpw_MOD_scf_post_calculation_gpw
#7  0xC819AC in __qs_scf_initialization_MOD_qs_scf_compute_properties
#8  0x84B786 in __qs_scf_MOD_scf
#9  0x1367DCA in __qs_energy_MOD_qs_energies
#10  0xCB93BD in __force_env_methods_MOD_force_env_calc_energy_force
#11  0x595526 in cp_eval_at_
#12  0x570745 in __gopt_f_methods_MOD_write_final_info at gopt_f_methods.F:0
#13  0x573FA2 in __gopt_f_methods_MOD_gopt_f_io_finalize
#14  0x4AF6AF in __bfgs_optimizer_MOD_geoopt_bfgs
#15  0x49DAAD in __geo_opt_MOD_cp_geo_opt
#16  0x436D81 in __cp2k_runs_MOD_cp2k_run at cp2k_runs.F:0
#17  0x439922 in __cp2k_runs_MOD_run_input
#18  0x423CB4 in MAIN__ at cp2k.F:327

while performing calculations to get the projected density of states, then your problem may be CP2K_INPUT / FORCE_EVAL / DFT / PRINT / PDOS / LDOS / LIST. According to the manual, this gives the indices of the atoms to be taken into account for the projection. It you have added any index that is out of range of your current system atom count, there will be no warning from cp2k but rather the segfault described above.

This has been tested with cp2k 2.5.1, rev. 13632.

You may also like...

Leave a Reply

Your email address will not be published.