Skip to content

Interface for greenX library#4078

Merged
oschuett merged 27 commits intocp2k:masterfrom
lstsgroup:master
Mar 14, 2025
Merged

Interface for greenX library#4078
oschuett merged 27 commits intocp2k:masterfrom
lstsgroup:master

Conversation

@dgolze
Copy link
Contributor

@dgolze dgolze commented Mar 13, 2025

Contains the interface to the minimax and analytic continuation component of the greenX library.

@dgolze dgolze requested a review from oschuett March 14, 2025 07:41
Copy link
Contributor

@mtaillefumier mtaillefumier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks alright to me. I misinterpreted the cmake stuff, apologies for that

@RMeli
Copy link
Member

RMeli commented Mar 14, 2025

GreenX is not available on Spack, but it looks like a solid project that should be easy to add. Once this PR is merged, I'll add it to Spack and then in CI (Spack + CMake).

tests/TEST_DIRS Outdated
# the order will be regularly checked and modified...
QS/regtest-double-hybrid-stress-laplace libint libxc
QS/regtest-rpa-sigma libint
QS/regtest-rpa-sigma libint greenx=.false.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct syntax here would be !greenx, but we currently only use it for leak sanitizer and I don't think we should start using it for features.

I think, an input file should either produce the same result regardless of the presents of a library or fail if the required library is missing.

So, if GreenX produces significantly different results then it's essentially a different method and therefore merits an input keyword to enable/disable it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Ole, I see your point and I was thinking about this, too. For a few cases, greenX and the internal minimax have slightly different grids. Because of numerical instabilities, this affects the results, but only for small grids. For those, I relaxed either the tolerance a little or I used a larger, numerically more stable grids. I can fix the "regtest-rpa-sigma" tests in a similar manner; I have to admit I was a little lazy here. The other case "QS/regtest-gw-kpoints" I would leave because the tests are already relatively long and a larger grids makes them even longer...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like well balanced plan 👍

I'd suggest we use !greenx only for the transition period and once we have GreenX in the toolchain we change the reference values and switch to greenx (without the !).

@oschuett
Copy link
Member

The recent PRs have unfortunately created some merge conflict. Once those are resolved this seems ready to be merged.

dgolze and others added 24 commits March 14, 2025 16:30
…ed (small minimax grids different between greenx and internal routines)
@oschuett oschuett merged commit 51f8a4b into cp2k:master Mar 14, 2025
36 checks passed
@StepanMarek StepanMarek mentioned this pull request Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants