Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
66 changes: 62 additions & 4 deletions .github/workflows/build_and_test_compiler_zoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,31 +185,89 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Compiler
- name: Setup Compiler
shell: bash
run: $GITHUB_WORKSPACE/.github/workflows/scripts/compiler_setup.sh gnu 12

- name: Configure CMake
shell: bash
run: cmake -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install
-DCMAKE_PREFIX_PATH=${ENV_PREFIX_PATH}
-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}

- name: Build
shell: bash
run: cmake --build ${{runner.workspace}}/build -j2
run: cmake --build ${{runner.workspace}}/build -j2

- name: Install
shell: bash
run: cmake --build ${{runner.workspace}}/build --target install

- name: CMake Discovery Configure
shell: bash
run: cmake -S $GITHUB_WORKSPACE/tests/cmake/discovery -B ${{runner.workspace}}/cmake_discovery_build
run: cmake -S $GITHUB_WORKSPACE/tests/cmake/discovery -B ${{runner.workspace}}/cmake_discovery_build
-DCMAKE_PREFIX_PATH="${{runner.workspace}}/install;${ENV_PREFIX_PATH}"
-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}

- name: CMake Discovery Build
shell: bash
run: cmake --build ${{runner.workspace}}/cmake_discovery_build -j2

macos_build:
name: macOS Build and Test
runs-on: macos-14

steps:
- uses: actions/checkout@v4

- uses: mamba-org/setup-micromamba@v2
with:
environment-name: gauxc
create-args: >-
python=3.11
c-compiler
cxx-compiler
fortran-compiler
mpich
cmake
hdf5
openblas
ccache
init-shell: bash
cache-environment: true

- name: Setup ccache
shell: micromamba-shell {0}
run: |
ccache --set-config=max_size=2G
ccache --set-config=compression=true
echo "CMAKE_C_COMPILER_LAUNCHER=ccache" >> $GITHUB_ENV
echo "CMAKE_CXX_COMPILER_LAUNCHER=ccache" >> $GITHUB_ENV

- name: Restore ccache
uses: actions/cache@v4
with:
path: ~/.ccache
key: ccache-macos-${{ github.sha }}
restore-keys: |
ccache-macos-

- name: Build
shell: micromamba-shell {0}
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DGAUXC_ENABLE_MPI=ON \
-DGAUXC_ENABLE_TESTS=ON \
-DBUILD_TESTING=ON \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
cmake --build build -j3

- name: ccache statistics
shell: micromamba-shell {0}
run: ccache --show-stats

- name: Test
shell: micromamba-shell {0}
run: ctest --test-dir build --output-on-failure
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ src/xc_integrator/local_work_driver/host/obara_saika/generator/integral*
src/xc_integrator/local_work_driver/host/obara_saika/generator/obara*
src/xc_integrator/local_work_driver/host/obara_saika/generator/*.x
*.swp

# Build directories
build/
_build/
cmake-build-*/
5 changes: 5 additions & 0 deletions src/xc_integrator/integrator_util/spherical_harmonics.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ void scaled_ylm_new(const int lmax, const std::array<double, 3> x, const std::ar
}

// compute scaled spherical harmonics, with standard library functions
// DISABLED ON MACOS: std::sph_legendre not available in Apple's libc++
// This function is unused. Added in commit 66784a4 (Feb 2025), never called.
// Production uses scaled_ylm_new() above.
#ifndef __APPLE__
std::vector<double> scaled_ylm_std(int lmax, std::array<double, 3> x, std::array<double, 3> a, double r) {

std::vector<double> delta = {x[0] - a[0], x[1] - a[1], x[2] - a[2]};
Expand Down Expand Up @@ -155,6 +159,7 @@ std::vector<double> scaled_ylm_std(int lmax, std::array<double, 3> x, std::array
}
return ylm;
}
#endif // __APPLE__

void scaled_ylm_matrix(const int lmax, const double* points, const int32_t npts, const std::array<double, 3> center, const double radius, double* ylm_matrix) {
int nharmonics = (lmax + 1) * (lmax + 1);
Expand Down