From 20e5a0603c93ab6f14152f4bb83765d3ff6c6d31 Mon Sep 17 00:00:00 2001 From: Ajay Panyala Date: Tue, 9 Sep 2025 14:14:42 -0700 Subject: [PATCH 1/4] Pin IntegratorXX revision to a new commit --- cmake/gauxc-dep-versions.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/gauxc-dep-versions.cmake b/cmake/gauxc-dep-versions.cmake index 8ab0aa11..da69257f 100644 --- a/cmake/gauxc-dep-versions.cmake +++ b/cmake/gauxc-dep-versions.cmake @@ -17,7 +17,7 @@ set( GAUXC_GAU2GRID_REPOSITORY https://github.com/dgasmith/gau2grid.git ) set( GAUXC_GAU2GRID_REVISION v2.0.6 ) set( GAUXC_INTEGRATORXX_REPOSITORY https://github.com/wavefunction91/IntegratorXX.git ) -set( GAUXC_INTEGRATORXX_REVISION cf2917c64916583cef1081011beab3085b66e352 ) +set( GAUXC_INTEGRATORXX_REVISION 1369be58d7a3235dac36d75dd964fef058830622 ) set( GAUXC_HIGHFIVE_REPOSITORY https://github.com/BlueBrain/HighFive.git ) set( GAUXC_HIGHFIVE_REVISION 805f0e13d09b47c4b01d40682621904aa3b31bb8 ) From 6eef75ef15e15fe8f1ff07e4e6bdf329e099912c Mon Sep 17 00:00:00 2001 From: Ajay Panyala Date: Wed, 10 Sep 2025 10:51:29 -0700 Subject: [PATCH 2/4] [CI] enable llvm build --- .../workflows/build_and_test_compiler_zoo.yml | 18 +++++++++++++++--- .github/workflows/scripts/compiler_setup.sh | 8 +++++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_and_test_compiler_zoo.yml b/.github/workflows/build_and_test_compiler_zoo.yml index 38ea93ae..0054096f 100644 --- a/.github/workflows/build_and_test_compiler_zoo.yml +++ b/.github/workflows/build_and_test_compiler_zoo.yml @@ -14,16 +14,28 @@ jobs: image: dbwy/chemistry strategy: matrix: - compiler: [ {suite: gnu, version: 12} ] + compiler: + - {suite: gnu, version: 12} + - {suite: llvm, version: 19} mpi_flag: [ON, OFF] openmp_flag: [ON, OFF] exclude: - - compiler: {suite: llvm, version: 14} - openmp_flag: ON + - openmp_flag: ON steps: - uses: actions/checkout@v4 + - name: Install LLVM toolchain + if: ${{ matrix.compiler.suite == 'llvm' }} + shell: bash + run: | + set -euo pipefail + apt-get update + apt-get install -y wget gnupg lsb-release software-properties-common + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + ./llvm.sh ${{ matrix.compiler.version }} -y + - name: Setup Compiler shell: bash run: $GITHUB_WORKSPACE/.github/workflows/scripts/compiler_setup.sh diff --git a/.github/workflows/scripts/compiler_setup.sh b/.github/workflows/scripts/compiler_setup.sh index 2d6fae01..467ed0f3 100755 --- a/.github/workflows/scripts/compiler_setup.sh +++ b/.github/workflows/scripts/compiler_setup.sh @@ -1,10 +1,13 @@ -#/bin/bash +#!/bin/bash export CSUITE=$1 export CVER=$2 if [[ "${CSUITE}" == "llvm" ]] then + # register the specific clang version as an alternative (needed once per version) + update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${CVER} 50 + update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${CVER} 50 update-alternatives --set clang /usr/bin/clang-${CVER} update-alternatives --set clang++ /usr/bin/clang++-${CVER} update-alternatives --install /usr/bin/cc cc /usr/bin/clang 30 @@ -20,3 +23,6 @@ else exit 125 fi +echo "Selected compilers:" +echo " cc -> $(command -v cc) | $(cc --version | head -1)" +echo " c++ -> $(command -v c++) | $(c++ --version | head -1)" From cd062cac91640b54ab36db4335f5931704152cc1 Mon Sep 17 00:00:00 2001 From: Ajay Panyala Date: Wed, 10 Sep 2025 11:20:53 -0700 Subject: [PATCH 3/4] [CI] disable openmp build for llvm --- .github/workflows/build_and_test_compiler_zoo.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test_compiler_zoo.yml b/.github/workflows/build_and_test_compiler_zoo.yml index 0054096f..7919a764 100644 --- a/.github/workflows/build_and_test_compiler_zoo.yml +++ b/.github/workflows/build_and_test_compiler_zoo.yml @@ -20,7 +20,8 @@ jobs: mpi_flag: [ON, OFF] openmp_flag: [ON, OFF] exclude: - - openmp_flag: ON + - compiler: {suite: llvm, version: 19} + openmp_flag: ON steps: - uses: actions/checkout@v4 From 258c54b355164febfd427b1d358aa827adb550fe Mon Sep 17 00:00:00 2001 From: Ajay Panyala Date: Wed, 10 Sep 2025 12:12:27 -0700 Subject: [PATCH 4/4] [CI] add guards to openmp headers and code --- .../reference_replicated_xc_host_integrator_dd_psi.hpp | 6 ++++++ ...ce_replicated_xc_host_integrator_dd_psi_potential.hpp | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/xc_integrator/replicated/host/reference_replicated_xc_host_integrator_dd_psi.hpp b/src/xc_integrator/replicated/host/reference_replicated_xc_host_integrator_dd_psi.hpp index 4a6b1138..211a4abb 100644 --- a/src/xc_integrator/replicated/host/reference_replicated_xc_host_integrator_dd_psi.hpp +++ b/src/xc_integrator/replicated/host/reference_replicated_xc_host_integrator_dd_psi.hpp @@ -17,7 +17,9 @@ #include "host/local_host_work_driver.hpp" #include #include +#ifdef GAUXC_ENABLE_OPENMP #include +#endif namespace GauXC::detail { template @@ -96,12 +98,16 @@ void ReferenceReplicatedXCHostIntegrator:: // Loop over tasks const size_t ntasks = tasks.size(); + #ifdef GAUXC_ENABLE_OPENMP #pragma omp parallel + #endif { XCHostData host_data; // Thread local host data + #ifdef GAUXC_ENABLE_OPENMP #pragma omp for schedule(dynamic) reduction(+:dd_Psi[:natom * ldPsi]) + #endif for( size_t iT = 0; iT < ntasks; ++iT ) { // Alias current task diff --git a/src/xc_integrator/replicated/host/reference_replicated_xc_host_integrator_dd_psi_potential.hpp b/src/xc_integrator/replicated/host/reference_replicated_xc_host_integrator_dd_psi_potential.hpp index fad35a29..58b9eddf 100644 --- a/src/xc_integrator/replicated/host/reference_replicated_xc_host_integrator_dd_psi_potential.hpp +++ b/src/xc_integrator/replicated/host/reference_replicated_xc_host_integrator_dd_psi_potential.hpp @@ -16,10 +16,13 @@ #include "integrator_util/spherical_harmonics.hpp" #include "host/local_host_work_driver.hpp" #include -#include #include "host/blas.hpp" #include "host/util.hpp" +#ifdef GAUXC_ENABLE_OPENMP +#include +#endif + namespace GauXC::detail { template void ReferenceReplicatedXCHostIntegrator:: @@ -92,12 +95,16 @@ void ReferenceReplicatedXCHostIntegrator:: // Loop over tasks const size_t ntasks = tasks.size(); + #ifdef GAUXC_ENABLE_OPENMP #pragma omp parallel + #endif { XCHostData host_data; // Thread local host data + #ifdef GAUXC_ENABLE_OPENMP #pragma omp for schedule(dynamic) + #endif for( size_t iT = 0; iT < ntasks; ++iT ) { // Alias current task