Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ endif()

include(cmake/flags.cmake)

include (GNUInstallDirs)

add_subdirectory(src)
kokkoscomm_add_cxx_flags(TARGET KokkosComm INTERFACE)
message(STATUS ${KOKKOSCOMM_PUBLIC_HEADERS})
set_target_properties(KokkosComm PROPERTIES PUBLIC_HEADER "${KOKKOSCOMM_PUBLIC_HEADERS}")

## Version config file
set(KOKKOSCOMM_VERSION_MAJOR ${CMAKE_PROJECT_VERSION_MAJOR} CACHE STRING "" FORCE)
Expand All @@ -68,6 +67,7 @@ configure_file(
)
target_include_directories(KokkosComm INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/src/>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

## Package config file
Expand Down
2 changes: 1 addition & 1 deletion perf_tests/test_2dhalo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include "test_utils.hpp"

#include "KokkosComm.hpp"
#include <KokkosComm.hpp>

#include <iostream>

Expand Down
2 changes: 1 addition & 1 deletion perf_tests/test_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//
//@HEADER

#include "KokkosComm_include_mpi.hpp"
#include <impl/KokkosComm_include_mpi.hpp>

#include <Kokkos_Core.hpp>
#include <benchmark/benchmark.h>
Expand Down
2 changes: 1 addition & 1 deletion perf_tests/test_sendrecv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include "test_utils.hpp"

#include "KokkosComm.hpp"
#include <KokkosComm.hpp>

template <typename Space, typename View>
void send_recv(benchmark::State &, MPI_Comm comm, const Space &space, int rank,
Expand Down
2 changes: 1 addition & 1 deletion perf_tests/test_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <benchmark/benchmark.h>

#include "KokkosComm_include_mpi.hpp"
#include <impl/KokkosComm_include_mpi.hpp>

// F is a function that takes (state, MPI_Comm, args...)
template <typename F, typename... Args>
Expand Down
32 changes: 24 additions & 8 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,33 @@ add_library(KokkosComm INTERFACE)

target_include_directories(KokkosComm INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_include_directories(KokkosComm INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/impl>
)
target_include_directories(KokkosComm INTERFACE
$<INSTALL_INTERFACE:include>
)

target_link_libraries(KokkosComm INTERFACE MPI::MPI_CXX Kokkos::kokkos)
if(KOKKOSCOMM_USE_KOKKOS_MDSPAN)
target_link_libraries(KokkosComm INTERFACE mdspan)
endif()

file(GLOB_RECURSE KOKKOSCOMM_PUBLIC_HEADERS ${CMAKE_CURRENT_LIST_DIR}/*.hpp)
set(KOKKOSCOMM_PUBLIC_HEADERS ${KOKKOSCOMM_PUBLIC_HEADERS} PARENT_SCOPE)
# FIXME Not sure it is really possible to set BUILD_INTERFACE for header only libraries
# We should ensure that we do not export convenience flags to users
kokkoscomm_add_cxx_flags(TARGET KokkosComm INTERFACE)

set (KokkosCommPublicHeaders
KokkosComm.hpp
KokkosComm_collective.hpp
KokkosComm_pack_traits.hpp
KokkosComm_request.hpp
KokkosComm_traits.hpp
impl/KokkosComm_concepts.hpp
impl/KokkosComm_include_mpi.hpp
impl/KokkosComm_isend.hpp
impl/KokkosComm_mdspan.hpp
impl/KokkosComm_packer.hpp
impl/KokkosComm_recv.hpp
impl/KokkosComm_reduce.hpp
impl/KokkosComm_send.hpp
impl/KokkosComm_types.hpp
)

set_target_properties(KokkosComm PROPERTIES PUBLIC_HEADER "${KokkosCommPublicHeaders}")
12 changes: 9 additions & 3 deletions src/KokkosComm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,20 @@

#pragma once

#include "KokkosComm_collective.hpp"
#include "KokkosComm_version.hpp"

#include <Kokkos_Core.hpp>

#include "KokkosComm_pack_traits.hpp"
#include "KokkosComm_traits.hpp"

#include "KokkosComm_request.hpp"
#include "KokkosComm_collective.hpp"

#include "impl/KokkosComm_isend.hpp"
#include "impl/KokkosComm_recv.hpp"
#include "impl/KokkosComm_send.hpp"

#include <Kokkos_Core.hpp>

namespace KokkosComm {

template <typename SendView, typename ExecSpace>
Expand Down
2 changes: 0 additions & 2 deletions src/KokkosComm_collective.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

#include "impl/KokkosComm_reduce.hpp"

#include <Kokkos_Core.hpp>

namespace KokkosComm {

template <typename SendView, typename RecvView, typename ExecSpace>
Expand Down
6 changes: 3 additions & 3 deletions src/KokkosComm_pack_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

#include "KokkosComm_traits.hpp"

#include "KokkosComm_concepts.hpp"
#include "KokkosComm_mdspan.hpp"
#include "KokkosComm_packer.hpp"
#include "impl/KokkosComm_concepts.hpp"
#include "impl/KokkosComm_mdspan.hpp"
#include "impl/KokkosComm_packer.hpp"

/*! \brief Defines a common interface for packing and unpacking
Kokkos::View-like types \file KokkosComm_traits.hpp
Expand Down
2 changes: 1 addition & 1 deletion src/KokkosComm_request.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <memory>

#include "KokkosComm_include_mpi.hpp"
#include "impl/KokkosComm_include_mpi.hpp" // MPI_REQUEST_NULL, MPI_STATUS_IGNORE

namespace KokkosComm {

Expand Down
5 changes: 2 additions & 3 deletions src/KokkosComm_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@

#pragma once

#include "KokkosComm_mdspan.hpp"

#include "KokkosComm_concepts.hpp"
#include "impl/KokkosComm_mdspan.hpp"
#include "impl/KokkosComm_concepts.hpp"

namespace KokkosComm {

Expand Down
4 changes: 0 additions & 4 deletions src/impl/KokkosComm_isend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@

#include <Kokkos_Core.hpp>

#include "KokkosComm_pack_traits.hpp"
#include "KokkosComm_request.hpp"
#include "KokkosComm_traits.hpp"

// impl
#include "KokkosComm_include_mpi.hpp"

Expand Down
3 changes: 0 additions & 3 deletions src/impl/KokkosComm_recv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@

#include <Kokkos_Core.hpp>

#include "KokkosComm_pack_traits.hpp"
#include "KokkosComm_traits.hpp"

// impl
#include "KokkosComm_include_mpi.hpp"

Expand Down
3 changes: 0 additions & 3 deletions src/impl/KokkosComm_reduce.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@

#include <Kokkos_Core.hpp>

#include "KokkosComm_pack_traits.hpp"
#include "KokkosComm_traits.hpp"

// impl
#include "KokkosComm_include_mpi.hpp"
#include "KokkosComm_types.hpp"
Expand Down
2 changes: 0 additions & 2 deletions src/impl/KokkosComm_send.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

#include <Kokkos_Core.hpp>

#include "KokkosComm_pack_traits.hpp"

// impl
#include "KokkosComm_include_mpi.hpp"

Expand Down
2 changes: 1 addition & 1 deletion unit_tests/test_isendrecv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ using std::MDSPAN_PREFIX() mdspan;

#include <gtest/gtest.h>

#include "KokkosComm.hpp"
#include <KokkosComm.hpp>

template <typename T>
class IsendRecv : public testing::Test {
Expand Down
2 changes: 1 addition & 1 deletion unit_tests/test_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <KokkosComm.hpp>
#include <Kokkos_Core.hpp>

#include "KokkosComm_include_mpi.hpp"
#include <impl/KokkosComm_include_mpi.hpp>

int main(int argc, char *argv[]) {
#if 0
Expand Down
2 changes: 1 addition & 1 deletion unit_tests/test_reduce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <gtest/gtest.h>

#include "KokkosComm.hpp"
#include <KokkosComm.hpp>

template <typename T>
class Reduce : public testing::Test {
Expand Down
2 changes: 1 addition & 1 deletion unit_tests/test_sendrecv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <gtest/gtest.h>

#include "KokkosComm.hpp"
#include <KokkosComm.hpp>

template <typename T>
class SendRecv : public testing::Test {
Expand Down