Skip to content

Commit 6353ccf

Browse files
committed
add document for the lcw parcelport
1 parent 57467c3 commit 6353ccf

2 files changed

Lines changed: 93 additions & 0 deletions

File tree

docs/sphinx/manual.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ information on how to build and use |hpx| in different scenarios.
3232
manual/debugging_hpx_applications
3333
manual/optimizing_hpx_applications
3434
manual/using_the_lci_parcelport
35+
manual/using_the_lcw_parcelport
3536
manual/hpx_runtime_and_resources
3637
manual/executors
3738
manual/miscellaneous
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
..
2+
Copyright (c) 2025 Jiakun Yan
3+
4+
SPDX-License-Identifier: BSL-1.0
5+
Distributed under the Boost Software License, Version 1.0. (See accompanying
6+
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7+
8+
.. _using_the_lcw_parcelport:
9+
10+
========================
11+
Using the LCW parcelport
12+
========================
13+
14+
.. _info_lcw:
15+
16+
Basic information
17+
=================
18+
19+
The LCW parcelport is an advanced MPI parcelport that can utilize the MPICH VCI
20+
and Continuation extensions. The exact MPI implementation is wrapped in a thin
21+
wrapper layer (the Lightweight Communication Wrapper, or LCW). This wrapper
22+
provides an active message, send/recv, completion queue, and device abstraction
23+
on top of MPI (with/without extensions), GASNet-EX, and LCI. The GASNet-EX
24+
backend of LCW cannot be used in |hpx| for now, as it lacks send/recv support.
25+
26+
.. _`Lightweight Communication Wrapper`: https://github.com/JiakunYan/lcw
27+
28+
.. _build_lcw_pp:
29+
30+
Build |hpx| with the LCW parcelport
31+
===================================
32+
33+
While building |hpx|, you can specify a set of |cmake|_ variables to enable
34+
and configure the LCW parcelport. Below, there is a set of the most important
35+
and frequently used CMake variables.
36+
37+
.. option:: HPX_WITH_PARCELPORT_LCW
38+
39+
Enable the LCW parcelport. This enables the use of LCW for networking
40+
operations in the |hpx| runtime. The default value is ``OFF`` because it's
41+
not available on all systems and/or requires another dependency.
42+
You must set this variable to ``ON`` in order to use the LCW parcelport. All
43+
the following variables only make sense when this variable is set to ``ON``.
44+
45+
.. option:: HPX_WITH_FETCH_LCW
46+
47+
Use FetchContent to fetch LCW. The default value is ``OFF``.
48+
If this option is set to ``OFF``. You need to install your own LCW library
49+
and |hpx| will try to find it using |cmake|_ ``find_package``. You can
50+
specify the location of the LCW installation by the environmental variable
51+
``LCW_ROOT``. Refer to the `LCW README`_ for how to install LCW.
52+
If this option is set to ``ON``. |hpx| will fetch and build LCW for you. You
53+
can use the following |cmake|_ variables to configure this behavior for your
54+
platform.
55+
56+
.. _`LCW README`: https://github.com/JiakunYan/lcw#readme
57+
58+
.. option:: HPX_WITH_LCW_TAG
59+
60+
This variable only takes effect when ``HPX_WITH_FETCH_LCW`` is set to ``ON``
61+
and ``FETCHCONTENT_SOURCE_DIR_LCW`` is not set.
62+
|hpx| will fetch LCW from its github repository. This variable controls the
63+
branch/tag LCW will be fetched.
64+
65+
.. option:: FETCHCONTENT_SOURCE_DIR_LCW
66+
67+
This variable only takes effect when ``HPX_WITH_FETCH_LCW`` is set to ``ON``.
68+
When it is defined, ``HPX_WITH_LCW_TAG`` will be ignored.
69+
It accepts a path to a local version of LCW source code and |hpx| will fetch
70+
and build LCW from there.
71+
72+
.. _run_lcw_pp:
73+
74+
Run |hpx| with the LCW parcelport
75+
=================================
76+
77+
You can configure runtime behavior with the following options.
78+
79+
.. option:: --hpx:ini=hpx.parcel.lcw.ndevices=<n>
80+
81+
The number of LCW devices to use (default: 2). Each LCW device maps to an MPI
82+
communicator or an LCI device. When the MPICH VCI extension is enabled, each
83+
MPI communicator will be mapped to a dedicated collection of network resources.
84+
More devices lead to lower thread contention, but too many devices
85+
may lead to load imbalance or hardware overhead.
86+
87+
Reference
88+
=========
89+
90+
Yan, Jiakun, Marc Snir, and Yanfei Guo. *Examining MPI and its Extensions for
91+
Asynchronous Multithreaded Communication.* In *European MPI Users' Group Meeting*,
92+
pp. 122-142. Cham: Springer Nature Switzerland, 2025.

0 commit comments

Comments
 (0)