Skip to content

Commit 72826a9

Browse files
authored
Merge pull request #284 from LLNL/v0.7-dev
v0.7 Release Prep
2 parents f346e74 + 342d3f2 commit 72826a9

File tree

147 files changed

+9237
-3379
lines changed

Some content is hidden

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

147 files changed

+9237
-3379
lines changed

.github/workflows/ci-test.yaml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI Test
22

33
on:
44
pull_request:
5-
branches: [ master, develop ]
5+
branches: [ master, '**-dev' ]
66
push:
77
branches: [ 'feature/**', 'hotfix/**']
88

@@ -14,17 +14,25 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
os: [ubuntu-latest, ubuntu-20.04]
18-
gcc-version: [8, 9, 10]
17+
os: [ubuntu-24.04, ubuntu-22.04]
18+
gcc-version: [11, 12, 13, 14]
1919
mpi-type: [mpich, openmpi]
2020
exclude:
21-
- os: ubuntu-latest
22-
gcc-version: 8
21+
- os: ubuntu-22.04
22+
gcc-version: 13
23+
- os: ubuntu-22.04
24+
gcc-version: 14
25+
- os: ubuntu-24.04
26+
mpi-type: mpich
2327
runs-on: ${{ matrix.os }}
2428
steps:
25-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
30+
- name: Update apt
31+
run: |
32+
sudo add-apt-repository -y universe
33+
sudo apt-get update
2634
- name: Cache boost
27-
uses: actions/cache@v3
35+
uses: actions/cache@v4
2836
id: cache-boost
2937
with:
3038
path: "~/boost_1_77_0"
@@ -33,32 +41,35 @@ jobs:
3341
if: steps.cache-boost.outputs.cache-hit != 'true'
3442
run: |
3543
cd ~
36-
wget --no-verbose https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.bz2
44+
wget --no-verbose https://archives.boost.io/release/1.77.0/source/boost_1_77_0.tar.bz2
3745
tar -xjf boost_1_77_0.tar.bz2
3846
- name: Install Apache Arrow
47+
if: ${{ matrix.os == 'ubuntu-latest'}} # Skip on ubuntu-20.04 due to pyarrow's ABI incompatibility issue
3948
run: |
40-
cd ~
41-
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
42-
sudo apt-get install ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
43-
sudo apt-get update
44-
sudo apt-get install libarrow-dev libparquet-dev
49+
python -m pip install pyarrow==16.1.*
50+
PIP_PYARROW_ROOT=$(python -c "import pyarrow as pa; print(pa.get_library_dirs()[0])")
51+
echo "PIP_PYARROW_ROOT=${PIP_PYARROW_ROOT}" >> $GITHUB_ENV
52+
echo "ENABLE_PARQUET_TEST=true" >> $GITHUB_ENV
4553
- name: Install mpich
4654
if: matrix.mpi-type == 'mpich'
4755
run: sudo apt-get install mpich
4856
- name: Install OpenMPI
4957
if: matrix.mpi-type == 'openmpi'
5058
run: sudo apt-get install openmpi-bin libopenmpi-dev
5159
- name: Install GCC-${{ matrix.gcc-version }}
52-
if: matrix.gcc-version == '8'
53-
run: sudo apt-get install gcc-8 g++-8
60+
if: (matrix.gcc-version == '11' && matrix.os == 'ubuntu-24.04')
61+
run: sudo apt-get install gcc-11 g++-11
5462
- name: Make
5563
run: |
5664
echo Run 'make'
5765
mpicc -show
5866
g++-${{ matrix.gcc-version }} --version
5967
mkdir build
6068
cd build
61-
cmake ../ -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_CXX_COMPILER=g++-${{ matrix.gcc-version }} -DBOOST_ROOT=~/boost_1_77_0 -DYGM_REQUIRE_ARROW=ON
69+
if [ "$ENABLE_PARQUET_TEST" ]; then
70+
ARROW_CMAKE_OPTION="-DPIP_PYARROW_ROOT=$PIP_PYARROW_ROOT -DYGM_REQUIRE_PARQUET=ON"
71+
fi
72+
cmake ../ -DYGM_BUILD_TESTS=On -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_CXX_COMPILER=g++-${{ matrix.gcc-version }} -DBOOST_ROOT=~/boost_1_77_0 ${ARROW_CMAKE_OPTION}
6273
make -j
6374
- name: Make test (mpich)
6475
if: matrix.mpi-type == 'mpich'

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
*~
22
*#*
33
build*
4-
.vscode*
4+
.vscode*
5+
.idea*
6+
.cache/

.readthedocs.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
3+
# Set OS and Python versions
4+
build:
5+
os: ubuntu-24.04
6+
tools:
7+
python: "3.12"
8+
9+
# Change the location of the requirements file
10+
python:
11+
install:
12+
- requirements: docs/rtd/requirements.txt
13+
14+
# Change the location of the configuration file
15+
sphinx:
16+
configuration: docs/rtd/conf.py

CMakeLists.txt

Lines changed: 65 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,29 @@ cmake_minimum_required(VERSION 3.14)
77

88
project(
99
ygm
10-
VERSION 0.6
10+
VERSION 0.7
1111
DESCRIPTION "HPC Communication Library"
1212
LANGUAGES CXX
1313
)
1414

15-
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
16-
set(YGM_MAIN_PROJECT ON)
17-
endif ()
18-
19-
# Controls whether to set up install boilerplate for project and depencencies.
20-
# Expects CMAKE_INSTALL_PREFIX to be set to a suitable directory.
21-
option(YGM_INSTALL "Generate the install target" ${YGM_MAIN_PROJECT})
22-
23-
# Only do these if this is the main project, and not if it is included through
24-
# add_subdirectory
25-
if (YGM_MAIN_PROJECT)
15+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
2616

27-
# Let's nicely support folders in IDE's
28-
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
29-
30-
# Testing only available if this is the main app Note this needs to be done
31-
# in the main CMakeLists since it calls enable_testing, which must be in the
32-
# main CMakeLists.
33-
include(CTest)
17+
#
18+
# Configuration options for YGM
19+
#
20+
option(JUST_INSTALL_YGM_HEADERS "Install YGM header files without building anything" OFF)
21+
option(YGM_BUILD_TESTS "Build tests" OFF)
22+
option(YGM_BUILD_TOOLS "Build tools" OFF)
23+
option(YGM_DOXYGEN "Adds targets for generating Doxygen documentation" OFF)
24+
option(YGM_RTD_ONLY "Run Cmake for only generating documentation for Read the Docs" OFF)
25+
option(YGM_REQUIRE_PARQUET "YGM requires Arrow Parquet." OFF)
26+
option(YGM_INSTALL_PARQUET "YGM installs Arrow Parquet if it is not found." OFF)
3427

35-
# Docs only available if this is the main app
36-
find_package(Doxygen)
37-
if (Doxygen_FOUND)
38-
# add_subdirectory(docs)
39-
else ()
40-
message(STATUS "Doxygen not found, not building docs")
41-
endif ()
28+
#
29+
# Early exit if only installing headers
30+
#
31+
if (JUST_INSTALL_YGM_HEADERS)
32+
return()
4233
endif ()
4334

4435
# Require out-of-source builds
@@ -73,7 +64,7 @@ if (NOT cereal_FOUND)
7364
FetchContent_Declare(
7465
cereal
7566
GIT_REPOSITORY https://github.com/USCiLab/cereal.git
76-
GIT_TAG af0700efb25e7dc7af637b9e6f970dbb94813bff
67+
GIT_TAG v1.3.2
7768
)
7869
FetchContent_GetProperties(cereal)
7970
if (cereal_POPULATED)
@@ -85,7 +76,7 @@ if (NOT cereal_FOUND)
8576
# Do not compile any cereal tests
8677
set(JUST_INSTALL_CEREAL ON)
8778
# Install cereal at ${CMAKE_INSTALL_PREFIX}
88-
set(CEREAL_INSTALL ${YGM_INSTALL})
79+
set(CEREAL_INSTALL ON)
8980
# Populate cereal
9081
FetchContent_Populate(cereal)
9182
# Include cereal root cmake boilerplate
@@ -134,125 +125,73 @@ endif ()
134125
# Arrow
135126
#
136127
#
137-
find_package(Arrow 8.0 QUIET)
138-
if (NOT Arrow_FOUND)
139-
find_package(Arrow 9.0 QUIET)
140-
endif()
141-
if (NOT Arrow_FOUND)
142-
find_package(Arrow 10.0 QUIET)
143-
endif()
144-
if (NOT Arrow_FOUND)
145-
find_package(Arrow 11.0 QUIET)
146-
endif()
147-
if (NOT Arrow_FOUND)
148-
find_package(Arrow 12.0 QUIET)
149-
endif()
150-
if (NOT Arrow_FOUND)
151-
find_package(Arrow 13.0 QUIET)
152-
endif()
153-
if (NOT Arrow_FOUND)
154-
find_package(Arrow 14.0 QUIET)
155-
endif()
156-
if (NOT Arrow_FOUND)
157-
find_package(Arrow 15.0 QUIET)
158-
endif()
159-
if (Arrow_FOUND)
160-
message(STATUS ${PROJECT_NAME} " found Arrow ")
161-
message(STATUS "Arrow version: ${ARROW_VERSION}")
162-
message(STATUS "Arrow SO version: ${ARROW_FULL_SO_VERSION}")
163-
set(ARROW_CMAKE_DIR ${Arrow_DIR})
164-
find_package(Parquet PATHS ${ARROW_CMAKE_DIR})
165-
if (Parquet_FOUND)
166-
message(STATUS ${PROJECT_NAME} " found Parquet ")
167-
message(STATUS "Parquet version: ${PARQUET_VERSION}")
168-
message(STATUS "Parquet SO version: ${PARQUET_FULL_SO_VERSION}")
169-
else ()
170-
message(WARNING ${PROJECT_NAME} " did not find Parquet. Building without Parquet.")
171-
endif ()
172-
else ()
173-
message(WARNING ${PROJECT_NAME} " did not find Arrow >= 8.0. Building without Arrow.")
174-
if (YGM_REQUIRE_ARROW)
175-
message(FATAL_ERROR "YGM configured to require Arrow, but Arrow could not be found")
176-
endif ()
177-
endif ()
128+
include(FindArrowParquet)
129+
find_or_install_arrow_parquet()
178130

179131
#
180132
# Create the YGM target library
181133
#
182134
add_library(ygm INTERFACE)
183135
add_library(ygm::ygm ALIAS ygm)
184-
target_compile_features(ygm INTERFACE cxx_std_17)
136+
target_compile_features(ygm INTERFACE cxx_std_20)
185137
target_include_directories(
186138
ygm INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
187139
$<INSTALL_INTERFACE:include>
188140
)
189141
target_link_libraries(
190-
ygm INTERFACE MPI::MPI_CXX Threads::Threads stdc++fs ${YGM_CEREAL_TARGET}
142+
ygm INTERFACE MPI::MPI_CXX Threads::Threads stdc++fs rt ${YGM_CEREAL_TARGET}
191143
)
192144

193145
option(TEST_WITH_SLURM "Run tests with Slurm" OFF)
194146

195147
# Install ygm. Expects CMAKE_INSTALL_PREFIX to be set to a suitable directory.
196-
if (${YGM_INSTALL})
197-
include(GNUInstallDirs)
198-
include(CMakePackageConfigHelpers)
199-
200-
# List libraries to be installed
201-
set(YGM_EXPORT_TARGETS ygm)
202-
203-
install(
204-
TARGETS ${PROJECT_NAME}
205-
EXPORT ${PROJECT_NAME}Targets
206-
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
207-
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
208-
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
209-
)
210-
211-
install(
212-
EXPORT ${PROJECT_NAME}Targets
213-
FILE ${PROJECT_NAME}Targets.cmake
214-
NAMESPACE ${PROJECT_NAME}::
215-
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake
216-
)
217-
218-
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ygm
219-
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
220-
)
221-
222-
# create version file
223-
write_basic_package_version_file(
224-
"${PROJECT_NAME}ConfigVersion.cmake"
225-
VERSION ${PROJECT_VERSION}
226-
COMPATIBILITY ExactVersion
227-
)
148+
include(GNUInstallDirs)
149+
include(CMakePackageConfigHelpers)
150+
151+
# List libraries to be installed
152+
set(YGM_EXPORT_TARGETS ygm)
153+
154+
install(
155+
TARGETS ${PROJECT_NAME}
156+
EXPORT ${PROJECT_NAME}Targets
157+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
158+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
159+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
160+
)
228161

229-
# create config file
230-
configure_package_config_file(
231-
"${PROJECT_SOURCE_DIR}/cmake/${PROJECT_NAME}Config.cmake.in"
232-
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
233-
INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake
234-
)
162+
install(
163+
EXPORT ${PROJECT_NAME}Targets
164+
FILE ${PROJECT_NAME}Targets.cmake
165+
NAMESPACE ${PROJECT_NAME}::
166+
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake
167+
)
235168

236-
install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
237-
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
238-
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake
239-
)
169+
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ygm
170+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
171+
)
240172

241-
endif ()
173+
# create version file
174+
write_basic_package_version_file(
175+
"${PROJECT_NAME}ConfigVersion.cmake"
176+
VERSION ${PROJECT_VERSION}
177+
COMPATIBILITY ExactVersion
178+
)
242179

243-
option(JUST_INSTALL_YGM "Skip executable compilation" OFF)
244-
if (JUST_INSTALL_YGM)
245-
return()
246-
endif ()
180+
# create config file
181+
configure_package_config_file(
182+
"${PROJECT_SOURCE_DIR}/cmake/${PROJECT_NAME}Config.cmake.in"
183+
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
184+
INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake
185+
)
247186

248-
if (NOT CMAKE_BUILD_TYPE)
249-
set(CMAKE_BUILD_TYPE Release)
250-
message(STATUS "CMAKE_BUILD_TYPE is set as Release")
251-
endif ()
187+
install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
188+
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
189+
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake
190+
)
252191

253-
# Testing & examples are only available if this is the main app
254-
if (YGM_MAIN_PROJECT)
192+
if (YGM_BUILD_TESTS)
255193
add_subdirectory(test)
256-
# Example codes are here.
257-
add_subdirectory(examples)
194+
endif ()
195+
if (YGM_BUILD_TOOLS)
196+
add_subdirectory(tools)
258197
endif ()

0 commit comments

Comments
 (0)