Merge branch 'moving-eompi-eoserial' into conflicting-headers
This commit is contained in:
commit
515bd5943d
46 changed files with 107 additions and 55 deletions
|
|
@ -56,25 +56,26 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Target.cmake)
|
|||
######################################################################################
|
||||
|
||||
## Paths to sources of modules
|
||||
set( EO_SRC_DIR "${CMAKE_SOURCE_DIR}/eo" CACHE INTERNAL "ParadisEO-EO source directory" FORCE)
|
||||
set( EDO_SRC_DIR "${CMAKE_SOURCE_DIR}/edo" CACHE INTERNAL "ParadisEO-EDO 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( 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( EO_SRC_DIR "${CMAKE_SOURCE_DIR}/eo" CACHE INTERNAL "ParadisEO-EO source directory" FORCE)
|
||||
set( EDO_SRC_DIR "${CMAKE_SOURCE_DIR}/edo" CACHE INTERNAL "ParadisEO-EDO 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( SMP_SRC_DIR "${CMAKE_SOURCE_DIR}/smp" CACHE INTERNAL "ParadisEO-SMP 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(PROBLEMS_SRC_DIR "${CMAKE_SOURCE_DIR}/problems" CACHE INTERNAL "Problems dependant source directory" FORCE)
|
||||
|
||||
|
||||
set(CMAKE_BASE_SOURCE_DIR ${CMAKE_SOURCE_DIR})
|
||||
|
||||
# All libraries are built in <build_dir>/lib/
|
||||
set( EO_BIN_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "ParadisEO-EO binary directory" FORCE)
|
||||
set( EDO_BIN_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "ParadisEO-EDO 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( 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( EO_BIN_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "ParadisEO-EO binary directory" FORCE)
|
||||
set( EDO_BIN_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "ParadisEO-EDO 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( SMP_BIN_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "ParadisEO-SMP 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(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)")
|
||||
|
|
@ -82,7 +83,7 @@ set(ENABLE_GNUPLOT "false" CACHE BOOL "Build EO with the GNUplot support (real-t
|
|||
#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(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
|
||||
set(EO_MODULE_NAME "Evolving Object")
|
||||
|
|
@ -114,15 +115,22 @@ if(NOT EO_ONLY)
|
|||
add_subdirectory(${SMP_SRC_DIR})
|
||||
endif()
|
||||
|
||||
## MPI Module
|
||||
if(MPI)
|
||||
## EOMPI Module
|
||||
if(EOMPI)
|
||||
find_package(MPI REQUIRED)
|
||||
add_definitions(-DWITH_MPI)
|
||||
set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS})
|
||||
set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS})
|
||||
include_directories(${MPI_INCLUDE_PATH})
|
||||
add_subdirectory(${MPI_SRC_DIR})
|
||||
include_directories(${EOMPI_INCLUDE_PATH})
|
||||
add_subdirectory(${EOMPI_SRC_DIR})
|
||||
endif()
|
||||
|
||||
## EOSERIAL Module
|
||||
#if(EOSERIAL)
|
||||
set(EOSERIAL_MODULE_NAME "Serialization Module")
|
||||
set(CMAKE_SOURCE_DIR ${EOSERIAL_SRC_DIR})
|
||||
add_subdirectory(${EOSERIAL_SRC_DIR})
|
||||
#endif()
|
||||
endif()
|
||||
|
||||
######################################################################################
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
# - moeo
|
||||
# - smp
|
||||
# - peo
|
||||
# - 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.
|
||||
#
|
||||
# Output
|
||||
|
|
@ -72,6 +74,10 @@ find_path(MOEO_INCLUDE_DIR moeo
|
|||
PATH_SUFFIXES include${INSTALL_SUB_DIR}/moeo moeo/src
|
||||
PATHS ${PARADISEO_SRC_PATHS})
|
||||
|
||||
find_path(EOSERIAL_INCLUDE_DIR eoserial
|
||||
PATH_SUFFIXES include${INSTALL_SUB_DIR}/eoserial eoserial/src
|
||||
PATHS ${PARADISEO_SRC_PATHS})
|
||||
|
||||
# Specific for SMP and PEO
|
||||
foreach(COMP ${PARADISEO_LIBRARIES_TO_FIND})
|
||||
if(${COMP} STREQUAL "smp")
|
||||
|
|
@ -81,14 +87,19 @@ foreach(COMP ${PARADISEO_LIBRARIES_TO_FIND})
|
|||
PATHS ${PARADISEO_SRC_PATHS})
|
||||
elseif(${COMP} STREQUAL "peo")
|
||||
set(PEO_FOUND true)
|
||||
find_path(EDO_INCLUDE_DIR edo
|
||||
PATH_SUFFIXES include${INSTALL_SUB_DIR}/edo edo/src
|
||||
find_path(PEO_INCLUDE_DIR peo
|
||||
PATH_SUFFIXES include${INSTALL_SUB_DIR}/peo peo/src
|
||||
PATHS ${PARADISEO_SRC_PATHS})
|
||||
elseif(${COMP} STREQUAL "edo")
|
||||
set(EDO_FOUND true)
|
||||
find_path(EDO_INCLUDE_DIR peo
|
||||
PATH_SUFFIXES include${INSTALL_SUB_DIR}/peo peo/src
|
||||
find_path(EDO_INCLUDE_DIR edo
|
||||
PATH_SUFFIXES include${INSTALL_SUB_DIR}/edo edo/src
|
||||
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()
|
||||
endforeach()
|
||||
|
||||
|
|
@ -102,6 +113,10 @@ if(PEO_FOUND)
|
|||
set(PARADISEO_INCLUDE_DIR ${PARADISEO_INCLUDE_DIR} ${PEO_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(EOMPI_FOUND)
|
||||
set(PARADISEO_INCLUDE_DIR ${PARADISEO_INCLUDE_DIR} ${EOMPI_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
# find the requested modules
|
||||
set(PARADISEO_FOUND true) # will be set to false if one of the required modules is not found
|
||||
|
||||
|
|
@ -127,6 +142,8 @@ set(PARADISEO_LIB_PATHS_SUFFIXES
|
|||
moeo/tutorial/examples/flowshop/lib #For flowshop library
|
||||
smp/lib
|
||||
peo/lib
|
||||
eoserial/lib
|
||||
eompi/lib
|
||||
lib
|
||||
lib32
|
||||
lib64
|
||||
|
|
@ -158,12 +175,16 @@ if(PARADISEO_FOUND)
|
|||
message(${EDO_INCLUDE_DIR})
|
||||
message(${MO_INCLUDE_DIR})
|
||||
message(${MOEO_INCLUDE_DIR})
|
||||
message(${EOSERIAL_INCLUDE_DIR})
|
||||
if(SMP_FOUND)
|
||||
message(${SMP_INCLUDE_DIR})
|
||||
endif()
|
||||
if(PEO_FOUND)
|
||||
message(${PEO_INCLUDE_DIR})
|
||||
endif()
|
||||
if(EOMPI_FOUND)
|
||||
message(${EOMPI_INCLUDE_DIR})
|
||||
endif()
|
||||
else()
|
||||
# include directory or library not found
|
||||
message(FATAL_ERROR "Could NOT find ParadisEO (missing : ${FIND_PARADISEO_MISSING})")
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
### 1) Include the sources
|
||||
######################################################################################
|
||||
|
||||
include_directories(${EOMPI_SRC_DIR}/src)
|
||||
include_directories(${EOSERIAL_SRC_DIR}/src)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
######################################################################################
|
||||
|
|
@ -47,7 +49,7 @@ install(DIRECTORY do es ga gp other utils
|
|||
add_subdirectory(es)
|
||||
add_subdirectory(ga)
|
||||
add_subdirectory(utils)
|
||||
add_subdirectory(serial)
|
||||
#add_subdirectory(serial)
|
||||
|
||||
if(ENABLE_PYEO)
|
||||
add_subdirectory(pyeo)
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@
|
|||
#include <apply.h>
|
||||
|
||||
# ifdef WITH_MPI
|
||||
#include <mpi/eoMpi.h>
|
||||
#include <mpi/eoTerminateJob.h>
|
||||
#include <mpi/eoMpiAssignmentAlgorithm.h>
|
||||
#include <mpi/eoParallelApply.h>
|
||||
#include <eoMpi.h>
|
||||
#include <eoTerminateJob.h>
|
||||
#include <eoMpiAssignmentAlgorithm.h>
|
||||
#include <eoParallelApply.h>
|
||||
#include <utils/eoParallel.h>
|
||||
|
||||
#include <cmath> // ceil
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ Authors:
|
|||
|
||||
# include "utils/eoParallel.h" // eo::parallel
|
||||
|
||||
# include "serial/eoSerial.h" // eo::Persistent
|
||||
# include <eoSerial.h> // eo::Persistent
|
||||
|
||||
/**
|
||||
* @brief Timer allowing to measure time between a start point and a stop point.
|
||||
|
|
|
|||
9
eompi/CMakeLists.txt
Normal file
9
eompi/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
######################################################################################
|
||||
### Include subdirectories
|
||||
######################################################################################
|
||||
#add_subdirectory(doc)
|
||||
add_subdirectory(src)
|
||||
|
||||
if(ENABLE_CMAKE_TESTING)
|
||||
add_subdirectory(test)
|
||||
endif(ENABLE_CMAKE_TESTING)
|
||||
|
|
@ -3,13 +3,14 @@
|
|||
######################################################################################
|
||||
|
||||
include_directories(${EO_SRC_DIR}/src)
|
||||
include_directories(${EOSERIAL_SRC_DIR}/src)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
######################################################################################
|
||||
### 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(EOMPI_SOURCES
|
||||
|
|
@ -23,7 +24,7 @@ add_library(eompi STATIC ${EOMPI_SOURCES})
|
|||
install(TARGETS eompi ARCHIVE DESTINATION ${LIB} COMPONENT libraries)
|
||||
|
||||
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
|
||||
|
|
@ -23,7 +23,7 @@ Authors:
|
|||
# define __EO_IMPL_MPI_HPP__
|
||||
|
||||
# include <mpi.h>
|
||||
# include <serial/eoSerial.h>
|
||||
# include <eoSerial.h>
|
||||
|
||||
/**
|
||||
* This namespace contains reimplementations of some parts of the Boost::MPI API in C++, so as to be used in
|
||||
|
|
@ -8,10 +8,10 @@
|
|||
### 1) Include the sources
|
||||
######################################################################################
|
||||
|
||||
message("EO SOURCE DIR: ${EO_SRC_DIR}")
|
||||
message("OMPI: ${MPI_DIR}")
|
||||
message("EOMPI: ${EOMPI_DIR}")
|
||||
|
||||
include_directories(${MPI_DIR}/include)
|
||||
include_directories(${EOMPI_SRC_DIR}/src)
|
||||
include_directories(${EOSERIAL_SRC_DIR}/src)
|
||||
include_directories(${EO_SRC_DIR}/src)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
|
|
@ -20,7 +20,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|||
######################################################################################
|
||||
|
||||
link_directories(${EO_BIN_DIR}/lib)
|
||||
link_directories(${MPI_DIR}/lib)
|
||||
link_directories(${EOMPI_BIN_DIR}/lib)
|
||||
link_directories(${EOSERIAL_BIN_DIR}/lib)
|
||||
|
||||
######################################################################################
|
||||
### 3) Define your targets and link the librairies
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# ifndef __T_MPI_COMMON_H__
|
||||
# define __T_MPI_COMMON_H__
|
||||
|
||||
#include <serial/eoSerial.h>
|
||||
#include <eoSerial.h>
|
||||
|
||||
/**
|
||||
* @file t-mpi-common.h
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
# include <eo>
|
||||
|
||||
# include <mpi/eoMpi.h>
|
||||
# include <eoMpi.h>
|
||||
# include "t-mpi-common.h"
|
||||
|
||||
using namespace eo::mpi;
|
||||
|
|
@ -30,9 +30,9 @@ Authors:
|
|||
#include <eoPopEvalFunc.h>
|
||||
|
||||
#include <es/make_real.h>
|
||||
#include "../real_value.h"
|
||||
#include "../../eo/test/real_value.h"
|
||||
|
||||
#include <mpi/eoMpi.h>
|
||||
#include <eoMpi.h>
|
||||
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
|
@ -37,9 +37,9 @@ Authors:
|
|||
* This test requires exactly 7 hosts. If the size is bigger, an exception will be thrown at the beginning.
|
||||
**/
|
||||
|
||||
# include <mpi/eoMpi.h>
|
||||
# include <mpi/eoParallelApply.h>
|
||||
# include <mpi/eoTerminateJob.h>
|
||||
# include <eoMpi.h>
|
||||
# include <eoParallelApply.h>
|
||||
# include <eoTerminateJob.h>
|
||||
|
||||
# include "t-mpi-common.h"
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# include <mpi/eoMultiStart.h>
|
||||
# include <eoMultiStart.h>
|
||||
using namespace eo::mpi;
|
||||
|
||||
#include <stdexcept>
|
||||
|
|
@ -39,9 +39,9 @@ Authors:
|
|||
* beginning;
|
||||
*/
|
||||
|
||||
# include <mpi/eoMpi.h>
|
||||
# include <mpi/eoParallelApply.h>
|
||||
# include <mpi/eoTerminateJob.h>
|
||||
# include <eoMpi.h>
|
||||
# include <eoParallelApply.h>
|
||||
# include <eoTerminateJob.h>
|
||||
|
||||
# include "t-mpi-common.h"
|
||||
|
||||
|
|
@ -29,9 +29,9 @@ Authors:
|
|||
* instanciating the store.
|
||||
*/
|
||||
|
||||
# include <mpi/eoMpi.h>
|
||||
# include <mpi/eoParallelApply.h>
|
||||
# include <mpi/eoTerminateJob.h>
|
||||
# include <eoMpi.h>
|
||||
# include <eoParallelApply.h>
|
||||
# include <eoTerminateJob.h>
|
||||
|
||||
# include "t-mpi-common.h"
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# include <mpi/eoMpi.h>
|
||||
# include <eoMpi.h>
|
||||
|
||||
using namespace eo::mpi;
|
||||
|
||||
6
eoserial/CMakeLists.txt
Normal file
6
eoserial/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
######################################################################################
|
||||
### Include subdirectories
|
||||
######################################################################################
|
||||
|
||||
#add_subdirectory(doc)
|
||||
add_subdirectory(src)
|
||||
|
|
@ -9,7 +9,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|||
### 2) Define the eoserial target
|
||||
######################################################################################
|
||||
|
||||
set(EOSERIAL_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib)
|
||||
set(EOSERIAL_LIB_OUTPUT_PATH ${EOSERIAL_BIN_DIR}/lib)
|
||||
set(LIBRARY_OUTPUT_PATH ${EOSERIAL_LIB_OUTPUT_PATH})
|
||||
|
||||
set(EOSERIAL_SOURCES
|
||||
|
|
@ -20,13 +20,17 @@ set(EOSERIAL_SOURCES
|
|||
)
|
||||
|
||||
add_library(eoserial STATIC ${EOSERIAL_SOURCES})
|
||||
install(TARGETS eoserial ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||
|
||||
file(GLOB HDRS *.h)
|
||||
install(FILES ${HDRS} DESTINATION include/eo/serial COMPONENT headers)
|
||||
install(TARGETS eoserial ARCHIVE DESTINATION ${LIB} COMPONENT libraries)
|
||||
|
||||
######################################################################################
|
||||
### 3) Optionnal
|
||||
### 4) Look for headers
|
||||
######################################################################################
|
||||
|
||||
file(GLOB HDRS *.h)
|
||||
install(FILES ${HDRS} DESTINATION ${INSTALL_SUB_DIR}/eoserial COMPONENT headers)
|
||||
|
||||
######################################################################################
|
||||
### 5) Optionnal
|
||||
######################################################################################
|
||||
|
||||
set(EOSERIAL_VERSION ${GLOBAL_VERSION})
|
||||
Loading…
Add table
Add a link
Reference in a new issue