Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

License

NotificationsYou must be signed in to change notification settings

danclas/pp_2022_spring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build application

Parallel Programming Course

The following parallel programming technologies are considered in practice:

  • MPI
  • OpenMP
  • TBB
  • std::thread

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)
    • Respect others time and don't slow down the job queue
  2. Carefully check if the program can hang

1. Set up your environment

Static analysis of project

  • Windows (MSVC):

Unsupported operating system!

  • Linux (gcc andclang):
sudo apt install cppcheck
  • MacOS (apple clang):
brew install cppcheck

Code style analysis

Please, followGoogle C++ Style Guide.

pip install cpplint # (Python3)

Parallel programming technologies

MPI

  • Windows (MSVC):

Installers link. You have to installmsmpisdk.msi andmsmpisetup.exe.

  • Linux (gcc andclang):
sudo apt install mpichsudo apt install openmpi-binsudo apt install libopenmpi-dev
  • MacOS (apple clang):
brew install open-mpi

OpenMP

OpenMP is included intogcc andmsvc, but some components should be installed additionally:

  • Linux (gcc andclang):
sudo apt install libomp-dev
  • MacOS (apple clang): The system is completely unstable thus you are not recommended to use it withOpenMP!
brew install libomp

TBB

  • Windows (MSVC):

CMake installsTBB while you runcmake for that project on Windows.

  • Linux (gcc andclang):
sudo apt-get install libtbb-dev
  • MacOS (apple clang):
brew install tbb

std::thread

  • std::thread is included into STL libraries.

2. Build the project withCMake

Navigate to a source code folder.

  1. Configure the build:Makefile,.sln, etc.
mkdir build && cd buildcmake -D USE_SEQ=ON \      -D USE_MPI=ON \      -D USE_OMP=ON \      -D USE_TBB=ON \      -D USE_STD=ON \      -D USE_STYLE_CHECKER=ON ..

Help on CMake keys:

  • -D USE_SEQ=ON enableSequential labs (based on OpenMP's CMakeLists.txt).
  • -D USE_MPI=ON enableMPI labs.
  • -D USE_OMP=ON enableOpenMP labs.
  • -D USE_TBB=ON enableTBB labs.
  • -D USE_STD=ON enablestd::thread labs.
  • -D USE_STYLE_CHECKER=ON enable style check with build project.

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

  1. Build the project:
cmake --build . --config RELEASE
  1. Check the task
  • Run<project's folder>/build/bin

3. How to submit you work

  • There aretask_1,task_2,task_3,task_4 folders inmodules directory. There are 4 tasks 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 5 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 intest_tasks.
  • The number of directories will increase with time. To build only your project, you need to do the following:

    cmake --build . --target <name task's directory>_<name_technology> --config RELEASE

    Example:

    cmake --build . --target nesterov_a_vector_sum_mpi --config RELEASE
  • Name your pull request in the following way:

    • for tasks:
    <Фамилия Имя>. Задача <Номер задачи>. Вариант <Номер варианта>. <Полное название задачи>.Нестеров Александр. Задача 1. Вариант 123. Сумма элементов вектора.
  • Provide the full task definition in pull request's description.

    Example pull request is located in repo's pull requests.

  • Work on your fork-repository. Keep your work on a separate branch andNOT onmaster!!!. Name you branch in the same way as your task's folder. To create a branch run:

    git checkout -b nesterov_a_vector_sum

Failing to follow the rules makes the project build red.

And finally,

All information of the course is in wiki page!!!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp