Skip to content

Commit 50241e8

Browse files
authored
updated readme (#868)
1 parent db1c811 commit 50241e8

File tree

4 files changed

+130
-70
lines changed

4 files changed

+130
-70
lines changed

README.rst

Lines changed: 127 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
Distributed Ranges
77
===================
88

9-
.. image:: https://github.com/intel-sandbox/libraries.runtimes.hpc.dds.distributed-ranges/actions/workflows/pr.yml/badge.svg
10-
:target: https://github.com/intel-sandbox/libraries.runtimes.hpc.dds.distributed-ranges/actions/workflows/pr.yml
9+
.. image:: https://github.com/oneapi-src/distributed-ranges/actions/workflows/pr.yml/badge.svg
10+
:target: https://github.com/oneapi-src/distributed-ranges/actions/workflows/pr.yml
1111
.. image:: https://www.bestpractices.dev/projects/8975/badge
1212
:target: https://www.bestpractices.dev/projects/8975
1313

@@ -17,60 +17,124 @@ C++ Ranges.
1717
About
1818
-----
1919

20-
Distributed Ranges is a productivity library for distributed and partitioned memory based on C++ ranges.
20+
Distributed Ranges is a C++ productivity library for distributed and partitioned memory based on C++ ranges.
2121
It offers a collection of data structures, views, and algorithms for building generic abstractions
2222
and provides interoperability with MPI, SHMEM, SYCL and OpenMP and portability on CPUs and GPUs.
2323
NUMA-aware allocators and distributed data structures facilitate development of C++ applications
2424
on heterogeneous nodes with multiple devices and achieve excellent performance and parallel scalability
2525
by exploiting local compute and data access.
2626

27+
Main strength of the library
28+
============================
29+
30+
In this model one can:
31+
32+
* create a `distributed data structure` that work with all our algorithms out of the box
33+
* create an `algorithm` that works with all our distributed data structures out of the box
34+
35+
Distributed Ranges is a `glue` that makes this possible.
36+
37+
2738
Documentation
2839
-------------
2940

30-
- Usage:
31-
- Introductory presentation: `Distributed Ranges, why you need it`_, 2024
32-
- Article: `Get Started with Distributed Ranges`_, 2023
33-
- Tutorial: `Sample repository showing Distributed Ranges usage`_
34-
- Design / Implementation:
35-
- Conference paper: `Distributed Ranges, A Model for Distributed Data Structures, Algorithms, and Views`_, 2024
36-
- Talk: `CppCon 2023; Benjamin Brock; Distributed Ranges`_, 2023
37-
- Technical presentation: `Intel Innovation'23`_, 2023
38-
- `API specification`_
39-
- `Doxygen`_
41+
* Usage:
4042

41-
Contact us
42-
----------
43+
* Introductory presentation: `Distributed Ranges, why you need it`_, 2024
44+
* Article: `Get Started with Distributed Ranges`_, 2023
45+
* Tutorial: `Distributed Ranges Tutorial`_
4346

44-
We seek collaboration opportunities and welcome feedback on ways to extend the library,
45-
according to developer needs. Contact us by writing a `new issue`_.
47+
* Design / Implementation:
4648

49+
* Conference paper: `Distributed Ranges, A Model for Distributed Data Structures, Algorithms, and Views`_, 2024
50+
* Talk: `CppCon 2023; Benjamin Brock; Distributed Ranges`_, 2023
51+
* Technical presentation: `Intel Innovation'23`_, 2023
52+
* `API specification`_
4753

48-
Examples
49-
--------
5054

51-
See `Sample repository showing Distributed Ranges usage`_ for a few well explained examples.
52-
Additionally you may build all tests of this repository to see and run much more examples.
55+
Requirements
56+
------------
57+
58+
* Linux
59+
* cmake >=3.20
60+
* `OneAPI HPC Toolkit`_ installed
61+
62+
Enable `OneAPI` by::
63+
64+
source ~/intel/oneapi/setvars.sh
65+
66+
... or by::
67+
68+
source /opt/intel/oneapi/setvars.sh
69+
70+
... or wherever you have ``oneapi/setvars.sh`` script installed in your system.
71+
72+
Additional requirements for NVIDIA GPUs
73+
=======================================
74+
75+
* `CUDA`_
76+
* `OneAPI for NVIDIA GPUs`_ plugin
77+
78+
When enabling OneAPI use ``--include-intel-llvm`` option, e.g. call::
79+
80+
source ~/intel/oneapi/setvars.sh --include-intel-llvm
81+
82+
... instead of ``source ~/intel/oneapi/setvars.sh``.
83+
84+
85+
Build and run
86+
-------------
87+
88+
Build for Intel GPU/CPU
89+
=======================
90+
91+
All tests and examples can be build by::
92+
93+
CXX=icpx cmake -B build
94+
cmake --build build -- -j
5395

54-
Build and test with gcc for CPU::
5596

56-
CXX=g++-12 cmake -B build
57-
make -C build -j all test
97+
Build for NVidia GPU
98+
====================
5899

59-
Build and test with ipcx for SYCL && CPU/GPU::
100+
.. note::
60101

61-
CXX=icpx cmake -B build -DENABLE_SYCL=ON
102+
Distributed Ranges library works in two models:
103+
- Multi Process (based on SYCL and MPI)
104+
- Single Process (based on pure SYCL)
62105

63-
See how example is run and the output::
106+
On NVIDIA GPU only `Multi Process` model is currently supported.
64107

65-
cd build
66-
ctest -VV
108+
To build multi-process tests call::
109+
110+
CXX=icpx cmake -B build -DENABLE_CUDA:BOOL=ON
111+
cmake --build build --target mp-all-tests -- -j
112+
113+
114+
Run tests
115+
=========
116+
117+
Run multi process tests::
118+
119+
ctest --test-dir build --output-on-failure -L MP -j 4
120+
121+
Run single process tests::
122+
123+
ctest --test-dir build --output-on-failure -L SP -j 4
124+
125+
Run all tests::
126+
127+
ctest --test-dir build --output-on-failure -L TESTLABEL -j 4
128+
129+
130+
Examples
131+
--------
132+
133+
See `Distributed Ranges Tutorial`_ for a few well explained examples.
67134

68135
Adding Distributed Ranges to your project
69136
-----------------------------------------
70137

71-
See `Sample repository showing Distributed Ranges usage`_
72-
for a live example how to write CMakeLists.txt. Alternatively you may read details below.
73-
74138
If your project uses CMAKE, add the following to your
75139
``CMakeLists.txt`` to download the library::
76140

@@ -87,52 +151,49 @@ The above will define targets that can be included in your project::
87151

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

90-
If your project does not use CMAKE, then you need to download the
91-
library, and install it into a prefix::
92-
93-
git clone https://github.com/oneapi-src/distributed-ranges.git dr
94-
cd dr
95-
cmake -B build -DCMAKE_INSTALL_PREFIX=<prefix>
96-
make -C build install
97-
cmake -B build-fmt -DCMAKE_INSTALL_PREFIX=<prefix> build/_deps/cpp-format-src
98-
make -C build-fmt install
99-
100-
Use ``-I`` and ``-L`` to find headers and libs during compilation::
101-
102-
g++ -std=c=++20 -I <prefix>/include -L <prefix>/lib -L /opt/intel/oneapi/mpi/latest/lib/release -lfmt -lmpicxx -lmpi
154+
See `Distributed Ranges Tutorial`_
155+
for a live example of a cmake project that imports and uses Distributed Ranges.
103156

104157
Logging
105158
-------
106159

107-
Add this to your main to enable logging::
160+
Add below code to your ``main`` function to enable logging.
108161

109-
std::ofstream logfile(fmt::format("dr.{}.log", comm_rank));
162+
If using `Single-Process` model::
163+
164+
std::ofstream logfile("dr.log");
110165
dr::drlog.set_file(logfile);
111166

167+
If using `Multi-Process` model::
112168

113-
Contributing
114-
------------
169+
int my_mpi_rank;
170+
MPI_Comm_rank(MPI_COMM_WORLD, &my_mpi_rank);
171+
std::ofstream logfile(fmt::format("dr.{}.log", my_mpi_rank));
115172

116-
See `CONTRIBUTING`_.
173+
Example of adding custom log statement to your code::
117174

175+
DRLOG("my debug message with varA:{} and varB:{}", a, b);
118176

119-
See also
120-
--------
121177

122-
`Fuzz Testing`_
123-
Fuzz testing of distributed ranges APIs
178+
Contact us
179+
----------
124180

125-
`Spec Editing`_
126-
Editing the API document
181+
Contact us by writing a `new issue`_.
127182

128-
`Print Type`_
129-
Print types at compile time:
183+
We seek collaboration opportunities and welcome feedback on ways to extend the library,
184+
according to developer needs.
130185

131-
`Testing`_
132-
Test system maintenance
133186

134-
`Security`_
135-
Security policy
187+
See also
188+
--------
189+
190+
* `CONTRIBUTING`_
191+
* `Fuzz Testing`_
192+
* `Spec Editing`_ - Editing the API document
193+
* `Print Type`_ - Print types at compile time:
194+
* `Testing`_ - Test system maintenance
195+
* `Security`_ - Security policy
196+
* `Doxygen`_
136197

137198
.. _`Security`: SECURITY.md
138199
.. _`Testing`: doc/developer/testing
@@ -142,10 +203,13 @@ See also
142203
.. _`CONTRIBUTING`: CONTRIBUTING.md
143204
.. _`Distributed Ranges, why you need it`: https://github.com/oneapi-src/distributed-ranges/blob/main/doc/presentations/Distributed%20Ranges%2C%20why%20you%20need%20it.pdf
144205
.. _`Get Started with Distributed Ranges`: https://www.intel.com/content/www/us/en/developer/articles/guide/get-started-with-distributed-ranges.html
145-
.. _`Sample repository showing Distributed Ranges usage`: https://github.com/oneapi-src/distributed-ranges-tutorial
206+
.. _`Distributed Ranges Tutorial`: https://github.com/oneapi-src/distributed-ranges-tutorial
146207
.. _`Distributed Ranges, A Model for Distributed Data Structures, Algorithms, and Views`: https://dl.acm.org/doi/10.1145/3650200.3656632
147208
.. _`CppCon 2023; Benjamin Brock; Distributed Ranges`: https://www.youtube.com/watch?v=X_dlJcV21YI
148209
.. _`Intel Innovation'23`: https://github.com/oneapi-src/distributed-ranges/blob/main/doc/presentations/Distributed%20Ranges.pdf
149210
.. _`API specification`: https://oneapi-src.github.io/distributed-ranges/spec/
150211
.. _`Doxygen`: https://oneapi-src.github.io/distributed-ranges/doxygen/
151212
.. _`new issue`: issues/new
213+
.. _`OneAPI HPC Toolkit`: https://www.intel.com/content/www/us/en/developer/tools/oneapi/hpc-toolkit-download.html
214+
.. _`OneAPI for NVIDIA GPUs`: https://developer.codeplay.com/products/oneapi/nvidia/home/
215+
.. _`CUDA`: https://developer.nvidia.com/cuda-toolkit

doc/spec/source/conf.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# -- Project information -----------------------------------------------------
2323

2424
project = "distributed-ranges"
25-
copyright = "2022-2024, Intel"
25+
copyright = "2022-2025, Intel"
2626

2727

2828
# -- General configuration ---------------------------------------------------
@@ -52,10 +52,7 @@
5252
# documentation.
5353
#
5454
html_theme_options = {
55-
"repository_url": (
56-
"https://github.com/intel-sandbox/"
57-
"personal.rscohn1.distributed-ranges"
58-
),
55+
"repository_url": ("https://github.com/oneapi-src/distributed-ranges"),
5956
"path_to_docs": "doc/spec/source",
6057
"use_issues_button": True,
6158
"use_edit_page_button": True,

doc/spec/source/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,4 @@ Indices and tables
2727
==================
2828

2929
* :ref:`genindex`
30-
* :ref:`modindex`
3130
* :ref:`search`

include/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
FetchContent_Declare(
66
dpl
7-
GIT_REPOSITORY https://github.com/oneapi-src/oneDPL.git
7+
GIT_REPOSITORY https://github.com/uxlfoundation/oneDPL.git
88
GIT_TAG main)
99
FetchContent_MakeAvailable(dpl)
1010

0 commit comments

Comments
 (0)