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

new cmake harness #205

Open
wants to merge 123 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 122 commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
a764784
this builds a library entirely with cmake
loriab Sep 27, 2019
8460bdf
build static and shared. process version and soversion.
loriab Sep 28, 2019
ed896f0
builds and works with psi4 libint2 branch
loriab Oct 2, 2019
516d6ba
more cmake tidying
loriab Oct 3, 2019
9d33d32
cmake info passing fixes
loriab Oct 3, 2019
82a1a7e
fixes
loriab Oct 3, 2019
3a302ac
cmake_module_path fix
loriab Oct 3, 2019
0ba973b
am_eri defaulting, take 4
loriab Oct 5, 2019
5af026c
opt_am fix
loriab Oct 5, 2019
02b6e43
try some gmp variations for windows
loriab Nov 26, 2019
ab73c8d
adapt for windows
loriab Nov 26, 2019
677de15
adapt for windows: srandom --> srand
loriab Nov 26, 2019
ef2b5af
adapt for windows: random --> rand
loriab Nov 27, 2019
d9a25d2
adapt for windows
loriab Nov 27, 2019
bb55f22
adapt for windows
loriab Nov 27, 2019
db785a8
adapt for windows
loriab Nov 27, 2019
c4b93fc
adapt for windows
loriab Nov 27, 2019
f2c586f
adapt for windows
loriab Nov 27, 2019
d128e48
adapt for windows
loriab Nov 27, 2019
67c853f
adapt for windows
loriab Nov 27, 2019
71fd890
adapt for windows
loriab Nov 27, 2019
41e6cfb
adapt for windows
loriab Nov 28, 2019
d6525b4
adapt for windows
loriab Nov 29, 2019
40e8477
adapt for windows
loriab Nov 29, 2019
9fb43c8
adapt for windows
loriab Nov 29, 2019
bb9b7ae
switch to generate, export, library 3-step CMake flow
loriab Dec 4, 2019
4383c6c
am component improvements
loriab Dec 7, 2019
d91fcce
debug
loriab Dec 8, 2019
cb58fdf
debug
loriab Dec 8, 2019
1dc54c9
debug
loriab Dec 8, 2019
4129968
config printing
loriab Dec 8, 2019
972a826
config printing
loriab Dec 8, 2019
ae27f7a
fpic handling
loriab Dec 8, 2019
d152bdc
fpic again
loriab Dec 8, 2019
e5f5dca
add generic code option
loriab Dec 9, 2019
6cf403b
add testing to library
loriab Dec 10, 2019
9c12cfd
more windows mods
loriab Dec 12, 2019
ee9365d
more output please
loriab Dec 12, 2019
0ab0367
more windows mods
loriab Dec 12, 2019
0c7cecd
more windows mods
loriab Dec 13, 2019
098a76e
more windows mods
loriab Dec 13, 2019
7fd4e7f
more windows mods
loriab Dec 13, 2019
958e955
win pokgin
loriab Dec 17, 2019
cbf4c5f
no more stars in basis names
loriab Dec 17, 2019
fae8caa
increase stack on win
loriab Jan 18, 2020
d5b6ee2
win stack in the right place
loriab Jan 19, 2020
ddb4361
strdup win
loriab Jan 21, 2020
ebe3fad
add libint_pragma changes, fixes #160
loriab Sep 10, 2020
5b54f6a
fix more (n2) in test. bundle boost with export. max_am[_eri3] advice…
loriab Sep 22, 2020
8ae554c
Adds eri3 and eri2 components, so if need library to compile 3-cente…
loriab Sep 28, 2020
3860201
missed a ref for export
loriab Sep 29, 2020
da780fd
Fix freeing of aligned memory on Windows
andysim Oct 21, 2020
4c5ab73
Merge pull request #1 from andysim/l2cmake
loriab Oct 22, 2020
d2843ee
boost detection for export, notes
loriab Oct 22, 2020
ed09cd1
minor notes
loriab Oct 23, 2020
f2581c7
psi4OptionsTools -> options, + fixed booleanize01 when dealing with C…
evaleev Jan 26, 2021
0a05675
removed almost all ExternalProject instances
evaleev Jan 26, 2021
e93d4ae
rewrote library exporting stages
evaleev Jan 27, 2021
e44ad20
generated library builds and passes tests
evaleev Jan 27, 2021
c2592cb
upgraded catch2 to 2.13.4, resolves #202
evaleev Jan 27, 2021
a1856db
Merge branch 'master' into features/new-cmake-harness
evaleev Jan 31, 2021
7d193eb
typo
evaleev Jun 25, 2021
689ab61
reduced contention in nuclear ints engine due to unnecessary shared_p…
evaleev Jun 25, 2021
8533dd9
minor cleanup to avoid copies of operator params
evaleev Jun 25, 2021
308d658
Merge branch 'master' into features/new-cmake-harness
evaleev Jul 4, 2021
3b7f0f8
typos
evaleev Jul 4, 2021
e637b47
fixup option_with_default
evaleev Jul 4, 2021
505e6b2
enable C language before building library
evaleev Jul 4, 2021
9059b16
[ci] switch to cmake harness for everything
evaleev Jul 4, 2021
4e37cac
[ci] disable fortran for now
evaleev Jul 5, 2021
00e79bb
[ci] need to install libmpfr-dev on ubuntu runners
evaleev Jul 5, 2021
5122653
MakeVars.features -> features
evaleev Jul 5, 2021
02a1c80
hartree-fock++-validate.py exits if features file not found
evaleev Jul 5, 2021
dc61487
exported library looks for PythonInterp to be able to properly valida…
evaleev Jul 5, 2021
3d06d5f
[ci] install built library before testing it from install tree
evaleev Jul 5, 2021
09539e6
relocated all cmake "modules" to cmake/modules
evaleev Jul 5, 2021
ac79816
generate source during compiler build
evaleev Jul 5, 2021
2cdac7d
make tests subprojectable
evaleev Jul 5, 2021
615a215
[ci] build library using both ExternalProject and FetchContent
evaleev Jul 5, 2021
a0db3c4
fixup
evaleev Jul 5, 2021
9b1054c
plug memory leaks in mpf numeric functions
evaleev Jul 6, 2021
576b951
[ci] try fixing install issues by creating install dir
evaleev Jul 6, 2021
f6205a4
building library as subproject does not require running cmake second …
evaleev Jul 6, 2021
afb74cd
Merge remote-tracking branch 'origin/features/new-cmake-harness' into…
evaleev Jul 6, 2021
e2cb6eb
clarify that only GMPXX is actually needed, not MPFR + improve depend…
evaleev Jul 6, 2021
032afe4
executables not built by default
evaleev Jul 6, 2021
f842c0a
cleanup
evaleev Jul 6, 2021
8f5ff9d
wip ... unnecessary deps on mpfr/gmp removed + install of libint-Eige…
evaleev Jul 6, 2021
986b4ab
libint targets depend on Boost::boost, if present
evaleev Jul 7, 2021
83cb622
fix install of externalproject and fetchcontent-based builds
evaleev Jul 7, 2021
b3884b0
comment
evaleev Jul 7, 2021
5bf226b
cleanup
evaleev Jul 7, 2021
c9e8057
fixed install target for ExternalProject-based build
evaleev Jul 7, 2021
2855b5a
int-{shared,static} are "bare" libraries (no Eigen or Boost), int-cxx…
evaleev Jul 7, 2021
c446dba
revived fortran
evaleev Jul 7, 2021
fc52be1
[ci] enable Fortran
evaleev Jul 7, 2021
f46d8b9
pass Fortran and other flags to ExternalProjct_add more carefully
evaleev Jul 7, 2021
d2723fb
removed much of autotools harness
evaleev Jul 7, 2021
e3d7aad
libint-libcompiler only needs GMPXX
evaleev Jul 7, 2021
47517b2
moved tests to src/lib/libint/tests
evaleev Jul 7, 2021
fbb51ef
moved compiler tests from src/bin/* to tests + reorg ... not finished
evaleev Jul 8, 2021
f7b6b17
starting to revive compiler tests
evaleev Jul 8, 2021
4a1949f
library ExternalProject-based build fixups
evaleev Jul 8, 2021
963bc5f
moved INSTALL and LICENSE from export to src/lib/libint
evaleev Jul 8, 2021
5b2b881
removed more legacy build files
evaleev Jul 8, 2021
51318f0
more work towards running libint-compiler-eri-test
evaleev Sep 10, 2021
76b6605
generalizing component names
evaleev Sep 10, 2021
3894ab2
INSTALL -> INSTALL.md
evaleev Sep 10, 2021
6c26803
Merge branch 'master' into features/new-cmake-harness
evaleev Jan 13, 2022
3e1d02d
C++ API only available when both 1-body and some 2-body (ERI, ERI3, E…
evaleev Oct 7, 2021
e0b7a7d
amended 59db8d447ceb2cecba25c4326797c74d0762f323
evaleev Oct 7, 2021
90a77e6
amend 09539e62577ae7a5555049f95f37858f43f0ec54
evaleev Oct 7, 2021
80dbcc0
use "modern" if(COND) ... else() ... endif() convention
evaleev Jan 13, 2022
2b6294e
added missing BOOST_PP_STRINGIZE in boost pp stuff in build_libint
evaleev Jan 14, 2022
69cd873
always UNITY_BUILD the generated library, never the compiler ... bump…
evaleev Jan 14, 2022
83d791a
fixup and propagate changes of c5cc9aa9b1170aef8b44dcaabbf6070b9d97df…
evaleev Jan 14, 2022
03b0f35
partially reverting 76b6605c9b99252176eb51071ffd6e38f8b4f1c0 since th…
evaleev Jan 14, 2022
e886334
fixup an #include
evaleev Jan 14, 2022
d3694ca
updated int_am to use "new" component names
evaleev Jan 14, 2022
b13667b
update the comparison threshold for fortran/test-eri
evaleev Jan 14, 2022
6c10230
Delete .project
evaleev Jan 16, 2022
10e00e8
added .gitignore
evaleev Jan 16, 2022
eacb677
added default int-cxx-{shared,static} is compiled, not interface: it …
evaleev Jan 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 34 additions & 33 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ jobs:
-DBUILD_SHARED_LIBS=OFF
-DMPIEXEC_PREFLAGS='--bind-to;none;--allow-run-as-root'
-DENABLE_FORTRAN=ON
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/library/install
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/installed
-DWITH_MAX_AM=2;2
-DERI_MAX_AM_LIST=2,2
-DERI3_MAX_AM_LIST=3,2
-DENABLE_ERI=1
-DENABLE_ERI3=1
-DENABLE_ONEBODY=1
-DDISABLE_ONEBODY_PROPERTY_DERIVS=ON
-DMULTIPOLE_MAX_ORDER=2
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}

Expand All @@ -48,23 +56,24 @@ jobs:
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
# N.B. can't seem to create ${{github.workspace}}/install for some reason, use 'installed'
run: |
cmake -E make_directory ${{github.workspace}}/build/compiler
cmake -E make_directory ${{github.workspace}}/build/library
cmake -E make_directory ${{github.workspace}}/build/library_test
cmake -E make_directory ${{github.workspace}}/build
cmake -E make_directory ${{github.workspace}}/test_installed_library
cmake -E make_directory ${{github.workspace}}/installed

- name: Install prerequisite MacOS packages
if: ${{ steps.skip_check.outputs.should_skip != 'true' && matrix.os == 'macos-latest' }}
run: |
brew install ninja gcc@10 boost eigen bison ccache automake
brew install ninja gcc@10 boost eigen bison ccache
echo "FC=/usr/local/bin/gfortran-10" >> $GITHUB_ENV
echo "EIGEN3_INCLUDE_DIR=/usr/local/include/eigen3" >> $GITHUB_ENV

- name: Install prerequisites Ubuntu packages
if: ${{ steps.skip_check.outputs.should_skip != 'true' && matrix.os == 'ubuntu-20.04' }}
run: |
sudo apt-get update
sudo apt-get install ninja-build g++-9 gfortran-9 liblapack-dev libboost-dev libeigen3-dev ccache
sudo apt-get install ninja-build g++-9 gfortran-9 liblapack-dev libmpfr-dev libboost-dev libeigen3-dev ccache
echo "FC=/usr/bin/gfortran-9" >> $GITHUB_ENV
echo "EIGEN3_INCLUDE_DIR=/usr/include/eigen3" >> $GITHUB_ENV

Expand All @@ -85,50 +94,42 @@ jobs:
restore-keys: |
${{ matrix.config.name }}-ccache-

- name: Generate configure script
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
- name: Generate+build Libint library (ExternalProject)
if: ${{ steps.skip_check.outputs.should_skip != 'true' && matrix.build_type == 'Debug'}}
shell: bash
working-directory: ${{github.workspace}}
run: ./autogen.sh && ls -l ${{github.workspace}}/configure

- name: Generate Libint library
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{github.workspace}}/build/compiler
run: |
CPPFLAGS="-I$EIGEN3_INCLUDE_DIR" CXXFLAGS="-std=c++11 -Wno-enum-compare" ${{github.workspace}}/configure --with-max-am=2,2 --with-eri-max-am=2,2 --with-eri3-max-am=3,2 --enable-eri=1 --enable-eri3=1 --enable-1body=1 --disable-1body-property-derivs --with-multipole-max-order=2
make -j3
make check
cd src/bin/test_eri && ./stdtests.pl && cd ../../..
make export
cmake -S . -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_CONFIG
cmake --build build
cmake --build build --target check-libint2compiler
cmake --build build --target install
#cd src/bin/test_eri && ./stdtests.pl && cd ../../..

- name: Build+test+install Libint library
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
- name: Generate+build Libint library (FetchContent)
if: ${{ steps.skip_check.outputs.should_skip != 'true' && matrix.build_type != 'Debug'}}
shell: bash
working-directory: ${{github.workspace}}/build/library
working-directory: ${{github.workspace}}
run: |
tar -xzf ../compiler/libint-2*.tgz
cd libint-2*
echo "LIBINT_EXPORTED_DIR=`pwd`" >> $GITHUB_ENV
cmake -S . -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_CONFIG
cmake --build build --target check
cmake -S . -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DLIBINT_BUILD_LIBRARY_AS_SUBPROJECT=ON $BUILD_CONFIG
cmake --build build --target libint-library-export
cmake --build build --target check-libint2compiler
cmake --build build --target check-libint2
cmake --build build --target install
#cd src/bin/test_eri && ./stdtests.pl && cd ../../..

- name: Test installed Libint library
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
shell: bash
working-directory: ${{github.workspace}}/build/library_test
working-directory: ${{github.workspace}}/test_installed_library
run: |
cat > CMakeLists.txt <<EOF
cmake_minimum_required(VERSION 3.8)
project(hf++)
find_package(Libint2 2.7.1 REQUIRED)
find_package(Threads) # clang does not autolink threads even though we are using std::thread
add_executable(hf++ EXCLUDE_FROM_ALL $LIBINT_EXPORTED_DIR/tests/hartree-fock/hartree-fock++.cc)
add_executable(hf++ EXCLUDE_FROM_ALL ${{github.workspace}}/src/lib/libint/tests/hartree-fock/hartree-fock++.cc)
target_link_libraries(hf++ Libint2::cxx Threads::Threads)
EOF
cmake . -DCMAKE_PREFIX_PATH=${{github.workspace}}/build/library/install -DCMAKE_BUILD_TYPE=$BUILD_TYPE
cmake . -DCMAKE_PREFIX_PATH=${{github.workspace}}/installed -DCMAKE_BUILD_TYPE=$BUILD_TYPE
cmake --build . --target hf++
./hf++ $LIBINT_EXPORTED_DIR/tests/hartree-fock/h2o_rotated.xyz | python $LIBINT_EXPORTED_DIR/tests/hartree-fock/hartree-fock++-validate.py $LIBINT_EXPORTED_DIR/MakeVars.features
./hf++ ${{github.workspace}}/src/lib/libint/tests/hartree-fock/h2o_rotated.xyz | python ${{github.workspace}}/src/lib/libint/tests/hartree-fock/hartree-fock++-validate.py ${{github.workspace}}/build/libint-2*/features
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# based on https://github.com/github/gitignore/blob/main/C++.gitignore

# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# IDE artifacts
.idea
89 changes: 0 additions & 89 deletions .project

This file was deleted.

Loading