Skip to content

Commit fe45b3b

Browse files
authored
Pin IntegratorXX revision to a new commit (#152)
* Pin IntegratorXX revision to a new commit * [CI] enable llvm build * [CI] disable openmp build for llvm * [CI] add guards to openmp headers and code
1 parent 7bc93c4 commit fe45b3b

5 files changed

Lines changed: 37 additions & 5 deletions

File tree

.github/workflows/build_and_test_compiler_zoo.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,29 @@ jobs:
1414
image: dbwy/chemistry
1515
strategy:
1616
matrix:
17-
compiler: [ {suite: gnu, version: 12} ]
17+
compiler:
18+
- {suite: gnu, version: 12}
19+
- {suite: llvm, version: 19}
1820
mpi_flag: [ON, OFF]
1921
openmp_flag: [ON, OFF]
2022
exclude:
21-
- compiler: {suite: llvm, version: 14}
23+
- compiler: {suite: llvm, version: 19}
2224
openmp_flag: ON
2325

2426
steps:
2527
- uses: actions/checkout@v4
2628

29+
- name: Install LLVM toolchain
30+
if: ${{ matrix.compiler.suite == 'llvm' }}
31+
shell: bash
32+
run: |
33+
set -euo pipefail
34+
apt-get update
35+
apt-get install -y wget gnupg lsb-release software-properties-common
36+
wget https://apt.llvm.org/llvm.sh
37+
chmod +x llvm.sh
38+
./llvm.sh ${{ matrix.compiler.version }} -y
39+
2740
- name: Setup Compiler
2841
shell: bash
2942
run: $GITHUB_WORKSPACE/.github/workflows/scripts/compiler_setup.sh

.github/workflows/scripts/compiler_setup.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
#/bin/bash
1+
#!/bin/bash
22

33
export CSUITE=$1
44
export CVER=$2
55

66
if [[ "${CSUITE}" == "llvm" ]]
77
then
8+
# register the specific clang version as an alternative (needed once per version)
9+
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${CVER} 50
10+
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${CVER} 50
811
update-alternatives --set clang /usr/bin/clang-${CVER}
912
update-alternatives --set clang++ /usr/bin/clang++-${CVER}
1013
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 30
@@ -20,3 +23,6 @@ else
2023
exit 125
2124
fi
2225

26+
echo "Selected compilers:"
27+
echo " cc -> $(command -v cc) | $(cc --version | head -1)"
28+
echo " c++ -> $(command -v c++) | $(c++ --version | head -1)"

cmake/gauxc-dep-versions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ set( GAUXC_GAU2GRID_REPOSITORY https://github.com/dgasmith/gau2grid.git )
1717
set( GAUXC_GAU2GRID_REVISION v2.0.6 )
1818

1919
set( GAUXC_INTEGRATORXX_REPOSITORY https://github.com/wavefunction91/IntegratorXX.git )
20-
set( GAUXC_INTEGRATORXX_REVISION cf2917c64916583cef1081011beab3085b66e352 )
20+
set( GAUXC_INTEGRATORXX_REVISION 1369be58d7a3235dac36d75dd964fef058830622 )
2121

2222
set( GAUXC_HIGHFIVE_REPOSITORY https://github.com/BlueBrain/HighFive.git )
2323
set( GAUXC_HIGHFIVE_REVISION 805f0e13d09b47c4b01d40682621904aa3b31bb8 )

src/xc_integrator/replicated/host/reference_replicated_xc_host_integrator_dd_psi.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
#include "host/local_host_work_driver.hpp"
1818
#include <gauxc/molgrid/defaults.hpp>
1919
#include <stdexcept>
20+
#ifdef GAUXC_ENABLE_OPENMP
2021
#include <omp.h>
22+
#endif
2123

2224
namespace GauXC::detail {
2325
template <typename ValueType>
@@ -96,12 +98,16 @@ void ReferenceReplicatedXCHostIntegrator<ValueType>::
9698

9799
// Loop over tasks
98100
const size_t ntasks = tasks.size();
101+
#ifdef GAUXC_ENABLE_OPENMP
99102
#pragma omp parallel
103+
#endif
100104
{
101105

102106
XCHostData<value_type> host_data; // Thread local host data
103107

108+
#ifdef GAUXC_ENABLE_OPENMP
104109
#pragma omp for schedule(dynamic) reduction(+:dd_Psi[:natom * ldPsi])
110+
#endif
105111
for( size_t iT = 0; iT < ntasks; ++iT ) {
106112

107113
// Alias current task

src/xc_integrator/replicated/host/reference_replicated_xc_host_integrator_dd_psi_potential.hpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@
1616
#include "integrator_util/spherical_harmonics.hpp"
1717
#include "host/local_host_work_driver.hpp"
1818
#include <stdexcept>
19-
#include <omp.h>
2019
#include "host/blas.hpp"
2120
#include "host/util.hpp"
2221

22+
#ifdef GAUXC_ENABLE_OPENMP
23+
#include <omp.h>
24+
#endif
25+
2326
namespace GauXC::detail {
2427
template <typename ValueType>
2528
void ReferenceReplicatedXCHostIntegrator<ValueType>::
@@ -92,12 +95,16 @@ void ReferenceReplicatedXCHostIntegrator<ValueType>::
9295
// Loop over tasks
9396
const size_t ntasks = tasks.size();
9497

98+
#ifdef GAUXC_ENABLE_OPENMP
9599
#pragma omp parallel
100+
#endif
96101
{
97102

98103
XCHostData<value_type> host_data; // Thread local host data
99104

105+
#ifdef GAUXC_ENABLE_OPENMP
100106
#pragma omp for schedule(dynamic)
107+
#endif
101108
for( size_t iT = 0; iT < ntasks; ++iT ) {
102109

103110
// Alias current task

0 commit comments

Comments
 (0)