Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gss/sss (solid harmonic ordering) runtime switchable #269

Merged
merged 8 commits into from
Sep 18, 2023

Conversation

loriab
Copy link
Collaborator

@loriab loriab commented Aug 29, 2023

(in order of decreasing importance)

  • add runtime switchable solid harmonic ordering
      libint2::initialize();
      libint2::set_solid_harmonics_ordering(libint2::SHGShellOrdering_Gaussian);
    
    • in shgshell_ordering, inlines for both orderings are now always defined. INT_SOLIDHARMINDEX(l, m) with 2 args has been deprecated (throws a warning) but still returns the value as the library was configured at build-time. a new INT_SOLIDHARMINDEX(sho, l, m) with 3 args returns the value according to the SH ordering requested in the new 1st arg.
    • in solidharmonics.h, generating the indices switches from ifdefs to logic.
  • [added 3 Sept] see 05ff2f1 for testing of the runtime switchable SHO functionality.
  • the only non-runtime-switchable use of solid harmonics is for generating the multipole ints code in build_libint.cc . we discussed possibly removing that option and settling on STANDARD. but for now to be minimally disruptive, it's still configurable.
  • more migration from find_package(PythonInterp) to find_package(Python COMPONENTS Interpreter Development). Specify directly with Python_EXECUTABLE. Hint behavior is complex, as described in https://cmake.org/cmake/help/latest/module/FindPython.html .
  • to use the new Python detection, it's recommended to require cmake 3.15+ (https://pybind11.readthedocs.io/en/stable/compiling.html?highlight=pybind11_nopython#findpython-mode). since the final goal is 3.16, I went ahead and bumped it to that.
  • add in configuration.h/cc files . at the moment, all this does is add a function configuration_accessor() that returns (nyi). this is in preparation for later accessing build configration at runtime.
  • expand GHA testing. the first stage build_repo (was build) remains largely the same except that the Release lanes upload a GHA artifact of the exported tarball. in the second stage, the Linux artifact gets downloaded into a fresh environment, and the library is built with gcc and icpx on Linux and clang on Mac. These all use a conda environment for uniformity across platforms. (the first stage is testing homebrew and apt-get.) only the hf++ test is run. python bindings are built and tested.
  • bump GHA Ununtu gcc from 9 to 10
  • Note that this snapshot has not been tested against Psi4. At the moment, it's the full cmake harness, 2023 edition #259 implementation that I know to be working.

  • Now rebased to master. Please squash PR when merging.

@loriab loriab changed the title CI wip gss/sss runtime switchable Aug 30, 2023
py::enum_<SHGShellOrdering>(m, "SHGShellOrdering")
.value("SHGShellOrdering_Standard", libint2::SHGShellOrdering_Standard)
.value("SHGShellOrdering_Gaussian", libint2::SHGShellOrdering_Gaussian)
.value("SHGShellOrdering_MOLDEN", libint2::SHGShellOrdering_Gaussian)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

On further investigation, I don't think this is a typo. The Molden: Gaussian mirrors https://github.com/evaleev/libint/blob/master/include/libint2/shgshell_ordering.h#L33 , and the defines in that file do seem to match, too.

I'm guessing it was a convenience to have Molden always defined even when the main SH value toggled.

@loriab loriab changed the title gss/sss runtime switchable gss/sss (solid harmonic ordering) runtime switchable Aug 30, 2023
@loriab loriab mentioned this pull request Aug 30, 2023
7 tasks
@loriab loriab marked this pull request as draft September 1, 2023 16:39
@loriab loriab marked this pull request as ready for review September 1, 2023 19:37
@loriab loriab requested a review from evaleev September 1, 2023 19:38
# Conflicts:
#	export/cmake/CMakeLists.txt.export
…ndard solid harmonic order, regardless of LIBINT_SHGSHELL_ORDERING
@evaleev
Copy link
Owner

evaleev commented Sep 17, 2023

@loriab looks good, I only tweaked this slightly (spherical multipoles operator components use standard order always ... this makes sense by analogy with the cartesian multipole operator components not depending on the Cartesian shell order)

@evaleev
Copy link
Owner

evaleev commented Sep 17, 2023

@loriab which is the next PR in the laundry list?

@loriab
Copy link
Collaborator Author

loriab commented Sep 17, 2023

Great, thanks! #270 is next and presently includes the commits of this one, so lmk if you'd like me to rebase.

@evaleev
Copy link
Owner

evaleev commented Sep 17, 2023 via email

@loriab
Copy link
Collaborator Author

loriab commented Sep 17, 2023

Sure that would be helpful. Also if you want to squash related commits (try
xxx) feel free ... I am not prmedabtic/paranoid about the history ...

Sure, I'll fix up 270 after this one is merged (GHA just completed). All the "try xxx" are long gone -- it's actually reviewable commit-by-commit if you prefer.

…bint2 library configured with any solid-harmonic order
@evaleev
Copy link
Owner

evaleev commented Sep 17, 2023

@loriab heads up: re-enabled FOR_SOLIDHARM to be able to write generic code that can work with any Libint2 library

@evaleev evaleev merged commit 5d5dd0b into evaleev:master Sep 18, 2023
7 checks passed
@loriab loriab deleted the windows branch September 18, 2023 00:37
@loriab loriab mentioned this pull request Dec 3, 2023
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.

2 participants