Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a07fbab
Update .travis.yml
nestolen Feb 12, 2020
acda9f4
Added report latex
Feb 12, 2020
91063c3
Added report latex 2
Feb 12, 2020
bb56860
Added report latex 3
Feb 12, 2020
989b0ec
Added report latex 4
Feb 12, 2020
c0692ef
Update .travis.yml
nestolen Feb 12, 2020
23e13a0
Update .travis.yml
nestolen Feb 12, 2020
74867d7
Update .travis.yml
nestolen Feb 12, 2020
f7cde90
Update appveyor.yml
nestolen Feb 12, 2020
4a03860
Update .travis.yml
nestolen Feb 12, 2020
555ea8c
Update appveyor.yml
nestolen Feb 12, 2020
f066e0f
Added report latex 5
Feb 12, 2020
41b70e9
Update appveyor.yml
nestolen Feb 12, 2020
0b883e7
Added report latex win
Feb 12, 2020
203ad52
Added imagemagic
Feb 20, 2020
a8c1eb3
Added imagemagic 2
Feb 20, 2020
18107f4
Added imagemagic 3
Feb 20, 2020
e2e7fdc
Added imagemagic 4
Feb 20, 2020
d6cc54f
Added imagemagic 5
Feb 20, 2020
8a71399
Added imagemagic 6
Feb 20, 2020
1014b48
Added imagemagic 7
Feb 20, 2020
d01b39d
Added imagemagic 8
Feb 20, 2020
3b64e7c
Added imagemagic 9
Feb 20, 2020
f372c22
Added imagemagic 10
Feb 20, 2020
ff751fc
Added imagemagic 11
Feb 20, 2020
8994626
Added imagemagic 12
Feb 20, 2020
6d6196f
Added imagemagic 13
Feb 20, 2020
2b94e0c
Added imagemagic 14
Feb 20, 2020
13e3c2a
Added MacOS support fol latex
Feb 20, 2020
bd4c7e3
Added MacOS support fol latex - FAILED
Feb 20, 2020
4d7ef07
Update docs 1
Feb 21, 2020
59a508e
Merge branch 'master' of https://github.com/learning-process/parallel…
Feb 21, 2020
e390147
Update docs 2
Feb 21, 2020
8ea1bf9
Update README.md
nestolen Feb 20, 2020
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
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,18 @@ before_install:
install:
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew update-reset; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew unlink python@2; fi

- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew install open-mpi libomp tbb; fi

- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt-get install mpich libmpich-dev; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt-get install libomp-dev libtbb-dev; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt install texlive*; fi

script:
- git submodule update --init --recursive
- python scripts/lint.py
- mkdir build
- cd build
- cmake -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STD=ON -D CMAKE_BUILD_TYPE=RELEASE ..
- cmake -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STD=ON -D USE_LATEX=ON -D CMAKE_BUILD_TYPE=RELEASE ..
- cmake --build . --config -j4
- cd ..
- export OMP_NUM_THREADS=4
Expand Down
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ if( USE_TBB )
endif( TBB_FOUND )
endif( USE_TBB )

############################### LATEX ###############################
option(USE_LATEX OFF)
if( USE_LATEX )
if ( NOT APPLE )
include( cmake/UseLATEX.cmake )
else( NOT APPLE )
set( USE_LATEX OFF )
endif( NOT APPLE )
endif( USE_LATEX )

############################## Modules ##############################
include_directories(3rdparty/unapproved)
add_subdirectory(modules)
59 changes: 39 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
[![Build status](https://ci.appveyor.com/api/projects/status/t46nd9gyt7iirdy8/branch/master?svg=true)](https://ci.appveyor.com/project/allnes/parallel-programming-course/branch/master)

# Parallel programming course

The following parallel programming technologies are considered in practice:
* `MPI`
* `OpenMP`
* `TBB`
* `std::thread`
* `MPI`
* `OpenMP`
* `TBB`
* `std::thread`

The following reporting technologies are considered in practice:
* `LaTeX`

## Rules for submissions
1. You are not supposed to trigger CI jobs by frequent updates of your pull request. First you should test you work locally with all the scripts (code style)
Expand All @@ -18,6 +22,8 @@ The following parallel programming technologies are considered in practice:
```
git submodule update --init --recursive
```

### Parallel programming technologies
### `MPI`
* **Windows (MSVC)**:
[Installers link.](https://www.microsoft.com/en-us/download/details.aspx?id=57467) You have to install `msmpisdk.msi` and `msmpisetup.exe`.
Expand Down Expand Up @@ -57,41 +63,67 @@ git submodule update --init --recursive
### `std::thread`
* `std::thread` is included into STL libraries.

### Reporting technologies
### `LaTeX`
* **Windows**:

Run powershell script `scripts/appveyor_install_miktex-latest-minimal.ps1` for install LaTeX and build project.

* **Linux**:
```
sudo apt install texlive*
```
* **MacOS (apple clang)**:

Unsupported operating system!

## 2. Build the project with `CMake`
Navigate to a source code folder.

1) Configure the build: `Makefile`, `.sln`, etc.

```
mkdir build && cd build
cmake -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STD=ON ..
cmake -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STD=ON -D USE_LATEX=ON ..
```
*Help on CMake keys:*
- `-D USE_MPI=ON` enbale `MPI` labs.
- `-D USE_OMP=ON` enable `OpenMP` labs.
- `-D USE_TBB=ON` enable `TBB` labs.
- `-D USE_STD=ON` enable `std::thread` labs.
- `-D USE_LATEX=ON` enable `LaTeX` reports.

*A corresponding flag can be omitted if it's not needed.*

2) Build the project:
```
cmake --build . --config RELEASE
```
3) Run `<project's folder>/build/bin`
3) Check the task
* Run `<project's folder>/build/bin`
* View report `<project's folder>/build/modules/reports/<report's folder>`

## 3. How to submit you work
* There are `task_1`, `task_2`, `task_3` folders in `modules` directory. There are 3 task for the semester. Move to a folder of your task. Make a directory named `<last name>_<first letter of name>_<short task name>`. Example: `task1/nesterov_a_vector_sum`.
* There are `task_1`, `task_2`, `task_3`, `reports` folders in `modules` directory. There are 3 task and 1 report for the semester. Move to a folder of your task. Make a directory named `<last name>_<first letter of name>_<short task name>`. Example: `task1/nesterov_a_vector_sum`.
* Go into the newly created folder and begin you work on the task. There must be only 4 files and 3 of them must be written by you:
- `main.cpp` - google tests for the task. The number of tests must be 4 or greater.
- `vector_sum.h` - a header file with function prototypes, name it in the same way as `<short task name>`.
- `vector_sum.cpp` - the task implementation, name it in the same way as `<short task name>`.
- `CMakeLists.txt` - a file to configure your project. Examples for each configuration can be found in `test_tasks`.
* Go into the newly created folder and begin you work on the report. There must be only 2 files and 1 of them must be written by you:
- `vector_sum.tex` - a LaTeX report file which consider information about your program, name it in the same way as `<short task name>`.
- `CMakeLists.txt` - a file to configure your project. Examples for each configuration can be found in `test_tasks/test_latex`.
* Name your pull request in the following way:
* for tasks:
```
<Фамилия Имя>. Задача <Номер задачи>. <Полное название задачи>.
Нестеров Александр. Задача 1. Сумма элементов вектора.
```
* for report:
```
<Фамилия Имя>. Отчет. <Полное название задачи>.
Нестеров Александр. Отчет. Сумма элементов вектора.
```
* Provide the full task definition in pull request's description.

Example pull request is located in repo's pull requests.
Expand All @@ -101,19 +133,6 @@ Navigate to a source code folder.
git checkout -b nesterov_a_vector_sum
```

## 4. How to submit your report to the project

* Place `<last name>_<first letter of name>_<short task name>.pdf` containing the report in [the `reports` folder](reports).

```
nesterov_a_vector_sum.pdf
```
* Pull request's name for the report looks in the following way:
```
<Фамилия Имя>. Отчет. <Полное название задачи>.
Нестеров Александр. Отчет. Сумма элементов вектора.
```

## Code style
Please, follow [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html).
Code style can be verified with [the script](scripts/lint.py) (it runs with Python 2):
Expand Down
20 changes: 12 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
environment:
matrix:
# - CMAKE_GENERATOR: "Visual Studio 11 2012"
# MPI_HOME: "C:/Program Files (x86)/Microsoft SDKs/MPI"
# - CMAKE_GENERATOR: "Visual Studio 12 2013"
# MPI_HOME: "C:/Program Files (x86)/Microsoft SDKs/MPI"
- CMAKE_GENERATOR: "Visual Studio 14 2015"
MPI_HOME: "C:/Program Files (x86)/Microsoft SDKs/MPI"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
Expand All @@ -13,23 +9,31 @@ environment:
CMAKE_GENERATOR: "Visual Studio 16 2019"
MPI_HOME: "C:/Program Files (x86)/Microsoft SDKs/MPI"

artifacts:
- path: build
name: build

install:
- ps: Start-FileDownload 'https://github.com/Microsoft/Microsoft-MPI/releases/download/v10.0/msmpisetup.exe'
- MSMpiSetup.exe -unattend
- set PATH=C:\Program Files\Microsoft MPI\Bin;%PATH%
- ps: Start-FileDownload 'https://github.com/Microsoft/Microsoft-MPI/releases/download/v10.0/msmpisdk.msi'
- msmpisdk.msi /passive
- powershell -file "scripts\appveyor_install_miktex-latest-minimal.ps1"
- refreshenv
- pdflatex -version

build_script:
- cmd: git submodule update --init --recursive
- cmd: python scripts/lint.py
- cmd: mkdir build
- cmd: cd build
- cmd: cmake -G "%CMAKE_GENERATOR%" ^
-D USE_MPI=ON ^
-D USE_OMP=ON ^
-D USE_TBB=ON ^
-D USE_STD=ON ^
-D USE_MPI=ON ^
-D USE_OMP=ON ^
-D USE_TBB=ON ^
-D USE_STD=ON ^
-D USE_LATEX=ON ^
-D MPI_C_INCLUDE_PATH:PATH="%MPI_HOME%/Include" ^
-D MPI_C_LIBRARIES:PATH="%MPI_HOME%/Lib/x86/msmpi.lib" ^
-D MPI_CXX_INCLUDE_PATH:PATH="%MPI_HOME%/Include" ^
Expand Down
Loading