Skip to content

Commit a45885d

Browse files
committed
# Conflicts: # scripts/run_mpi.sh # scripts/run_perf_collector.sh
2 parents 6d67295 + 9eafe5d commit a45885d

File tree

91 files changed

+3435
-1132
lines changed

Some content is hidden

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

91 files changed

+3435
-1132
lines changed

Diff for: .clang-tidy

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Checks: >
1414
-bugprone-narrowing-conversions,
1515
-clang-analyzer-optin.cplusplus.UninitializedObject,
1616
-misc-const-correctness,
17+
-misc-header-include-cycle,
1718
-misc-include-cleaner,
1819
-misc-no-recursion,
1920
-misc-non-private-member-variables-in-classes,

Diff for: .github/labeler.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'task:all':
2+
- "tasks/all/**"
13
'task:mpi':
24
- "tasks/mpi/**"
35
'task:omp':

Diff for: .github/workflows/main.yml

+75-21
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
sudo apt-get update
4545
sudo apt-get install gcc-13 g++-13
4646
sudo apt-get install ninja-build
47-
sudo apt-get install mpich libmpich* mpi* openmpi-bin
47+
sudo apt-get install mpich
4848
sudo apt-get install libomp-dev
4949
sudo apt-get install valgrind
5050
python3 -m pip install xlsxwriter
@@ -69,21 +69,30 @@ jobs:
6969
env:
7070
CC: gcc-13
7171
CXX: g++-13
72+
- name: Run func tests (MPI, num_proc=1)
73+
run: |
74+
source scripts/run_mpi.sh
75+
env:
76+
PROC_COUNT: 1
77+
OMP_NUM_THREADS: 3
7278
- name: Run func tests (MPI, num_proc=2)
7379
run: |
7480
source scripts/run_mpi.sh
7581
env:
7682
PROC_COUNT: 2
83+
OMP_NUM_THREADS: 2
7784
- name: Run func tests (MPI, num_proc=3)
7885
run: |
7986
source scripts/run_mpi.sh
8087
env:
8188
PROC_COUNT: 3
89+
OMP_NUM_THREADS: 1
8290
- name: Run func tests (MPI, num_proc=4)
8391
run: |
8492
source scripts/run_mpi.sh
8593
env:
8694
PROC_COUNT: 4
95+
OMP_NUM_THREADS: 1
8796
- name: Run func tests (threads, num_threads=1)
8897
run: source scripts/run_threads.sh
8998
env:
@@ -114,7 +123,7 @@ jobs:
114123
sudo apt-get update
115124
sudo apt-get install gcc-13 g++-13
116125
sudo apt-get install ninja-build
117-
sudo apt-get install mpich libmpich* mpi* openmpi-bin
126+
sudo apt-get install mpich
118127
sudo apt-get install libomp-dev
119128
sudo apt-get install valgrind
120129
python3 -m pip install xlsxwriter
@@ -185,7 +194,7 @@ jobs:
185194
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
186195
sudo apt-get update
187196
sudo apt-get install ninja-build
188-
sudo apt-get install mpich libmpich* mpi* openmpi-bin
197+
sudo apt-get install mpich
189198
sudo apt-get install python3-pip
190199
sudo apt-get install valgrind
191200
wget https://apt.llvm.org/llvm.sh
@@ -211,21 +220,30 @@ jobs:
211220
env:
212221
CC: clang-19
213222
CXX: clang++-19
223+
- name: Run func tests (MPI, num_proc=1)
224+
run: |
225+
source scripts/run_mpi.sh
226+
env:
227+
PROC_COUNT: 1
228+
OMP_NUM_THREADS: 3
214229
- name: Run func tests (MPI, num_proc=2)
215230
run: |
216231
source scripts/run_mpi.sh
217232
env:
218233
PROC_COUNT: 2
234+
OMP_NUM_THREADS: 2
219235
- name: Run func tests (MPI, num_proc=3)
220236
run: |
221237
source scripts/run_mpi.sh
222238
env:
223239
PROC_COUNT: 3
240+
OMP_NUM_THREADS: 1
224241
- name: Run func tests (MPI, num_proc=4)
225242
run: |
226243
source scripts/run_mpi.sh
227244
env:
228245
PROC_COUNT: 4
246+
OMP_NUM_THREADS: 1
229247
- name: Run tests (threads, num_threads=1)
230248
run: source scripts/run_threads.sh
231249
env:
@@ -255,7 +273,7 @@ jobs:
255273
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
256274
sudo apt-get update
257275
sudo apt-get install ninja-build
258-
sudo apt-get install mpich libmpich* mpi* openmpi-bin
276+
sudo apt-get install mpich
259277
sudo apt-get install python3-pip
260278
sudo apt-get install valgrind
261279
wget https://apt.llvm.org/llvm.sh
@@ -355,9 +373,10 @@ jobs:
355373
- name: Run tests (MPI)
356374
run: |
357375
export ASAN_RUN=1
358-
source scripts/run_mpi.sh
376+
source scripts/run_mpi.sh "--oversubscribe"
359377
env:
360378
PROC_COUNT: 2
379+
OMP_NUM_THREADS: 2
361380
- name: Run tests (threads, num_threads=1)
362381
run: source scripts/run_threads.sh
363382
env:
@@ -489,21 +508,30 @@ jobs:
489508
- name: Ninja build
490509
run: |
491510
cmake --build build
511+
- name: Run func tests (MPI, num_proc=1)
512+
run: |
513+
source scripts/run_mpi.sh
514+
env:
515+
PROC_COUNT: 1
516+
OMP_NUM_THREADS: 3
492517
- name: Run func tests (MPI, num_proc=2)
493518
run: |
494519
source scripts/run_mpi.sh
495520
env:
496521
PROC_COUNT: 2
522+
OMP_NUM_THREADS: 2
497523
- name: Run func tests (MPI, num_proc=3)
498524
run: |
499525
source scripts/run_mpi.sh
500526
env:
501527
PROC_COUNT: 3
528+
OMP_NUM_THREADS: 1
502529
- name: Run func tests (MPI, num_proc=4)
503530
run: |
504531
source scripts/run_mpi.sh
505532
env:
506533
PROC_COUNT: 4
534+
OMP_NUM_THREADS: 1
507535
- name: Run tests (threads, num_threads=1)
508536
run: source scripts/run_threads.sh
509537
env:
@@ -596,7 +624,9 @@ jobs:
596624
with:
597625
submodules: recursive
598626
- name: Add msbuild to PATH
599-
uses: microsoft/[email protected]
627+
uses: microsoft/setup-msbuild@v2
628+
with:
629+
vs-version: 'latest'
600630
- name: Setup MPI
601631
uses: mpi4py/setup-mpi@v1
602632
with:
@@ -608,10 +638,14 @@ jobs:
608638
uses: Chocobo1/setup-ccache-action@v1
609639
with:
610640
windows_compile_environment: msvc
641+
- name: Setup ninja
642+
uses: seanmiddleditch/gha-setup-ninja@master
643+
- name: Setup MSVC for Ninja again
644+
uses: ilammy/msvc-dev-cmd@v1
611645
- name: CMake configure
612646
shell: bash
613647
run: >
614-
cmake -S . -B build
648+
cmake -S . -B build -G Ninja -D CMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl
615649
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
616650
-D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STL=ON
617651
-D USE_FUNC_TESTS=ON -D USE_PERF_TESTS=ON
@@ -648,7 +682,9 @@ jobs:
648682
with:
649683
submodules: recursive
650684
- name: Add msbuild to PATH
651-
uses: microsoft/[email protected]
685+
uses: microsoft/setup-msbuild@v2
686+
with:
687+
vs-version: 'latest'
652688
- name: Setup MPI
653689
uses: mpi4py/setup-mpi@v1
654690
with:
@@ -660,10 +696,14 @@ jobs:
660696
uses: Chocobo1/setup-ccache-action@v1
661697
with:
662698
windows_compile_environment: msvc
699+
- name: Setup ninja
700+
uses: seanmiddleditch/gha-setup-ninja@master
701+
- name: Setup MSVC for Ninja again
702+
uses: ilammy/msvc-dev-cmd@v1
663703
- name: CMake configure
664704
shell: bash
665705
run: >
666-
cmake -S . -B build
706+
cmake -S . -B build -G Ninja -D CMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl
667707
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
668708
-D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STL=ON
669709
-D USE_FUNC_TESTS=ON -D USE_PERF_TESTS=ON
@@ -717,10 +757,16 @@ jobs:
717757
with:
718758
submodules: recursive
719759
- name: Add msbuild to PATH
720-
uses: microsoft/[email protected]
760+
uses: microsoft/setup-msbuild@v2
761+
with:
762+
vs-version: 'latest'
763+
- name: Setup ninja
764+
uses: seanmiddleditch/gha-setup-ninja@master
765+
- name: Setup MSVC for Ninja again
766+
uses: ilammy/msvc-dev-cmd@v1
721767
- name: CMake configure
722768
run: >
723-
cmake -S . -B build -A x64 -T ClangCL
769+
cmake -S . -B build -GNinja -D CMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
724770
-D USE_SEQ=ON -D USE_MPI=OFF -D USE_OMP=OFF -D USE_TBB=ON -D USE_STL=ON
725771
-D USE_FUNC_TESTS=ON -D USE_PERF_TESTS=ON
726772
-D CMAKE_BUILD_TYPE=RELEASE
@@ -765,10 +811,16 @@ jobs:
765811
with:
766812
submodules: recursive
767813
- name: Add msbuild to PATH
768-
uses: microsoft/[email protected]
814+
uses: microsoft/setup-msbuild@v2
815+
with:
816+
vs-version: 'latest'
817+
- name: Setup ninja
818+
uses: seanmiddleditch/gha-setup-ninja@master
819+
- name: Setup MSVC for Ninja again
820+
uses: ilammy/msvc-dev-cmd@v1
769821
- name: CMake configure
770822
run: >
771-
cmake -S . -B build -A x64 -T ClangCL
823+
cmake -S . -B build -GNinja -D CMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
772824
-D USE_SEQ=ON -D USE_MPI=OFF -D USE_OMP=OFF -D USE_TBB=ON -D USE_STL=ON
773825
-D USE_FUNC_TESTS=ON -D USE_PERF_TESTS=ON
774826
-D CMAKE_BUILD_TYPE=RELEASE
@@ -823,7 +875,9 @@ jobs:
823875
CLANG_BUILD: 1
824876
ubuntu-gcc-build-codecov:
825877
needs:
826-
- ubuntu-gcc-build
878+
- ubuntu-gcc-build-extended
879+
- ubuntu-clang-build-extended
880+
- macos-clang-build-extended
827881
runs-on: ubuntu-latest
828882
steps:
829883
- uses: actions/checkout@v4
@@ -834,7 +888,7 @@ jobs:
834888
sudo apt-get update
835889
sudo apt-get install gcc g++
836890
sudo apt-get install ninja-build
837-
sudo apt-get install mpich libmpich* mpi* openmpi-bin
891+
sudo apt-get install mpich
838892
sudo apt-get install libomp-dev
839893
sudo apt-get install valgrind
840894
sudo apt-get install gcovr lcov
@@ -854,6 +908,7 @@ jobs:
854908
source scripts/run_mpi.sh
855909
env:
856910
PROC_COUNT: 2
911+
OMP_NUM_THREADS: 2
857912
- name: Run tests (threads, num_threads=1)
858913
run: source scripts/run_threads.sh
859914
env:
@@ -883,7 +938,7 @@ jobs:
883938
run: |
884939
cd build
885940
lcov --capture --directory . --output-file ../coverage.info
886-
lcov --remove ../coverage.info '*/3rdparty/*' '/usr/*' '*/perf_tests/*' '*/func_tests/*' --output-file ../coverage.info
941+
lcov --remove ../coverage.info '*/3rdparty/*' '/usr/*' '*/perf_tests/*' '*/func_tests/*' '*/all/runner.cpp' '*/mpi/runner.cpp' '*/omp/runner.cpp' '*/seq/runner.cpp' '*/stl/runner.cpp' '*/tbb/runner.cpp' --output-file ../coverage.info
887942
cd ..
888943
genhtml coverage.info --output-directory cov-report
889944
- name: Upload coverage report artifact
@@ -893,11 +948,10 @@ jobs:
893948
path: 'cov-report'
894949
ubuntu-gcc-build-perf-stats:
895950
needs:
896-
- macos-clang-build
897-
- ubuntu-clang-sanitizer-build
898951
- ubuntu-gcc-build-codecov
899-
- windows-clang-build
900-
- windows-msvc-build
952+
- ubuntu-clang-sanitizer-build-extended
953+
- windows-clang-build-extended
954+
- windows-msvc-build-extended
901955
runs-on: ubuntu-latest
902956
steps:
903957
- uses: actions/checkout@v4
@@ -909,7 +963,7 @@ jobs:
909963
sudo apt-get update
910964
sudo apt-get install gcc-12 g++-12
911965
sudo apt-get install ninja-build
912-
sudo apt-get install mpich libmpich* mpi* openmpi-bin
966+
sudo apt-get install mpich
913967
sudo apt-get install libomp-dev
914968
sudo apt-get install valgrind
915969
python3 -m pip install xlsxwriter

Diff for: CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ endif( USE_MPI )
2323

2424
############################### OpenMP ##############################
2525
option(USE_OMP OFF)
26-
if( USE_OMP OR USE_SEQ )
26+
if( USE_OMP )
2727
find_package( OpenMP )
2828
if( OpenMP_FOUND )
2929
include_directories( ${OpenMP_C_INCLUDE_DIRS} ${OpenMP_CXX_INCLUDE_DIRS} )
@@ -43,7 +43,7 @@ if( USE_OMP OR USE_SEQ )
4343
message(FATAL_ERROR "OpenMP NOT FOUND")
4444
endif()
4545
endif( OpenMP_FOUND )
46-
endif( USE_OMP OR USE_SEQ )
46+
endif( USE_OMP )
4747

4848
############################ std::thread ############################
4949
option(USE_STL OFF)

Diff for: cmake/boost.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ ExternalProject_Add(ppc_boost
1313
CONFIGURE_COMMAND "${CMAKE_COMMAND}" -S "${CMAKE_SOURCE_DIR}/3rdparty/boost/" -B "${CMAKE_CURRENT_BINARY_DIR}/ppc_boost/build/"
1414
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -G${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBOOST_ENABLE_MPI=ON
1515
-D MPI_INCLUDE_PATH=${MPI_INCLUDE_PATH} -D MPI_LIBRARIES=${MPI_LIBRARIES} -D MPI_COMPILE_FLAGS=${MPI_COMPILE_FLAGS} -D MPI_LINK_FLAGS=${MPI_LINK_FLAGS}
16-
BUILD_COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/ppc_boost/build" --config ${CMAKE_BUILD_TYPE}
16+
BUILD_COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/ppc_boost/build" --config ${CMAKE_BUILD_TYPE} --parallel
1717
INSTALL_COMMAND "${CMAKE_COMMAND}" --install "${CMAKE_CURRENT_BINARY_DIR}/ppc_boost/build" --prefix "${CMAKE_CURRENT_BINARY_DIR}/ppc_boost/install"
1818
TEST_COMMAND "")

Diff for: cmake/configure.cmake

+13-3
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,21 @@ set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" )
2121
set( CMAKE_CXX_STANDARD 20 )
2222

2323
if( UNIX )
24-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -Wno-cast-function-type -Wsign-compare -Werror")
25-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter -Wno-cast-function-type -Wsign-compare -Werror")
24+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \
25+
-Wall -Wextra \
26+
-Wno-unused-parameter \
27+
-Wno-cast-function-type \
28+
-Wsign-compare -Werror")
29+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
30+
-Wall -Wextra \
31+
-Wno-unused-parameter \
32+
-Wno-cast-function-type \
33+
-Wsign-compare -Werror")
2634
if (USE_COVERAGE)
2735
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
2836
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
2937
endif(USE_COVERAGE)
30-
endif( UNIX )
38+
endif()
3139

3240
if( MSVC )
3341
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
@@ -39,6 +47,8 @@ if( MSVC )
3947
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /wd4267 /wd4244 /wd4100 /WX" )
4048
endif( MSVC )
4149

50+
add_compile_definitions(PPC_PATH_TO_PROJECT="${CMAKE_CURRENT_SOURCE_DIR}")
51+
4252
MACRO(SUBDIRLIST result curdir)
4353
FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
4454
SET(dirlist "")

Diff for: cmake/gtest.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ ExternalProject_Add(ppc_googletest
88
INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/ppc_googletest/install"
99
CONFIGURE_COMMAND "${CMAKE_COMMAND}" -S "${CMAKE_SOURCE_DIR}/3rdparty/googletest/" -B "${CMAKE_CURRENT_BINARY_DIR}/ppc_googletest/build/"
1010
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -G${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
11-
-Dgtest_force_shared_crt=ON
12-
BUILD_COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/ppc_googletest/build" --config ${CMAKE_BUILD_TYPE}
11+
-Dgtest_force_shared_crt=ON -DCMAKE_CXX_FLAGS="-w" -DCMAKE_C_FLAGS="-w"
12+
BUILD_COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/ppc_googletest/build" --config ${CMAKE_BUILD_TYPE} --parallel
1313
INSTALL_COMMAND "${CMAKE_COMMAND}" --install "${CMAKE_CURRENT_BINARY_DIR}/ppc_googletest/build" --prefix "${CMAKE_CURRENT_BINARY_DIR}/ppc_googletest/install")

0 commit comments

Comments
 (0)