Skip to content

Commit

Permalink
Merge branch 'learning-process:master' into lopatin_i_count_words_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ascannel authored Nov 2, 2024
2 parents f47fcd3 + 17935f0 commit 409b8c6
Show file tree
Hide file tree
Showing 231 changed files with 23,155 additions and 48 deletions.
49 changes: 43 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
pull_request:
schedule:
- cron: '0 12 * * *'
workflow_dispatch:

jobs:
ubuntu-gcc-build:
Expand Down Expand Up @@ -44,9 +45,20 @@ jobs:
env:
CC: gcc-13
CXX: g++-13
- name: Run func tests
- name: Run func tests (num_proc=2)
run: |
export OMP_NUM_THREADS=4
export PROC_COUNT=2
source scripts/run.sh
- name: Run func tests (num_proc=3)
run: |
export OMP_NUM_THREADS=4
export PROC_COUNT=3
source scripts/run.sh
- name: Run func tests (num_proc=4)
run: |
export OMP_NUM_THREADS=4
export PROC_COUNT=4
source scripts/run.sh
ubuntu-clang-build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -85,9 +97,20 @@ jobs:
env:
CC: clang-18
CXX: clang++-18
- name: Run tests
- name: Run func tests (num_proc=2)
run: |
export OMP_NUM_THREADS=4
export PROC_COUNT=2
source scripts/run.sh
- name: Run func tests (num_proc=3)
run: |
export OMP_NUM_THREADS=4
export PROC_COUNT=3
source scripts/run.sh
- name: Run func tests (num_proc=4)
run: |
export OMP_NUM_THREADS=4
export PROC_COUNT=4
source scripts/run.sh
ubuntu-clang-sanitizer-build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -130,6 +153,7 @@ jobs:
run: |
export OMP_NUM_THREADS=4
export ASAN_RUN=1
export PROC_COUNT=4
source scripts/run.sh
macos-clang-build:
runs-on: macOS-latest
Expand Down Expand Up @@ -163,6 +187,7 @@ jobs:
- name: Run tests
run: |
export OMP_NUM_THREADS=4
export PROC_COUNT=2
source scripts/run.sh
windows-msvc-build:
runs-on: windows-latest
Expand Down Expand Up @@ -249,7 +274,7 @@ jobs:
sudo apt-get install mpich libmpich* mpi* openmpi-bin
sudo apt-get install libomp-dev
sudo apt-get install valgrind
sudo apt-get install gcovr
sudo apt-get install gcovr lcov
- name: CMake configure
run: >
cmake -S . -B build
Expand All @@ -264,14 +289,26 @@ jobs:
- name: Run tests
run: |
export OMP_NUM_THREADS=4
export PROC_COUNT=4
source scripts/run.sh
- name: Generate Coverage Data
- name: Generate gcovr Coverage Data
run: |
cd build
gcovr -r ../ --xml --output ../coverage.xml
cat ../coverage.xml
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: 01474879-5a86-4c59-bd1d-6e29d3ed9550
files: coverage.xml
- name: Generate lcov Coverage Data
run: |
cd build
lcov --capture --directory . --output-file ../coverage.info
lcov --remove ../coverage.info '*/3rdparty/*' '/usr/*' '*/perf_tests/*' '*/func_tests/*' --output-file ../coverage.info
cd ..
genhtml coverage.info --output-directory cov-report
- name: Upload coverage report artifact
uses: actions/upload-artifact@v4
with:
name: cov-report
path: 'cov-report'
1 change: 1 addition & 0 deletions .github/workflows/perf-statistic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Collect performance statistic
on:
schedule:
- cron: '0 12 * * *'
workflow_dispatch:

jobs:
ubuntu-gcc-build:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/static-analysis-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Update submodules
run: git submodule update --init --recursive
- name: ccache
uses: hendrikmuhs/[email protected]
with:
Expand All @@ -36,8 +34,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Update submodules
run: git submodule update --init --recursive
- name: ccache
uses: hendrikmuhs/[email protected]
with:
Expand All @@ -53,4 +49,6 @@ jobs:
split_workflow: true
lgtm_comment_body: ""
- if: steps.review.outputs.total_comments > 0
run: exit 1
run: |
echo "clang-tidy run has failed. See previous 'Run clang-tidy' stage logs"
exit 1
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
build
out
mpich
cmake-build-release*
cmake-build-debug*
.idea/
.vs/
.vscode/
scripts/variants.csv
scripts/variants.xlsx
venv*
sln/
CMakeSettings.json
.DS_Store
.cache
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,24 @@ The following parallel programming technologies are considered in practice:

## 0. Download all submodules
```
git submodule update --init --recursive
git submodule update --init --recursive --depth=1
```
## 1. Set up your environment
### Static analysis of project (optional)
* **Windows (MSVC)**:

Unsupported operating system!

* **Linux (`gcc` and `clang`)**:
* **Ubuntu / Debian (`gcc` and `clang`)**:
```
sudo apt install -y cppcheck
```

* **NixOS / Nix (with flakes enabled)**:
```
nix develop .
```

* **MacOS (apple clang)**:
```
brew install cppcheck
Expand All @@ -44,10 +50,16 @@ Code style is checked using [clang-format](https://clang.llvm.org/docs/ClangForm

[Installers link.](https://www.microsoft.com/en-us/download/details.aspx?id=105289) You have to install `msmpisdk.msi` and `msmpisetup.exe`.

* **Linux (`gcc` and `clang`)**:
* **Ubuntu / Debian (`gcc` and `clang`)**:
```
sudo apt install -y mpich openmpi-bin libopenmpi-dev
```

* **NixOS / Nix (with flakes enabled)**:
```
nix develop .
```

* **MacOS (apple clang)**:
```
brew install open-mpi
Expand All @@ -57,10 +69,16 @@ Code style is checked using [clang-format](https://clang.llvm.org/docs/ClangForm

`OpenMP` is included into `gcc` and `msvc`, but some components should be installed additionally:

* **Linux (`gcc` and `clang`)**:
* **Ubuntu / Debian (`gcc` and `clang`)**:
```
sudo apt install -y libomp-dev
```

* **NixOS / Nix (with flakes enabled)**:
```
nix develop .
```

* **MacOS (`llvm`)**:
```
brew install llvm
Expand All @@ -81,7 +99,7 @@ Navigate to a source code folder.

```
mkdir build && cd build
cmake -D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STL=ON -D USE_FUNC_TESTS=ON -D USE_PERF_TESTS=ON -D USE_CPPCHECK=ON -D CMAKE_BUILD_TYPE=Release ..
cmake -D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STL=ON -D USE_FUNC_TESTS=ON -D USE_PERF_TESTS=ON -D CMAKE_BUILD_TYPE=Release ..
```
*Help on CMake keys:*
- `-D USE_SEQ=ON` enable `Sequential` labs (based on OpenMP's CMakeLists.txt).
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ install:
- python -m pip install xlsxwriter

build_script:
- cmd: git submodule update --init --recursive
- cmd: git submodule update --init --recursive --depth=1
- cmd: mkdir build
- cmd: cmake -S . -B build ^
-D USE_SEQ=ON ^
Expand Down
4 changes: 3 additions & 1 deletion cmake/boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ ExternalProject_Add(ppc_boost
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/ppc_boost/build"
INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/ppc_boost/install"
CONFIGURE_COMMAND "${CMAKE_COMMAND}" -S "${CMAKE_SOURCE_DIR}/3rdparty/boost/" -B "${CMAKE_CURRENT_BINARY_DIR}/ppc_boost/build/"
-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
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -G${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DBOOST_INCLUDE_LIBRARIES=mpi -DBOOST_ENABLE_MPI=ON
-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}
-DCMAKE_INSTALL_LIBDIR=lib
BUILD_COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/ppc_boost/build" --config ${CMAKE_BUILD_TYPE}
INSTALL_COMMAND "${CMAKE_COMMAND}" --install "${CMAKE_CURRENT_BINARY_DIR}/ppc_boost/build" --prefix "${CMAKE_CURRENT_BINARY_DIR}/ppc_boost/install"
TEST_COMMAND "")
4 changes: 2 additions & 2 deletions cmake/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ MACRO(CPPCHECK_TEST ProjectId ALL_SOURCE_FILES)
endif ()
endforeach ()
if (NOT APPLE)
find_program(CPPCHECK_EXEC /usr/bin/cppcheck)
find_program(CPPCHECK_EXEC cppcheck)
add_custom_target(
"${ProjectId}_cppcheck" ALL
COMMAND ${CPPCHECK_EXEC}
Expand All @@ -74,5 +74,5 @@ MACRO(CPPCHECK_TEST ProjectId ALL_SOURCE_FILES)
${ALL_SOURCE_FILES}
)
ENDIF ()
endif( UNIX )
endif( UNIX AND USE_CPPCHECK)
ENDMACRO()
1 change: 1 addition & 0 deletions cmake/gtest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ ExternalProject_Add(ppc_googletest
CONFIGURE_COMMAND "${CMAKE_COMMAND}" -S "${CMAKE_SOURCE_DIR}/3rdparty/googletest/" -B "${CMAKE_CURRENT_BINARY_DIR}/ppc_googletest/build/"
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -G${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-Dgtest_force_shared_crt=ON
-DCMAKE_INSTALL_LIBDIR=lib
BUILD_COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/ppc_googletest/build" --config ${CMAKE_BUILD_TYPE}
INSTALL_COMMAND "${CMAKE_COMMAND}" --install "${CMAKE_CURRENT_BINARY_DIR}/ppc_googletest/build" --prefix "${CMAKE_CURRENT_BINARY_DIR}/ppc_googletest/install")
1 change: 1 addition & 0 deletions cmake/onetbb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ else(MSVC)
INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/ppc_onetbb/install"
CONFIGURE_COMMAND "${CMAKE_COMMAND}" -S "${CMAKE_SOURCE_DIR}/3rdparty/onetbb/" -B "${CMAKE_CURRENT_BINARY_DIR}/ppc_onetbb/build/"
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -G${CMAKE_GENERATOR} -DTBB_TEST=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_LIBDIR=lib
BUILD_COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/ppc_onetbb/build" --config ${CMAKE_BUILD_TYPE}
INSTALL_COMMAND "${CMAKE_COMMAND}" --install "${CMAKE_CURRENT_BINARY_DIR}/ppc_onetbb/build" --prefix "${CMAKE_CURRENT_BINARY_DIR}/ppc_onetbb/install")
endif(MSVC)
96 changes: 96 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 409b8c6

Please sign in to comment.