-
Notifications
You must be signed in to change notification settings - Fork 73
API refactoring #438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
allnes
wants to merge
122
commits into
learning-process:master
Choose a base branch
from
allnes:an/unite-tests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
API refactoring #438
Changes from all commits
Commits
Show all changes
122 commits
Select commit
Hold shift + click to select a range
e07ea3d
Remove keys
allnes a0e20fc
Fix docs and reports
allnes 018b685
Change mpi libs
allnes 37c1842
Unite libs
allnes e93c104
first uniting tests
allnes 1c9da2e
second part uniting tests
allnes 9570c53
3rd part perf unifying tests
allnes 594201a
4th part perf unifying tests
allnes 15e673f
Change API
allnes ec82c6a
update func tests
allnes b6c406f
update omp task
allnes 33ae009
update seq task
allnes 483834a
Merge branch 'master' of https://github.com/learning-process/parallel…
allnes 984570e
fix core tests
allnes afa6fe1
Merge branch 'master' of https://github.com/learning-process/parallel…
allnes a0a5ef0
fix clang format
allnes 7d671e0
update dir
allnes 276601b
unite binaries
allnes 9cce2f3
Refactor test parametrization and naming for clarity
allnes a8fdefd
Refactor test and script logic to improve task handling
allnes d4ed8d3
Refactor test and script logic for improved readability
allnes cdca4e0
Refactor performance test parameter handling.
allnes c6edfda
Refactor functional tests to use BaseRunFuncTests.
allnes 376dfa4
Refactor test utilities and improve image handling.
allnes ee536fe
Refactor test execution and data handling in func_tests
allnes c81c99b
Refactor test suite instantiation for modularity.
allnes 1148c77
Refactor test parameters to use GTestFuncParam alias
allnes 929d357
Refactor task generation macro for clarity and simplicity
allnes bb725d2
Rename task classes and enums for improved clarity.
allnes 21f1dcf
Refactor test parameter handling for clarity and flexibility
allnes 5016f3d
Refactor type usage and improve code clarity.
allnes 9172d07
Refactor test parameter handling and fix type consistency.
allnes f05e6a8
Refactor index types to use `std::vector<int>::size_type`.
allnes d413536
Merge branch 'master' of https://github.com/learning-process/parallel…
allnes 404f6f4
Merge branch 'master' of https://github.com/learning-process/parallel…
allnes 84cc083
Use std::abort instead of std::exit for termination
allnes e240d51
Unify task namespaces and refactor common functionality.
allnes d8f9a49
Refactor task type handling and improve performance tracking.
allnes 2a6f8fc
Refactor code to consistently use namespaces.
allnes c5881e8
Refactor test file structure for consistency
allnes 12436c3
Rename and update image file path in functional test.
allnes c8555af
Merge branch 'master' of https://github.com/learning-process/parallel…
allnes 6a29e89
Refactor: Replace GetPPCNumThreads with GetNumThreads
allnes 65a8880
Add JSON integration and task status/type handling
allnes 99f0a6a
Merge branch 'master' of https://github.com/learning-process/parallel…
allnes 5b91f8e
Refactor: Move and adjust `GetStringParamName` function
allnes 4340dd4
Rename macro ADD_PERF_MODES to ADD_PERF_TASK.
allnes 1ce11d2
Refactor and modularize test utilities.
allnes e01b19d
Set C++ standard as required in CMake configuration
allnes 1579663
Remove unused JSON include and adjust const qualifier.
allnes 2e36d52
Fix incorrect usage of `constexpr` and redundant `const` casts
allnes 151a1ce
Set C++ standard to C++20 for Clang builds
allnes 38c32e9
Update test parameters in functional test
allnes 76dd44a
Refactor tasks to simplify matrix operations and input handling
allnes dc6d8ba
Add <atomic> include and fix OpenMP shared directive
allnes ba1ba02
Refactor member variable naming and initialization.
allnes b51ab41
Add Intel oneAPI setup for OpenMP in GitHub Actions
allnes dd19a31
Update main.yml
allnes 90796b5
Update main.yml
allnes e997ee8
Update main.yml
allnes a2e4f11
Refactor threading and parallelism logic in tasks.
allnes 0267deb
Enable core run for threads and processes in test runner
allnes a42c6be
Add debug logs for task input and output in test utility
allnes ab2242f
Add OMP thread control and refactor environment handling
allnes 93b19ba
**Replace `exit` with `std::terminate` and refine error handling**
allnes 431496f
Filter out death tests in run_tests.py
allnes c75efb6
Add Valgrind suppression file and integrate into test script
allnes 3837166
Refactor for modern C++ features and cleanup.
allnes dc93e46
Use Valgrind suppression files and replace `exit` with `MPI_Abort`
allnes 198cea9
Set C++ standard to 23 unconditionally
allnes bb8a044
Refactor runners directory and add ASAN-specific handling
allnes 5d9109d
Add PPC_ASAN_RUN logic and refactor task/test macros
allnes ba8011a
Add libenvpp integration and improve thread/environment handling
allnes 0da828b
Remove PPC_ASAN_RUN logic and simplify build/test configurations
allnes 8c6e9ff
Expand Valgrind suppression file for additional leaks
allnes 110cd96
Remove Valgrind suppression file and simplify command
allnes 92d7b85
Refactor OpenMP thread handling and remove redundant `omp_set_num_thr…
allnes 647bf7e
Remove redundant CMake flag `-DCMAKE_CXX_FLAGS=-Wno-error=switch-enum`
allnes 76a13a4
Refactor example tasks to `example_threads` and streamline task/test …
allnes b7513af
Fix inconsistent spacing and formatting in `util.hpp` and `util.cpp`
allnes 68f93bb
Rename tests and update filters to disable Valgrind-specific cases
allnes 751a475
Refactor type extraction logic in `Demangle` for improved clarity and…
allnes d729919
Switch Windows build configuration to use LLVM and GCC tooling
allnes 82896be
Switch Windows MPI setup from MS-MPI to MPICH
allnes e7220ec
Switch to `mpi4py/setup-mpi` for MPI setup in Windows builds
allnes 8856a71
Switch Windows build configuration from GCC to MSVC and update CMake …
allnes d42fd48
Update LLVM GitHub action to v2 and set version to 20.1.4
allnes 54f5e9a
Update Windows build to include `CMAKE_PREFIX_PATH` for LLVM
allnes 11d5777
Add `example_processes` task with MPI and SEQ modes
allnes 5403c40
Switch performance and functional tests in `example_processes` to use…
allnes f45801a
Update CMake to link `fmtd` in Debug mode on non-MSVC builds
allnes f5aca53
Refactor `CMakeLists.txt` to simplify `target_link_libraries` logic a…
allnes 3816898
Switch `ubuntu-gcc-build-codecov` to Ninja and comment out `needs` de…
allnes ad308fe
Merge remote-tracking branch 'origin/an/unite-tests' into an/unite-tests
allnes a4d58a1
Expand GitHub Actions triggers and uncomment `needs` dependencies in …
allnes 48fd9d9
Refactor imports and update JSON pointer initialization across multip…
allnes 9a5a272
Simplify codecov ignore patterns to focus on task-related tests and r…
allnes 72cae17
Simplify codecov ignore patterns to focus on task-related tests and r…
allnes b629680
Merge remote-tracking branch 'origin/an/unite-tests' into an/unite-tests
allnes d352ce0
Refactor task and test initialization methods, improve naming consist…
allnes 1472579
Refactor test suite instantiations, consolidate test name utilities, …
allnes 5b95764
Refactor test folder structure, update imports, adjust CMake and Code…
allnes 82ec6f3
Remove `run_perf_counter.py`, `performance-list` option, and related …
allnes d1f9626
Simplify apt package list in static analysis GitHub workflow by remov…
allnes ab415f8
Replace `libmpich-dev` with OpenMPI packages in static analysis workf…
allnes 149f0e0
Update GitHub Actions and Codecov ignore patterns to exclude module t…
allnes c1e5530
Adjust performance test parameters and computation to improve consist…
allnes 9aadb72
Update CMakeLists.txt
allnes d3842c7
Update settings.json
allnes 201a6d3
Update settings.json
allnes 1df223e
Replace `fmt::println` with `std::cerr` and `std::format` for error l…
allnes dc2f909
Add `private` access specifier for implementation methods in task hea…
allnes d9a890f
Refine CMake library source file glob patterns to explicitly target .…
allnes 2604844
Replace `fmt` with `std::format` and `std::cerr`, adjust test suite i…
allnes 9d07107
Refactor functional and performance runners by extracting MPI-related…
allnes 578d829
Rename `perf` module to `performance` across headers, sources, and te…
allnes daac04d
Anonymize student data in `example_processes` and `example_threads` t…
allnes e16b65d
Include missing utility headers in `performance` test files and `runn…
allnes ae2f207
Merge branch 'master' of https://github.com/learning-process/parallel…
allnes b6356f9
Simplify TBB library linking in `core` CMake configuration by using `…
allnes e4d463e
Unify and streamline test configuration in `CMakeLists.txt` using hel…
allnes bda4270
Simplify library linking in `core` CMake configuration by introducing…
allnes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#define STB_IMAGE_IMPLEMENTATION | ||
|
||
// NOLINTNEXTLINE(misc-include-cleaner) | ||
#include "stb_library.hpp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# ——— Helper function to add & register tests ————————————————————————— | ||
function(ppc_add_test test_name test_src USE_FLAG) | ||
if(${USE_FLAG}) | ||
add_executable(${test_name} "${PROJECT_SOURCE_DIR}/${test_src}") | ||
enable_testing() | ||
add_test(NAME ${test_name} COMMAND ${test_name}) | ||
install(TARGETS ${test_name} RUNTIME DESTINATION bin) | ||
endif() | ||
endfunction() | ||
|
||
# Function to configure tests | ||
function(add_tests test_flag exec_target subdir) | ||
if(${test_flag}) | ||
# Gather all source files under tests/<subdir> | ||
file(GLOB_RECURSE src_files | ||
"${TEST_DIR}/${subdir}/*.cpp" | ||
"${TEST_DIR}/${subdir}/*.cxx" | ||
"${TEST_DIR}/${subdir}/*.cc" | ||
) | ||
target_sources(${exec_target} PRIVATE ${src_files}) | ||
list(APPEND TEST_EXECUTABLES ${exec_target}) | ||
set(TEST_EXECUTABLES "${TEST_EXECUTABLES}" PARENT_SCOPE) | ||
endif() | ||
endfunction() | ||
|
||
# ============================================================================ | ||
# Function: setup_implementation | ||
# - NAME: implementation sub‐directory name (e.g. “mpi”) | ||
# - PROJ_NAME: project base name | ||
# - BASE_DIR: root source directory | ||
# - TESTS: list of test executables to link against | ||
# ============================================================================ | ||
function(setup_implementation) | ||
# parse named args: NAME, PROJ_NAME, BASE_DIR; multi‐value: TESTS | ||
cmake_parse_arguments( | ||
SETUP | ||
"" # no plain options | ||
"NAME;PROJ_NAME;BASE_DIR" | ||
"TESTS" | ||
${ARGN} | ||
) | ||
|
||
# skip if impl dir doesn't exist | ||
set(IMP_DIR "${SETUP_BASE_DIR}/${SETUP_NAME}") | ||
if(NOT EXISTS "${IMP_DIR}") | ||
return() | ||
endif() | ||
message(STATUS " -- ${SETUP_NAME}") | ||
|
||
# collect sources | ||
file(GLOB_RECURSE CPP_SOURCES "${IMP_DIR}/src/*.cpp") | ||
file(GLOB_RECURSE ALL_SOURCES | ||
"${IMP_DIR}/include/*.h" | ||
"${IMP_DIR}/include/*.hpp" | ||
"${IMP_DIR}/src/*.cpp" | ||
) | ||
|
||
# create library (STATIC if .cpp exist, otherwise INTERFACE) | ||
set(LIB_NAME "${SETUP_PROJ_NAME}_${SETUP_NAME}") | ||
if(CPP_SOURCES) | ||
add_library(${LIB_NAME} STATIC ${ALL_SOURCES}) | ||
else() | ||
add_library(${LIB_NAME} INTERFACE ${ALL_SOURCES}) | ||
endif() | ||
|
||
# link core module | ||
target_link_libraries(${LIB_NAME} PUBLIC core_module_lib) | ||
|
||
# and link into each enabled test executable | ||
foreach(test_exec ${SETUP_TESTS}) | ||
target_link_libraries(${test_exec} PUBLIC ${LIB_NAME}) | ||
endforeach() | ||
endfunction() | ||
|
||
# Function to configure each subproject | ||
function(ppc_configure_subproject SUBDIR) | ||
# Module-specific compile-time definitions | ||
add_compile_definitions( | ||
PPC_SETTINGS_${SUBDIR}="${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}/settings.json" | ||
PPC_ID_${SUBDIR}="${SUBDIR}" | ||
) | ||
|
||
# Switch project context to the subproject | ||
project(${SUBDIR}) | ||
|
||
# Directory with tests and list of test executables (populated by setup_implementation) | ||
set(TEST_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}/tests") | ||
set(TEST_EXECUTABLES "") | ||
|
||
# Register functional and performance test runners | ||
add_tests(USE_FUNC_TESTS ${FUNC_TEST_EXEC} functional) | ||
add_tests(USE_PERF_TESTS ${PERF_TEST_EXEC} performance) | ||
|
||
message(STATUS "${SUBDIR}") | ||
|
||
# List of implementations to configure | ||
foreach(IMPL IN LISTS IMPLEMENTATIONS) | ||
setup_implementation( | ||
NAME ${IMPL} | ||
PROJ_NAME ${SUBDIR} | ||
TESTS "${TEST_EXECUTABLES}" | ||
BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}" | ||
) | ||
endforeach() | ||
endfunction() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
include_directories(${CMAKE_SOURCE_DIR}/3rdparty/json/include) | ||
include(ExternalProject) | ||
ExternalProject_Add(ppc_json | ||
SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rdparty/json" | ||
PREFIX "${CMAKE_CURRENT_BINARY_DIR}/ppc_json" | ||
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/ppc_json/build" | ||
INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/ppc_json/install" | ||
CONFIGURE_COMMAND "${CMAKE_COMMAND}" -S "${CMAKE_SOURCE_DIR}/3rdparty/json/" -B "${CMAKE_CURRENT_BINARY_DIR}/ppc_json/build/" | ||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -G${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} | ||
-D CMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER} -D CMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER} | ||
BUILD_COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/ppc_json/build" --config ${CMAKE_BUILD_TYPE} --parallel | ||
INSTALL_COMMAND "${CMAKE_COMMAND}" --install "${CMAKE_CURRENT_BINARY_DIR}/ppc_json/build" --prefix "${CMAKE_CURRENT_BINARY_DIR}/ppc_json/install") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
include_directories(${CMAKE_SOURCE_DIR}/3rdparty/libenvpp/include) | ||
include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/3rdparty/libenvpp/external/fmt/include) | ||
aobolensk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
include(ExternalProject) | ||
ExternalProject_Add(ppc_libenvpp | ||
SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rdparty/libenvpp" | ||
PREFIX "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp" | ||
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/build" | ||
INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/install" | ||
CONFIGURE_COMMAND "${CMAKE_COMMAND}" -S "${CMAKE_SOURCE_DIR}/3rdparty/libenvpp/" -B "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/build/" | ||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -G${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} | ||
-D CMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER} -D CMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER} | ||
BUILD_COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/build" --config ${CMAKE_BUILD_TYPE} --parallel | ||
INSTALL_COMMAND "${CMAKE_COMMAND}" --install "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/build" --prefix "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/install") | ||
|
||
string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower) | ||
if(cmake_build_type_lower STREQUAL "debug") | ||
set(PPC_FMT_LIB_NAME fmtd) | ||
else() | ||
set(PPC_FMT_LIB_NAME fmt) | ||
endif() | ||
|
||
if(MSVC) | ||
set(PPC_ENVPP_LIB_NAME libenvpp) | ||
else() | ||
set(PPC_ENVPP_LIB_NAME envpp) | ||
endif () |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.