You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
phys-gw-from-bareH: Segmentation fault in dipole_io for hf_and_locXC with covariant dipoles #187
Segmentation fault occurs in hf_and_locXC part when using BareHfromScratch with covariant dipoles (screenshot 1).
"yambo_sc" received signal SIGSEGV, Segmentation fault.
Possible cause
Related to a call to DIPOLE_IO from Bare_Hamiltonian_from_Scratch. DIPOLE_IO tries accessing the unallocated variable PAR_K_scheme%IND_bz%element_1D(ik) (line 202 in DIPOLE_IO.F) (screenshot 2).
PAR_K_scheme%ind_bz%element_1D should be allocated by the following line inside PARALLEL_SETUP_K_scheme (line 88 in PARALLEL_SETUP_K_scheme.F)
Parallelization (the one you mention). Now Bare_Hamiltonian_from_Scratch uses DIP_par_scheme="HAM" in "not l_sc_run". Possibly the same could be used in l_sc_run. (see change in PARALLEL_global_Self_Energy here 9bbc538 )
There were few other issues (use of errore function from QE, impose maximum cutoff, cutoff on G-hartree not defined). Also p2y was broken.
Hi Davide. Thanks for your quick response. One question - did the HF_and_locXC part work for you? I tried the commit from your last comment. I didn't get the segmentation fault but got the following error with the same input as above (both serial and parallel):
At line 58 of file V_Hartree.f90
Fortran runtime error: Index '7240' of dimension 1 of array 'fft_g_table' above upper bound of 7239
If it worked for you, could you share the input you used? I might be missing something.
If you lower VXCRLvcs you need lo lower HARRLcvs to the same value (or lower).
This could be avoided by changing the call to WF_load in Bare_Hamiltonian as follows: replace QP_ng_Vxc with max(QP_ng_Vxc,QP_ng_Hartree)
(Check the correct variable name).
I didn't yet because we would need to decide what is better for the user (discussed today with Fulvio).
Anyway, my suggestion is to keep both VXCRLvcs and HARRLvcs to the maximum, and lower instead EXXRLvcs, which is responsible for the expensive part (e.g the exchange)
Hi, following up on this issue: using the same phys-gw-from-bareH workflow I encountered a second reproducible segmentation fault, this time in V_Hartree.F.
I am using Yambo 5.3.0, revision 23979, commit 9bbc5386b7, with:
I then restored the original input cutoffs, i.e. I did not increase VXCRLvcs/EXXRLvcs to the Hartree cutoff, and the calculation now passes the Hartree step correctly and proceeds to the G0W0 calculation.
It therefore seems that, in this workflow, the FFT grid prepared by WF_load before V_Hartree needs to account for both QP_ng_Vxc and QP_ng_SH.
Activity
Version 5.3.0, Revision 23978, Hash 01ce042
sangallidavide commentedon Feb 17, 2025
Fixed a number of problems related to the code:
Parallelization (the one you mention). Now Bare_Hamiltonian_from_Scratch uses
DIP_par_scheme="HAM"in "not l_sc_run". Possibly the same could be used in l_sc_run. (see change in PARALLEL_global_Self_Energy here 9bbc538 )There were few other issues (use of errore function from QE, impose maximum cutoff, cutoff on G-hartree not defined). Also p2y was broken.
It runs in serial.
sangallidavide commentedon Feb 17, 2025
Addendum. After this commit e3ff8db it seems to also runs in parallel, although without memory distribution. Everything to be checked.
thge123 commentedon Feb 18, 2025
Hi Davide. Thanks for your quick response. One question - did the HF_and_locXC part work for you? I tried the commit from your last comment. I didn't get the segmentation fault but got the following error with the same input as above (both serial and parallel):
If it worked for you, could you share the input you used? I might be missing something.
sangallidavide commentedon Feb 18, 2025
mrf1g12 commentedon Oct 25, 2026
Hi, following up on this issue: using the same
phys-gw-from-bareHworkflow I encountered a second reproducible segmentation fault, this time inV_Hartree.F.I am using Yambo 5.3.0, revision 23979, commit
9bbc5386b7, with:BareHfromScratchBareHScaleFermiHF_and_locXCDipApproach="Covariant"The calculation was crashing at:
inside
V_Hartree.F.The FFT grid prepared before entering
V_Hartreewas not large enough for the Hartree G-space. InBare_Hamiltonian_from_Scratch.F,WF_loadis called aswhile
V_Hartreesubsequently loops up toQP_ng_SH.In my case,
and
fft_g_tablecontained indices outside the currentfft_size, leading to the out-of-bounds access and segmentation fault.I changed the call in
Bare_Hamiltonian_from_Scratch.Ftoand this fixes the problem.
I then restored the original input cutoffs, i.e. I did not increase
VXCRLvcs/EXXRLvcsto the Hartree cutoff, and the calculation now passes the Hartree step correctly and proceeds to the G0W0 calculation.It therefore seems that, in this workflow, the FFT grid prepared by
WF_loadbeforeV_Hartreeneeds to account for bothQP_ng_VxcandQP_ng_SH.