Page 1 of 1

Randomly different nlXC values

Posted: Tue Mar 21, 2023 11:46 am
by lorenzo.sponza
Dear Yambo users and developers,
While converging the GW parameters of a 2D system, a colleague of mine and I encountered some weird behaviour. We realised that something was wrong in the calculation of the exchange part of the self-energy as it was changing from one calculation to the other in an unpredictable way. By this, I mean that sometimes the bottom conduction (band 57) changed, sometimes the top valence (56), sometimes both, and most importantly they changed when they were not supposed to: for example while converging the Sigma_c parameters, or while changing uniquely the number of parallelisation threads and even when two identical calculations were run with the very same command. Attached to my message, I add the reports of the latter example: the very same calculation, parallelised over the same number of threads, gives different values of nlXC. I have to specify that the two runs have been launched in two separate folders to prevent messing with the databases.
Have you ever encountered issues of this kind?
Any idea how to solve it?

To our experience, it looks like there's a problem in the parallelization of the nlXC algorithm, possibly while reading or writing the databases. I'm working with yambo 5.0.4 compiled in OpenMP.
Is there some known issue with compilation flags that may be responsible of this behaviour?
Is the MPI version more stable and reliable?
Is it a known bug?

Many thanks for your help

Cheers!

Re: Randomly different nlXC values

Posted: Tue Mar 21, 2023 12:01 pm
by Daniele Varsano
Ciao Lorenzo,

that's weird, and not expected at all.

The only think it comes to my mind, besides some compilation issue, is the statistical error coming from the random integration of the potential needed to build the "box" cutoff potential.

Please note that the "box" cutoff is deprecated and the use of the "slab" cutoff is highly suggested. In order to test this hypothesis you could try to raise the RandQpts to e.g. 3 millions.
Anyway, this is just a quick test, but the difference you observe seem to me quite large to be ascribed to the statistical error of the integration, moreover the correlation part of the self energy seems to be ok.

My suggestion actually is to upgrade to yambo@5.1 and repeat the calculation using a slab geometry:

Code: Select all

CUTGeo= "slab z"
and see if this solves the problem.

Best,
Daniele

Re: Randomly different nlXC values

Posted: Tue Mar 21, 2023 3:05 pm
by Davide Sangalli
Ciao Lorenzo,
in my experience MPI is more stable than OpenMP, and usually also faster (although it may consume more memory)

I'll check if the same issue can be reproduced on small runs.

Best,
D.

Re: Randomly different nlXC values

Posted: Tue Mar 21, 2023 3:11 pm
by claudio
Dear all

I try to put a small correction for this bug in the bug-fixes but it seems nothing change.
I'm not able to reproduce this bug on small systems. Using from 1 to 8 openMP core it gives to me the same results.
Lorenzo please put in the forum your inputs, including DFT, PSEUDO e YAMBO inputs
I will try with your runs.
Anyway I advice you not to use too many threads, but use MPI parallelization

best
Claudio

Re: Randomly different nlXC values

Posted: Tue Mar 21, 2023 4:23 pm
by Davide Sangalli
One point could be also the "compilation precision".
Maybe the system of Lorenzo is big enough that, in single precision, the way the sums are spread over the threads has an impact on the final result.
We were experiencing something similar in the past.

@Lorenzo, to check this, just compile yambo in double precision, e.g. when running the configure add the flag

Code: Select all

--enable-dp
Best,
D.

Re: Randomly different nlXC values

Posted: Wed Mar 22, 2023 10:42 am
by lorenzo.sponza
Thanks guys,
I will do tests on my side following your prescriptions.
In the meanwhile, here you are my input files. Enjoy !

PS
If you find amazing physics, just aknowledge me in your next paper :-)

Re: Randomly different nlXC values

Posted: Wed Mar 29, 2023 4:36 pm
by lorenzo.sponza
Dear all,
I've managed to compile an MPI version of yambo 5.1.1 and everything seems to work well now.
It's not my intention to investigate further the origin of this strange and wrong behaviour, but it is important to keep in mind that some OpenMP compilations may give some random error in the calculation of the nlXC.
Cheers and many thanks for your help.


Ciao