-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from cwpearson/feature/packers
More PR tests, non-contiguous mdspan support, documentation
- Loading branch information
Showing
44 changed files
with
890 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Docs build | ||
run-name: Docs build | ||
on: [push] | ||
|
||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
MDBOOK_VERSION: 0.4.36 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install sphinx | ||
run: | | ||
pip install -U -r docs/requirements.txt | ||
- name: Build with sphinx | ||
run: make -C docs html |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: clang-format check | ||
run-name: clang-format check | ||
|
||
on: [push, pull_request] | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
formatting-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run clang-format style check. | ||
uses: DoozyX/[email protected] | ||
with: | ||
clangFormatVersion: 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Linux (mdspan) | ||
run-name: Linux (mdspan) | ||
on: [push] | ||
jobs: | ||
Kokkos-040200-OpenMPI-OpenMP-kokkosmdspan-Release: | ||
env: | ||
KOKKOS_SRC: ${{ github.workspace }}/_deps/kokkos | ||
KOKKOS_BUILD: ${{ github.workspace }}/_deps/kokkos-build | ||
KOKKOS_INSTALL: ${{ github.workspace }}/_deps/kokkos-install | ||
COMM_SRC: ${{ github.workspace }} | ||
COMM_BUILD: ${{ github.workspace }}/build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Install MPI | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y libopenmpi-dev openmpi-bin cmake | ||
which mpirun | ||
mpirun --version | ||
which mpicxx | ||
mpicxx --version | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- name: Build Kokkos | ||
run: | | ||
git clone https://github.com/kokkos/kokkos.git "$KOKKOS_SRC" | ||
cd "$KOKKOS_SRC" && git checkout 4.2.00 | ||
cmake -S "$KOKKOS_SRC" -B "$KOKKOS_BUILD" -DCMAKE_INSTALL_PREFIX="$KOKKOS_INSTALL" -DCMAKE_BUILD_TYPE=Release -DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_OPENMP=ON -DKokkos_ARCH_NATIVE=ON -DCMAKE_CXX_COMPILER=mpicxx | ||
cmake --build "$KOKKOS_BUILD" --parallel $(nproc) -t install | ||
- name: Build KokkosComm | ||
run: | | ||
cmake -S "$COMM_SRC" -B "$COMM_BUILD" -DKokkos_DIR="$KOKKOS_INSTALL/lib/cmake/Kokkos" -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wshadow -Wpedantic" -DKokkosComm_ENABLE_MDSPAN=ON -DKokkosComm_USE_KOKKOS_MDSPAN=ON | ||
VERBOSE=1 cmake --build "$COMM_BUILD" | ||
- name: Test KokkosComm | ||
run: | | ||
ctest -V --test-dir "$COMM_BUILD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: macOS (mdspan) | ||
run-name: macOS (mdspan) | ||
on: [push] | ||
jobs: | ||
Kokkos-040200-MPICH-Threads-kokkosmdspan-Release: | ||
env: | ||
KOKKOS_SRC: ${{ github.workspace }}/_deps/kokkos | ||
KOKKOS_BUILD: ${{ github.workspace }}/_deps/kokkos-build | ||
KOKKOS_INSTALL: ${{ github.workspace }}/_deps/kokkos-install | ||
COMM_SRC: ${{ github.workspace }} | ||
COMM_BUILD: ${{ github.workspace }}/build | ||
runs-on: macos-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Install MPI | ||
run: | | ||
brew install mpich cmake | ||
which mpirun | ||
mpirun --version | ||
which mpicxx | ||
mpicxx --version | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- name: Build Kokkos | ||
run: | | ||
git clone https://github.com/kokkos/kokkos.git "$KOKKOS_SRC" | ||
cd "$KOKKOS_SRC" && git checkout 4.2.00 | ||
cmake -S "$KOKKOS_SRC" -B "$KOKKOS_BUILD" -DCMAKE_INSTALL_PREFIX="$KOKKOS_INSTALL" -DCMAKE_BUILD_TYPE=Release -DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_THREADS=ON -DKokkos_ARCH_NATIVE=ON -DCMAKE_CXX_COMPILER=mpicxx | ||
cmake --build "$KOKKOS_BUILD" --parallel $(nproc) -t install | ||
- name: Build KokkosComm | ||
run: | | ||
cmake -S "$COMM_SRC" -B "$COMM_BUILD" -DKokkos_DIR="$KOKKOS_INSTALL/lib/cmake/Kokkos" -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wshadow -Wpedantic" -DKokkosComm_ENABLE_MDSPAN=ON -DKokkosComm_USE_KOKKOS_MDSPAN=ON | ||
VERBOSE=1 cmake --build "$COMM_BUILD" | ||
- name: Test KokkosComm | ||
run: | | ||
ctest -V --test-dir "$COMM_BUILD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
Core | ||
==== | ||
|
||
|
||
Point-to-point | ||
-------------- | ||
|
||
.. cpp:function:: template <typename SendView, typename ExecSpace> \ | ||
Req KokkosComm::isend(const ExecSpace &space, const SendView &sv, int dest, int tag, MPI_Comm comm) | ||
|
||
MPI_Isend wrapper | ||
|
||
:param space: The execution space to operate in | ||
:param sv: The data to send | ||
:param dest: the destination rank | ||
:param tag: the MPI tag | ||
:param comm: the MPI communicator | ||
:tparam SendView: A Kokkos::View to send | ||
:tparam ExecSpace: A Kokkos execution space to operate in | ||
:returns: A KokkosComm::Req representing the asynchronous communication and any lifetime-extended views. | ||
|
||
.. cpp:function:: template <typename SendView, typename ExecSpace> \ | ||
void KokkosComm::send(const ExecSpace &space, const SendView &sv, int dest, int tag, MPI_Comm comm) | ||
|
||
MPI_Send wrapper | ||
|
||
:param space: The execution space to operate in | ||
:param sv: The data to send | ||
:param dest: the destination rank | ||
:param tag: the MPI tag | ||
:param comm: the MPI communicator | ||
:tparam SendView: A Kokkos::View to send | ||
:tparam ExecSpace: A Kokkos execution space to operate in | ||
|
||
.. cpp:function:: template <typename Recv, typename ExecSpace> \ | ||
void KokkosComm::recv(const ExecSpace &space, Recv &rv, int src, int tag, MPI_Comm comm) | ||
|
||
MPI_Recv wrapper | ||
|
||
:param space: The execution space to operate in | ||
:param srv: The data to recv | ||
:param src: the source rank | ||
:param tag: the MPI tag | ||
:param comm: the MPI communicator | ||
:tparam Recv: A Kokkos::View to send | ||
:tparam ExecSpace: A Kokkos execution space to operate in | ||
|
||
|
||
Collective | ||
---------- | ||
|
||
.. cpp:function:: template <typename SendView, typename RecvView, typename ExecSpace> \ | ||
void KokkosComm::reduce(const ExecSpace &space, const SendView &sv, const RecvView &rv, MPI_Op op, int root, MPI_Comm comm) | ||
|
||
MPI_Reduce wrapper | ||
|
||
:param space: The execution space to operate in | ||
:param sv: The data to send | ||
:param rv: The view to receive into | ||
:param op: The MPI_Op to use in the reduction | ||
:param root: The root rank for the reduction | ||
:param comm: the MPI communicator | ||
:tparam SendView: A Kokkos::View to send | ||
:tparam RecvView: A Kokkos::View to recv | ||
:tparam ExecSpace: A Kokkos execution space to operate in | ||
|
||
Related Types | ||
------------- | ||
|
||
.. cpp:class:: KokkosComm::Req | ||
|
||
A wrapper around an MPI_Request that can also extend the lifetime of Views. | ||
|
||
.. cpp:function:: MPI_Request &KokkosComm::Req::mpi_req() | ||
|
||
Retrieve a reference to the held MPI_Request. | ||
|
||
.. cpp:function:: void KokkosComm::Req::wait() | ||
|
||
Call MPI_Wait on the held MPI_Request and drop copies of any previous arguments to Req::keep_until_wait(). | ||
|
||
.. cpp:function:: template<typename View> \ | ||
void KokkosComm::Req::keep_until_wait(const View &v) | ||
|
||
Extend the lifetime of v at least until Req::wait() is called. | ||
This is useful to prevent a View from being destroyed during an asynchronous MPI operation. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.