Skip to content

Commit

Permalink
Merge branch 'develop' into jmm/make-get-parent-pointer-consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurlungur authored Nov 12, 2023
2 parents ef9463f + bd4c0b1 commit eb29ede
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,10 @@ if (PARTHENON_ENABLE_ASCENT)
find_package(Ascent REQUIRED NO_DEFAULT_PATH)
endif()

# Installation configuration
include(GNUInstallDirs)
set(CMAKE_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/parthenon")

add_subdirectory(src)
add_subdirectory(example)
add_subdirectory(benchmarks)
Expand Down
10 changes: 10 additions & 0 deletions cmake/parthenonConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
# the public, perform publicly and display publicly, and to permit others to do so.
#=========================================================================================

if(NOT PARTHENON_CMAKE)
cmake_path(SET PARTHENON_CMAKE_BASE_DIR NORMALIZE "${CMAKE_CURRENT_LIST_DIR}/..")
message(STATUS "Appending parthenon cmake module directory: " ${PARTHENON_CMAKE_BASE_DIR})
list(APPEND CMAKE_MODULE_PATH ${PARTHENON_CMAKE_BASE_DIR})
set(PARTHENON_CMAKE TRUE)
endif()


# Favor using the kokkos package that was built with parthenon, if one has not been specified
if (@PARTHENON_IMPORT_KOKKOS@)
find_package(Kokkos 3 REQUIRED PATHS @Kokkos_DIR@ NO_DEFAULT_PATH)
Expand All @@ -37,4 +45,6 @@ if(@OpenMP_FOUND@)
find_package(OpenMP REQUIRED COMPONENTS CXX)
endif()

find_package(Filesystem REQUIRED COMPONENTS Experimental Final)

include("${CMAKE_CURRENT_LIST_DIR}/parthenonTargets.cmake")
14 changes: 6 additions & 8 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -328,24 +328,22 @@ lint_target(parthenon)
target_include_directories(parthenon PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/generated>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/parthenon>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

install(TARGETS parthenon EXPORT parthenonTargets
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/parthenon"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
install(TARGETS parthenon EXPORT parthenonTargets)

# Maintain directory structure in installed include files
install(DIRECTORY . DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/parthenon" FILES_MATCHING PATTERN "*.hpp")
install(DIRECTORY ./ TYPE INCLUDE FILES_MATCHING PATTERN "*.hpp")

# Install generated config header file
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/generated/config.hpp
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/parthenon")
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")

install(FILES ${PROJECT_BINARY_DIR}/cmake/parthenonConfig.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/parthenon")

install(FILES ${PROJECT_SOURCE_DIR}/cmake/FindFilesystem.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake")

install(EXPORT parthenonTargets
FILE parthenonTargets.cmake
NAMESPACE Parthenon::
Expand Down
5 changes: 3 additions & 2 deletions src/mesh/meshblock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ class StateDescriptor;
// - Not defined in kokkos_abstraction.hpp because it requires the compile time option
// DEFAULT_INNER_LOOP_PATTERN to be set.
template <typename Function>
KOKKOS_INLINE_FUNCTION void par_for_inner(const team_mbr_t &team_member, const int &il,
const int &iu, const Function &function) {
KOKKOS_FORCEINLINE_FUNCTION void par_for_inner(const team_mbr_t &team_member,
const int &il, const int &iu,
const Function &function) {
parthenon::par_for_inner(DEFAULT_INNER_LOOP_PATTERN, team_member, il, iu, function);
}

Expand Down

0 comments on commit eb29ede

Please sign in to comment.