long 4th deriv compile
There's some trouble at the conda-forge package for v6 (https://github.com/conda-forge/libxc-feedstock/pull/40) where the Linux builds are timing out (3h) due to compiling 4th derivatives. I did a local serial build with GCC v9 while timing each file; total build took 7h. 261 source files built in under a minute; 72 more built in under 10 minutes; then there's the 8 files below. Native C flags for Release are -O3. I tried out one file (wpbeh), and compile time didn't drop significantly until -O1.
gga_c_ft97.c real 14m54.450s
gga_x_wpbeh.c real 15m49.668s
mgga_x_br89.c real 43m52.883s
mgga_x_mbrxh_bg.c real 11m24.961s
mgga_x_mbrxc_bg.c real 32m45.740s
mgga_x_mggac.c real 36m20.049s
mgga_x_mbr.c real 11m35.780s
mgga_c_rmggac.c real 17m56.367s
Certainly we'd like to keep most functionality enabled for the package. Some approaches below, but I'd take others.
- (a) have a cmake option to skip the longest fctls for 4th deriv
- (b) turn down optimization for certain fctls (I'd feel better if it was only the 4th deriv block
- (c) figure out some particular optimizations that -O2 includes to turn off (I've tried a couple w/o luck)
By the way, shouldn't the 1st/2nd/3rd/4th deriv be a cmake component (so one can find_package(Libxc COMPONENTS d3)
if 3rd-order deriv used)? It'd be easier to select suitable libs and easier to track what quantum packages need. This can also be a cmake property on the library.