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: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build*
/build*
out
mpich
cmake-build-*
Expand Down
28 changes: 0 additions & 28 deletions docs/build.md

This file was deleted.

34 changes: 34 additions & 0 deletions docs/build.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Build the Project with ``CMake``
================================

Navigate to a source code folder.

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

.. code-block:: bash

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 CMAKE_BUILD_TYPE=Release ..

*Help on CMake keys:*

- ``-D USE_SEQ=ON`` enable ``Sequential`` labs (based on OpenMP's CMakeLists.txt).
- ``-D USE_MPI=ON`` enable ``MPI`` labs.
- ``-D USE_OMP=ON`` enable ``OpenMP`` labs.
- ``-D USE_TBB=ON`` enable ``TBB`` labs.
- ``-D USE_STL=ON`` enable ``std::thread`` labs.
- ``-D USE_FUNC_TESTS=ON`` enable functional tests.
- ``-D USE_PERF_TESTS=ON`` enable performance tests.
- ``-D CMAKE_BUILD_TYPE=Release`` required parameter for stable work of repo.

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

2. **Build the project**:

.. code-block:: bash

cmake --build . --config Release --parallel

3. **Check the task**:

* Run ``<project's folder>/build/bin``
4 changes: 0 additions & 4 deletions docs/download.md

This file was deleted.

6 changes: 6 additions & 0 deletions docs/download.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Download all submodules
=======================

.. code-block:: bash

git submodule update --init --recursive --depth=1
42 changes: 0 additions & 42 deletions docs/environment.md

This file was deleted.

55 changes: 55 additions & 0 deletions docs/environment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Set Up Your Environment
========================

Code Style Analysis
--------------------
Please follow the `Google C++ Style Guide <https://google.github.io/styleguide/cppguide.html>`_.

Code style is checked using the `clang-format <https://clang.llvm.org/docs/ClangFormat.html>`_ tool.

Parallel Programming Technologies
---------------------------------

``MPI``
~~~~~~~
- **Windows (MSVC)**:

`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)**:

.. code-block:: bash

sudo apt install -y mpich openmpi-bin libopenmpi-dev

- **MacOS (apple clang)**:

.. code-block:: bash

brew install open-mpi

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

- **Linux (gcc and clang)**:

.. code-block:: bash

sudo apt install -y libomp-dev

- **MacOS (llvm)**:

.. code-block:: bash

brew install llvm
brew install libomp

``TBB``
~~~~~~~
- **Windows (MSVC)**, **Linux (gcc and clang)**, **MacOS (apple clang)**:
Build as 3rdparty in the current project.

``std::thread``
~~~~~~~~~~~~~~~
``std::thread`` is included in STL libraries.
65 changes: 0 additions & 65 deletions docs/submit_work.md

This file was deleted.

83 changes: 83 additions & 0 deletions docs/submit_work.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
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>``.

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:

- ``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 prototypes and classes in the ``include`` directory must be namespace-escaped. Name your namespace as follows:

.. code-block:: cpp

namespace <last name>_<first letter of name>_<short task name>_<technology> {
...
}
e.g.
namespace nesterov_a_test_task_seq {

class TestTaskSequential : public ppc::core::Task {
...
};

} // namespace nesterov_a_test_task_seq

- Name your group of tests and individual test cases as follows:

- For functional tests (for maximum coverage):

.. code-block:: cpp

TEST(<last name>_<first letter of name>_<short task name>_<technology>, <any_name_of_test_case>) {
...
}
e.g.
TEST(nesterov_a_vector_sum_omp, test_sum) {
...
}

- For performance tests (only 2 tests - ``pipeline`` and ``task`` - no more no less):

.. code-block:: cpp

TEST(<last name>_<first letter of name>_<short task name>_<technology>, <type_of_performance_validation>) {
...
}
e.g.
TEST(nesterov_a_vector_sum_stl, test_pipeline_run) {
...
}
TEST(nesterov_a_vector_sum_stl, test_task_run) {
...
}

- Name your pull request as follows:

- For tasks:

.. code-block::

<Last Name First Name>. Task <Number of task>. Variant <Number of variant>. Technology <Name of technology>. <Full name of task>.
Нестеров Александр. Задача 1. Вариант 123. Технология MPI. Сумма элементов вектора.

- Provide the full task definition in the pull request's description.

Example pull request can be found in the repository's pull requests.

- Work on your forked repository. Keep your work on a separate branch (not on ``master``)!!! Name your branch the same as your task's folder. To create a branch, run:

.. code-block:: bash

git checkout -b nesterov_a_vector_sum_mpi

**Failing to follow the rules will result in a red project build.**
Loading