Skip to content

Commit

Permalink
Catalyst Adaptor: Implementation and tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
coroutinely authored and user committed Apr 17, 2024
1 parent ffd0093 commit fe0cb11
Show file tree
Hide file tree
Showing 10 changed files with 1,328 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ if(TINYOBJLOADER_FOUND)
set(DEFINE_HAVE_TINYOBJLOADER "#define HAVE_TINYOBJLOADER 1")
endif()

if(catalyst_FOUND)
set(DEFINE_HAVE_CATALYST "#define HAVE_CATALYST")
endif()

include_directories(SYSTEM ${MPI_INCLUDE_PATH})

add_subdirectory (src)
Expand All @@ -23,5 +27,6 @@ get_directory_property(hasParent PARENT_DIRECTORY)
if(hasParent)
set(DEFINE_HAVE_TINYOBJLOADER ${DEFINE_HAVE_TINYOBJLOADER} CACHE INTERNAL "")
set(DEFINE_HAVE_HDF5 ${DEFINE_HAVE_HDF5} CACHE INTERNAL "")
set(DEFINE_HAVE_CATALYST ${DEFINE_HAVE_CATALYST} CACHE INTERNAL "")
endif()

26 changes: 26 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ if ( CUDA_ON_BACKEND STREQUAL "HIP" AND HIP_FOUND )

hip_add_executable(io main.cpp
MetaParser/MetaParser_unit_test.cpp
Catalyst/catalyst_unit_test.cpp
${CUDA_SOURCES}
ObjReader/ObjReader_unit_test.cpp
CSVReader/tests/CSVReader_unit_test.cpp)
else()
add_executable(io main.cpp
MetaParser/MetaParser_unit_test.cpp
Catalyst/catalyst_unit_test.cpp
${CUDA_SOURCES}
ObjReader/ObjReader_unit_test.cpp
CSVReader/tests/CSVReader_unit_test.cpp)
Expand Down Expand Up @@ -66,13 +68,31 @@ target_include_directories (io PUBLIC ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../openfpm_devices/src/)
target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../openfpm_vcluster/src/)
target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../openfpm_pdata/src/)
target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../openfpm_data/src/)
target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../src/)
target_include_directories (io PUBLIC ${CMAKE_BINARY_DIR}/config)
target_include_directories (io PUBLIC ${HDF5_ROOT}/include)
target_include_directories (io PUBLIC ${TINYOBJLOADER_INCLUDE_DIRS} )
target_include_directories (io PUBLIC ${Boost_INCLUDE_DIRS})
target_include_directories (io PUBLIC ${ALPAKA_ROOT}/include)
target_include_directories (io PUBLIC ${METIS_ROOT}/include)
target_include_directories (io PUBLIC ${PARMETIS_ROOT}/include)
target_include_directories (io PUBLIC ${LIBHILBERT_INCLUDE_DIRS})

if (Vc_FOUND)
target_include_directories (io PUBLIC ${Vc_INCLUDE_DIR})
target_link_libraries(io ${Vc_LIBRARIES})
endif()

if (PNG_FOUND)
target_include_directories (io PUBLIC ${PNG_INCLUDE_DIRS})
target_link_libraries(io ${PNG_LIBRARIES})
endif()

if (catalyst_FOUND)
target_link_libraries(io catalyst::catalyst)
endif()

if (PETSC_FOUND)
target_include_directories(io PUBLIC ${PETSC_INCLUDES})
Expand All @@ -83,6 +103,7 @@ target_link_libraries(io ${HDF5_LIBRARIES})
target_link_libraries(io ${TINYOBJLOADER_LIBRARIES} )
target_link_libraries(io vcluster)
target_link_libraries(io ofpmmemory)
target_link_libraries(io ${PARMETIS_LIBRARIES})

if (OPENMP_FOUND)
target_link_libraries(io OpenMP::OpenMP_CXX)
Expand Down Expand Up @@ -165,3 +186,8 @@ install(FILES Plot/GoogleChart.hpp Plot/util.hpp
DESTINATION openfpm_io/include/Plot
COMPONENT OpenFPM)

install(FILES Catalyst/catalyst_adaptor.hpp
Catalyst/catalyst_adaptor_grid_dist.hpp
Catalyst/catalyst_adaptor_vector_dist.hpp
DESTINATION openfpm_io/include/Catalyst
COMPONENT OpenFPM)
Loading

0 comments on commit fe0cb11

Please sign in to comment.