Skip to content

Commit 676db61

Browse files
authored
Report: Latex (#17)
* Update .travis.yml * Update .travis.yml * Added report latex * Added report latex 2 * Added report latex 3 * Added report latex 4 * Update .travis.yml * Update .travis.yml * Update appveyor.yml * Update appveyor.yml * Update .travis.yml * Update appveyor.yml * Added report latex 5 * Added report latex win * Added imagemagic * Added imagemagic 2 * Added imagemagic 3 * Added imagemagic 4 * Added imagemagic 5 * Added imagemagic 6 * Added imagemagic 7 * Added imagemagic 8 * Added imagemagic 9 * Added imagemagic 10 * Added imagemagic 11 * Added imagemagic 12 * Added imagemagic 13 * Added imagemagic 14 * Update README.md * Added MacOS support fol latex * Added MacOS support fol latex - FAILED * Update docs 1 * Update docs 2
1 parent 528f649 commit 676db61

File tree

11 files changed

+2279
-31
lines changed

11 files changed

+2279
-31
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,18 @@ before_install:
4444
install:
4545
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew update-reset; fi
4646
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew unlink python@2; fi
47-
4847
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew install open-mpi libomp tbb; fi
48+
4949
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt-get install mpich libmpich-dev; fi
5050
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt-get install libomp-dev libtbb-dev; fi
51+
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt install texlive*; fi
5152

5253
script:
5354
- git submodule update --init --recursive
5455
- python scripts/lint.py
5556
- mkdir build
5657
- cd build
57-
- cmake -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STD=ON -D CMAKE_BUILD_TYPE=RELEASE ..
58+
- 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 ..
5859
- cmake --build . --config -j4
5960
- cd ..
6061
- export OMP_NUM_THREADS=4

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ if( USE_TBB )
7676
endif( TBB_FOUND )
7777
endif( USE_TBB )
7878

79+
############################### LATEX ###############################
80+
option(USE_LATEX OFF)
81+
if( USE_LATEX )
82+
if ( NOT APPLE )
83+
include( cmake/UseLATEX.cmake )
84+
else( NOT APPLE )
85+
set( USE_LATEX OFF )
86+
endif( NOT APPLE )
87+
endif( USE_LATEX )
88+
7989
############################## Modules ##############################
8090
include_directories(3rdparty/unapproved)
8191
add_subdirectory(modules)

README.md

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
[![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)
33

44
# Parallel programming course
5+
56
The following parallel programming technologies are considered in practice:
6-
* `MPI`
7-
* `OpenMP`
8-
* `TBB`
9-
* `std::thread`
7+
* `MPI`
8+
* `OpenMP`
9+
* `TBB`
10+
* `std::thread`
11+
12+
The following reporting technologies are considered in practice:
13+
* `LaTeX`
1014

1115
## Rules for submissions
1216
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)
@@ -18,6 +22,8 @@ The following parallel programming technologies are considered in practice:
1822
```
1923
git submodule update --init --recursive
2024
```
25+
26+
### Parallel programming technologies
2127
### `MPI`
2228
* **Windows (MSVC)**:
2329
[Installers link.](https://www.microsoft.com/en-us/download/details.aspx?id=57467) You have to install `msmpisdk.msi` and `msmpisetup.exe`.
@@ -57,41 +63,67 @@ git submodule update --init --recursive
5763
### `std::thread`
5864
* `std::thread` is included into STL libraries.
5965

66+
### Reporting technologies
67+
### `LaTeX`
68+
* **Windows**:
69+
70+
Run powershell script `scripts/appveyor_install_miktex-latest-minimal.ps1` for install LaTeX and build project.
71+
72+
* **Linux**:
73+
```
74+
sudo apt install texlive*
75+
```
76+
* **MacOS (apple clang)**:
77+
78+
Unsupported operating system!
79+
6080
## 2. Build the project with `CMake`
6181
Navigate to a source code folder.
6282

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

6585
```
6686
mkdir build && cd build
67-
cmake -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STD=ON ..
87+
cmake -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STD=ON -D USE_LATEX=ON ..
6888
```
6989
*Help on CMake keys:*
7090
- `-D USE_MPI=ON` enbale `MPI` labs.
7191
- `-D USE_OMP=ON` enable `OpenMP` labs.
7292
- `-D USE_TBB=ON` enable `TBB` labs.
7393
- `-D USE_STD=ON` enable `std::thread` labs.
94+
- `-D USE_LATEX=ON` enable `LaTeX` reports.
7495

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

7798
2) Build the project:
7899
```
79100
cmake --build . --config RELEASE
80101
```
81-
3) Run `<project's folder>/build/bin`
102+
3) Check the task
103+
* Run `<project's folder>/build/bin`
104+
* View report `<project's folder>/build/modules/reports/<report's folder>`
82105

83106
## 3. How to submit you work
84-
* 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`.
107+
* 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`.
85108
* 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:
86109
- `main.cpp` - google tests for the task. The number of tests must be 4 or greater.
87110
- `vector_sum.h` - a header file with function prototypes, name it in the same way as `<short task name>`.
88111
- `vector_sum.cpp` - the task implementation, name it in the same way as `<short task name>`.
89112
- `CMakeLists.txt` - a file to configure your project. Examples for each configuration can be found in `test_tasks`.
113+
* 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:
114+
- `vector_sum.tex` - a LaTeX report file which consider information about your program, name it in the same way as `<short task name>`.
115+
- `CMakeLists.txt` - a file to configure your project. Examples for each configuration can be found in `test_tasks/test_latex`.
90116
* Name your pull request in the following way:
117+
* for tasks:
91118
```
92119
<Фамилия Имя>. Задача <Номер задачи>. <Полное название задачи>.
93120
Нестеров Александр. Задача 1. Сумма элементов вектора.
94121
```
122+
* for report:
123+
```
124+
<Фамилия Имя>. Отчет. <Полное название задачи>.
125+
Нестеров Александр. Отчет. Сумма элементов вектора.
126+
```
95127
* Provide the full task definition in pull request's description.
96128

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

104-
## 4. How to submit your report to the project
105-
106-
* Place `<last name>_<first letter of name>_<short task name>.pdf` containing the report in [the `reports` folder](reports).
107-
108-
```
109-
nesterov_a_vector_sum.pdf
110-
```
111-
* Pull request's name for the report looks in the following way:
112-
```
113-
<Фамилия Имя>. Отчет. <Полное название задачи>.
114-
Нестеров Александр. Отчет. Сумма элементов вектора.
115-
```
116-
117136
## Code style
118137
Please, follow [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html).
119138
Code style can be verified with [the script](scripts/lint.py) (it runs with Python 2):

appveyor.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
environment:
22
matrix:
3-
# - CMAKE_GENERATOR: "Visual Studio 11 2012"
4-
# MPI_HOME: "C:/Program Files (x86)/Microsoft SDKs/MPI"
5-
# - CMAKE_GENERATOR: "Visual Studio 12 2013"
6-
# MPI_HOME: "C:/Program Files (x86)/Microsoft SDKs/MPI"
73
- CMAKE_GENERATOR: "Visual Studio 14 2015"
84
MPI_HOME: "C:/Program Files (x86)/Microsoft SDKs/MPI"
95
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
@@ -13,23 +9,31 @@ environment:
139
CMAKE_GENERATOR: "Visual Studio 16 2019"
1410
MPI_HOME: "C:/Program Files (x86)/Microsoft SDKs/MPI"
1511

12+
artifacts:
13+
- path: build
14+
name: build
15+
1616
install:
1717
- ps: Start-FileDownload 'https://github.com/Microsoft/Microsoft-MPI/releases/download/v10.0/msmpisetup.exe'
1818
- MSMpiSetup.exe -unattend
1919
- set PATH=C:\Program Files\Microsoft MPI\Bin;%PATH%
2020
- ps: Start-FileDownload 'https://github.com/Microsoft/Microsoft-MPI/releases/download/v10.0/msmpisdk.msi'
2121
- msmpisdk.msi /passive
22+
- powershell -file "scripts\appveyor_install_miktex-latest-minimal.ps1"
23+
- refreshenv
24+
- pdflatex -version
2225

2326
build_script:
2427
- cmd: git submodule update --init --recursive
2528
- cmd: python scripts/lint.py
2629
- cmd: mkdir build
2730
- cmd: cd build
2831
- cmd: cmake -G "%CMAKE_GENERATOR%" ^
29-
-D USE_MPI=ON ^
30-
-D USE_OMP=ON ^
31-
-D USE_TBB=ON ^
32-
-D USE_STD=ON ^
32+
-D USE_MPI=ON ^
33+
-D USE_OMP=ON ^
34+
-D USE_TBB=ON ^
35+
-D USE_STD=ON ^
36+
-D USE_LATEX=ON ^
3337
-D MPI_C_INCLUDE_PATH:PATH="%MPI_HOME%/Include" ^
3438
-D MPI_C_LIBRARIES:PATH="%MPI_HOME%/Lib/x86/msmpi.lib" ^
3539
-D MPI_CXX_INCLUDE_PATH:PATH="%MPI_HOME%/Include" ^

0 commit comments

Comments
 (0)