Skip to content

Commit 678a305

Browse files
David Williams-Youngajaypanyalalicense[bot]
authored
Change ASCI -> MACIS (#8)
* ASCI -> MACIS * Move ASCI headers to a more sane location * Fix CMake tests * Fix subproject test * ...more fixes * ...more fixes * macis -> asci * turn off device backends for blaspp * Add License and README * README++ * Update BLAS++/LAPACK++ URL to GH * Add GH Workflow for License Headers * Broaden License Action Triggers * Add Ignore Paths in License Action * Add Ignore Paths in License Action * Add Ignore Paths in License Action * Committing license headers * Minor * Dox++ + minor refactor of headers * Revamp CI + add missing file * Committing license headers * Change CI target platform * Bump Catch2 for modern GCC patch * Add OpenMP flags to CI matrix * Additional OpenMP insulation * Additional OpenMP insulation * minor * Changed Headers in Discovery / Subproject CMake unit tests * [skip ci] Dox++ * Dox++ --------- Co-authored-by: Ajay Panyala <[email protected]> Co-authored-by: license[bot] <license[bot]@github.com>
1 parent 779ecdf commit 678a305

File tree

180 files changed

+3068
-1184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+3068
-1184
lines changed

.github/.licenserc.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
header:
2+
license:
3+
spdx-id: BSD-3-Clause-LBNL
4+
copyright-year: 2023
5+
software-name: MACIS
6+
7+
paths-ignore:
8+
- .github/
9+
- attic/
10+
- tests/ref_data/
11+
- LICENSE.txt
12+
- src/lobpcgxx/
13+
- src/sparsexx/tests/b1_ss/
14+
- src/sparsexx/tests/mycielskian3/
15+
16+
comment: never

.github/workflows/add_licenses.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Add Licenses
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
7+
8+
jobs:
9+
license_files:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
token: ${{ github.token }}
15+
- name: Apply Licenses
16+
uses: wavefunction91/skywalking-eyes@feature/bsd3-lbl
17+
with:
18+
config: .github/.licenserc.yaml
19+
mode: fix
20+
- name: Push Licensed Files
21+
uses: EndBug/add-and-commit@v4
22+
with:
23+
author_name: license[bot]
24+
author_email: license[bot]@github.com
25+
message: 'Committing license headers'
26+
env:
27+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/build_and_test.yml

-113
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
name: Build and Test - Compiler Zoo
2+
3+
on: [pull_request, workflow_dispatch]
4+
5+
env:
6+
GH_ACTIONS_TOOLCHAIN: .github/workflows/toolchains/gh-actions.cmake
7+
ENV_PREFIX_PATH: "/home/software/install/openblas-lp64-sequential"
8+
9+
jobs:
10+
release_build:
11+
name: Release Build and Test
12+
runs-on: ubuntu-latest
13+
container:
14+
image: dbwy/chemistry
15+
strategy:
16+
matrix:
17+
compiler: [ {suite: gnu, version: 12}, {suite: llvm, version: 14} ]
18+
openmp_flag: [ON, OFF]
19+
exclude:
20+
- compiler: {suite: llvm, version: 14}
21+
openmp_flag: ON
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
26+
- name: Setup Compiler
27+
shell: bash
28+
run: $GITHUB_WORKSPACE/.github/workflows/scripts/compiler_setup.sh
29+
${{matrix.compiler.suite}} ${{matrix.compiler.version}}
30+
31+
- name: Enable or Disable OpenMP
32+
shell: bash
33+
run: echo "set(MACIS_ENABLE_OPENMP ${{matrix.openmp_flag}} CACHE BOOL \"\" FORCE)" >>
34+
${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
35+
36+
- name: Setup Build Type
37+
shell: bash
38+
run: echo "set(CMAKE_BUILD_TYPE Release CACHE BOOL \"\" FORCE)" >>
39+
${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
40+
41+
- name: Configure CMake
42+
shell: bash
43+
run: cmake -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build
44+
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install
45+
-DCMAKE_PREFIX_PATH=${ENV_PREFIX_PATH}
46+
-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
47+
48+
- name: Build
49+
shell: bash
50+
run: cmake --build ${{runner.workspace}}/build -j2
51+
52+
- name: Test
53+
shell: bash
54+
run: cmake --build ${{runner.workspace}}/build --target test
55+
56+
debug_build:
57+
name: Debug Build and Test
58+
runs-on: ubuntu-latest
59+
container:
60+
image: dbwy/chemistry
61+
62+
steps:
63+
- uses: actions/checkout@v3
64+
65+
- name: Setup Compiler
66+
shell: bash
67+
run: $GITHUB_WORKSPACE/.github/workflows/scripts/compiler_setup.sh gnu 12
68+
69+
- name: Setup Build Type
70+
shell: bash
71+
run: echo "set(CMAKE_BUILD_TYPE Debug CACHE BOOL \"\" FORCE)" >> ${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
72+
73+
- name: Configure CMake
74+
shell: bash
75+
run: cmake -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build
76+
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install
77+
-DCMAKE_PREFIX_PATH=${ENV_PREFIX_PATH}
78+
-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
79+
80+
- name: Build
81+
shell: bash
82+
run: cmake --build ${{runner.workspace}}/build -j2
83+
84+
- name: Test
85+
shell: bash
86+
run: cmake --build ${{runner.workspace}}/build --target test
87+
88+
subproject_build:
89+
name: Build as Subproject
90+
needs: release_build
91+
runs-on: ubuntu-latest
92+
container:
93+
image: dbwy/chemistry
94+
95+
steps:
96+
- uses: actions/checkout@v3
97+
98+
- name: Setup Compiler
99+
shell: bash
100+
run: $GITHUB_WORKSPACE/.github/workflows/scripts/compiler_setup.sh gnu 12
101+
102+
- name: CMake Subproject Configure
103+
shell: bash
104+
run: cmake -S $GITHUB_WORKSPACE/tests/cmake/subproject
105+
-B ${{runner.workspace}}/cmake_subproject_build
106+
-DGITHUB_REPOSITORY=$GITHUB_ACTOR/MACIS
107+
-DGIT_REVISION=$GITHUB_HEAD_REF
108+
-DFETCHCONTENT_SOURCE_DIR_MACIS=$GITHUB_WORKSPACE
109+
-DCMAKE_PREFIX_PATH=${ENV_PREFIX_PATH}
110+
-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
111+
112+
- name: CMake Subproject Build
113+
shell: bash
114+
run: cmake --build ${{runner.workspace}}/cmake_subproject_build -j2
115+
116+
cmake_discovery:
117+
name: CMake Discovery
118+
needs: release_build
119+
runs-on: ubuntu-latest
120+
container:
121+
image: dbwy/chemistry
122+
123+
steps:
124+
- uses: actions/checkout@v3
125+
126+
- name: Setup Compiler
127+
shell: bash
128+
run: $GITHUB_WORKSPACE/.github/workflows/scripts/compiler_setup.sh gnu 12
129+
130+
- name: Configure CMake
131+
shell: bash
132+
run: cmake -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build
133+
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install
134+
-DCMAKE_PREFIX_PATH=${ENV_PREFIX_PATH}
135+
-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
136+
137+
- name: Build
138+
shell: bash
139+
run: cmake --build ${{runner.workspace}}/build -j2
140+
141+
- name: Install
142+
shell: bash
143+
run: cmake --build ${{runner.workspace}}/build --target install
144+
145+
- name: CMake Discovery Configure
146+
shell: bash
147+
run: cmake -S $GITHUB_WORKSPACE/tests/cmake/discovery -B ${{runner.workspace}}/cmake_discovery_build
148+
-DCMAKE_PREFIX_PATH="${{runner.workspace}}/install;${ENV_PREFIX_PATH}"
149+
-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
150+
151+
- name: CMake Discovery Build
152+
shell: bash
153+
run: cmake --build ${{runner.workspace}}/cmake_discovery_build -j2

.github/workflows/scripts/compiler_setup.sh

+18-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
#/bin/bash
22

3-
echo $CC
4-
echo $CXX
3+
export CSUITE=$1
4+
export CVER=$2
55

6-
export TOOLCHAIN=$1
6+
if [[ "${CSUITE}" == "llvm" ]]
7+
then
8+
update-alternatives --set clang /usr/bin/clang-${CVER}
9+
update-alternatives --set clang++ /usr/bin/clang++-${CVER}
10+
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 30
11+
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 30
12+
elif [[ "${CSUITE}" == "gnu" ]]
13+
then
14+
update-alternatives --set gcc /usr/bin/gcc-${CVER}
15+
update-alternatives --set g++ /usr/bin/g++-${CVER}
16+
update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
17+
update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
18+
else
19+
echo "Compiler Suite Not Recognized!"
20+
exit 125
21+
fi
722

8-
sudo apt install ${CC} ${CXX}
9-
10-
sed -i -e "s/CI_CXX/${CXX}/g" ${TOOLCHAIN}
11-
sed -i -e "s/CI_C/${CC}/g" ${TOOLCHAIN}
12-
echo $PWD && cat ${TOOLCHAIN}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
set( CMAKE_C_COMPILER CI_C )
2-
set( CMAKE_CXX_COMPILER CI_CXX )
3-
set( CMAKE_Fortran_COMPILER CI_FC )
1+
set( CMAKE_C_COMPILER cc )
2+
set( CMAKE_CXX_COMPILER c++ )
3+
4+
set(CMAKE_CXX_FLAGS_INIT "-march=native")
5+
set(CMAKE_C_FLAGS_INIT "-march=native")

CMakeLists.txt

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1+
# MACIS Copyright (c) 2023, The Regents of the University of California,
2+
# through Lawrence Berkeley National Laboratory (subject to receipt of
3+
# any required approvals from the U.S. Dept. of Energy). All rights reserved.
4+
#
5+
# See LICENSE.txt for details
6+
17
cmake_minimum_required(VERSION 3.14)
2-
project(asci VERSION 0.1 LANGUAGES C CXX)
8+
project(MACIS VERSION 0.1 LANGUAGES C CXX)
39

410

5-
option( ASCI_ENABLE_OPENMP "Enable OpenMP Bindings" ON )
6-
option( ASCI_ENABLE_BOOST "Enable Boost" ON )
11+
option( MACIS_ENABLE_OPENMP "Enable OpenMP Bindings" ON )
12+
option( MACIS_ENABLE_BOOST "Enable Boost" ON )
713

814
# CMake Modules
915
list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake )
10-
include( asci-cmake-modules )
11-
if( ASCI_ENABLE_OPENMP )
16+
include( macis-cmake-modules )
17+
if( MACIS_ENABLE_OPENMP )
1218
find_package(OpenMP)
1319
endif()
1420

0 commit comments

Comments
 (0)