Commit 5fde8334 authored by Bram Veenboer's avatar Bram Veenboer

Merge branch 'distributed-example' into 'master'

Add distributed examples

See merge request !53
parents fac03fd8 1ec3ae87
Pipeline #8140 passed with stages
in 16 minutes and 44 seconds
......@@ -22,3 +22,6 @@ if (BUILD_LIB_OPENCL)
add_subdirectory(OpenCL)
endif ()
add_subdirectory(plan)
if (BUILD_WITH_MPI)
add_subdirectory(distributed)
endif ()
# Copyright (C) 2021 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: GPL-3.0-or-later
add_subdirectory(CPU)
add_subdirectory(CUDA)
add_subdirectory(Hybrid)
\ No newline at end of file
# Copyright (C) 2021 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: GPL-3.0-or-later
project(cpu-optimized-mp.x)
# Set sources
set (${PROJECT_NAME}_sources
main.cpp
)
# Set build target
add_executable (${PROJECT_NAME} ${${PROJECT_NAME}_sources})
# Set include directories
target_include_directories(
${PROJECT_NAME} PRIVATE
${MPI_C_COMPILER_INCLUDE_DIRS}
)
# Set link libaries
set(LINK_LIBRARIES
idg-util
idg-cpu
${MPI_mpi_LIBRARY}
${MPI_mpi_cxx_LIBRARY}
)
target_link_libraries (
${PROJECT_NAME}
${LINK_LIBRARIES}
)
# install
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin/examples/cxx
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/static
)
// Copyright (C) 2021 ASTRON (Netherlands Institute for Radio Astronomy)
// SPDX-License-Identifier: GPL-3.0-or-later
#include "idg-cpu.h"
using ProxyType = idg::proxy::cpu::Optimized;
#include "../common.h"
int main(int argc, char *argv[]) {
run();
return 0;
}
\ No newline at end of file
# Copyright (C) 2021 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: GPL-3.0-or-later
project(cuda-generic-mp.x)
# Set sources
set (${PROJECT_NAME}_sources
main.cpp
)
# Set build target
add_executable (${PROJECT_NAME} ${${PROJECT_NAME}_sources})
# Set include directories
target_include_directories(
${PROJECT_NAME} PRIVATE
${MPI_C_COMPILER_INCLUDE_DIRS}
)
# Set link libaries
set(LINK_LIBRARIES
idg-util
idg-cuda
${MPI_mpi_LIBRARY}
${MPI_mpi_cxx_LIBRARY}
)
target_link_libraries (
${PROJECT_NAME}
${LINK_LIBRARIES}
)
# install
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin/examples/cxx
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/static
)
// Copyright (C) 2021 ASTRON (Netherlands Institute for Radio Astronomy)
// SPDX-License-Identifier: GPL-3.0-or-later
#include "idg-cuda.h"
using ProxyType = idg::proxy::cuda::Generic;
#include "../common.h"
int main(int argc, char *argv[]) {
run();
return 0;
}
\ No newline at end of file
# Copyright (C) 2021 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: GPL-3.0-or-later
project(hybrid-cuda-generic-optimized-mp.x)
# Set sources
set (${PROJECT_NAME}_sources
main.cpp
)
# Set build target
add_executable (${PROJECT_NAME} ${${PROJECT_NAME}_sources})
# Set include directories
target_include_directories(
${PROJECT_NAME} PRIVATE
${MPI_C_COMPILER_INCLUDE_DIRS}
)
# Set link libaries
set(LINK_LIBRARIES
idg-util
idg-hybrid-cuda
${MPI_mpi_LIBRARY}
${MPI_mpi_cxx_LIBRARY}
)
target_link_libraries (
${PROJECT_NAME}
${LINK_LIBRARIES}
)
# install
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin/examples/cxx
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/static
)
// Copyright (C) 2021 ASTRON (Netherlands Institute for Radio Astronomy)
// SPDX-License-Identifier: GPL-3.0-or-later
#include "idg-hybrid-cuda.h"
using ProxyType = idg::proxy::hybrid::GenericOptimized;
#include "../common.h"
int main(int argc, char *argv[]) {
run();
return 0;
}
\ No newline at end of file
This diff is collapsed.
......@@ -19,7 +19,8 @@ option (BUILD_LIB_CPU "Build CPU libraries" ON)
option (BUILD_LIB_CUDA "Build CUDA libraries" OFF)
#option (BUILD_LIB_OPENCL "Build OpenCL libraries" OFF)
option (BUILD_WITH_MKL "Build with MKL (if available)" OFF)
option (BUILD_WITH_POWERSENSOR " Build with PowerSensor" OFF)
option (BUILD_WITH_POWERSENSOR "Build with PowerSensor" OFF)
option (BUILD_WITH_MPI "Build with MPI" OFF)
option (PERFORMANCE_REPORT "Report performance metrics" OFF)
option (COMPILE_VERBOSE "Report compiler flags used during runtime compilation" OFF)
option (STRICT_WARNINGS "Turn compiliation warnings into errors" ON)
......@@ -124,6 +125,11 @@ if (BUILD_LIB_CUDA)
find_package(CUDA QUIET)
endif()
# MPI
if (BUILD_WITH_MPI)
find_package(MPI QUIET)
endif()
include_directories (${CMAKE_CURRENT_BINARY_DIR}/src)
# add main include folder
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment