Hi Daniele
So I've tried increasing to 12million G vectors and the BZ Q(8) ratio remains roughly constant (0.7028 compared to 0.7022 for 1million G vectors). I've also tried increasing 'RandGvec', I get very little change again:
RandGvec = 1RL; Q(8) ratio = 0.7022
RandGvec = 9RL; Q(8) ratio = 0.7022
RandGvec = 1000RL; Q(8) ratio = 0.7021
RandGvec = 12000RL; Q(8) ratio = 0.7025.
Do you think I should be increasing these variables much further or is there another issue?
A couple of other things I have noticed:
 as in the rRandGvec files, about 7080% of the points are falling outside the sphere radius (this continues when I increase the number of sampling points);
 when I increase RandGvec, the value of 'Gamma point sphere radius' in the RIM integral doesn't change (I'm not sure if it should?).
All the best,
Alan
RIM step hangs when calculating HF bandgap
Moderators: Davide Sangalli, Daniele Varsano, andrea.ferretti, andrea marini, myrta gruning

 Posts: 9
 Joined: Thu Jul 02, 2020 3:56 pm
Re: RIM step hangs when calculating HF bandgap
Alan Bowman
University of Cambridge
University of Cambridge
 Daniele Varsano
 Posts: 2416
 Joined: Tue Mar 17, 2009 2:23 pm
 Contact:
Re: RIM step hangs when calculating HF bandgap
Dear Alan,
probably I was not clear enough:
When you add RandGvec you apply the Monte Carlo integration outside the BZ, it is normal that Q(8) ratio does not change because you looking always at the same integral and it tells you need to go outside the BZ: What you are looking at is statistical fluctuation of the MC integration on the same integral and it is correct it does not change. It just tells you that you are using enough RandQpoints.
What I have suggested is to increase the RandGvec and look at the convergence of the <HF> value.
Best,
Daniele
probably I was not clear enough:
When you add RandGvec you apply the Monte Carlo integration outside the BZ, it is normal that Q(8) ratio does not change because you looking always at the same integral and it tells you need to go outside the BZ: What you are looking at is statistical fluctuation of the MC integration on the same integral and it is correct it does not change. It just tells you that you are using enough RandQpoints.
Ok this is normal, it is how work the MC integration. as in the rRandGvec files, about 7080% of the points are falling outside the sphere radius (this continues when I increase the number of sampling points);
It does not have to change. when I increase RandGvec, the value of 'Gamma point sphere radius' in the RIM integral doesn't change (I'm not sure if it should?).
What I have suggested is to increase the RandGvec and look at the convergence of the <HF> value.
Best,
Daniele
Dr. Daniele Varsano
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/

 Posts: 9
 Joined: Thu Jul 02, 2020 3:56 pm
Re: RIM step hangs when calculating HF bandgap
Dear Daniele
Thanks for the clarification. This brings me back to my original question  when I increase RandGvec past 12000RL the RIM integrals no longer run due to memory issues. If I run the calculation on 160 cores then I think the integrals part are only running on 8 cores. Is a different parallelisation strategy the best way to solve this or is there something else I should be doing?
Best wishes,
Alan
Thanks for the clarification. This brings me back to my original question  when I increase RandGvec past 12000RL the RIM integrals no longer run due to memory issues. If I run the calculation on 160 cores then I think the integrals part are only running on 8 cores. Is a different parallelisation strategy the best way to solve this or is there something else I should be doing?
Best wishes,
Alan
Alan Bowman
University of Cambridge
University of Cambridge
 Daniele Varsano
 Posts: 2416
 Joined: Tue Mar 17, 2009 2:23 pm
 Contact:
Re: RIM step hangs when calculating HF bandgap
Dear Alan,
I can only repeat my answer.
The algorithm it is not meant for such large number of Gvector outside the BZ.
If it does not converge after few hundreds of G vector I suspect that something odd is happening, as the code was never used for such a large number of G vector, this is because in line of principle the MC integral and the one done my simple summation should be the same.
What I suggested you is to look at the convergence increasing the number of G vectors from few tenth to some hundreds (which is the usual way the technique is used) and see the behaviour of your <HF> matrix elements in order if you have a monotonic convergence or strange and suspicious behaviour.
Best,
Daniele
I can only repeat my answer.
The algorithm it is not meant for such large number of Gvector outside the BZ.
If it does not converge after few hundreds of G vector I suspect that something odd is happening, as the code was never used for such a large number of G vector, this is because in line of principle the MC integral and the one done my simple summation should be the same.
What I suggested you is to look at the convergence increasing the number of G vectors from few tenth to some hundreds (which is the usual way the technique is used) and see the behaviour of your <HF> matrix elements in order if you have a monotonic convergence or strange and suspicious behaviour.
This is because the algorithm it is parallelized over q points and you have 8 q points. The parallelisation has been not extended to G vectors as it never happened to use such large number of Gvectors.If I run the calculation on 160 cores then I think the integrals part are only running on 8 cores. Is a different parallelisation strategy the best way to solve this or is there something else I should be doing?
Best,
Daniele
Dr. Daniele Varsano
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/

 Posts: 9
 Joined: Thu Jul 02, 2020 3:56 pm
Re: RIM step hangs when calculating HF bandgap
Dear Daniele
That's really helpful, thank you. I guess I will just have to stop at 12000RL in that case. The HF convergence is monotonic and is close to converged at 12000RL, but it sounds like I won't be able to increase beyond this value (I'm using high memory nodes to even do this calculation!).
With best wishes,
Alan
That's really helpful, thank you. I guess I will just have to stop at 12000RL in that case. The HF convergence is monotonic and is close to converged at 12000RL, but it sounds like I won't be able to increase beyond this value (I'm using high memory nodes to even do this calculation!).
With best wishes,
Alan
Alan Bowman
University of Cambridge
University of Cambridge