Page 1 of 1

Upgrade of LibXC

Posted: Thu Oct 06, 2011 12:48 pm
by dcaliste
Currently, BigDFT depends on libXC 1.1, but ABINIT still uses 1.0. Is it possible to upgrade (almost nothing to do, just one or two symbol change names) ? Do you expect any trouble ?

Related question, who's ready to do it and when (I volunteer) ?

Re: Upgrade of LibXC

Posted: Thu Oct 06, 2011 6:12 pm
by pouillon
I'm perfectly fine if you do it.

In the worst case, we can discuss this when I come to Grenoble.

Re: Upgrade of LibXC

Posted: Fri Oct 07, 2011 3:08 pm
by Alain_Jacques
Hi Damien,

already done but not pushed yet on 6.11.0 - there are a few accuracy problems (and a dirty hack to get rid of clumsy Portuguese chars in the libxc comments).

Alain

Re: Upgrade of LibXC

Posted: Fri Oct 07, 2011 3:13 pm
by pouillon
Did you report this issue to the developers of LibXC?

Re: Upgrade of LibXC

Posted: Fri Oct 07, 2011 3:20 pm
by dcaliste
here are a few accuracy problems


That's exactly the kind of sentence I was expecting and why I started this discussion. I spent one week with BigDFT tracking regression. If it can help here are the accuracy tests we have in BigDFT, comparing ABINIT driveXC and libXC (nosp for no spin, scol for colinear spin calculations):

Code: Select all

 -----------------------------------------+--------------------------------------------
 ixc =       1   nosp =    -2766.21488514 | scol =    -2240.03581793   time = 0.09250 s
 ixc =     -20   nosp =    -2766.21488083 | scol =    -2240.03581374   time = 0.13350 s
 -----------------------------------------+--------------------------------------------
 ixc =       2   nosp =    -2764.02880304 | scol =    -2237.43642550   time = 0.06550 s
 ixc =   -1009   nosp =    -2764.02879847 | scol =    -2237.49187260   time = 0.28450 s
 -----------------------------------------+--------------------------------------------
 ixc =       3   nosp =    -2765.45147845 | scol =    -2239.62248621   time = 0.05550 s
 -----------------------------------------+--------------------------------------------
 ixc =       4   nosp =    -3115.62686101 | scol =    -2529.22837520   time = 0.05850 s
 ixc =   -1002   nosp =    -3115.62685637 | scol =    -2529.70171805   time = 0.22050 s
 -----------------------------------------+--------------------------------------------
 ixc =       5   nosp =    -2872.14600673 | scol =    -2320.88893565   time = 0.08500 s
 ixc =   -1004   nosp =    -2872.15683268 | scol =    -2321.36253050   time = 0.31150 s
 -----------------------------------------+--------------------------------------------
 ixc =       6   nosp =    -1814.17322566 | scol =    -1440.08163062   time = 0.05500 s
 ixc =   -6006   nosp =    -1814.17322329 | scol =    -1440.55497575   time = 0.27150 s
 -----------------------------------------+--------------------------------------------
 ixc =       7   nosp =    -2767.10176245 | scol =    -2240.49206038   time = 0.12850 s
 ixc =   -1012   nosp =    -2767.10175784 | scol =    -2240.49205495   time = 0.33200 s
 -----------------------------------------+--------------------------------------------
 ixc =       8   nosp =    -1814.17322566 | scol =    -1440.55497812   time = 0.08150 s
 ixc =      -1   nosp =    -1814.17322329 | scol =    -1440.55497575   time = 0.14750 s
 -----------------------------------------+--------------------------------------------
 ixc =       9   nosp =    -3655.22471599 | scol =    -3056.94510925   time = 0.14300 s
 ixc =   -1003   nosp =    45754.55630339 | scol =    65484.14723970   time = 0.22350 s
 -----------------------------------------+--------------------------------------------
 ixc =   -1005   nosp =    -2764.47194298 | scol =    -2218.51637483   time = 0.30800 s
 -----------------------------------------+--------------------------------------------
 ixc =   -1007   nosp =    -2768.72308542 | scol =    -2242.11840810   time = 0.43450 s
 -----------------------------------------+--------------------------------------------
 ixc =   -1008   nosp =    -3637.33819847 | scol =    -3026.08745675   time = 0.42900 s
 -----------------------------------------+--------------------------------------------
 ixc =   -1010   nosp =    -2764.02879847 | scol =    -2237.49187260   time = 0.28400 s
 -----------------------------------------+--------------------------------------------
 ixc =   -1011   nosp =    -2762.84136401 | scol =    -2232.39062452   time = 0.28400 s
 -----------------------------------------+--------------------------------------------
 ixc =   -1013   nosp =    -2767.10162590 | scol =    -2240.49197745   time = 0.33150 s
 -----------------------------------------+--------------------------------------------
 ixc =   -1014   nosp =    -2812.15317905 | scol =    -2270.68646003   time = 0.33500 s
 -----------------------------------------+--------------------------------------------
 ixc =      11   nosp =    -3214.44003433 | scol =    -2562.83066924   time = 0.20100 s
 ixc = -101130   nosp =    -3214.44010430 | scol =    -2562.83071776   time = 0.66500 s
 -----------------------------------------+--------------------------------------------
 ixc =      12   nosp =    -3189.91009343 | scol =    -2545.91096900   time = 0.10250 s
 ixc =    -101   nosp =    -3189.91009064 | scol =    -2545.91096621   time = 0.19050 s
 -----------------------------------------+--------------------------------------------
 ixc =      13   nosp =    -2767.10176245 | scol =    -2240.49206038   time = 0.22600 s
 ixc = -160012   nosp =     -952.92853455 | scol =     -799.93707920   time = 0.47400 s
 -----------------------------------------+--------------------------------------------
 ixc =      14   nosp =    -3939.83765965 | scol =    -3150.23273351   time = 0.19950 s
 ixc = -102130   nosp =    -3939.83772939 | scol =    -3150.23278181   time = 0.66600 s
 -----------------------------------------+--------------------------------------------
 ixc =      15   nosp =    -3247.86373506 | scol =    -2584.49246457   time = 0.21750 s
 ixc = -117130   nosp =    -3247.86380504 | scol =    -2584.49251310   time = 0.67600 s
 -----------------------------------------+--------------------------------------------
 ixc =      16   nosp =    -4949.52814777 | scol =    -3938.44829636   time = 0.21750 s
 ixc =    -161   nosp =    -4949.52814358 | scol =    -3938.44829532   time = 0.85050 s
 -----------------------------------------+--------------------------------------------
 ixc =      17   nosp =    -2546.44585867 | scol =    -1954.21497826   time = 0.21750 s
 ixc =    -162   nosp =    -2546.44585522 | scol =    -1954.21497929   time = 0.84800 s
 -----------------------------------------+--------------------------------------------
 ixc =      23   nosp =    -3203.90850303 | scol =    -2562.83066924   time = 0.21350 s
 ixc =    -118   nosp =    -3179.37855934 | scol =    -2538.99096955   time = 0.22900 s
 -----------------------------------------+--------------------------------------------
 ixc =      26   nosp =    -3140.83269864 | scol =    -2430.35321529   time = 0.21950 s
 ixc =    -163   nosp =    -3140.83269493 | scol =    -2430.35321666   time = 0.84750 s
 -----------------------------------------+--------------------------------------------
 ixc =      27   nosp =    -1176.92556505 | scol =     -719.23727167   time = 0.21750 s
 ixc =    -164   nosp =    -1176.92556175 | scol =     -719.23727951   time = 0.84900 s
 -----------------------------------------+--------------------------------------------
 ixc =    -102   nosp =    -3915.30771573 | scol =    -3133.31303025   time = 0.19150 s
 -----------------------------------------+--------------------------------------------
 ixc =    -103   nosp =    -3463.54672524 | scol =    -2766.65340442   time = 0.18800 s
 -----------------------------------------+--------------------------------------------
 ixc =    -104   nosp = ***************** | scol = *****************   time = 0.17800 s
 -----------------------------------------+--------------------------------------------
 ixc =    -105   nosp =    -5517.45276955 | scol =    -4674.67859141   time = 0.23450 s
 -----------------------------------------+--------------------------------------------
 ixc =    -106   nosp =   -21314.23000832 | scol =   -20397.88167685   time = 0.24350 s
 -----------------------------------------+--------------------------------------------
 ixc =    -107   nosp = -2055131.19113725 | scol = -2304024.37004162   time = 0.18650 s
 -----------------------------------------+--------------------------------------------
 ixc =    -108   nosp =    -7031.32396038 | scol =    -6101.52065424   time = 0.27050 s
 -----------------------------------------+--------------------------------------------
 ixc =    -109   nosp =     -628.09086418 | scol =     -410.60793637   time = 0.37950 s
 -----------------------------------------+--------------------------------------------
 ixc =    -110   nosp =    -4494.87325445 | scol =    -3600.81871942   time = 0.18950 s
 -----------------------------------------+--------------------------------------------
 ixc =    -406   nosp =    -2416.96258164 | scol =    -1926.35297621   time = 0.62650 s
 -----------------------------------------+--------------------------------------------

I can send you the Fortran routine to generate this Alain if you're interested.

Re: Upgrade of LibXC

Posted: Mon Oct 10, 2011 4:07 pm
by pouillon
Here is the comment from Miguel:
Several of the comparisons that give errors are meaningless. For
example, you are comparing ixc=13=> GGA potential of van
Leeuwen-Baerends, while for energy, Perdew-Wang 92 functional, with a
calculation for the energy with van Leeuwen-Baerends (that does not have
an energy). The Gill functional gives wild errors, I guess because it is
wild (divergent), etc. There a couple of things that worry me, in any
case, the RPA functional (even if again you are comparing two different
things), and the wc functionals. I will take a closer look when I have
time...
Then, the small numerical differences are to be expected, as abinit
and libxc use different thresholds, different number of significant
digits in the constants and different orders of operations.

Re: Upgrade of LibXC

Posted: Tue Oct 11, 2011 9:36 am
by dcaliste
Hello Miguel,

If you read this... Don't worry, I'm not saying that LibXC is less precise or buggy in comparison to ABINIT, I'm happy with it, following its developments and we plan in near future to switch to it as default in BigDFT (we've already abandonned the drivexc wrapper). Some comparisons in my tab are not adequat, I know and I'm not trying to make them match, sorry for the bad presentation.

Regarding my sentence about tracking regressions, it's indeed something I've done because for one or two functionals the results were diverging while they should have not. I've commited patches to libXC for this and discuss with Micael about them. So now, I'm providing this array to show to Alain that there's no regressions so far compared to ABINIT results, so he can include libXC1.1 as far as I'm concerned.

Sorry, it was not clear at the beginning.

Re: Upgrade of LibXC  [SOLVED]

Posted: Tue Oct 11, 2011 1:26 pm
by Alain_Jacques
Hello Damien, Yann and Miguel,

Miguel ... don't worry at all :-) I simply wanted to check to impact - on Abinit I assumed this has been done for long and on Atompaw, my main concern. And I certainly don't imply that libXC is less accurate, simply slightly different. Very fine for me to update to 1.1 - that was my original intention.

Kind regards,

Alain