Skip to content

Commit ffa254c

Browse files
committed
misc. fixes
1 parent df2b395 commit ffa254c

File tree

5 files changed

+59
-11
lines changed

5 files changed

+59
-11
lines changed

CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ option_with_default(LIBINT_BUILD_LIBRARY_AS_SUBPROJECT "[EXPERT] Build generated
7474
option_with_default(REQUIRE_CXX_API "C++11 Libint API: define library targets + test (requires Eigen3; Boost is optional but strongly recommended)" ON)
7575
option_with_default(ENABLE_FORTRAN "Build Fortran03+ Libint interface (requires Fortran)" OFF)
7676

77+
option_with_print(BUILD_SHARED_LIBS "Build Libint library as shared, not static" OFF)
78+
option_with_print(LIBINT2_BUILD_SHARED_AND_STATIC_LIBS "Build both shared and static Libint libraries in one shot. Uses -fPIC." OFF)
79+
7780
# <<< Which Integrals Classes, Which Derivative Levels >>>
7881

7982
option_with_default(ENABLE_ONEBODY

INSTALL.md

+48-5
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,58 @@ These are the most useful configure options:
4343
* `WITH_MAX_AM` -- Support Gaussians of angular momentum up to N. Can specify values for each derivative level as a semicolon-separated string. [Default=4]
4444
* `WITH_OPT_AM` -- Optimize maximally for up to angular momentum N (N <= WITH_MAX_AM). Can specify values for each derivative level as a semicolon-separated string. [Default=-1 -> `(WITH_MAX_AM/2)+1`]
4545

46+
* `WITH_ONEBODY_MAX_AM` -- Support 1-body ints for Gaussians of angular momentum up to N. Can specify values for each derivative level as a semicolon-separated string. [Default=-1 -> `WITH_MAX_AM`]
47+
* `WITH_ONEBODY_OPT_AM` -- Optimize 1-body ints maximally for up to angular momentum N (N <= max-am). Can specify values for each derivative level as a semicolon-separated string. [Default=-1 -> `WITH_OPT_AM`]
48+
49+
* `WITH_TWOBODY4_MAX_AM` -- Support 4-center ERIs for Gaussians of angular momentum up to N. Can specify values for each derivative level as a semicolon-separated string. [Default=-1 -> `WITH_MAX_AM`]
50+
* `WITH_TWOBODY4_OPT_AM` -- Optimize 4-center ERIs maximally for up to angular momentum N (N <= max-am). Can specify values for each derivative level as a semicolon-separated string. [Default=-1 -> `WITH_OPT_AM`]
51+
52+
* `WITH_TWOBODY3_MAX_AM` -- Support 3-center ERIs for Gaussians of angular momentum up to N. Can specify values for each derivative level as a semicolon-separated string. [Default=-1 -> `WITH_MAX_AM`]
53+
* `WITH_TWOBODY3_OPT_AM` -- Optimize 3-center ERIs maximally for up to angular momentum N (N <= max-am). Can specify values for each derivative level as a semicolon-separated string. [Default=-1 -> `WITH_OPT_AM`]
54+
55+
* `WITH_TWOBODY2_MAX_AM` -- Support 2-center ERIs for Gaussians of angular momentum up to N. Can specify values for each derivative level as a semicolon-separated string. [Default=-1 -> `WITH_MAX_AM`]
56+
* `WITH_TWOBODY2_OPT_AM` -- Optimize 2-center ERIs maximally for up to angular momentum N (N <= max-am). Can specify values for each derivative level as a semicolon-separated string. [Default=-1 -> `WITH_OPT_AM`]
57+
58+
59+
4660
### Autotools Update Guide
4761

48-
* `--enable-eri=N` --> `-D ENABLE_ERI=N` --> `ENABLE_TWOBODY4=N`
49-
* `--disable-eri` --> `-D ENABLE_TWOBODY4=-1`
50-
* `--enable-eri3=N` --> `-D ENABLE_ERI3=N` --> `ENABLE_TWOBODY3=N`
51-
* `--enable-eri2=N` --> `-D ENABLE_ERI2=N` --> `ENABLE_TWOBODY2=N`
62+
* `--enable-1body=N` --> `-D ENABLE_ONEBODY`
63+
* `--enable-eri=N` --> `-D ENABLE_ERI=N` --> `-D ENABLE_TWOBODY4=N`
64+
* `--disable-eri` --> `-D ENABLE_ERI=-1` --> `-D ENABLE_TWOBODY4=-1`
65+
* `--enable-eri3=N` --> `-D ENABLE_ERI3=N` --> `-D ENABLE_TWOBODY3=N`
66+
* `--enable-eri2=N` --> `-D ENABLE_ERI2=N` --> `-D ENABLE_TWOBODY2=N`
5267

5368
* `--with-max-am=N` --> `-D WITH_MAX_AM=N`
54-
* `--with-max-am=N0,N1,N2` --> `-D WITH_MAX_AM="N0;N1;N2"` (notice commas becoming semicolons and quotes; this is normal CMake list syntax)
69+
* `--with-max-am=N0,N1,N2` --> `-D WITH_MAX_AM="N0;N1;N2"` (notice semicolons and quotes. This is standard CMake list syntax)
5570
* `--with-opt-am=N` --> `-D WITH_OPT_AM=N`
5671
* `--with-opt-am=N0,N1,N2` --> `-D WITH_OPT_AM="N0;N1;N2"`
5772

73+
* `--with-1body-max-am=N` --> `-D WITH_ONEBODY_MAX_AM=N`
74+
* `--with-1body-max-am=N0,N1,N2` --> `-D WITH_ONEBODY_MAX_AM="N0;N1;N2"`
75+
* `--with-1body-opt-am=N` --> `-D WITH_ONEBODY_OPT_AM=N`
76+
* `--with-1body-opt-am=N0,N1,N2` --> `-D WITH_ONEBODY_OPT_AM="N0;N1;N2"`
77+
78+
* `--with-eri-max-am=N` --> `-D WITH_ERI_MAX_AM=N` --> `-D WITH_TWOBODY4_MAX_AM=N`
79+
* `--with-eri-max-am=N0,N1,N2` --> `-D WITH_ERI_MAX_AM="N0;N1;N2"` --> `-D WITH_TWOBODY4_MAX_AM="N0;N1;N2"`
80+
* `--with-eri-opt-am=N` --> `-D WITH_ERI_OPT_AM=N` --> `-D WITH_TWOBODY4_OPT_AM=N`
81+
* `--with-eri-opt-am=N0,N1,N2` --> `-D WITH_ERI_OPT_AM="N0;N1;N2"` --> `-D WITH_TWOBODY4_OPT_AM="N0;N1;N2"`
82+
83+
* `--with-eri3-max-am=N` --> `-D WITH_ERI3_MAX_AM=N` --> `-D WITH_TWOBODY3_MAX_AM=N`
84+
* `--with-eri3-max-am=N0,N1,N2` --> `-D WITH_ERI3_MAX_AM="N0;N1;N2"` --> `-D WITH_TWOBODY3_MAX_AM="N0;N1;N2"`
85+
* `--with-eri3-opt-am=N` --> `-D WITH_ERI3_OPT_AM=N` --> `-D WITH_TWOBODY3_OPT_AM=N`
86+
* `--with-eri3-opt-am=N0,N1,N2` --> `-D WITH_ERI3_OPT_AM="N0;N1;N2"` --> `-D WITH_TWOBODY3_OPT_AM="N0;N1;N2"`
87+
88+
* `--with-eri2-max-am=N` --> `-D WITH_ERI2_MAX_AM=N` --> `-D WITH_TWOBODY2_MAX_AM=N`
89+
* `--with-eri2-max-am=N0,N1,N2` --> `-D WITH_ERI2_MAX_AM="N0;N1;N2"` --> `-D WITH_TWOBODY2_MAX_AM="N0;N1;N2"`
90+
* `--with-eri2-opt-am=N` --> `-D WITH_ERI2_OPT_AM=N` --> `-D WITH_TWOBODY2_OPT_AM=N`
91+
* `--with-eri2-opt-am=N0,N1,N2` --> `-D WITH_ERI2_OPT_AM="N0;N1;N2"` --> `-D WITH_TWOBODY2_OPT_AM="N0;N1;N2"`
92+
93+
* `--enable-shared` --> `-D BUILD_SHARED_LIBS=ON` (standard CMake variable)
94+
* `--enable-static` --> `-D BUILD_SHARED_LIBS=OFF` (standard CMake variable)
95+
96+
* Targets
97+
* `libint2` --> `Libint2::int2` (internal target name `int-shared`)
98+
* `libint2_cxx` --> `Libint2::cxx` (internal target name `int-cxx-shared`)
99+
100+

src/bin/libint/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ endif()
1313

1414
### compiler library
1515

16-
add_library(libint-libcompiler
16+
add_library(libint-libcompiler STATIC
1717
algebra.cc
1818
buildtest.cc
1919
class_registry.cc

src/lib/libint/CMakeLists.txt.export

+6-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ include(int_computed)
3030

3131
option_with_default(CMAKE_BUILD_TYPE "Build type" Release)
3232
option_with_print(REQUIRE_CXX_API "C++11 Libint API: define library targets + test (requires Eigen3)" ON)
33-
option_with_print(ENABLE_FORTRAN "Build Fortran03+ Libint interface (requires C and Fortran)" OFF)
33+
option_with_print(ENABLE_FORTRAN "Build Fortran03+ Libint interface (requires C and Fortran and Python)" OFF)
3434
option_with_print(BUILD_TESTING "Compile the testing infrastructure" ON)
3535
option_with_print(ENABLE_MPFR "Use GNU MPFR library for high-precision testing (EXPERTS ONLY)" OFF)
36-
option_with_print(LIBINT2_BUILD_SHARED_AND_STATIC_LIBS "Build in one shot static and shared library variants. Uses -fPIC." OFF)
36+
option_with_print(BUILD_SHARED_LIBS "Build Libint library as shared, not static" OFF)
37+
option_with_print(LIBINT2_BUILD_SHARED_AND_STATIC_LIBS "Build both shared and static Libint libraries in one shot. Uses -fPIC." OFF)
38+
3739
if (NOT LIBINT2_REALTYPE)
3840
set(LIBINT2_REALTYPE double)
3941
endif()
@@ -128,8 +130,8 @@ else (TARGET Eigen3::Eigen)
128130
find_package(Eigen3)
129131
if (EIGEN3_FOUND)
130132
if (NOT EXISTS "${EIGEN3_INCLUDE_DIR}")
131-
message(WARNING "Eigen3 is \"found\", but the reported EIGEN3_INCLUDE_DIR=${EIGEN3_INCLUDE_DIR} does not exist; likely corrupt Eigen3 build registered in user or system package registry; specify EIGEN3_INCLUDE_DIR manually or (better) configure (with CMake) and install Eigen3 package")
132-
else(NOT EXISTS "${EIGEN3_INCLUDE_DIR}")
133+
message(FATAL_ERROR "Eigen3 is \"found\", but the reported EIGEN3_INCLUDE_DIR=${EIGEN3_INCLUDE_DIR} does not exist; likely corrupt Eigen3 build registered in user or system package registry; specify EIGEN3_INCLUDE_DIR manually or (better) configure (with CMake) and install Eigen3 package")
134+
else()
133135
add_library(libint-Eigen3 INTERFACE)
134136
set_property(TARGET libint-Eigen3 PROPERTY
135137
INTERFACE_INCLUDE_DIRECTORIES ${EIGEN3_INCLUDE_DIR})

src/lib/libint/tests/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ if (LIBINT_HAS_CXX_API)
8383
-P ${PROJECT_SOURCE_DIR}/tests/hartree-fock/hftest.cmake)
8484
else()
8585
add_test(NAME libint2/hf/run
86-
COMMAND $<TARGET_FILE:hartree-fock> hartree-fock/h2o.xyz)
86+
COMMAND $<TARGET_FILE:hf-libint2> hartree-fock/h2o.xyz)
8787
endif()
8888
set_tests_properties(libint2/hf/run
8989
PROPERTIES FIXTURES_REQUIRED LIBINT2_HFTEST_EXEC)

0 commit comments

Comments
 (0)