yambo-code / yambo

This is the official GPL repository of the yambo code
http://www.yambo-code.eu/
GNU General Public License v2.0
98 stars 37 forks source link

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

Open sangallidavide opened 1 month ago

sangallidavide commented 1 month ago

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 https://github.com/yambo-code/yambo/issues/111#issuecomment-2249351535

sangallidavide commented 1 month ago

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

sangallidavide commented 1 month ago

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

muralidhar-nalabothula commented 1 month ago

@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 commented 1 month ago

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:

In the new version: