Skip to content
Merged
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: 2 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'task:all':
- "tasks/all/**"
'task:mpi':
- "tasks/mpi/**"
'task:omp':
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
sudo apt-get update
sudo apt-get install gcc-13 g++-13
sudo apt-get install ninja-build
sudo apt-get install mpich libmpich* mpi* openmpi-bin
sudo apt-get install mpich
sudo apt-get install libomp-dev
sudo apt-get install valgrind
python3 -m pip install xlsxwriter
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
sudo apt-get update
sudo apt-get install gcc-13 g++-13
sudo apt-get install ninja-build
sudo apt-get install mpich libmpich* mpi* openmpi-bin
sudo apt-get install mpich
sudo apt-get install libomp-dev
sudo apt-get install valgrind
python3 -m pip install xlsxwriter
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install ninja-build
sudo apt-get install mpich libmpich* mpi* openmpi-bin
sudo apt-get install mpich
sudo apt-get install python3-pip
sudo apt-get install valgrind
wget https://apt.llvm.org/llvm.sh
Expand Down Expand Up @@ -255,7 +255,7 @@ jobs:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install ninja-build
sudo apt-get install mpich libmpich* mpi* openmpi-bin
sudo apt-get install mpich
sudo apt-get install python3-pip
sudo apt-get install valgrind
wget https://apt.llvm.org/llvm.sh
Expand Down Expand Up @@ -355,7 +355,7 @@ jobs:
- name: Run tests (MPI)
run: |
export ASAN_RUN=1
source scripts/run_mpi.sh
source scripts/run_mpi.sh "--oversubscribe"
env:
PROC_COUNT: 2
- name: Run tests (threads, num_threads=1)
Expand Down Expand Up @@ -834,7 +834,7 @@ jobs:
sudo apt-get update
sudo apt-get install gcc g++
sudo apt-get install ninja-build
sudo apt-get install mpich libmpich* mpi* openmpi-bin
sudo apt-get install mpich
sudo apt-get install libomp-dev
sudo apt-get install valgrind
sudo apt-get install gcovr lcov
Expand Down Expand Up @@ -883,7 +883,7 @@ jobs:
run: |
cd build
lcov --capture --directory . --output-file ../coverage.info
lcov --remove ../coverage.info '*/3rdparty/*' '/usr/*' '*/perf_tests/*' '*/func_tests/*' --output-file ../coverage.info
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
cd ..
genhtml coverage.info --output-directory cov-report
- name: Upload coverage report artifact
Expand Down Expand Up @@ -911,7 +911,7 @@ jobs:
sudo apt-get update
sudo apt-get install gcc-12 g++-12
sudo apt-get install ninja-build
sudo apt-get install mpich libmpich* mpi* openmpi-bin
sudo apt-get install mpich
sudo apt-get install libomp-dev
sudo apt-get install valgrind
python3 -m pip install xlsxwriter
Expand Down
6 changes: 6 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
ignore:
- "**/perf_tests/**"
- "**/func_tests/**"
- "**/all/runner.cpp"
- "**/mpi/runner.cpp"
- "**/omp/runner.cpp"
- "**/seq/runner.cpp"
- "**/stl/runner.cpp"
- "**/tbb/runner.cpp"
coverage:
status:
project:
Expand Down
5 changes: 3 additions & 2 deletions docs/user_guide/submit_work.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
How to submit your work
========================

- 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>``.
- 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>``.

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``.

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

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

- There must be 10 executable files for running:

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

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

Expand Down
7 changes: 5 additions & 2 deletions scripts/create_perf_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
logs_path = os.path.abspath(args.input)
xlsx_path = os.path.abspath(args.output)

list_of_type_of_tasks = ["mpi", "omp", "seq", "stl", "tbb"]
list_of_type_of_tasks = ["all", "mpi", "omp", "seq", "stl", "tbb"]

result_tables = {"pipeline": {}, "task_run": {}}
set_of_task_name = []
Expand Down Expand Up @@ -83,7 +83,10 @@
continue
par_time = result_tables[table_name][task_name][type_of_task]
seq_time = result_tables[table_name][task_name]["seq"]
speed_up = seq_time / par_time
if par_time == 0:
speed_up = -1
else:
speed_up = seq_time / par_time
efficiency = speed_up / cpu_num
worksheet.write(it_j, it_i, par_time)
it_i += 1
Expand Down
2 changes: 2 additions & 0 deletions scripts/run.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ if "%CLANG_BUILD%" NEQ "1" build\bin\sample_omp.exe
build\bin\sample_stl.exe
build\bin\sample_tbb.exe

if "%CLANG_BUILD%" NEQ "1" mpiexec.exe -np 4 build\bin\all_func_tests.exe --gtest_repeat=10 || exit 1
if "%CLANG_BUILD%" NEQ "1" mpiexec.exe -np 4 build\bin\mpi_func_tests.exe --gtest_repeat=10 || exit 1
if "%CLANG_BUILD%" NEQ "1" build\bin\all_func_tests.exe || exit 1
if "%CLANG_BUILD%" NEQ "1" build\bin\mpi_func_tests.exe || exit 1
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
build\bin\seq_func_tests.exe --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating || exit 1
Expand Down
14 changes: 5 additions & 9 deletions scripts/run_mpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@ if [[ $OSTYPE == "linux-gnu" && -z "$ASAN_RUN" ]]; then
valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./build/bin/core_func_tests
valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./build/bin/ref_func_tests

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

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

if [[ -z "$ASAN_RUN" ]]; then
if [[ $OSTYPE == "linux-gnu" ]]; then
mpirun --oversubscribe -np $PROC_COUNT ./build/bin/sample_mpi
mpirun --oversubscribe -np $PROC_COUNT ./build/bin/sample_mpi_boost
mpirun --oversubscribe -np $PROC_COUNT ./build/bin/mpi_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
elif [[ $OSTYPE == "darwin"* ]]; then
mpirun -np $PROC_COUNT ./build/bin/sample_mpi
mpirun -np $PROC_COUNT ./build/bin/sample_mpi_boost
mpirun -np $PROC_COUNT ./build/bin/mpi_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
fi
mpirun $1 -np $PROC_COUNT ./build/bin/sample_mpi
mpirun $1 -np $PROC_COUNT ./build/bin/sample_mpi_boost
mpirun $1 -np $PROC_COUNT ./build/bin/all_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
mpirun $1 -np $PROC_COUNT ./build/bin/mpi_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
fi
1 change: 1 addition & 0 deletions scripts/run_perf_collector.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
REM mpiexec -np 4 build\bin\all_perf_tests.exe
REM mpiexec -np 4 build\bin\mpi_perf_tests.exe
build\bin\omp_perf_tests.exe
build\bin\seq_perf_tests.exe
Expand Down
6 changes: 4 additions & 2 deletions scripts/run_perf_collector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

if [[ -z "$ASAN_RUN" ]]; then
if [[ $OSTYPE == "linux-gnu" ]]; then
mpirun --oversubscribe -np 4 ./build/bin/mpi_perf_tests
mpirun -np 4 ./build/bin/all_perf_tests --gtest_color=no
mpirun -np 4 ./build/bin/mpi_perf_tests --gtest_color=no
elif [[ $OSTYPE == "darwin"* ]]; then
mpirun -np 2 ./build/bin/mpi_perf_tests
mpirun -np 2 ./build/bin/all_perf_tests --gtest_color=no
mpirun -np 2 ./build/bin/mpi_perf_tests --gtest_color=no
fi
fi
./build/bin/omp_perf_tests
Expand Down
1 change: 1 addition & 0 deletions scripts/run_perf_count_checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ run_check() {
fi
}

run_check "all"
run_check "mpi"
run_check "omp"
run_check "seq"
Expand Down
29 changes: 29 additions & 0 deletions tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ else ()
message(WARNING "TBB tasks not build!")
endif ()

if (USE_MPI AND USE_OMP AND USE_SEQ AND USE_STL AND USE_TBB)
list(APPEND LIST_OF_TASKS "all")
else ()
message(WARNING "ALL tasks not build!")
endif ()

add_compile_definitions(PATH_TO_PPC_PROJECT="${CMAKE_SOURCE_DIR}")

foreach(TASK_TYPE ${LIST_OF_TASKS})
Expand Down Expand Up @@ -101,6 +107,29 @@ foreach(TASK_TYPE ${LIST_OF_TASKS})
target_link_libraries(${EXEC_FUNC} PUBLIC boost_mpi boost_serialization)
endif ()
elseif ("${MODULE_NAME}" STREQUAL "tbb")
add_dependencies(${EXEC_FUNC} ppc_onetbb)
target_link_directories(${EXEC_FUNC} PUBLIC ${CMAKE_BINARY_DIR}/ppc_onetbb/install/lib)
if(NOT MSVC)
target_link_libraries(${EXEC_FUNC} PUBLIC tbb)
endif()
elseif ("${MODULE_NAME}" STREQUAL "all")
target_link_libraries(${EXEC_FUNC} PUBLIC Threads::Threads)
target_link_libraries(${EXEC_FUNC} PUBLIC ${OpenMP_libomp_LIBRARY})
if( MPI_COMPILE_FLAGS )
set_target_properties(${EXEC_FUNC} PROPERTIES COMPILE_FLAGS "${MPI_COMPILE_FLAGS}")
endif( MPI_COMPILE_FLAGS )

if( MPI_LINK_FLAGS )
set_target_properties(${EXEC_FUNC} PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
endif( MPI_LINK_FLAGS )
target_link_libraries(${EXEC_FUNC} PUBLIC ${MPI_LIBRARIES})

add_dependencies(${EXEC_FUNC} ppc_boost)
target_link_directories(${EXEC_FUNC} PUBLIC ${CMAKE_BINARY_DIR}/ppc_boost/install/lib)
if (NOT MSVC)
target_link_libraries(${EXEC_FUNC} PUBLIC boost_mpi boost_serialization)
endif ()

add_dependencies(${EXEC_FUNC} ppc_onetbb)
target_link_directories(${EXEC_FUNC} PUBLIC ${CMAKE_BINARY_DIR}/ppc_onetbb/install/lib)
if(NOT MSVC)
Expand Down
1 change: 1 addition & 0 deletions tasks/all/example/data/test_mpi.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
120
1 change: 1 addition & 0 deletions tasks/all/example/data/test_omp.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5
1 change: 1 addition & 0 deletions tasks/all/example/data/test_seq.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
100
1 change: 1 addition & 0 deletions tasks/all/example/data/test_stl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
15
1 change: 1 addition & 0 deletions tasks/all/example/data/test_tbb.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5
Loading
Loading