10000 GitHub - lslusarczyk/distributed-ranges at mateusz_sort_expose_mpi_assert
[go: up one dir, main page]

Skip to content

lslusarczyk/distributed-ranges

 
 

Repository files navigation

Distributed Ranges

Productivity library for distributed and partitioned memory based on C++ Ranges.

Overview slides

The documentation is built from main branch on every commit and published at latest spec and latest doxygen.

Benchmark results

Environment Setup

On Ubuntu 22.04:

sudo apt install g++-12

If you want to build the document or run the pre-commit checks, you must install some python packages. Create a python virtual environment and install dependencies:

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Activate virtual environment:

source venv/bin/activate

For benchmarking:

pip install src-python/drbench

Examples

Build and test with gcc for CPU:

CXX=g++-12 cmake -B build
make -C build -j all test

Build and test with ipcx for SYCL && CPU:

CXX=icpx cmake -B build -DENABLE_SYCL=ON

Build and test with ipcx for SYCL && CPU on devcloud:

CXX=icpx cmake -B build -DENABLE_SYCL=ON -DENABLE_MPIFORK=on

See how example is run and the output:

cd build
ctest -VV

Logging

Add this to your main to enable logging:

std::ofstream logfile(fmt::format("dr.{}.log", comm_rank));
dr::drlog.set_file(logfile);

Adding DR to a project

If your project uses CMAKE, add the following to your CMakeLists.txt to download the library:

find_package(MPI REQUIRED)
include(FetchContent)
FetchContent_Declare(
  dr
  GIT_REPOSITORY https://github.com/oneapi-src/distributed-ranges.git
  GIT_TAG main
  )
FetchContent_MakeAvailable(dr)

The above will define targets that can be included in your project:

target_link_libraries(<application> MPI::MPI_CXX DR::mpi)

If your project does not use CMAKE, then you need to download the library, and install it into a prefix:

git clone https://github.com/oneapi-src/distributed-ranges.git dr
cd dr
cmake -B build -DCMAKE_INSTALL_PREFIX=<prefix>
make -C build install
cmake -B build-fmt -DCMAKE_INSTALL_PREFIX=<prefix> build/_deps/cpp-format-src
make -C build-fmt install

Use -I and -L to find headers and libs during compilation:

g++ -std=c=++20 -I <prefix>/include -L <prefix>/lib -L /opt/intel/oneapi/mpi/latest/lib/release -lfmt -lmpicxx -lmpi

Developer Information

Submitting a PR

Follow the standard github workflow. Fork this repo, clone your fork, make changes, commit to a new branch, push branch to your fork. Submit a PR from your fork.

The CI runs static checks and runs the test system. See pre-commit for information on failing static checks.

See also

Fuzz Testing
Fuzz testing of distributed ranges APIs
Spec Editing
Editing the API document
Print Type
Print types at compile time:
Testing
Test system maintenance
Security
Security policy

About

Łukasz's constributions to distributed ranges

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 95.9%
  • CMake 3.1%
  • Other 1.0%
0