Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#308: Rename KOKKOS macros #340

Merged
merged 2 commits into from
Jun 21, 2024
Merged
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
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if (${kokkos_DIR_FOUND})
endif()
target_compile_definitions(
${CHECKPOINT_LIBRARY} PUBLIC
KOKKOS_ENABLED_CHECKPOINT=1 KOKKOS_KERNELS_ENABLED=${KERNELS}
MAGISTRATE_KOKKOS_ENABLED=1 MAGISTRATE_KOKKOS_KERNELS_ENABLED=${KERNELS}
)
message(STATUS "Checkpoint: Kokkos enabled")
target_link_libraries(${CHECKPOINT_LIBRARY} PUBLIC Kokkos::kokkos)
Expand Down
4 changes: 2 additions & 2 deletions src/checkpoint/container/kokkos_complex_serialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#include "checkpoint/dispatch/dispatch.h"
#include "checkpoint/dispatch/reconstructor.h"

#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include <Kokkos_Complex.hpp>

Expand All @@ -65,6 +65,6 @@ void serialize(SerializerT& s, Kokkos::complex<T1>& complex)

} // namespace checkpoint

#endif /*KOKKOS_ENABLED_CHECKPOINT*/
#endif /*MAGISTRATE_KOKKOS_ENABLED*/

#endif /*INCLUDED_CHECKPOINT_CONTAINER_KOKKOS_COMPLEX_SERIALIZE_H*/
4 changes: 2 additions & 2 deletions src/checkpoint/container/kokkos_pair_serialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#include "checkpoint/dispatch/dispatch.h"
#include "checkpoint/dispatch/reconstructor.h"

#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include <Kokkos_Pair.hpp>

Expand All @@ -71,6 +71,6 @@ void serialize(SerializerT& s, Kokkos::pair<T1, void>& pair)

} // namespace checkpoint

#endif /*KOKKOS_ENABLED_CHECKPOINT*/
#endif /*MAGISTRATE_KOKKOS_ENABLED*/

#endif /*INCLUDED_CHECKPOINT_CONTAINER_KOKKOS_PAIR_SERIALIZE_H*/
4 changes: 2 additions & 2 deletions src/checkpoint/container/kokkos_unordered_map_serialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#include "checkpoint/dispatch/dispatch.h"
#include "checkpoint/dispatch/reconstructor.h"

#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include <Kokkos_UnorderedMap.hpp>

Expand Down Expand Up @@ -156,6 +156,6 @@ typename std::enable_if_t<

} // namespace checkpoint

#endif /*KOKKOS_ENABLED_CHECKPOINT*/
#endif /*MAGISTRATE_KOKKOS_ENABLED*/

#endif /*INCLUDED_CHECKPOINT_CONTAINER_KOKKOS_UNORDERED_MAP_SERIALIZE_H*/
4 changes: 2 additions & 2 deletions src/checkpoint/container/view_equality.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#include "checkpoint/container/view_traverse_manual.h"
#include "checkpoint/container/view_traverse_ndim.h"

#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include <Kokkos_Core.hpp>
#include <Kokkos_DynamicView.hpp>
Expand Down Expand Up @@ -344,6 +344,6 @@ struct ViewEquality {

} /* end namespace checkpoint */

#endif /*KOKKOS_ENABLED_CHECKPOINT*/
#endif /*MAGISTRATE_KOKKOS_ENABLED*/

#endif /*INCLUDED_CHECKPOINT_CONTAINER_VIEW_EQUALITY_H*/
8 changes: 4 additions & 4 deletions src/checkpoint/container/view_serialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#include "checkpoint/container/view_traverse_manual.h"
#include "checkpoint/container/view_traverse_ndim.h"

#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include <Kokkos_Core.hpp>
#include <Kokkos_DynamicView.hpp>
Expand All @@ -62,7 +62,7 @@
#define CHECKPOINT_KOKKOS_WITHOUTINIT
#endif

#if KOKKOS_KERNELS_ENABLED
#if MAGISTRATE_KOKKOS_KERNELS_ENABLED
#include <Kokkos_StaticCrsGraph.hpp>
#include <KokkosSparse_CrsMatrix.hpp>
#endif
Expand Down Expand Up @@ -588,7 +588,7 @@ void serializeContentsOnly(SerializerT& s, Kokkos::View<T, Ts...>& v) {
deepCopyWithLocalFence(v, values);
}

#if KOKKOS_KERNELS_ENABLED
#if MAGISTRATE_KOKKOS_KERNELS_ENABLED
template< typename Serializer, typename T, typename... Ts >
inline void serialize( Serializer &s, Kokkos::StaticCrsGraph<T, Ts...> &graph ) {
s | graph.entries | graph.row_map | graph.row_block_offsets;
Expand All @@ -611,6 +611,6 @@ inline void serialize( Serializer &s, KokkosSparse::CrsMatrix<T, Ts...> &matrix

} /* end namespace checkpoint */

#endif /*KOKKOS_ENABLED_CHECKPOINT*/
#endif /*MAGISTRATE_KOKKOS_ENABLED*/

#endif /*INCLUDED_CHECKPOINT_CONTAINER_VIEW_SERIALIZE_H*/
4 changes: 2 additions & 2 deletions src/checkpoint/container/view_traits_extract.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#include "checkpoint/common.h"
#include "checkpoint/serializers/serializers_headers.h"

#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include <Kokkos_Core.hpp>
#include <Kokkos_DynamicView.hpp>
Expand Down Expand Up @@ -117,6 +117,6 @@ struct CountDims<ViewType, T[N]> {

} /* end namespace checkpoint */

#endif /*KOKKOS_ENABLED_CHECKPOINT*/
#endif /*MAGISTRATE_KOKKOS_ENABLED*/

#endif /*INCLUDED_CHECKPOINT_CONTAINER_VIEW_TRAITS_EXTRACT_H*/
4 changes: 2 additions & 2 deletions src/checkpoint/container/view_traverse_manual.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#include "checkpoint/serializers/serializers_headers.h"
#include "checkpoint/container/view_traits_extract.h"

#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include <Kokkos_Core.hpp>
#include <Kokkos_DynamicView.hpp>
Expand Down Expand Up @@ -345,6 +345,6 @@ struct TraverseManual<SerializerT,ViewType,8> {

} /* end namespace checkpoint */

#endif /*KOKKOS_ENABLED_CHECKPOINT*/
#endif /*MAGISTRATE_KOKKOS_ENABLED*/

#endif /*INCLUDED_CHECKPOINT_CONTAINER_VIEW_TRAVERSE_MANUAL_H*/
4 changes: 2 additions & 2 deletions src/checkpoint/container/view_traverse_ndim.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#include "checkpoint/serializers/serializers_headers.h"
#include "checkpoint/container/view_traits_extract.h"

#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include <Kokkos_Core.hpp>
#include <Kokkos_DynamicView.hpp>
Expand Down Expand Up @@ -274,6 +274,6 @@ struct TraverseRecursive {

} /* end namespace checkpoint */

#endif /*KOKKOS_ENABLED_CHECKPOINT*/
#endif /*MAGISTRATE_KOKKOS_ENABLED*/

#endif /*INCLUDED_CHECKPOINT_CONTAINER_VIEW_TRAVERSE_NDIM_H*/
6 changes: 3 additions & 3 deletions tests/unit/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#endif
#include "test_harness.h"

#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED
#include <Kokkos_Core.hpp>
#endif

Expand All @@ -72,14 +72,14 @@ int main(int argc, char **argv) {

int ret = 0;
{
#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED
Kokkos::initialize();
#endif

checkpoint::tests::unit::TestHarness::store_cmdline_args(argc, argv);
ret = RUN_ALL_TESTS();

#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED
Kokkos::finalize();
#endif
}
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_commons.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#include <checkpoint/checkpoint.h>
#include <checkpoint/container/view_equality.h>

#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include <Kokkos_Core.hpp>
#include <Kokkos_DynamicView.hpp>
Expand Down Expand Up @@ -88,7 +88,7 @@ static void compareBasic(ViewT const& k1, ViewT const& k2) {
EqualityType::template compareMeta<GTestEquality>(k1,k2);
}

#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED
template <typename ParamT>
struct KokkosViewTest : ::testing::TestWithParam<ParamT> { };
#endif
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_footprinter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ TEST_F(TestFootprinter, test_no_serialize) {
);
}

#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED
TEST_F(TestFootprinter, test_kokkos_unordered_map) {
// empty map
{
Expand Down Expand Up @@ -698,6 +698,6 @@ TEST_F(TestFootprinter, test_kokkos_complex) {
}


#endif /*KOKKOS_ENABLED_CHECKPOINT*/
#endif /*MAGISTRATE_KOKKOS_ENABLED*/

}}} // end namespace checkpoint::tests::unit
10 changes: 5 additions & 5 deletions tests/unit/test_kokkos_integration_commons.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct Data : BaseData {
using Kokkos_ViewType2 = ::Kokkos::View<double**, Kokkos::LayoutRight>;
using Kokkos_ViewType3 = ::Kokkos::View<float***, AtomicTrait>;
using Kokkos_ViewType4 = ::Kokkos::View<int*[2]>;
#if KOKKOS_KERNELS_ENABLED
#if MAGISTRATE_KOKKOS_KERNELS_ENABLED
using Kokkos_CrsType = ::Kokkos::StaticCrsGraph<double, Kokkos::DefaultExecutionSpace>;
using Kokkos_CrsMatrix = ::KokkosSparse::CrsMatrix<double, int, Kokkos::DefaultExecutionSpace>;
#endif
Expand Down Expand Up @@ -122,7 +122,7 @@ struct Data : BaseData {
v3 = v3_tmp;
v4 = v4_tmp;

#if KOKKOS_KERNELS_ENABLED
#if MAGISTRATE_KOKKOS_KERNELS_ENABLED
std::vector< std::vector< int > > graph( d1_a );

for ( size_t i = 0 ; i < d1_a; ++i ) {
Expand Down Expand Up @@ -207,7 +207,7 @@ struct Data : BaseData {
EXPECT_EQ(in.v4.operator()(i,1), v4val(i,1));
}

#if KOKKOS_KERNELS_ENABLED
#if MAGISTRATE_KOKKOS_KERNELS_ENABLED
std::vector< std::vector< int > > graph( d1_a );

for ( size_t i = 0 ; i < d1_a; ++i ) {
Expand Down Expand Up @@ -251,7 +251,7 @@ struct Data : BaseData {
s | vec;
s | val1 | val2;
s | v0 | v1 | v2 | v3 | v4;
#if KOKKOS_KERNELS_ENABLED
#if MAGISTRATE_KOKKOS_KERNELS_ENABLED
s | crs;
s | crs_mat;
#endif
Expand All @@ -265,7 +265,7 @@ struct Data : BaseData {
Kokkos_ViewType2 v2;
Kokkos_ViewType3 v3;
Kokkos_ViewType4 v4;
#if KOKKOS_KERNELS_ENABLED
#if MAGISTRATE_KOKKOS_KERNELS_ENABLED
Kokkos_CrsType crs;
Kokkos_CrsMatrix crs_mat;
#endif
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_kokkos_serialize_0d.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// *****************************************************************************
//@HEADER
*/
#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include "test_harness.h"
#include "test_commons.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_kokkos_serialize_1d.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// *****************************************************************************
//@HEADER
*/
#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include "test_commons.h"
#include "test_kokkos_1d_commons.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_kokkos_serialize_2d.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// *****************************************************************************
//@HEADER
*/
#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include "test_harness.h"
#include "test_commons.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_kokkos_serialize_3d_left.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// *****************************************************************************
//@HEADER
*/
#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include "test_harness.h"
#include "test_commons.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_kokkos_serialize_3d_right.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// *****************************************************************************
//@HEADER
*/
#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include "test_harness.h"
#include "test_commons.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_kokkos_serialize_3d_stride.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// *****************************************************************************
//@HEADER
*/
#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include "test_harness.h"
#include "test_commons.h"
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_kokkos_serialize_complex.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
//@HEADER
*/

#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include "test_commons.h"

Expand Down Expand Up @@ -76,4 +76,4 @@ TEST_F(KokkosComplexTest, test_kokkos_complex) {

}}} // namespace checkpoint::tests::unit

#endif /*KOKKOS_ENABLED_CHECKPOINT*/
#endif /*MAGISTRATE_KOKKOS_ENABLED*/
2 changes: 1 addition & 1 deletion tests/unit/test_kokkos_serialize_dynrankview.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// *****************************************************************************
//@HEADER
*/
#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include "test_commons.h"
#include "test_harness.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_kokkos_serialize_integration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// *****************************************************************************
//@HEADER
*/
#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include "test_harness.h"
#include "test_commons.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_kokkos_serialize_nd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// *****************************************************************************
//@HEADER
*/
#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include "test_harness.h"
#include "test_commons.h"
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_kokkos_serialize_pair.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
//@HEADER
*/

#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include "test_commons.h"

Expand Down Expand Up @@ -79,4 +79,4 @@ TEST_F(KokkosPairTest, test_kokkos_pair) {

}}} // namespace checkpoint::tests::unit

#endif /*KOKKOS_ENABLED_CHECKPOINT*/
#endif /*MAGISTRATE_KOKKOS_ENABLED*/
2 changes: 1 addition & 1 deletion tests/unit/test_kokkos_serialize_special.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// *****************************************************************************
//@HEADER
*/
#if KOKKOS_ENABLED_CHECKPOINT
#if MAGISTRATE_KOKKOS_ENABLED

#include "test_harness.h"
#include "test_commons.h"
Expand Down
Loading
Loading