Skip to content

Commit 7f8cff8

Browse files
authored
Add "all" dir (#205)
* add all dir * fix scripts * update examples * update examples * update coverage * Update main.yml * Update main.yml * Update main.yml * test mpi part * fix sanitizer * Update main.yml * fix sanitizer * fix perf counter checker * fix scripts * Update main.yml * Update main.yml
1 parent beda560 commit 7f8cff8

34 files changed

+2055
-23
lines changed

.github/labeler.yml

Lines changed: 2 additions & 0 deletions
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':

.github/workflows/main.yml

Lines changed: 8 additions & 8 deletions
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
@@ -114,7 +114,7 @@ jobs:
114114
sudo apt-get update
115115
sudo apt-get install gcc-13 g++-13
116116
sudo apt-get install ninja-build
117-
sudo apt-get install mpich libmpich* mpi* openmpi-bin
117+
sudo apt-get install mpich
118118
sudo apt-get install libomp-dev
119119
sudo apt-get install valgrind
120120
python3 -m pip install xlsxwriter
@@ -185,7 +185,7 @@ jobs:
185185
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
186186
sudo apt-get update
187187
sudo apt-get install ninja-build
188-
sudo apt-get install mpich libmpich* mpi* openmpi-bin
188+
sudo apt-get install mpich
189189
sudo apt-get install python3-pip
190190
sudo apt-get install valgrind
191191
wget https://apt.llvm.org/llvm.sh
@@ -255,7 +255,7 @@ jobs:
255255
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
256256
sudo apt-get update
257257
sudo apt-get install ninja-build
258-
sudo apt-get install mpich libmpich* mpi* openmpi-bin
258+
sudo apt-get install mpich
259259
sudo apt-get install python3-pip
260260
sudo apt-get install valgrind
261261
wget https://apt.llvm.org/llvm.sh
@@ -355,7 +355,7 @@ jobs:
355355
- name: Run tests (MPI)
356356
run: |
357357
export ASAN_RUN=1
358-
source scripts/run_mpi.sh
358+
source scripts/run_mpi.sh "--oversubscribe"
359359
env:
360360
PROC_COUNT: 2
361361
- name: Run tests (threads, num_threads=1)
@@ -834,7 +834,7 @@ jobs:
834834
sudo apt-get update
835835
sudo apt-get install gcc g++
836836
sudo apt-get install ninja-build
837-
sudo apt-get install mpich libmpich* mpi* openmpi-bin
837+
sudo apt-get install mpich
838838
sudo apt-get install libomp-dev
839839
sudo apt-get install valgrind
840840
sudo apt-get install gcovr lcov
@@ -883,7 +883,7 @@ jobs:
883883
run: |
884884
cd build
885885
lcov --capture --directory . --output-file ../coverage.info
886-
lcov --remove ../coverage.info '*/3rdparty/*' '/usr/*' '*/perf_tests/*' '*/func_tests/*' --output-file ../coverage.info
886+
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
887887
cd ..
888888
genhtml coverage.info --output-directory cov-report
889889
- name: Upload coverage report artifact
@@ -911,7 +911,7 @@ jobs:
911911
sudo apt-get update
912912
sudo apt-get install gcc-12 g++-12
913913
sudo apt-get install ninja-build
914-
sudo apt-get install mpich libmpich* mpi* openmpi-bin
914+
sudo apt-get install mpich
915915
sudo apt-get install libomp-dev
916916
sudo apt-get install valgrind
917917
python3 -m pip install xlsxwriter

codecov.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
ignore:
22
- "**/perf_tests/**"
33
- "**/func_tests/**"
4+
- "**/all/runner.cpp"
5+
- "**/mpi/runner.cpp"
6+
- "**/omp/runner.cpp"
7+
- "**/seq/runner.cpp"
8+
- "**/stl/runner.cpp"
9+
- "**/tbb/runner.cpp"
410
coverage:
511
status:
612
project:

docs/user_guide/submit_work.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
How to submit your work
22
========================
33

4-
- There are ``mpi``, ``omp``, ``seq``, ``stl``, ``tbb`` folders in the ``tasks`` directory. Move to a folder of your task. Create a directory named ``<last name>_<first letter of name>_<short task name>``.
4+
- There are ``all``, ``mpi``, ``omp``, ``seq``, ``stl``, ``tbb`` folders in the ``tasks`` directory. Move to a folder of your task. Create a directory named ``<last name>_<first letter of name>_<short task name>``.
55

66
Example: ``seq/nesterov_a_vector_sum``. Please name all tasks **with the same** name directory. If the ``seq`` task is named ``seq/nesterov_a_vector_sum``, then the ``omp`` task must be named ``omp/nesterov_a_vector_sum``.
77

88
- Navigate into the newly created folder and begin your work on the task. The folder must contain only 4 directories with files:
99

10+
- ``data`` - Directory with own data files for functional testing of the task.
1011
- ``func_tests`` - Directory with Google tests for functional testing of the task.
1112
- ``include`` - Directory for header files with function prototypes.
1213
- ``perf_tests`` - Directory with Google tests for performance testing. The number of tests must be 2: ``run_task`` and ``run_pipeline``.
1314
- ``src`` - Directory with source files containing the function implementations.
1415

1516
- There must be 10 executable files for running:
1617

17-
- ``<mpi, omp, seq, stl, tbb>_<func, perf>_tests``. For example, ``omp_perf_tests`` - an executable file for performance tests of OpenMP practice tasks.
18+
- ``<all, mpi, omp, seq, stl, tbb>_<func, perf>_tests``. For example, ``omp_perf_tests`` - an executable file for performance tests of OpenMP practice tasks.
1819

1920
- All prototypes and classes in the ``include`` directory must be namespace-escaped. Name your namespace as follows:
2021

scripts/create_perf_table.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
logs_path = os.path.abspath(args.input)
1212
xlsx_path = os.path.abspath(args.output)
1313

14-
list_of_type_of_tasks = ["mpi", "omp", "seq", "stl", "tbb"]
14+
list_of_type_of_tasks = ["all", "mpi", "omp", "seq", "stl", "tbb"]
1515

1616
result_tables = {"pipeline": {}, "task_run": {}}
1717
set_of_task_name = []
@@ -83,7 +83,10 @@
8383
continue
8484
par_time = result_tables[table_name][task_name][type_of_task]
8585
seq_time = result_tables[table_name][task_name]["seq"]
86-
speed_up = seq_time / par_time
86+
if par_time == 0:
87+
speed_up = -1
88+
else:
89+
speed_up = seq_time / par_time
8790
efficiency = speed_up / cpu_num
8891
worksheet.write(it_j, it_i, par_time)
8992
it_i += 1

scripts/run.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ if "%CLANG_BUILD%" NEQ "1" build\bin\sample_omp.exe
99
build\bin\sample_stl.exe
1010
build\bin\sample_tbb.exe
1111

12+
if "%CLANG_BUILD%" NEQ "1" mpiexec.exe -np 4 build\bin\all_func_tests.exe --gtest_repeat=10 || exit 1
1213
if "%CLANG_BUILD%" NEQ "1" mpiexec.exe -np 4 build\bin\mpi_func_tests.exe --gtest_repeat=10 || exit 1
14+
if "%CLANG_BUILD%" NEQ "1" build\bin\all_func_tests.exe || exit 1
1315
if "%CLANG_BUILD%" NEQ "1" build\bin\mpi_func_tests.exe || exit 1
1416
if "%CLANG_BUILD%" NEQ "1" build\bin\omp_func_tests.exe --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating || exit 1
1517
build\bin\seq_func_tests.exe --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating || exit 1

scripts/run_mpi.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,16 @@ if [[ $OSTYPE == "linux-gnu" && -z "$ASAN_RUN" ]]; then
44
valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./build/bin/core_func_tests
55
valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./build/bin/ref_func_tests
66

7+
# valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./build/bin/all_func_tests
78
# valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./build/bin/mpi_func_tests
89
fi
910

1011
./build/bin/core_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
1112
./build/bin/ref_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
1213

1314
if [[ -z "$ASAN_RUN" ]]; then
14-
if [[ $OSTYPE == "linux-gnu" ]]; then
15-
mpirun --oversubscribe -np $PROC_COUNT ./build/bin/sample_mpi
16-
mpirun --oversubscribe -np $PROC_COUNT ./build/bin/sample_mpi_boost
17-
mpirun --oversubscribe -np $PROC_COUNT ./build/bin/mpi_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
18-
elif [[ $OSTYPE == "darwin"* ]]; then
19-
mpirun -np $PROC_COUNT ./build/bin/sample_mpi
20-
mpirun -np $PROC_COUNT ./build/bin/sample_mpi_boost
21-
mpirun -np $PROC_COUNT ./build/bin/mpi_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
22-
fi
15+
mpirun $1 -np $PROC_COUNT ./build/bin/sample_mpi
16+
mpirun $1 -np $PROC_COUNT ./build/bin/sample_mpi_boost
17+
mpirun $1 -np $PROC_COUNT ./build/bin/all_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
18+
mpirun $1 -np $PROC_COUNT ./build/bin/mpi_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
2319
fi

scripts/run_perf_collector.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
REM mpiexec -np 4 build\bin\all_perf_tests.exe
12
REM mpiexec -np 4 build\bin\mpi_perf_tests.exe
23
build\bin\omp_perf_tests.exe
34
build\bin\seq_perf_tests.exe

scripts/run_perf_collector.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
if [[ -z "$ASAN_RUN" ]]; then
44
if [[ $OSTYPE == "linux-gnu" ]]; then
5-
mpirun --oversubscribe -np 4 ./build/bin/mpi_perf_tests
5+
mpirun -np 4 ./build/bin/all_perf_tests --gtest_color=no
6+
mpirun -np 4 ./build/bin/mpi_perf_tests --gtest_color=no
67
elif [[ $OSTYPE == "darwin"* ]]; then
7-
mpirun -np 2 ./build/bin/mpi_perf_tests
8+
mpirun -np 2 ./build/bin/all_perf_tests --gtest_color=no
9+
mpirun -np 2 ./build/bin/mpi_perf_tests --gtest_color=no
810
fi
911
fi
1012
./build/bin/omp_perf_tests

scripts/run_perf_count_checker.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ run_check() {
4040
fi
4141
}
4242

43+
run_check "all"
4344
run_check "mpi"
4445
run_check "omp"
4546
run_check "seq"

0 commit comments

Comments
 (0)