Switch to lowopt=True for libxc v2.2.* and v3.*#4199
Switch to lowopt=True for libxc v2.2.* and v3.*#4199boegel merged 5 commits intoeasybuilders:developfrom
Conversation
I've noticed that some functionals in LibXC give significantly different results with too much compiler optimization. For example, the energy of a water molecule computed with the TPSS functional changes by 6.5 kJ/mol with lowopt=False. (The problem is in the TPSS correlation functional, somewhere in mgga_c_pkzb.c. I've ruled out numerical integration issues. Similar relative errors appear on every grid point of the tpss_c energy density.) I can only test with libx-2.2.* and intel compilers at the moment. I'll make similar changes for other versions and compilers when the opportunity arises.
|
@tovrstra You say that the results are different, which is a clear indication of a problem, but do you know which of the results is correct? In any case, if we make this change, it should probably be made consistent across all libxc 2.2.x easyconfigs, and maybe also for libxc 3.x? |
| toolchain = {'name': 'intel', 'version': '2014b'} | ||
| toolchainopts = {'opt': True} | ||
| # Results for some functions (e.g. mgga_c_tpss) change with too aggressive optimization settings. | ||
| toolchainopts = {'opt': False, 'lowopt': True} |
There was a problem hiding this comment.
@tovrstra settign opt to False shouldn't be needed, it's False by default, see http://easybuild.readthedocs.io/en/latest/version-specific/toolchain_opts.html#intel
enabling opt would imply -O3, the default is to use -O2, while lowopt is equivalent with -O1 (see also eb -x libxc.eb | grep CFLAGS
|
I'm reasonably sure that the with lowopt=True are correct. I noticed the following two problems with LibXC when trying to install a beta release of HORTON on delcatty:
The TPSS code has nearly not changed in the 3.0.0. (Only the reference to the paper is done differently.) So, it seems right to make the same changes for libxc-3.0.0. I'm not sure about the other compilers. We always had consistent results with the GNU compilers, irrespective of optimization settings. |
|
@tovrstra Please also make the same change in the |
Consistency across all eb files reduces the risk that this problem gets reintroduced.
|
Good point. Done. |
|
Test report by @boegel |
|
Test report by @boegel |
|
lgtm, tested with easyconfigs that still work on CentOS7 (others should be fine too) |
|
Going in, thanks @tovrstra! |
I've noticed that some functionals in LibXC give significantly different results with too much compiler optimization. For example, the energy of a water molecule computed with the TPSS functional changes by 6.5 kJ/mol with lowopt=False. (The problem is in the TPSS correlation functional, somewhere in mgga_c_pkzb.c. I've ruled out numerical integration issues. Similar relative errors appear on every grid point of the tpss_c energy density.)
I can only test with libx-2.2.* and intel compilers at the moment. I'll make similar changes for other versions and compilers when the opportunity arises.
Can someone check if the combination
{'opt': False, 'lowopt': True}is meaningful fortoolchainopts? It seems to work for me.