Merge branch 'moving-eompi' into 'moving-eoserial'
Conflicts: CMakeLists.txt cmake/module/FindParadiseo.cmake
This commit is contained in:
commit
651e722de7
15 changed files with 32 additions and 14 deletions
|
|
@ -61,7 +61,7 @@ set( EDO_SRC_DIR "${CMAKE_SOURCE_DIR}/edo" CACHE INTERNAL "ParadisEO-
|
||||||
set( MO_SRC_DIR "${CMAKE_SOURCE_DIR}/mo" CACHE INTERNAL "ParadisEO-MO source directory" FORCE)
|
set( MO_SRC_DIR "${CMAKE_SOURCE_DIR}/mo" CACHE INTERNAL "ParadisEO-MO source directory" FORCE)
|
||||||
set( MOEO_SRC_DIR "${CMAKE_SOURCE_DIR}/moeo" CACHE INTERNAL "ParadisEO-MOEO source directory" FORCE)
|
set( MOEO_SRC_DIR "${CMAKE_SOURCE_DIR}/moeo" CACHE INTERNAL "ParadisEO-MOEO source directory" FORCE)
|
||||||
set( SMP_SRC_DIR "${CMAKE_SOURCE_DIR}/smp" CACHE INTERNAL "ParadisEO-SMP source directory" FORCE)
|
set( SMP_SRC_DIR "${CMAKE_SOURCE_DIR}/smp" CACHE INTERNAL "ParadisEO-SMP source directory" FORCE)
|
||||||
set( MPI_SRC_DIR "${CMAKE_SOURCE_DIR}/eo/src/mpi" CACHE INTERNAL "ParadisEO-MPI source directory" FORCE)
|
set( EOMPI_SRC_DIR "${CMAKE_SOURCE_DIR}/eompi" CACHE INTERNAL "ParadisEO-EOMPI source directory" FORCE)
|
||||||
set(EOSERIAL_SRC_DIR "${CMAKE_SOURCE_DIR}/eoserial" CACHE INTERNAL "ParadisEO-EOSERIAL source directory" FORCE)
|
set(EOSERIAL_SRC_DIR "${CMAKE_SOURCE_DIR}/eoserial" CACHE INTERNAL "ParadisEO-EOSERIAL source directory" FORCE)
|
||||||
|
|
||||||
set(PROBLEMS_SRC_DIR "${CMAKE_SOURCE_DIR}/problems" CACHE INTERNAL "Problems dependant source directory" FORCE)
|
set(PROBLEMS_SRC_DIR "${CMAKE_SOURCE_DIR}/problems" CACHE INTERNAL "Problems dependant source directory" FORCE)
|
||||||
|
|
@ -74,17 +74,16 @@ set( EDO_BIN_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "ParadisEO-EDO bi
|
||||||
set( MO_BIN_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "ParadisEO-MO binary directory" FORCE)
|
set( MO_BIN_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "ParadisEO-MO binary directory" FORCE)
|
||||||
set( MOEO_BIN_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "ParadisEO-MOEO binary directory" FORCE)
|
set( MOEO_BIN_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "ParadisEO-MOEO binary directory" FORCE)
|
||||||
set( SMP_BIN_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "ParadisEO-SMP binary directory" FORCE)
|
set( SMP_BIN_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "ParadisEO-SMP binary directory" FORCE)
|
||||||
set( MPI_BIN_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "ParadisEO-MPI binary directory" FORCE)
|
set( EOMPI_BIN_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "ParadisEO-EOMPI binary directory" FORCE)
|
||||||
set(EOSERIAL_BIN_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "ParadisEO-EOSERIAL binary directory" FORCE)
|
set(EOSERIAL_BIN_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "ParadisEO-EOSERIAL binary directory" FORCE)
|
||||||
|
|
||||||
|
|
||||||
set(EO_ONLY "false" CACHE BOOL "Only build EO and not the other modules")
|
set(EO_ONLY "false" CACHE BOOL "Only build EO and not the other modules")
|
||||||
set(ENABLE_OPENMP "false" CACHE BOOL "Build EO with the OpenMP support (shared-memory parallel evaluators on multi-core)")
|
set(ENABLE_OPENMP "false" CACHE BOOL "Build EO with the OpenMP support (shared-memory parallel evaluators on multi-core)")
|
||||||
set(ENABLE_GNUPLOT "false" CACHE BOOL "Build EO with the GNUplot support (real-time convergence plotting)")
|
set(ENABLE_GNUPLOT "false" CACHE BOOL "Build EO with the GNUplot support (real-time convergence plotting)")
|
||||||
set(EDO "false" CACHE BOOL "Build the EDO module")
|
set(EDO "false" CACHE BOOL "Build the EDO module")
|
||||||
set(EDO_USE_LIB "Eigen3" CACHE STRING "Which linear algebra library to use to build EDO ('UBlas' or 'Eigen3', Eigen3 is recommended)")
|
set(EDO_USE_LIB "Eigen3" CACHE STRING "Which linear algebra library to use to build EDO ('UBlas' or 'Eigen3', Eigen3 is recommended)")
|
||||||
set(SMP "false" CACHE BOOL "Build the SMP module")
|
set(SMP "false" CACHE BOOL "Build the SMP module")
|
||||||
set(MPI "false" CACHE BOOL "Build the MPI module")
|
set(EOMPI "false" CACHE BOOL "Build the MPI module")
|
||||||
|
|
||||||
## EO Module
|
## EO Module
|
||||||
set(EO_MODULE_NAME "Evolving Object")
|
set(EO_MODULE_NAME "Evolving Object")
|
||||||
|
|
@ -116,14 +115,14 @@ if(NOT EO_ONLY)
|
||||||
add_subdirectory(${SMP_SRC_DIR})
|
add_subdirectory(${SMP_SRC_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
## MPI Module
|
## EOMPI Module
|
||||||
if(MPI)
|
if(EOMPI)
|
||||||
find_package(MPI REQUIRED)
|
find_package(MPI REQUIRED)
|
||||||
add_definitions(-DWITH_MPI)
|
add_definitions(-DWITH_MPI)
|
||||||
set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS})
|
set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS})
|
||||||
set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS})
|
set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS})
|
||||||
include_directories(${MPI_INCLUDE_PATH})
|
include_directories(${EOMPI_INCLUDE_PATH})
|
||||||
add_subdirectory(${MPI_SRC_DIR})
|
add_subdirectory(${EOMPI_SRC_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
## EOSERIAL Module
|
## EOSERIAL Module
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
# - smp
|
# - smp
|
||||||
# - peo
|
# - peo
|
||||||
# - eoserial
|
# - eoserial
|
||||||
|
# - eompi
|
||||||
# You can use find_package(Paradiseo COMPONENTS ... ) to enable one or several components. If you not specifie component, all components will be load except SMP for compatibility reasons.
|
# You can use find_package(Paradiseo COMPONENTS ... ) to enable one or several components. If you not specifie component, all components will be load except SMP for compatibility reasons.
|
||||||
#
|
#
|
||||||
# Output
|
# Output
|
||||||
|
|
@ -86,14 +87,19 @@ foreach(COMP ${PARADISEO_LIBRARIES_TO_FIND})
|
||||||
PATHS ${PARADISEO_SRC_PATHS})
|
PATHS ${PARADISEO_SRC_PATHS})
|
||||||
elseif(${COMP} STREQUAL "peo")
|
elseif(${COMP} STREQUAL "peo")
|
||||||
set(PEO_FOUND true)
|
set(PEO_FOUND true)
|
||||||
find_path(EDO_INCLUDE_DIR edo
|
find_path(EDO_INCLUDE_DIR peo
|
||||||
PATH_SUFFIXES include${INSTALL_SUB_DIR}/edo edo/src
|
PATH_SUFFIXES include${INSTALL_SUB_DIR}/peo peo/src
|
||||||
PATHS ${PARADISEO_SRC_PATHS})
|
PATHS ${PARADISEO_SRC_PATHS})
|
||||||
elseif(${COMP} STREQUAL "edo")
|
elseif(${COMP} STREQUAL "edo")
|
||||||
set(EDO_FOUND true)
|
set(EDO_FOUND true)
|
||||||
find_path(EDO_INCLUDE_DIR peo
|
find_path(EDO_INCLUDE_DIR edo
|
||||||
PATH_SUFFIXES include${INSTALL_SUB_DIR}/peo peo/src
|
PATH_SUFFIXES include${INSTALL_SUB_DIR}/edo edo/src
|
||||||
PATHS ${PARADISEO_SRC_PATHS})
|
PATHS ${PARADISEO_SRC_PATHS})
|
||||||
|
elseif(${COMP} STREQUAL "eompi")
|
||||||
|
set(EOMPI_FOUND true)
|
||||||
|
find_path(EOMPI_INCLUDE_DIR eompi
|
||||||
|
PATH_SUFFIXES include${INSTALL_SUB_DIR}/eompi eompi/src
|
||||||
|
PATHS ${PARADISEO_SRC_PATHS})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
|
@ -107,6 +113,10 @@ if(PEO_FOUND)
|
||||||
set(PARADISEO_INCLUDE_DIR ${PARADISEO_INCLUDE_DIR} ${PEO_INCLUDE_DIR})
|
set(PARADISEO_INCLUDE_DIR ${PARADISEO_INCLUDE_DIR} ${PEO_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(EOMPI_FOUND)
|
||||||
|
set(PARADISEO_INCLUDE_DIR ${PARADISEO_INCLUDE_DIR} ${EOMPI_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
# find the requested modules
|
# find the requested modules
|
||||||
set(PARADISEO_FOUND true) # will be set to false if one of the required modules is not found
|
set(PARADISEO_FOUND true) # will be set to false if one of the required modules is not found
|
||||||
|
|
||||||
|
|
@ -133,6 +143,7 @@ set(PARADISEO_LIB_PATHS_SUFFIXES
|
||||||
smp/lib
|
smp/lib
|
||||||
peo/lib
|
peo/lib
|
||||||
eoserial/lib
|
eoserial/lib
|
||||||
|
eompi/lib
|
||||||
lib
|
lib
|
||||||
lib32
|
lib32
|
||||||
lib64
|
lib64
|
||||||
|
|
@ -171,6 +182,9 @@ if(PARADISEO_FOUND)
|
||||||
if(PEO_FOUND)
|
if(PEO_FOUND)
|
||||||
message(${PEO_INCLUDE_DIR})
|
message(${PEO_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
if(EOMPI_FOUND)
|
||||||
|
message(${EOMPI_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
# include directory or library not found
|
# include directory or library not found
|
||||||
message(FATAL_ERROR "Could NOT find ParadisEO (missing : ${FIND_PARADISEO_MISSING})")
|
message(FATAL_ERROR "Could NOT find ParadisEO (missing : ${FIND_PARADISEO_MISSING})")
|
||||||
|
|
|
||||||
5
eompi/CMakeLists.txt
Normal file
5
eompi/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
######################################################################################
|
||||||
|
### Include subdirectories
|
||||||
|
######################################################################################
|
||||||
|
#add_subdirectory(doc)
|
||||||
|
add_subdirectory(src)
|
||||||
|
|
@ -10,7 +10,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
### 2) Define the eompi target
|
### 2) Define the eompi target
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
set(EOMPI_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib)
|
set(EOMPI_LIB_OUTPUT_PATH ${EOMPI_BIN_DIR}/lib)
|
||||||
set(LIBRARY_OUTPUT_PATH ${EOMPI_LIB_OUTPUT_PATH})
|
set(LIBRARY_OUTPUT_PATH ${EOMPI_LIB_OUTPUT_PATH})
|
||||||
|
|
||||||
set(EOMPI_SOURCES
|
set(EOMPI_SOURCES
|
||||||
|
|
@ -24,7 +24,7 @@ add_library(eompi STATIC ${EOMPI_SOURCES})
|
||||||
install(TARGETS eompi ARCHIVE DESTINATION ${LIB} COMPONENT libraries)
|
install(TARGETS eompi ARCHIVE DESTINATION ${LIB} COMPONENT libraries)
|
||||||
|
|
||||||
file(GLOB HDRS *.h)
|
file(GLOB HDRS *.h)
|
||||||
install(FILES ${HDRS} DESTINATION include${INSTALL_SUB_DIR}/eo/mpi COMPONENT headers)
|
install(FILES ${HDRS} DESTINATION include${INSTALL_SUB_DIR}/eompi COMPONENT headers)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 3) Optionnal
|
### 3) Optionnal
|
||||||
Loading…
Add table
Add a link
Reference in a new issue