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

Bse run with BSEprop= "photolum" crashes with array mismatch #116

Open
sangallidavide opened this issue Jul 25, 2024 · 4 comments
Open

Bse run with BSEprop= "photolum" crashes with array mismatch #116

sangallidavide opened this issue Jul 25, 2024 · 4 comments
Assignees
Labels

Comments

@sangallidavide
Copy link
Member

Bse run (same inputs) with BSEprop= "photolum" crashed with array mismatch between BS_T_grp(i_T_g)%dipoles_opt(:,i_T,1) and PL_weights(:) in file https://github.com/yambo-code/yambo/blob/master/src/bse/K_IP.F#L188
This seems like a valid bug as printing their sizes gave me different values (1 and 3) respectively.
also in https://github.com/yambo-code/yambo/blob/master/src/bse/K_components_folded_in_serial_arrays.F#L111

One more
In https://github.com/yambo-code/yambo/blob/master/src/bse/PL_diago_residual.F ,the shape of BSS_dipoles_PL is assumed to be (BS_H_dim,3), but its allocated array shape is different (3,BS_H_dim) in
https://github.com/yambo-code/yambo/blob/master/src/modules/mod_PHOTOLUM.F#L47
Again in https://github.com/yambo-code/yambo/blob/master/src/bse/K_components_folded_in_serial_arrays.F#L111
the shape is assumed to be (3,BS_H_dim). This is an undefined behaviour, not sure how the test cases passed in this case

Size mismatch error :
https://github.com/yambo-code/yambo/blob/master/src/bse/PL_diago_residual.F#L126

BSE inputfile : bse.txt

Originally posted by @muralidhar-nalabothula in #111 (comment)

@sangallidavide sangallidavide self-assigned this Jul 25, 2024
@sangallidavide
Copy link
Member Author

The PL tests in the test-suite are tagged as BROKEN

@sangallidavide
Copy link
Member Author

This was fixed in this branch: https://github.com/sangallidavide/yambo/tree/fixes-photoluminescence

@muralidhar-nalabothula
Copy link
Contributor

@sangallidavide Looking at the changes, I see that K_diago_residuals are changed. Could you please tell me what changed compared to the previous version. I am asking this because, I am about the complete the Ydiago interface and rewrote some of these functions to take care of parallel distribution of eigen-vectors . Here is my new implementation : https://github.com/muralidhar-nalabothula/yambo/blob/master/src/bse/K_residuals.F

@sangallidavide
Copy link
Member Author

sangallidavide commented Jul 25, 2024

Yeah, I recently merge in tech master with changes done some time ago. Sorry it overlapped with your development on distributed residuals.

In the previous version:

  • there were different "diago residual" subroutines for each observable (absorption, kerr, magnons), with two different versions, one hermitian (K_diago_hermitian_residuals), and one non-hermitian (K_diago_non_hermitian_residuals). 6 subroutines in total
  • any version (hermitian or not) computed both the left and the right residuals

In the new version:

  • there are two subroutines, one for the left and one for the right residuals with options for the kind of observable (abs, kerr, magnons).
  • the one for the right residuals is always identical
  • the one for the left residuals was coded with two modes, one for the kind of scheme "hermitian" (e.g. TDA) and one for the kind scheme "non-hermitian (e.g. with coupling). Looking at the code now, I think it is always used in coupling mode. So I think the code could be cleaned a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants