Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
257 commits
Select commit Hold shift + click to select a range
a619687
Add barrier function and documentation.
breyerml Dec 9, 2024
e2904eb
Add implicit conversion operator back to a native MPI communicator.
breyerml Dec 9, 2024
2bacd78
Create function to map C++ datatypes to MPI datatypes.
breyerml Dec 10, 2024
0261bec
Restructure and add documentation.
breyerml Dec 10, 2024
f0fc216
Update core header namespace documentation as well as directory docum…
breyerml Dec 10, 2024
4ca5f53
Add two new environmental MPI wrapper functions: is_active and abort_…
breyerml Dec 10, 2024
3e2407b
Add the current MPI rank to the source_location information IF AVAILA…
breyerml Dec 10, 2024
67d4ed1
Output the current MPI rank on a failed PLSSVM_ASSERT and correctly c…
breyerml Dec 10, 2024
1901e1e
Provide implicit conversion operator only if MPI is available.
breyerml Dec 10, 2024
b32a482
Fix unused parameter compiler warning.
breyerml Dec 10, 2024
300fce7
Add functions wrapping MPI version information.
breyerml Dec 10, 2024
c8ab227
Add function to get the current node name.
breyerml Dec 10, 2024
a7b0202
Add MPI specific tracking entries.
breyerml Dec 10, 2024
27058a9
Implement general new MPI communicator API. Note: MPI isn't used, i.e…
breyerml Dec 10, 2024
45e6219
First notes to MPI in README file.
breyerml Dec 10, 2024
36bc66e
Add a way to manually disable MPI support.
breyerml Dec 10, 2024
ed58e8a
Remove TODO and unnecessary code.
breyerml Dec 11, 2024
fd1d228
Improve multi-node performance tracking handling.
breyerml Dec 11, 2024
7aab723
Again do only initialize the required backends using our scope_guard.
breyerml Dec 11, 2024
613c2b7
Output the number of MPI ranks in the start of plssvm-train and plssv…
breyerml Dec 11, 2024
08f4d7c
Move error check functionality to the cpp file to prevent circular in…
breyerml Dec 11, 2024
1404388
Add new (static) member function identifying the current main MPI rank.
breyerml Dec 11, 2024
b5b0422
Add support for directly communicating enum types.
breyerml Dec 11, 2024
37390c4
Add simple gather function.
breyerml Dec 11, 2024
952a428
Mark gather function as const.
breyerml Dec 12, 2024
fb12edf
Add specialized gather functions for strings (internally using MPI_Ga…
breyerml Dec 12, 2024
4d10527
Improve output for multiple MPI ranks.
breyerml Dec 12, 2024
1eaccb8
Add new gather function for std::chrono::milliseconds.
breyerml Dec 12, 2024
85a6b9b
If necessary, output the kernel matrix assembly runtime for each MPI …
breyerml Dec 12, 2024
acbc2ed
Merge branch 'develop' into mpi
breyerml Feb 18, 2025
62f7996
Merge branch 'regression' into mpi
breyerml Feb 18, 2025
fd45042
Correctly finish the merge from the regression branch (many API chang…
breyerml Feb 18, 2025
95faec1
Split log functions in more separate files to reduce the number of po…
breyerml Feb 19, 2025
79daa63
The data distribution now supports MPI, which means that the computat…
breyerml Feb 21, 2025
e9b220d
Make sure plssvm-scale is only called with a single MPI process.
breyerml Feb 21, 2025
b115afd
Add function to check whether MPI was enabled or not.
breyerml Feb 21, 2025
dcfa92e
Add missing fmt header.
breyerml Feb 21, 2025
cc33d4a
Output error message only on the main MPI rank.
breyerml Feb 21, 2025
ccaec10
Do not use the mpi::communicator constructor to retrieve the current …
breyerml Feb 23, 2025
1f9752e
Add missing include.
breyerml Feb 23, 2025
6f3a752
Add rudimentary, manual load balancing to our MPI implementation.
breyerml Feb 23, 2025
a367308
Add MPI related README entry.
breyerml Feb 23, 2025
56dee5a
Add public MPI communicator getter to CSVM base class.
breyerml Feb 24, 2025
796ebe2
Fix unused variable compiler warnings if compiled without MPI support.
breyerml Feb 24, 2025
7ca51a6
Add a warning if PLSSVM was build without support for MPI but plssvm-…
breyerml Feb 24, 2025
ca41fff
Add MPI support to our Python bindings using mpi4py.
breyerml Feb 24, 2025
7ee0a7a
Consistently use log_untracked where possible.
breyerml Feb 24, 2025
b343275
Add mpi4py to Python dependencies.
breyerml Feb 24, 2025
eadb510
Add some MPI examples.
breyerml Feb 24, 2025
eaff2ab
Update tests to add new plssvm::mpi::communicator parameter for the d…
breyerml Mar 2, 2025
f4515a1
Move SVM parameter validation from the C-SVM class to the parameter c…
breyerml Mar 2, 2025
1a1279d
Add plssvm::mpi::communicator parameter to C-SVM classes and update P…
breyerml Mar 2, 2025
b5cf852
Update Python APIs.
breyerml Mar 2, 2025
73604fc
Update PLSSVM version handling in Python bindings.
breyerml Mar 2, 2025
937426b
Add missing Kokkos backend related enumeration bindings.
breyerml Mar 2, 2025
c8a6314
Enable string to enum conversions for all exposed PLSSVM enumerations.
breyerml Mar 2, 2025
5045796
Explicitly qualify all Pybind11 types with py::.
breyerml Mar 2, 2025
bfa8245
The sklearn like Python bindings plssvm.SVC and plssvm.SVR are now av…
breyerml Mar 2, 2025
92509b9
Update sklearn like PLSSVM bindings.
breyerml Mar 2, 2025
bcdf9bf
Update the examples and utility scripts to reflect the newest Python …
breyerml Mar 2, 2025
b0bd086
Add missing MPI communicator getter to the MinMaxScaler class.
breyerml Mar 2, 2025
67eb5bb
Update Python bindings README.md to reflect resent changes.
breyerml Mar 2, 2025
8c4cdf8
Add comparison operators (== and !=) for an plssvm::mpi::communicator.
breyerml Mar 2, 2025
952d52c
Fox Doxygen warnings.
breyerml Mar 2, 2025
48c6aa1
Better clarify usages of the plssvm::mpi::communicator comm parameters.
breyerml Mar 2, 2025
3e073a7
Remove MPI_CONGRUENT and enforce strict identity with only MPI_IDENT …
breyerml Mar 3, 2025
5686e6d
Add sanity checks ensuring that the provided MPI communicators are id…
breyerml Mar 3, 2025
bd469ae
Fix implicit conversion compiler warning.
breyerml Mar 5, 2025
5de34d1
Fix clang compiler error with [[nodiscard]] attribute and friend func…
breyerml Mar 5, 2025
34e7c1b
Remove unnecessary explicit keywords.
breyerml Mar 5, 2025
5daad2c
Do not use hardcoded target platform.
breyerml Mar 5, 2025
815b7b1
add exception header inclusion for platform device checks in utility …
vancraar Feb 24, 2025
ce642e6
Fix formatting and remove other unnecessary explicit usages.
breyerml Mar 5, 2025
32a3595
Add MPI support to the AdaptiveCpp SYCL backend.
breyerml Mar 5, 2025
4b4460d
Add MPI support to the DPC++ SYCL backend.
breyerml Mar 5, 2025
fe63915
Add MPI support to the Kokkos backend.
breyerml Mar 5, 2025
85c62b0
Add support for additional information gathering with more than one M…
breyerml Mar 6, 2025
d529796
Add MPI support to the HIP backend.
breyerml Mar 6, 2025
fba8294
Add MPI support to the OpenCL backend.
breyerml Mar 6, 2025
7792e3b
Add MPI support to the OpenMP backend.
breyerml Mar 8, 2025
05591d7
Fix HPX includes.
breyerml Mar 8, 2025
8a904a6
Remove unused PLSSVM_HPX_KERNEL_FUNCTION.
breyerml Mar 8, 2025
a575c15
Add MPI support to the HPX backend.
breyerml Mar 8, 2025
2f53db0
Add MPI support to the stdpar backends.
breyerml Mar 8, 2025
8be893d
Clarify that our tests do not support execution via MPI.
breyerml Mar 10, 2025
0990ac3
Fix compilation error.
breyerml Mar 11, 2025
4261278
Remove constexpr from plssvm::parameter constructor to silence compil…
breyerml Mar 11, 2025
d56a771
Add specific icpx CMake preset.
breyerml Mar 13, 2025
4e791f0
Add [[maybe_unused]] annotation to function parameters.
breyerml Mar 13, 2025
6958830
Merge branch 'refs/heads/regression' into mpi
breyerml Mar 14, 2025
94e4f36
Rename MPI communicator member function from sequentialize to serialize.
breyerml Mar 15, 2025
382658e
Implement default constructor by explicitly defaulting it.
breyerml Mar 15, 2025
e677324
Reorder function definition.
breyerml Mar 15, 2025
fa58c8b
When calling abort_world and MPI isn't enabled, call std::abort inste…
breyerml Mar 15, 2025
2201e09
Enable usage of colors for warning outputs again.
breyerml Mar 15, 2025
4e4a13e
Fix logic error preventing from warning outputs to be generated if pl…
breyerml Mar 15, 2025
c481df4
Add the Kokkos execution_space tests to the Base_tests.
breyerml Mar 15, 2025
8a7df56
Improve existing executable tests (changing file names and add additi…
breyerml Mar 15, 2025
35421ff
Add executable tests to all backends.
breyerml Mar 15, 2025
a0d1158
Add tests for warning outputs (different code path).
breyerml Mar 15, 2025
6ffe458
Add logger tests for the MPI communicator overloads.
breyerml Mar 15, 2025
668cec1
Add basic tests for the MPI wrappers. Note that they assume that only…
breyerml Mar 15, 2025
6795aa5
Improve coverage messages.
breyerml Mar 15, 2025
7c3e09d
Check whether the necessary coverage executables could be found
breyerml Mar 15, 2025
aa3e02f
Disable LTO for the coverage analysis.
breyerml Mar 15, 2025
f3f6f4b
Move min_max_scaler implementation to .cpp file if possible.
breyerml Mar 20, 2025
0b53f65
Move parts of the environment implementation to .cpp file.
breyerml Mar 20, 2025
e2920a8
Move model test files to a separate directory.
breyerml Mar 20, 2025
d31d36d
Remove unused classification report functionality.
breyerml Mar 20, 2025
018b569
Correctly guard option handling behind ifdefs and add missing command…
breyerml Mar 20, 2025
36f7221
Improve documentation (comments).
breyerml Mar 20, 2025
bcf35af
Change ifdef handling.
breyerml Mar 20, 2025
7cb13c6
Remove std::exit call right before return statement.
breyerml Mar 20, 2025
a3d3c64
Fix wrong verbosity condition in logging functions.
breyerml Mar 20, 2025
a90adac
Add sanity test that we assume that at least 512 MiB of main and devi…
breyerml Mar 20, 2025
69e3992
Change default build type from RelWithDebInfo to Release in CMake pre…
breyerml Mar 20, 2025
5975fa8
Replace ifdef with if defined.
breyerml Mar 20, 2025
9dab732
Add missing exception type.
breyerml Mar 20, 2025
e781451
Move model test files to a separate directory.
breyerml Mar 20, 2025
c419485
Add missing regression report tests.
breyerml Mar 20, 2025
ee62aad
Add missing tests.
breyerml Mar 20, 2025
0bad244
Add additional executable tests.
breyerml Mar 20, 2025
8eb5093
Add some MPI related tests.
breyerml Mar 20, 2025
fa83f87
Fix compilation error.
breyerml Mar 20, 2025
438b9f1
Change SVM to C-SVM.
breyerml Mar 20, 2025
519fb9f
Add missing documentation.
breyerml Mar 20, 2025
97c9777
Fix wrong usage of jit_duration (not declared anymore).
breyerml Mar 21, 2025
c30844f
Remove unsigned types from the list of supported label types for the …
breyerml Mar 21, 2025
8abce33
Move all possible functions to the cpp file.
breyerml Mar 21, 2025
1017e39
Add missing data set constructor edge case tests.
breyerml Mar 21, 2025
e8ba395
Add assertion message check.
breyerml Mar 21, 2025
2ec4a5a
Add tests for the defaulted copy and move constructors and assignment…
breyerml Mar 21, 2025
4500343
Remove unsigned types also from possible Python bindings.
breyerml Mar 22, 2025
8da7ed8
Add additional device pointer constructor tests.
breyerml Mar 22, 2025
7696761
Add additional compiler flags for the code coverage.
breyerml Mar 22, 2025
6a51436
Update the code coverage target.
breyerml Mar 22, 2025
892bf05
Change multiplication by zero to std::memset.
breyerml Mar 22, 2025
5f0fa8d
Be sure that the mirror blas level 3 implementation is also tested.
breyerml Mar 22, 2025
ae00293
Add coverage flags to CUDA only if the build type is coverage.
breyerml Mar 22, 2025
48171ba
Use variable.
breyerml Mar 26, 2025
89537a8
Fix loop bound error in the OpenMP kernel matrix functions.
breyerml Mar 26, 2025
59d4098
Use correct verbosity conditions in logging functions and reduce code…
breyerml Mar 27, 2025
8062033
Move all environment functions back to the header and delete the cpp …
breyerml Mar 27, 2025
1459708
Fix MPI related error (loop bounds) in stdpar kernel matrix assembly …
breyerml Mar 27, 2025
81862c7
Fix MPI related error (loop bounds) in HPX kernel matrix assembly fun…
breyerml Mar 27, 2025
0697dee
Fix CMake format.
breyerml Mar 27, 2025
b1f23ab
Fix clang format.
breyerml Mar 27, 2025
37f2a09
Fix clang format.
breyerml Mar 27, 2025
2d53e12
Add missing inline specifiers.
breyerml Mar 27, 2025
7b3d8f2
Add missing std::ignore for [[nodiscard]] return.
breyerml Mar 27, 2025
df85c52
Replace EXPECT_THROW_WHAT_MATCHER with EXPECT_THROW_WHAT where possible.
breyerml Mar 27, 2025
6265179
Explicitly disable MPI during CMake configuration.
breyerml Mar 27, 2025
5307b2c
Install OpenMPI needed for mpi4py.
breyerml Mar 27, 2025
e45d22c
Explicitly enable MPI during CMake invocation.
breyerml Mar 27, 2025
2ba9388
Fix some codacy warnings.
breyerml Mar 27, 2025
acd88ac
Add missing -lgcov linker flags to CMAKE_CUDA_FLAGS.
breyerml Mar 27, 2025
d3eae2f
Fix codacy warnings.
breyerml Mar 27, 2025
aa2de9b
Add OpenCL JIT info struct tests.
breyerml Mar 27, 2025
1f7f511
If MPI is disabled, set the size() return value correctly to 1 instea…
breyerml Mar 27, 2025
d50ec31
Remove unreachable tests.
breyerml Mar 27, 2025
73e391f
Fix tests.
breyerml Mar 27, 2025
83568d7
Add missing MPI type caster header to the Python backend bindings.
breyerml Mar 27, 2025
9d339bf
Add new __has_mpi_support__ Python attribute.
breyerml Mar 27, 2025
9650bad
Fix problem where import plssvm.svm wasn't possible.
breyerml Mar 27, 2025
4b4f747
Fix clang-format error.
breyerml Mar 28, 2025
bc4d150
Force add missing test file (extension otherwise excluded via gitigno…
breyerml Mar 28, 2025
8c7dbd5
Regex should work now.
breyerml Mar 28, 2025
d69cec3
Change regex: now test less but should be compatible with MSVC.
breyerml Mar 28, 2025
e1b8332
Fix format error.
breyerml Mar 28, 2025
c188833
Bump {fmt} version to remove compiler warnings.
breyerml Mar 28, 2025
d37d535
Move GIL three lines down AFTER the call to arr.request() (which must…
breyerml Mar 28, 2025
e804454
Revert "Bump {fmt} version to remove compiler warnings."
breyerml Mar 28, 2025
cde86e0
Fix floating point inaccuracy error.
breyerml Mar 28, 2025
84b1b85
Remove SLURM_PROCID from is_executed_via_mpirun check.
breyerml Apr 17, 2025
ea77189
Merge branch 'develop' into mpi
breyerml Apr 17, 2025
4fa7919
Silence compiler warnings.
breyerml Apr 17, 2025
d127f40
Use __ACPP_USE_ACCELERATED_CPU__ instead of the old __HIPSYCL_USE_ACC…
breyerml Apr 17, 2025
e83bee1
Use new acpp namespace instead of hipsycl.
breyerml Apr 17, 2025
a0dfb59
Add ACPP_TARGETS output to performance tracker and AdaptiveCpp csvm c…
breyerml Apr 17, 2025
63131a6
Fix roc-stdpar compiler warning and error.
breyerml Apr 17, 2025
0461ff5
Add --hipstdpar-interpose-alloc flag to roc-stdpar.
breyerml Apr 17, 2025
53e0d92
nvc++ as CMAKE_CXX_COMPILER currently does not support the full label…
breyerml Apr 17, 2025
54fb22d
Fix nvc++ compiler warning.
breyerml Apr 17, 2025
e59318f
Add REQUIRED clause.
breyerml Apr 17, 2025
2eb8710
Replace wrong C with explicitly captured pointer C_ptr in the stdpar …
breyerml Apr 17, 2025
01a98a8
Remove obsolete PLSSVM_SYCL_BACKEND_DPCPP_GPU_AMD_USE_HIP option.
breyerml Apr 17, 2025
cb57eea
Remove unnecessary check.
breyerml Apr 17, 2025
9df7a56
Correctly populate the transformed ACPP_TARGETS.
breyerml Apr 18, 2025
770c72b
Per default, disable LTO support (doesn't really improve our performa…
breyerml Apr 18, 2025
d2b80f7
Bump Pybind11, {fmt}, GoogleTest, and fast float versions. Replace cu…
breyerml Apr 18, 2025
975b513
Remove unused CMake option.
breyerml Apr 18, 2025
0962ec5
Remove usage of std::exit with special exception such that the enviro…
breyerml Apr 18, 2025
32b0561
Replace std::dynamic_pointer_cast with an equivalent dynamic_cast.
breyerml Apr 18, 2025
3279538
Fix wrong compilation flags (need to escape "").
breyerml Apr 19, 2025
d29c2db
Correctly guard death test.
breyerml Apr 19, 2025
0c1d273
Add the option to switch between the SSCP and legacy compiler passes …
breyerml Apr 20, 2025
95d0cef
Add a warning output that we ignore the ACPP_TARGETS environment vari…
breyerml Apr 20, 2025
cbd732e
Fix doxygen warnings.
breyerml Apr 20, 2025
6ed2dad
Add additional warning if ACPP_TARGETS is provided via the CMake comm…
breyerml Apr 20, 2025
f7f069b
Remove check.
breyerml Apr 20, 2025
e1d7f84
AdaptiveCpp's old compilation flow does not support Intel GPUs (anymo…
breyerml Apr 20, 2025
3a6184f
Use new HWS CMake options to only enable hardware sampling of hardwar…
breyerml Apr 20, 2025
db4fb44
Undo adding REQUIRED flag.
breyerml Apr 20, 2025
5272d3f
Undo {fmt} version bump due to MSVC compiler error.
breyerml Apr 20, 2025
485461d
Always use SYCL math functions in stdpar kernels.
breyerml Apr 20, 2025
61f4ee3
Improve --hipstdpar-interpose-alloc compiler flag handling.
breyerml Apr 22, 2025
cd23002
Warn if hardware sampling is used together with the --hipstdpar-inter…
breyerml Apr 22, 2025
5a37bf1
Fix compiler warning (dim3 shadows global variable).
breyerml Apr 22, 2025
881f3d9
Improve Kokkos CUDA handling (works fine with clang CUDA, not so much…
breyerml Apr 22, 2025
d8ef279
Remove CPU support for the SYCL Kokkos execution space (can't use GPU…
breyerml Apr 22, 2025
6242afa
Fix icpx NVIDIA GPU AOT flag.
breyerml Apr 22, 2025
4218399
Fix wrong option name.
breyerml Apr 22, 2025
26cd060
Fix wrong device selection for icpx Intel GPUs.
breyerml Apr 23, 2025
7289163
Fix compiler warning.
breyerml Apr 24, 2025
55115df
Add missing hws target.
breyerml Apr 24, 2025
62840a2
Remove now unused PLSSVM_STDPAR_BACKEND_HIPSTDPAR_PATH.
breyerml Apr 24, 2025
e4d0931
Add custom install message.
breyerml Apr 24, 2025
9ed1170
Add missing variable declaration such that the stdpar cmake targets c…
breyerml Apr 24, 2025
210e5e2
Add sanity check.
breyerml Apr 24, 2025
744a501
Remove unused (wrong) variable.
breyerml Apr 24, 2025
8d1241f
Escape string.
breyerml Apr 24, 2025
1459a32
Improve install handling.
breyerml Apr 24, 2025
e45e65d
Add additional output shown in a find_package call.
breyerml Apr 24, 2025
95d0303
Correctly handle the QUIET modifier in the PLSSVM cmake package.
breyerml Apr 24, 2025
bed1249
Update example CMakeLists.
breyerml Apr 25, 2025
187f595
Change SYCL library names.
breyerml Apr 25, 2025
6321480
Update CMake install handling.
breyerml Apr 25, 2025
0e31f90
Improve HIP install handling.
breyerml Apr 25, 2025
c874b26
Silence Python regex escape warning.
breyerml Apr 25, 2025
d333fac
Fix CMake format.
breyerml Apr 25, 2025
e33aede
Fix clang format.
breyerml Apr 25, 2025
f3e8962
Remove now obsolete hws version output.
breyerml Apr 25, 2025
d74dd16
Fix a Python install problem.
breyerml Apr 25, 2025
b801a78
Try setting TMPDIR explicitly.
breyerml Apr 26, 2025
53f298c
Move fast_float usage to a separate library that always disables fast…
breyerml Apr 26, 2025
0bc95c1
Try increasing {fmt} version to silence GCC compiler warning.
breyerml Apr 26, 2025
8b3d43f
Update library versions.
breyerml Apr 26, 2025
aaf540a
Silence false positive clang warnings.
breyerml Apr 26, 2025
9e94681
Fix wrong compiler name NVHPC -> IntelLLVM.
breyerml Apr 26, 2025
aa3fc76
Improve icpx compiler flag handling.
breyerml Apr 26, 2025
98bd325
Escape semicolons before appending to list.
breyerml Apr 26, 2025
9a2af74
Add missing compiler flags to the fast_float wrapper library.
breyerml Apr 27, 2025
aeae32f
Add missing ${}.
breyerml Apr 27, 2025
8656fc8
Fix CMake format.
breyerml Apr 27, 2025
fc8647c
Fix clang format.
breyerml Apr 27, 2025
c4075c1
Per default, disable multi-GPU support for the Kokkos::SYCL execution…
breyerml Apr 28, 2025
99263e4
Update HIP HIP_PLATFORM logic to support more cases.
breyerml Apr 28, 2025
e4e9008
Improve output.
breyerml Apr 29, 2025
fafe7a4
Bump hws version after new release.
breyerml Apr 29, 2025
97be9a8
Fix CMake format.
breyerml Apr 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ IncludeCategories:
Priority: 2
- Regex: '^"(tests|bindings)/'
Priority: 3
- Regex: '^"(fmt|igor|fast_float|cxxopts|gtest|gmock|pybind|nvml|rocm_smi|level_zero|subprocess)'
- Regex: '^"(fmt|igor|fast_float|cxxopts|gtest|gmock|pybind|boost|mpi)'
Priority: 4
- Regex: '^.*'
Priority: 5
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/clang_gcc_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
- name: "Install Compiler"
run: |
sudo apt install g++ clang libomp-dev
- name: "Install MPI"
run: |
sudo apt install libopenmpi-dev
- name: "Install cmake 3.31.0"
uses: lukka/get-cmake@v3.31.0
- name: "Clone the PLSSVM repository into PLSSVM/"
Expand All @@ -34,7 +37,7 @@ jobs:
- name: "Configure PLSSVM using CMake"
run: |
cd PLSSVM
cmake --preset openmp_test -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DPLSSVM_TARGET_PLATFORMS="cpu" -DPLSSVM_ENABLE_LANGUAGE_BINDINGS=ON -DPLSSVM_ENABLE_PERFORMANCE_TRACKING=ON -DPLSSVM_TEST_FILE_NUM_DATA_POINTS=50 -DPLSSVM_TEST_FILE_NUM_FEATURES=20 -DPLSSVM_ENABLE_LTO=OFF
cmake --preset openmp_test -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DPLSSVM_TARGET_PLATFORMS="cpu" -DPLSSVM_ENABLE_LANGUAGE_BINDINGS=ON -DPLSSVM_ENABLE_PERFORMANCE_TRACKING=ON -DPLSSVM_ENABLE_MPI=ON -DPLSSVM_TEST_FILE_NUM_DATA_POINTS=50 -DPLSSVM_TEST_FILE_NUM_FEATURES=20 -DPLSSVM_ENABLE_LTO=OFF
- name: "Build PLSSVM"
run: |
cd PLSSVM
Expand All @@ -43,4 +46,6 @@ jobs:
- name: "Run tests"
run: |
cd PLSSVM
mkdir tmp
export TMPDIR=$PWD/tmp
ctest --preset openmp_test -C ${{ matrix.build_type }} --parallel 2
2 changes: 1 addition & 1 deletion .github/workflows/clang_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
cd PLSSVM
export LDFLAGS="-L/opt/homebrew/opt/libomp/lib"
export CPPFLAGS="-I/opt/homebrew/opt/libomp/include"
cmake --preset openmp_test -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DPLSSVM_TARGET_PLATFORMS="cpu" -DPLSSVM_ENABLE_LANGUAGE_BINDINGS=ON -DPLSSVM_ENABLE_PERFORMANCE_TRACKING=ON -DPLSSVM_TEST_FILE_NUM_DATA_POINTS=50 -DPLSSVM_TEST_FILE_NUM_FEATURES=20 -DPLSSVM_ENABLE_LTO=OFF
cmake --preset openmp_test -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DPLSSVM_TARGET_PLATFORMS="cpu" -DPLSSVM_ENABLE_LANGUAGE_BINDINGS=ON -DPLSSVM_ENABLE_PERFORMANCE_TRACKING=ON -DPLSSVM_ENABLE_MPI=OFF -DPLSSVM_TEST_FILE_NUM_DATA_POINTS=50 -DPLSSVM_TEST_FILE_NUM_FEATURES=20 -DPLSSVM_ENABLE_LTO=OFF
- name: "Build PLSSVM"
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/msvc_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: "Configure PLSSVM using CMake"
run: |
cd PLSSVM
cmake --preset openmp_test -DCMAKE_CONFIGURATION_TYPES=${{ matrix.build_type }} -DPLSSVM_TARGET_PLATFORMS="cpu" -DPLSSVM_ENABLE_LANGUAGE_BINDINGS=ON -DPLSSVM_ENABLE_PERFORMANCE_TRACKING=ON -DPLSSVM_TEST_FILE_NUM_DATA_POINTS=50 -DPLSSVM_TEST_FILE_NUM_FEATURES=20
cmake --preset openmp_test -DCMAKE_CONFIGURATION_TYPES=${{ matrix.build_type }} -DPLSSVM_TARGET_PLATFORMS="cpu" -DPLSSVM_ENABLE_LANGUAGE_BINDINGS=ON -DPLSSVM_ENABLE_PERFORMANCE_TRACKING=ON -DPLSSVM_ENABLE_MPI=OFF -DPLSSVM_TEST_FILE_NUM_DATA_POINTS=50 -DPLSSVM_TEST_FILE_NUM_FEATURES=20
- name: "Build PLSSVM"
shell: bash
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
- name: "Install new g++"
run: |
sudo apt install g++
- name: "Install MPI (necessary for mpi4py)"
run: |
sudo apt install libopenmpi-dev
- name: "Clone the PLSSVM repository into PLSSVM/"
uses: actions/checkout@v4.1.1
with:
Expand Down
157 changes: 129 additions & 28 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,23 @@ set(PLSSVM_BASE_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/backends/SYCL/kernel_invocation_types.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/backends/stdpar/implementation_types.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/backends/execution_range.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/data_set/min_max_scaler.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/detail/cmd/parser_predict.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/detail/cmd/parser_scale.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/detail/cmd/parser_train.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/detail/io/file_reader.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/detail/data_distribution.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/detail/memory_size.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/detail/sha256.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/detail/string_conversion.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/detail/string_utility.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/detail/utility.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/exceptions/exceptions.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/exceptions/source_location.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/mpi/detail/information.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/mpi/detail/utility.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/mpi/detail/version.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/mpi/communicator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/mpi/environment.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/svm/csvm.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/version/version.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/version/git_metadata/git_metadata.cpp
Expand Down Expand Up @@ -233,6 +239,38 @@ else ()
message(WARNING "Couldn't find OpenMP. Note that in a multi-GPU setting this will result in serialized kernel calls across all GPUs!")
endif ()

########################################################################################################################
# check for MPI (optional) ##
########################################################################################################################
# check for MPI
set(PLSSVM_ENABLE_MPI AUTO CACHE STRING "Enable distributed memory support via MPI")
set_property(CACHE PLSSVM_ENABLE_MPI PROPERTY STRINGS AUTO ON OFF)
if (PLSSVM_ENABLE_MPI MATCHES "AUTO" OR PLSSVM_ENABLE_MPI)
list(APPEND CMAKE_MESSAGE_INDENT "MPI: ")
message(CHECK_START "Checking for MPI")

# try finding MPI
find_package(MPI)

if (MPI_FOUND)
# MPI found
message(CHECK_PASS "found ")

message(STATUS "Found MPI ${MPI_CXX_VERSION} for distributed memory support.")
set(PLSSVM_FOUND_MPI ON)
target_link_libraries(${PLSSVM_BASE_LIBRARY_NAME} PUBLIC MPI::MPI_CXX)
target_compile_definitions(${PLSSVM_BASE_LIBRARY_NAME} PUBLIC PLSSVM_HAS_MPI_ENABLED)
else ()
# MPI not found
message(CHECK_FAIL "not found")
if (PLSSVM_ENABLE_MPI MATCHES "ON")
message(SEND_ERROR "Cannot find requested MPI!")
endif ()
endif ()

list(POP_BACK CMAKE_MESSAGE_INDENT)
endif ()

########################################################################################################################
# create executables #
########################################################################################################################
Expand Down Expand Up @@ -260,6 +298,7 @@ list(
########################################################################################################################
# coverage analysis only possible with the Coverage CMAKE_BUILD_TYPE
if (uppercase_CMAKE_BUILD_TYPE MATCHES COVERAGE)
list(APPEND CMAKE_MESSAGE_INDENT "coverage: ")
# must be linux
if (WIN32 OR APPLE)
message(FATAL_ERROR "Only Linux is supported for the coverage analysis.")
Expand All @@ -268,31 +307,61 @@ if (uppercase_CMAKE_BUILD_TYPE MATCHES COVERAGE)
if (NOT CMAKE_CXX_COMPILER_ID MATCHES "GNU")
message(FATAL_ERROR "Only GCC is supported for the coverage analysis.")
endif ()
message(STATUS "Enable code coverage analysis using lcov and genhtml.")

# tests must be available for a coverage analysis
message(STATUS "Enabling tests since they are necessary for the coverage analysis.")
set(PLSSVM_ENABLE_TESTING ON CACHE BOOL "" FORCE)
# disable fast-math like it should be in the normal tests
message(STATUS "Disabling fast-math for the tests.")
set(PLSSVM_ENABLE_FAST_MATH OFF CACHE BOOL "" FORCE)
# assertions must be available for a coverage analysis
message(STATUS "Enabling assertions since they are necessary for the coverage analysis.")
set(PLSSVM_ENABLE_ASSERTS ON CACHE BOOL "" FORCE)
# LTO must be disabled for a coverage analysis
message(STATUS "Disabling LTO since it may interfere with the coverage analysis.")
set(PLSSVM_ENABLE_LTO OFF CACHE BOOL "" FORCE)

# also enable code coverage for nvcc
set(CMAKE_CUDA_FLAGS "-Xcompiler '-O0 -g --coverage -lgcov'")

# check that the necessary executables are available
find_program(PLSSVM_LCOV lcov REQUIRED)
find_program(PLSSVM_GENHTML genhtml REQUIRED)
find_program(PLSSVM_CPPFILT c++filt)
if (PLSSVM_CPPFILT)
set(PLSSVM_DEMANGLE_USING_CPPFILT --demangle-cpp)
endif ()

message(STATUS "Enable code coverage analysis using lcov.")

# Create the coverage target. Run coverage tests with 'make coverage'
# Create the coverage target. Run coverage tests with 'ctest --build . --target coverage'
set(PLSSVM_COVERAGE_REPORT_OUTPUT_DIRECTORY "coverage_report")
add_custom_target(
coverage
COMMAND lcov --zerocounters --directory .
COMMAND lcov --capture -d . --initial --output-file test_base.info
COMMAND mkdir -p coverage
COMMAND ${CMAKE_MAKE_PROGRAM} test || true
COMMAND lcov --capture -d . --output-file test_test.info
COMMAND lcov --add-tracefile test_base.info --add-tracefile test_test.info -o test_total.info
COMMAND lcov --remove test_total.info '/usr/*' '*/build/*' '*/tests/*' '*/_deps/*' -o test_clean.info
COMMAND genhtml test_clean.info --output-directory coverage --title "PLSSVM Test Coverage" --show-details --legend
BYPRODUCTS ${CMAKE_BINARY_DIR}/test_base.info
${CMAKE_BINARY_DIR}/test_test.info
${CMAKE_BINARY_DIR}/test_total.info
${CMAKE_BINARY_DIR}/test_clean.info
${CMAKE_BINARY_DIR}/coverage
COMMENT "Running tests and generating coverage report..."
# Cleanup previous coverage data
COMMAND ${PLSSVM_LCOV} --directory . --zerocounters
COMMAND ${CMAKE_COMMAND} -E remove -f coverage.info coverage_init.info coverage_tests.info "${PLSSVM_COVERAGE_REPORT_OUTPUT_DIRECTORY}"
# Capture initial zero coverage baseline (useful for untouched files)
COMMAND ${PLSSVM_LCOV} --directory . --capture --initial --rc geninfo_unexecuted_blocks=1 --include '*/PLSSVM/src/*' --include '*/PLSSVM/include/*'
--output-file coverage_init.info
# Be sure the output directory exists
COMMAND mkdir -p "${PLSSVM_COVERAGE_REPORT_OUTPUT_DIRECTORY}"
# Run tests
COMMAND ${CMAKE_CTEST_COMMAND} --parallel 8 || true
# Capture coverage info
COMMAND ${PLSSVM_LCOV} --directory . --capture --rc geninfo_unexecuted_blocks=1 --include '*/PLSSVM/src/*' --include '*/PLSSVM/include/*' --output-file
coverage_tests.info
# Combine coverage files (in case of multiple test runs)
COMMAND ${PLSSVM_LCOV} --add-tracefile coverage_init.info --add-tracefile coverage_tests.info --output-file coverage.info
# Generate HTML report
COMMAND ${PLSSVM_GENHTML} coverage.info --output-directory "${PLSSVM_COVERAGE_REPORT_OUTPUT_DIRECTORY}" --title "PLSSVM Test Coverage" --show-details
--legend --frames ${PLSSVM_DEMANGLE_USING_CPPFILT}
# Summary message
COMMAND ${CMAKE_COMMAND} -E echo "Coverage report generated in: ${CMAKE_BINARY_DIR}/${PLSSVM_COVERAGE_REPORT_OUTPUT_DIRECTORY}"
# Specify byproducts for CMake
BYPRODUCTS "${CMAKE_BINARY_DIR}/coverage_init.info" "${CMAKE_BINARY_DIR}/coverage_tests.info" "${CMAKE_BINARY_DIR}/coverage.info"
"${CMAKE_BINARY_DIR}/${PLSSVM_COVERAGE_REPORT_OUTPUT_DIRECTORY}"
# Set the working directory
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)

Expand All @@ -307,8 +376,10 @@ if (uppercase_CMAKE_BUILD_TYPE MATCHES COVERAGE)
DEPENDS clean
COMMENT "remove all coverage files"
COMMAND ${CMAKE_MAKE_PROGRAM} clean
COMMAND ${CMAKE_COMMAND} -E remove -f coverage.info coverage_init.info coverage_tests.info ${PLSSVM_COVERAGE_REPORT_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/delete_coverage_files.cmake" TARGET clean_coverage
)
list(POP_BACK CMAKE_MESSAGE_INDENT)
endif ()

########################################################################################################################
Expand Down Expand Up @@ -544,7 +615,7 @@ endif ()
# check for Link Time Optimization #
########################################################################################################################
# enable Link Time Optimization (LTO)
option(PLSSVM_ENABLE_LTO "Enable Link Time Optimizations." ON)
option(PLSSVM_ENABLE_LTO "Enable Link Time Optimizations." OFF)
if (PLSSVM_ENABLE_LTO)
include(CheckIPOSupported)
check_ipo_supported(RESULT PLSSVM_LTO_SUPPORTED LANGUAGES CXX)
Expand Down Expand Up @@ -590,15 +661,19 @@ else ()
target_include_directories(${PLSSVM_BASE_LIBRARY_NAME} PUBLIC $<BUILD_INTERFACE:${cxxopts_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
endif ()

# try finding fast_float
set(PLSSVM_fast_float_VERSION v6.1.3)
find_package(fast_float QUIET)
# ~~~
# try finding fast_float note: We have to wrap fast_float into a small wrapper library to ensure that fast-math is never enabled.
# Otherwise, the fast_float usage of std::numeric_limits<>::infinity() results in UB...
# ~~~
set(PLSSVM_FAST_FLOAT_WRAPPER_LIBRARY_NAME plssvm-fast_float-wrapper)
add_library(${PLSSVM_FAST_FLOAT_WRAPPER_LIBRARY_NAME} SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/plssvm/detail/fast_float_wrapper.cpp)
set(PLSSVM_fast_float_VERSION v8.0.2)
find_package(fast_float 8.0.0 QUIET)
if (fast_float_FOUND)
message(STATUS "Found package fast_float.")
target_include_directories(${PLSSVM_BASE_LIBRARY_NAME} PUBLIC ${fast_float_INCLUDE_DIR})
target_include_directories(${PLSSVM_FAST_FLOAT_WRAPPER_LIBRARY_NAME} PUBLIC ${fast_float_INCLUDE_DIR})
else ()
message(STATUS "Couldn't find package fast_float. Building version ${PLSSVM_fast_float_VERSION} from source.")
target_compile_definitions(${PLSSVM_BASE_LIBRARY_NAME} PRIVATE PLSSVM_fast_float_VERSION="${PLSSVM_fast_float_VERSION}")
# set options for fast_float
set(FASTFLOAT_TEST OFF CACHE INTERNAL "" FORCE)
set(FASTFLOAT_SANITIZE OFF CACHE INTERNAL "" FORCE)
Expand All @@ -610,9 +685,26 @@ else ()
QUIET
)
FetchContent_MakeAvailable(fast_float)
add_dependencies(${PLSSVM_BASE_LIBRARY_NAME} fast_float)
target_include_directories(${PLSSVM_BASE_LIBRARY_NAME} PUBLIC $<BUILD_INTERFACE:${fast_float_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
add_dependencies(${PLSSVM_FAST_FLOAT_WRAPPER_LIBRARY_NAME} fast_float)
target_include_directories(
${PLSSVM_FAST_FLOAT_WRAPPER_LIBRARY_NAME} PUBLIC $<BUILD_INTERFACE:${fast_float_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>
)
endif ()
# ensure that fast-math is ALWAYS of
target_compile_options(
${PLSSVM_FAST_FLOAT_WRAPPER_LIBRARY_NAME} PRIVATE $<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,IntelLLVM>:-fno-fast-math>
$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/fp:precise>
)
target_include_directories(
${PLSSVM_FAST_FLOAT_WRAPPER_LIBRARY_NAME} PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>
)
target_compile_features(${PLSSVM_FAST_FLOAT_WRAPPER_LIBRARY_NAME} PUBLIC cxx_std_17)
if (PLSSVM_ENABLE_STL_DEBUG_MODE)
target_compile_definitions(${PLSSVM_FAST_FLOAT_WRAPPER_LIBRARY_NAME} PUBLIC ${PLSSVM_STL_DEBUG_MODE_FLAGS})
endif ()
# link wrapper library against base library
target_link_libraries(${PLSSVM_BASE_LIBRARY_NAME} PUBLIC ${PLSSVM_FAST_FLOAT_WRAPPER_LIBRARY_NAME})
list(APPEND PLSSVM_TARGETS_TO_INSTALL "${PLSSVM_FAST_FLOAT_WRAPPER_LIBRARY_NAME}")

# try finding igor
set(PLSSVM_igor_VERSION a5224c60d266974d3f407191583fe266cbe1c93d)
Expand Down Expand Up @@ -881,7 +973,7 @@ write_basic_package_version_file(
COMPATIBILITY SameMajorVersion
)

# generate configuration file
# generate configuration files
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmConfig.cmake.in" "${PROJECT_BINARY_DIR}/plssvmConfig.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/plssvm/cmake
Expand All @@ -890,6 +982,15 @@ configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmHIPTargets.cmake.in" "${PROJECT_BINARY_DIR}/plssvmHIPTargets.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/plssvm/cmake
)
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmAdaptiveCppTargets.cmake.in" "${PROJECT_BINARY_DIR}/plssvmAdaptiveCppTargets.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/plssvm/cmake
)
string(REPLACE "\"" "\\\"" PLSSVM_ESCAPED_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # necessary to correctly escape quotes
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmstdparTargets.cmake.in" "${PROJECT_BINARY_DIR}/plssvmstdparTargets.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/plssvm/cmake
)

# create and copy install-targets file
install(
Expand All @@ -908,9 +1009,9 @@ install(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmOpenCLTargets.cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmOpenMPTargets.cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmHPXTargets.cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmAdaptiveCppTargets.cmake"
"${PROJECT_BINARY_DIR}/plssvmAdaptiveCppTargets.cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmDPCPPTargets.cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmKokkosTargets.cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/plssvm/plssvmstdparTargets.cmake"
"${PROJECT_BINARY_DIR}/plssvmstdparTargets.cmake"
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/plssvm/cmake
)
1 change: 1 addition & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"cmake/presets/opencl.json",
"cmake/presets/acpp.json",
"cmake/presets/dpcpp.json",
"cmake/presets/icpx.json",
"cmake/presets/kokkos.json",
"cmake/presets/all.json"
]
Expand Down
Loading
Loading