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

Minor changes to SLWF+C logic in parameters.F90 #205

Merged
merged 2 commits into from
Oct 8, 2018

Conversation

VVitale
Copy link
Collaborator

@VVitale VVitale commented Oct 8, 2018

to better handle tricky situations when combining SCDM with SLWF+C

…ky situations when combining SCDM with SLWF+C
@@ -2445,7 +2449,7 @@ function get_smearing_index(string, keyword)

end function get_smearing_index

!===================================================================
!===================================================================
Copy link
Member

Choose a reason for hiding this comment

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

Interesting that this indentation changed... I wasn't expecting this to happen.

if (selective_loc .and. slwf_constrain .and. allocated(proj_site)) &
write (stdout, '(a)') 'No slwf_centres block requested. Desired centres for SLWF same as projection centres'
! Allocate array for constrained centres
call param_get_centre_constraints
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't there be a check that selective_loc is true? The function internally accesses variables that are now allocated only if (selected_loc) above

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @giovannipizzi, I changed it so it is easier to follow. I don't think I need a check on selective_loc, since slwf_constrain is true only if selective_loc is also true.

@giovannipizzi
Copy link
Member

Thanks for clarifying.
Note, however, that the tests failing at runtime with

At line 4783 of file ../parameters.F90
Fortran runtime error: Index '1' of dimension 2 of array 'ccentres_frac' above upper bound of 0

make me feel that there is at least one case where the function is called and ccentres_frac are not allocated.

@VVitale
Copy link
Collaborator Author

VVitale commented Oct 8, 2018

Yes, I think that was the case in my previous commit. It should be OK now, all the tests have passed.

@mostofi
Copy link
Member

mostofi commented Oct 8, 2018

Seems fine to me. @giovannipizzi - I think your concern has been addressed, and this PR can now be accepted?

@giovannipizzi giovannipizzi merged commit bf1111f into wannier-developers:develop Oct 8, 2018
@giovannipizzi
Copy link
Member

Yes, I had checked it when the tests were still running. Now I merged it!

manxkim pushed a commit to manxkim/wannier90 that referenced this pull request Jan 10, 2021
Minor changes to SLWF+C logic in parameters.F90
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.

3 participants