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

adapt Libint library for Windows #270

Merged
merged 5 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
GHA: update labels, actions versions, add 2nd-stage library testing. …
…update CHANGES file.
  • Loading branch information
loriab committed Sep 18, 2023
commit 6841392f2d0d8f1025ab56bd41df13f2ed8a80b3
33 changes: 19 additions & 14 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Linux/MacOS Build
name: Build

on: [push, pull_request]

#env:

jobs:
build_repo:
strategy:
Expand All @@ -17,7 +15,7 @@ jobs:
- os: macos-latest
cxx: clang++

name: "${{ matrix.os }}: ${{ matrix.cxx }} ${{ matrix.build_type }}"
name: "Repo • ${{ matrix.os }}: ${{ matrix.cxx }} ${{ matrix.build_type }}"
runs-on: ${{ matrix.os }}
env:
CXX : ${{ matrix.cxx }}
Expand All @@ -37,11 +35,11 @@ jobs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- id: skip_check
name: Check if can skip
uses: fkirc/skip-duplicate-actions@v3.4.0
uses: fkirc/skip-duplicate-actions@v5
with:
cancel_others: 'true'

Expand Down Expand Up @@ -75,11 +73,11 @@ jobs:
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
message("\"timestamp=${current_date}\" >> $GITHUB_OUTPUT")

- name: Setup ccache cache files
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
uses: actions/cache@v1.1.0
uses: actions/cache@v3
with:
path: ${{github.workspace}}/build/.ccache
key: ${{ matrix.config.name }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
Expand Down Expand Up @@ -206,7 +204,7 @@ jobs:
-DCMAKE_CXX_COMPILER=icpx
-DCMAKE_CXX_FLAGS="--gcc-toolchain=/usr/share/miniconda3/envs/test --sysroot=/usr/share/miniconda3/envs/test/x86_64-conda-linux-gnu/sysroot -target x86_64-conda-linux-gnu"

name: "Export • ${{ matrix.cfg.lane }} • ${{ matrix.cfg.libargs }}"
name: "Export • ${{ matrix.cfg.lane }}"
runs-on: ${{ matrix.cfg.runs-on }}

steps:
Expand Down Expand Up @@ -274,21 +272,28 @@ jobs:
cmake \
-S. \
-Bbuild \
-GNinja \
-DCMAKE_INSTALL_PREFIX="${{github.workspace}}/installed" \
-DCMAKE_CXX_COMPILER=${CXX} \
-DLIBINT2_PYTHON=ON \
-DCMAKE_PREFIX_PATH="${CONDA_PREFIX}" \
${{ matrix.cfg.libargs }}
cmake --build build --target install libint2-python-test

- name: Test Installed Libint library
- name: Test Libint library - unit tests
shell: bash -l {0}
working-directory: ${{github.workspace}}/libint/build
run: |
cmake --build . --target check

- name: Test Libint library - consume installation for SCF
shell: bash -l {0}
run: |
mkdir test_installed_library && cd test_installed_library
cat > CMakeLists.txt <<EOF
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.8)
project(hf++)
find_package(Libint2 2.7.2 REQUIRED COMPONENTS eri_c4_d0_l2 CXX_ho)
find_package(Libint2 2.8.0 REQUIRED)
get_target_property(_l2_maxam Libint2::int2 Libint2_MAX_AM_ERI)
message("Libint2_MAX_AM_ERI \${_l2_maxam}")
find_package(Threads) # clang does not autolink threads even though we are using std::thread
Expand All @@ -299,11 +304,11 @@ jobs:
cmake --build build --target hf++
./build/hf++ ../libint/tests/hartree-fock/h2o_rotated.xyz | python ../libint/tests/hartree-fock/hartree-fock++-validate.py ../libint/MakeVars.features

- name: Build (again) & Test Python bindings
- name: Build & Test Python bindings (again, independently)
shell: bash -l {0}
working-directory: ${{github.workspace}}/libint/python
run: |
cmake . -D LIBINT2_PYTHON=ON -D CMAKE_PREFIX_PATH="${{github.workspace}}/installed" ${{ matrix.cfg.testargs }}
cmake . -D CMAKE_PREFIX_PATH="${{github.workspace}}/installed" ${{ matrix.cfg.testargs }}
cmake --build . --target libint2-python
cmake --build . --target libint2-python-test

12 changes: 12 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
Following is a brief summary of changes made in each release of Libint.

- 2022-xx-yy: 2.8.0-beta.1
- UNMERGED PR #270: For Windows, basis sets with a star have been renamed to "s", so 6-31g**.g94 -> 6-31gss.g94.
- UNMERGED PR #270: Adapt build system and header imports so that library and Python bindings can build on
Windows (at least with clang-cl compiler atop MSVC). Note that a Linux- or Mac-generated export
builds on Windows; one cannot generate an export on Windows.
- UNMERGED PR #269: minimum CMake bumped to 3.16
- UNMERGED PR #269: Solid harmonics ordering is runtime switchable in the library. Issue
`libint2::set_solid_harmonics_ordering(libint2::SHGShellOrdering_Gaussian)` or `_Standard` after
initialization. Similarly, prefer new `INT_SOLIDHARMINDEX(sho, l, m)` to usual `(l, m)` version.
- PR #268: Python detection (relevant to Python bindings, Fortran, and some tests) now uses modern
`find_package(Python)`. Specify with `Python_EXECUTABLE` (note change in case) or
https://cmake.org/cmake/help/latest/module/FindPython.html for details .
- PR #268: Python bindings can now use Pybind11 >=2.6 and can use detected installation.
- PR #249: Python bindings (HT @asadchev)
- PR #246: BasisSet is no longer derived from vector<Shell>
- PR #232: introduced new primitive screening methods
Expand Down
2 changes: 2 additions & 0 deletions tests/hartree-fock/hartree-fock++-validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def validate(label, data, refdata, tolerance, textline):
no = False
yes = True
exec(open(path_to_libfeatures).read())
else:
sys.exit(2)

# ignore test if ERI_MAX_AM is too low
if LIBINT_ERI_MAX_AM<2:
Expand Down