Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/segfault hamiltonian get hr #469

Conversation

mikibonacci
Copy link
Collaborator

@mikibonacci mikibonacci commented Feb 15, 2024

This fixes #439.

@mikibonacci mikibonacci force-pushed the fix/segfault-hamiltonian_get_hr branch from 3ac85d6 to ea98aa2 Compare February 15, 2024 16:48
@mikibonacci mikibonacci self-assigned this Feb 16, 2024
Copy link
Member

@giovannipizzi giovannipizzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also have to deallocate the variables

i.e., after the variable declaration. This is needed to avoid
allocation on stack if the intel compiler is used, causing segmentation
fault for large systems. see issue wannier-developers#439.
…used in

the hamiltonian.F90 file. Basically the eigval_opt, utmp variable are
allocated only if have_disentangle is true.
…sym.F90), the following variables:

umatnew, ZU, deltaU, carr. This is in direction of issue wannier-developers#439.
- eigval2, eigval_opt, utmp in hamiltonian_get_hr
- umatnew, ZU, deltaU, carr in sitesym_dis_extract_symmetry

also, I moved the eigval2 allocation after the *if (ham_logical%have_ham_k) go to 100* line, because
if we go to 100, we do not need the eigval2 variale
@JeromeCCP9 JeromeCCP9 force-pushed the fix/segfault-hamiltonian_get_hr branch from 55dc398 to 210b2cd Compare February 16, 2024 11:15
@JeromeCCP9 JeromeCCP9 dismissed giovannipizzi’s stale review February 16, 2024 12:05

necessary deallocations have been made

@JeromeCCP9 JeromeCCP9 merged commit cbd556c into wannier-developers:develop Feb 16, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segmentation fault for large systems
3 participants