Skip to content

Prepare for 2.13.0#389

Merged
evaleev merged 22 commits intomasterfrom
prepare-2-13-0
Feb 1, 2026
Merged

Prepare for 2.13.0#389
evaleev merged 22 commits intomasterfrom
prepare-2-13-0

Conversation

@evaleev
Copy link
Owner

@evaleev evaleev commented Jan 28, 2026

last preparations for 2.13.0 release that introduces @loriab's CMake harness. This will scrap the legacy harness(es).

…riables are namespaced by LIBINT_ prefix

all exported library Cmake options already followed this namespacing convention, thus this only renames many compiler-specific CMake options
…riables are namespaced by LIBINT_ prefix

all exported library Cmake options already followed this namespacing convention, thus this only renames many compiler-specific CMake options
@evaleev
Copy link
Owner Author

evaleev commented Jan 29, 2026

@loriab would appreciate a quick scan, as this aggregates your titanic efforts + option namespacing may have impact on psi4

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR prepares for the 2.13.0 release by introducing a CMake harness to replace the legacy Autotools/Makefile build system. The changes involve systematic renaming of preprocessor macros to use consistent LIBINT_ prefixing, deletion of legacy build files, and updates to CMake configuration.

Changes:

  • Renamed preprocessor macros throughout codebase: INCLUDE_*LIBINT_INCLUDE_*, MULTIPOLE_MAX_ORDERLIBINT_MULTIPOLE_MAX_ORDER, and other similar changes for consistency
  • Removed legacy Makefile-based build system files (Makefiles, autoconf files, shell scripts)
  • Updated CMake configuration to use LIBINT2_ prefix for user-facing options while maintaining LIBINT_ prefix for internal variables
  • Updated documentation (INSTALL.md) to reflect new CMake option names

Reviewed changes

Copilot reviewed 52 out of 66 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/unit/test-2body.cc Updated macro from INCLUDE_ERI to LIBINT_INCLUDE_ERI
tests/unit/test-1body.cc Updated macro from INCLUDE_ONEBODY to LIBINT_INCLUDE_ONEBODY
tests/hartree-fock/hartree-fock++.cc Updated MULTIPOLE_MAX_ORDER to LIBINT_MULTIPOLE_MAX_ORDER
tests/eri/test.cc Comprehensive macro renaming for all ERI types and derivatives
src/bin/libint/build_libint.cc Updated all internal macro references to new naming scheme
src/bin/libint/buildtest.h Added missing header includes
include/libint2/engine.impl.h Updated preprocessor checks to use new macro names
include/libint2/engine.h Updated documentation and macro references
include/libint2/deriv_map.h Updated macro conditionals and added formatting improvements
include/libint2/cxxapi.h Updated API availability checks
include/libint2/config.h.cmake.in Comprehensive macro renaming in configuration template
export/fortran/* Updated Fortran interface files with new macro names
cmake/modules/int_am.cmake Updated CMake option handling with new naming convention
cmake/modules/int_orderings.cmake Fixed variable naming bugs
cmake/modules/int_userreal.cmake Updated variable names
src/lib/libint/populate.cmake Fixed typo in comment
src/lib/libint/CMakeLists.txt Updated internal variable references
CMakeLists.txt Added LIBINT2_/LIBINT_ variable conversion logic
INSTALL.md Updated all documentation to reflect new option names
.github/workflows/cmake.yml Updated CI workflow with new option names
All Makefile files Deleted legacy build system files
All autoconf files Deleted legacy configuration files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@loriab
Copy link
Collaborator

loriab commented Jan 30, 2026

Thanks for all this! I realize now how out of practice I am with pure-cmake builds, so checking the migration guide as I go. I've generated a toy export and am testing that over at conda-forge. Now generating one that psi4 can consume ...

@evaleev
Copy link
Owner Author

evaleev commented Jan 30, 2026

I've generated a toy export and am testing that over at conda-forge. Now generating one that psi4 can consume ...

Here's what I found in adapting MPQC to 2.13.0:

  • library target names have changed
  • some PP tokens have changed, e.g. MULTIPOLE_MAX_ORDER -> LIBINT_MULTIPOLE_MAX_ORDER, INCLUDE_* -> LIBINT_INCLUDE_*, etc.

Nothing major otherwise. Of course the CMake option names now all start with LIBINT2_ (but some option renames were not just a concat).

Thanks again, I would have never done this. Neither could any agents do this. My attempt to use Claude to do cmake option renaming revealed that it is completely hopeless at groking nontrivial cmake code in int_am.cmake (straight text replace is fine, but programmatically-hidden instances stayed hidden)

@evaleev
Copy link
Owner Author

evaleev commented Jan 30, 2026

@loriab this seems to be in shape now to be merged (at least I managed to consume library from MPQC both via FC and find_package). BTW, re: DynamicVersion ... it seems that now I have to make a tag to change the version? Then make a release?

@loriab
Copy link
Collaborator

loriab commented Jan 30, 2026

Are G12 ints working for you? I'm still investigating the case of the config below not happy compiling build_libint.cc

    -D LIBINT2_ENABLE_ERI=2 \
    -D LIBINT2_ENABLE_ERI3=2 \
    -D LIBINT2_ENABLE_ERI2=2 \
    -D LIBINT2_ENABLE_ONEBODY=2 \
    -D LIBINT2_ENABLE_G12=1 \
    -D LIBINT2_DISABLE_ONEBODY_PROPERTY_DERIVS=ON \
    -D LIBINT2_MULTIPOLE_MAX_ORDER=10 \
    -D LIBINT2_G12_MAX_AM=4 \
    -D LIBINT2_ERI_MAX_AM="5;5;3" \
    -D LIBINT2_ERI3_MAX_AM="6;6;4" \
    -D LIBINT2_ERI2_MAX_AM="6;6;4" \
    -D LIBINT2_MAX_AM="5;5;3"
                 from /psi/gits/libint2-upstream-wip/src/bin/libint/build_libint.cc:45:
/psi/gits/libint2-upstream-wip/build102/include/libint2/config.h:48: note: this is the location of the previous definition
   48 | #define LIBINT_MAX_AM 5
      | 
/psi/gits/libint2-upstream-wip/src/bin/libint/build_libint.cc:722: warning: "LIBINT_OPT_AM" redefined
  722 | #define LIBINT_OPT_AM G12_OPT_AM
      | 
/psi/gits/libint2-upstream-wip/build102/include/libint2/config.h:54: note: this is the location of the previous definition
   54 | #define LIBINT_OPT_AM 3
      | 
/psi/gits/libint2-upstream-wip/src/bin/libint/build_libint.cc: In function 'void try_main(int, char**)':
/psi/gits/libint2-upstream-wip/src/bin/libint/build_libint.cc:724:30: error: 'G12_MAX_AM' was not declared in this scope
  724 |   cparams->max_am("r12kg12", G12_MAX_AM);
      |                              ^~~~~~~~~~
/psi/gits/libint2-upstream-wip/src/bin/libint/build_libint.cc:725:34: error: 'G12_OPT_AM' was not declared in this scope
  725 |   cparams->max_am_opt("r12kg12", G12_OPT_AM);
      |                                  ^~~~~~~~~~
ninja: build stopped: subcommand failed.

@evaleev
Copy link
Owner Author

evaleev commented Jan 31, 2026

Are G12 ints working for you? I'm still investigating the case of the config below not happy compiling build_libint.cc

sheesh ... so many missed namespacing changes. pushed. G12 seems to generate/compile. G12DKH seems broken, but that code is experimental (so is G12 at this point ... no modern code uses it, keep them around since F12 is better formulated in terms of them).

@evaleev
Copy link
Owner Author

evaleev commented Jan 31, 2026

@loriab ok, now pushed

@loriab
Copy link
Collaborator

loriab commented Jan 31, 2026

@loriab ok, now pushed

Thanks, I'll try that next. I started a PR #390 with one very minor fix I hit so far.

Copy link
Collaborator

@loriab loriab left a comment

Choose a reason for hiding this comment

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

lgtm! I've a few optional changes at #391

@evaleev evaleev merged commit 8fe7d1e into master Feb 1, 2026
7 checks passed
@evaleev evaleev deleted the prepare-2-13-0 branch February 1, 2026 15:41
@loriab loriab mentioned this pull request Feb 1, 2026
11 tasks
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