sissaschool / turborvb

Quantum Monte Carlo package, TurboRVB
https://turborvb.sissa.it
GNU General Public License v3.0
28 stars 6 forks source link

Fix accessing non allocated array in prep #51

Closed addman2 closed 1 year ago

addman2 commented 1 year ago

Prep was asking for a size of non allocated array.

Fix #50

kousuke-nakano commented 1 year ago

Dear @addman2 thanks! It is surprising that I have never notice it... I did not see any complaint. So, it means that compilers automatically allocate the (non-allocated) array?

        if (ipc .eq. 1) then
               bdim = size(molecorbl, 1)
+             bdimdo = size(molecorbldo, 1)
addman2 commented 1 year ago

I guess size was returning some random value. Since it was not used it did not produce any problems.

kousuke-nakano commented 1 year ago

Dear @addman2 thanks for the comment! It was not used in essential DFT parts?

addman2 commented 1 year ago

Well, it was in essential part of prep but it did not affect any behaviour, because the variable with garbage data was not used

kousuke-nakano commented 1 year ago

Thanks @addman2!