Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/macosx-clang-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
VT_LB_ENABLED: 1
VT_TRACE_ENABLED: 1
VT_WERROR: 1
CMAKE_CXX_STANDARD: 17
CMAKE_CXX_STANDARD: 20
CMAKE_GENERATOR: "Unix Makefiles"
CMAKE_BUILD_PARALLEL_LEVEL: 4

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/spawn-extended-tests-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ jobs:
fail-fast: false
matrix:
target:
- vt-build-amd64-ubuntu-20-04-gcc-9-cuda-11-4-3-cpp
- vt-build-amd64-ubuntu-20-04-gcc-9-cuda-12-2-0-cpp
- vt-build-amd64-ubuntu-24-04-gcc-13-cuda-12-9-0-cpp
- vt-build-amd64-ubuntu-24-04-icpx-cpp

steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ build
transport
lib/*-build
lib/checkpoint
lib/loc
lib/googletest
lib/kokkos
lib/vt-tv
Expand Down
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ file(READ "VERSION" _vt_version_str)
string(STRIP "${_vt_version_str}" _vt_version_str)
project(vt VERSION ${_vt_version_str})

# VT does not use C++ modules. Disable CMake's automatic C++20 module
# dependency scanning so builds do not require clang-scan-deps.
set(CMAKE_CXX_SCAN_FOR_MODULES OFF)

# To generate output file with compilation errors and warnings
# CMake generator needs to be known
set(USED_CMAKE_GENERATOR "${CMAKE_GENERATOR}" CACHE STRING "Expose CMAKE_GENERATOR" FORCE)
Expand Down Expand Up @@ -41,7 +45,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17 CACHE STRING "The C++ standard to use")
set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use")
endif()
message(STATUS "CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD}")

Expand Down Expand Up @@ -70,6 +74,7 @@ include(cmake/check_compiler.cmake)
include(cmake/nvcc_no_deprecated_gpu_targets.cmake)
include(cmake/load_bundled_libraries.cmake)
include(cmake/load_local_packages.cmake)
include(cmake/load_loc_repositories.cmake)

# Primary VT build
add_subdirectory(src)
Expand Down
43 changes: 43 additions & 0 deletions ci/add_spack_loc_resource.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env python3

"""Add the loc source resource needed by a VT pull-request version."""

import re
import sys
from pathlib import Path


LOC_BRANCH = "develop"


if len(sys.argv) != 3 or not sys.argv[2].strip():
sys.exit(
"usage: add_spack_loc_resource.py <darma-vt-package.py> <version>"
)

package_file = Path(sys.argv[1])
version = sys.argv[2]
text = package_file.read_text()

resource = f''' resource(
name="loc",
git="https://github.com/DARMA-tasking/loc.git",
branch="{LOC_BRANCH}",
destination="lib",
placement="loc",
when="@{version}",
)
'''

if resource not in text:
version_pattern = re.compile(
rf'^\s*version\(["\']{re.escape(version)}["\'].*$',
re.MULTILINE,
)
version_match = version_pattern.search(text)
if version_match is None:
sys.exit(f"version {version!r} was not found in {package_file}")

insertion_point = text.find("\n", version_match.end()) + 1
text = text[:insertion_point] + "\n" + resource + text[insertion_point:]
package_file.write_text(text)
11 changes: 10 additions & 1 deletion ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env | sort

# Dependency versions, when fetched via git.
checkpoint_rev=develop
loc_rev=develop

if [ -z ${4} ]; then
dashj=""
Expand Down Expand Up @@ -98,6 +99,14 @@ else
fi
fi

if test -d "${source_dir}/lib/loc"
then
{ echo "loc already in lib... not downloading"; } 2>/dev/null
else
cd "${source_dir}/lib"
git clone -b "${loc_rev}" --depth 1 https://github.com/DARMA-tasking/loc.git
fi

if test "${VT_TV_ENABLED}" -eq 1
then
if test -d "${source_dir}/lib/vt-tv"
Expand Down Expand Up @@ -176,7 +185,7 @@ cmake -G "${CMAKE_GENERATOR:-Ninja}" \
-Dfmt_DIR="${FMT_DIR}" \
-Dlibunwind_ROOT="${LIBUNWIND_ROOT:-/usr}" \
-Dvt_no_color_enabled="${VT_NO_COLOR_ENABLED:-0}" \
-DCMAKE_CXX_STANDARD="${CMAKE_CXX_STANDARD:-17}" \
-DCMAKE_CXX_STANDARD="${CMAKE_CXX_STANDARD:-20}" \
-DBUILD_SHARED_LIBS="${BUILD_SHARED_LIBS:-0}" \
"$VT"
cmake_conf_ret=$?
Expand Down
2 changes: 1 addition & 1 deletion ci/build_vt_sample.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ then
-Dvt_build_examples="0" \
-Dvt_build_tests="0" \
-Dvt_external_fmt="${VT_EXTERNAL_FMT:-0}" \
-DCMAKE_CXX_STANDARD="${CMAKE_CXX_STANDARD:-17}" \
-DCMAKE_CXX_STANDARD="${CMAKE_CXX_STANDARD:-20}" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Release}" \
-DCMAKE_CXX_COMPILER="${CXX:-c++}" \
Expand Down
9 changes: 9 additions & 0 deletions ci/ctest_build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ build_dir=${2}

# Dependency versions, when fetched via git.
checkpoint_rev=develop
loc_rev=develop

export parallel_level=4
if [ -z ${4} ]; then
Expand Down Expand Up @@ -61,6 +62,14 @@ else
fi
fi

if test -d "${source_dir}/lib/loc"
then
{ echo "loc already in lib... not downloading"; } 2>/dev/null
else
cd "${source_dir}/lib"
git clone -b "${loc_rev}" --depth 1 https://github.com/DARMA-tasking/loc.git
fi

if test "${VT_ZOLTAN_ENABLED:-0}" -eq 1
then
export Zoltan_DIR=${ZOLTAN_DIR:-""}
Expand Down
4 changes: 4 additions & 0 deletions ci/docker/vt.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ RUN --mount=type=cache,id=${CACHE_ID},target=/build/ccache \
--mount=type=cache,id=BUILD-${CACHE_ID},target=/build/vt \
--mount=type=secret,id=GITHUB_TOKEN,env=GITHUB_TOKEN \
--mount=target=/vt,rw \
if [ "${VT_TV_ENABLED}" = "1" ]; then \
apt-get update -y -q && \
apt-get install -y -q --no-install-recommends nlohmann-json3-dev; \
fi && \
if [ "${VT_TEST_SPACK}" = "1" ]; then \
apt update -y -q && apt install -y -q libssl-dev unzip && \
/vt/ci/test_spack_package.sh; \
Expand Down
6 changes: 5 additions & 1 deletion ci/test_spack_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ set -exo pipefail

cur_path=$(pwd)
vt_spack_package="$cur_path/spack-package"
script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)

git clone --branch v1.2.2 --depth=2 https://github.com/spack/spack.git
. spack/share/spack/setup-env.sh

git clone -b master https://github.com/DARMA-tasking/spack-package.git
python3 spack-package/ci/add_vt_branch.py "${GIT_BRANCH}"
python3 "${script_dir}/add_spack_loc_resource.py" \
spack-package/packages/darma-vt/package.py "${GIT_BRANCH}"

declare -A variables_map
variables_map["lb_enabled"]="${VT_LB_ENABLED:-0}"
Expand All @@ -35,7 +38,8 @@ do
done

install_cmd=$(printf " %s" "${cmd_vars[@]}")
install_cmd="spack install darma-vt@${GIT_BRANCH} build_type=Release ${install_cmd:1} ^openmpi@4.0.4"
# Match VT/loc's fmt headers, including when Spack has not listed this release.
install_cmd="spack install darma-vt@${GIT_BRANCH} build_type=Release ${install_cmd:1} ^openmpi@4.0.4 ^fmt@git.12.2.0=12.2.0"

mkdir -p ~/.spack
cat >> ~/.spack/packages.yaml <<'EOF'
Expand Down
2 changes: 1 addition & 1 deletion cmake/check_compiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function(check_cc_quirk VAR CC_FILE)
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/cmake/cc_tests/${CC_FILE}
OUTPUT_VARIABLE check_cc_quirk_output
CXX_STANDARD 17
CXX_STANDARD 20
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
)
Expand Down
40 changes: 15 additions & 25 deletions cmake/load_bundled_libraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,23 @@ endif()
add_subdirectory(${PROJECT_LIB_DIR}/CLI)

# Use an external fmt package or configure VT's shared DARMA fmt provider.
if(${vt_external_fmt})
# user should provide 'fmt_DIR' or 'fmt_ROOT' to CMake (unless fmt is installed in system libs)
if(fmt_ROOT)
message(STATUS "vt_external_fmt = ON. Using fmt located at ${fmt_ROOT}")
elseif(fmt_DIR)
message(STATUS "vt_external_fmt = ON. Using fmt located at ${fmt_DIR}")
else()
message(STATUS "vt_external_fmt = ON but neither fmt_DIR nor fmt_ROOT is provided!")
endif()
find_package(fmt 10.2.1 REQUIRED)
set(FMT_LIBRARY "")
set(FMT_LINK_TARGET fmt::fmt)
include(setup_fmt)
if(vt_external_fmt AND NOT TARGET fmt::fmt)
find_package(fmt 12.2.0 EXACT CONFIG REQUIRED)
# Record the verified package version for setup_fmt's existing reuse check.
set_property(TARGET fmt::fmt PROPERTY INTERFACE_DARMA_FMT_VERSION 120200)
endif()
darma_setup_fmt(
SOURCE_DIR "${PROJECT_LIB_DIR}/fmt"
VENDORED_TARGET fmt
OUT_LIBRARY FMT_LIBRARY
OUT_LINK_TARGET FMT_LINK_TARGET
POST_ADD_COMMAND set_darma_compiler_flags
)
if(FMT_LIBRARY OR vt_external_fmt)
set(vt_uses_parent_fmt 0)
else()
include(setup_fmt)
darma_setup_fmt(
SOURCE_DIR "${PROJECT_LIB_DIR}/fmt"
VENDORED_TARGET fmt
OUT_LIBRARY FMT_LIBRARY
OUT_LINK_TARGET FMT_LINK_TARGET
POST_ADD_COMMAND set_darma_compiler_flags
)
if(FMT_LIBRARY)
set(vt_uses_parent_fmt 0)
else()
set(vt_uses_parent_fmt 1)
endif()
set(vt_uses_parent_fmt 1)
endif()

# yaml-cpp always included in the build
Expand Down
23 changes: 23 additions & 0 deletions cmake/load_loc_repositories.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
if (EXISTS "${PROJECT_LIB_DIR}/loc")
# loc detects that it is embedded and disables its standalone comm/MPI
# backend, examples, tests, and documentation. VT supplies LocCommunicator.
add_subdirectory(${PROJECT_LIB_DIR}/loc)
else()
message(
FATAL_ERROR
"DARMA/loc was not found. Clone https://github.com/DARMA-tasking/loc.git "
"into ${PROJECT_LIB_DIR}/loc before configuring VT."
)
endif()

get_target_property(
VT_LOC_INCLUDE_DIRECTORIES loc::loc INTERFACE_INCLUDE_DIRECTORIES
)

# loc is header-only and does not currently define install rules. Install its
# public headers with VT so installed VT packages do not need the source tree.
install(
DIRECTORY "${PROJECT_LIB_DIR}/loc/src/loc"
DESTINATION include
FILES_MATCHING PATTERN "*.h"
)
30 changes: 11 additions & 19 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function "vt_ldms" {

function "vt_cmake_cxx_standard" {
params = [item]
result = lookup(item, "vt_cmake_cxx_standard", 17)
result = lookup(item, "vt_cmake_cxx_standard", 20)
}

function "vt_find_mpi" {
Expand Down Expand Up @@ -294,14 +294,16 @@ target "vt-build-all" {
vt_production_build = 1
},
{
image = "amd64-ubuntu-20.04-clang-10-cpp"
image = "amd64-ubuntu-22.04-clang-14-cpp"
variant = "ubsan"
vt_tests_num_nodes = 8
vt_ubsan = 1
#FIXME
ubsan_options = "print_stacktrace=1"
},
{
image = "amd64-ubuntu-20.04-clang-9-cpp"
image = "amd64-ubuntu-22.04-clang-15-cpp"
variant = "shared-ext-lib"
vt_build_shared_libs = 1
vt_inclusion = "EXT_LIB"
vt_werror = 0
Expand All @@ -322,19 +324,7 @@ target "vt-build-all" {
variant = "spack"
},
{
image = "amd64-ubuntu-20.04-gcc-9-cpp"
},
{
image = "amd64-ubuntu-20.04-gcc-9-cuda-11.4.3-cpp"
vt_diagnostics = 0
vt_extended_tests = 0
vt_external_fmt = 1
vt_pool = 0
vt_tests_num_nodes = 8
vt_trace = 1
},
{
image = "amd64-ubuntu-20.04-gcc-9-cuda-12.2.0-cpp"
image = "amd64-ubuntu-24.04-gcc-13-cuda-12.9.0-cpp"
vt_debug_verbose = 1
vt_diagnostics = 0
vt_extended_tests = 0
Expand All @@ -350,7 +340,8 @@ target "vt-build-all" {
vt_trace = 1
},
{
image = "amd64-ubuntu-22.04-clang-11-cpp"
image = "amd64-ubuntu-22.04-clang-13-cpp"
variant = "fcontext"
vt_fcontext = 1
},
{
Expand All @@ -364,12 +355,13 @@ target "vt-build-all" {
},
{
image = "amd64-ubuntu-22.04-clang-14-cpp"
variant = "trace-debug"
vt_trace = 1
vt_debug_verbose = 1
},
{
image = "amd64-ubuntu-22.04-clang-15-cpp"
variant = "cxx20"
variant = "debug"
vt_cmake_cxx_standard = 20
vt_debug_verbose = 1
vt_production_build = 0
Expand Down Expand Up @@ -427,7 +419,7 @@ target "vt-build-all" {
variant = "docs"
},
{
image = "amd64-ubuntu-20.04-gcc-9-ldms-cpp"
image = "amd64-ubuntu-20.04-gcc-10-ldms-cpp"
vt_ldms = 1
vt_lb = 0
vt_trace = 0
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ x-ccache: &ccache
x-vtopts: &vtopts
BUILD_SHARED_LIBS: ${VT_BUILD_SHARED_LIBS:-0}
CMAKE_BUILD_TYPE: ${BUILD_TYPE:-release}
CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD:-17}
CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD:-20}
CODECOV_TOKEN: ${CODECOV_TOKEN:-}
http_proxy: ${PROXY-}
https_proxy: ${PROXY-}
Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile.in-mcss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ M_SHOW_UNDOCUMENTED = YES
EXTRACT_ALL = YES

M_LINKS_NAVBAR1 = \
"introduction context active-messenger collection collective group location objgroup pipe pool rdmahandle registry scheduler term trace trace-only" \
"introduction context active-messenger collection collective group objgroup pipe pool rdmahandle registry scheduler term trace trace-only" \
"learn vt-build tutorial examples ckpt_learn_serialize" \
"pages" \
"namespaces namespacevt namespacevt_1_1collective namespacevt_1_1debug namespacevt_1_1group namespacevt_1_1location namespacevt_1_1messaging namespacevt_1_1objgroup namespacevt_1_1pipe namespacevt_1_1rdma namespacevt_1_1runtime namespacevt_1_1term namespacevt_1_1vrt"
Expand Down
Loading
Loading