Migration from SVN
This commit is contained in:
parent
d7d6c3a217
commit
8cd56f37db
29069 changed files with 0 additions and 4096888 deletions
11
AUTHORS
Normal file
11
AUTHORS
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
Main developers:
|
||||
|
||||
Sébastien Cahon
|
||||
Jérémie Humeau
|
||||
Arnaud Liefooghe
|
||||
Sebastien Verel
|
||||
Nourdine Melab
|
||||
|
||||
Team leader:
|
||||
|
||||
El-Ghazali Talbi
|
||||
110
CMakeLists.txt
Normal file
110
CMakeLists.txt
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
# ParadiseO
|
||||
|
||||
######################################################################################
|
||||
### 0) Check the CMake version
|
||||
######################################################################################
|
||||
|
||||
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
|
||||
|
||||
######################################################################################
|
||||
### 1) Define the project
|
||||
######################################################################################
|
||||
|
||||
## Name
|
||||
project("ParadisEO")
|
||||
|
||||
## Language
|
||||
enable_language(CXX)
|
||||
|
||||
## Test the presence of a compiler
|
||||
if("${CMAKE_CXX_COMPILER}" STREQUAL "" OR "${CMAKE_C_COMPILER}" STREQUAL "")
|
||||
message(FATAL_ERROR "No compiler found !")
|
||||
endif()
|
||||
|
||||
## Versioning
|
||||
set(VERSION_MAJOR 2)
|
||||
set(VERSION_MINOR 0)
|
||||
set(VERSION_PATCH 0)
|
||||
|
||||
######################################################################################
|
||||
### 2) Check dependencies
|
||||
######################################################################################
|
||||
|
||||
## Optional
|
||||
include(FindDoxygen OPTIONAL)
|
||||
|
||||
######################################################################################
|
||||
### 3) Include CMake files
|
||||
######################################################################################
|
||||
|
||||
## Configuration file for building type and flags
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake)
|
||||
|
||||
## Macro file
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Macro.cmake)
|
||||
|
||||
## Custom Targets file
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Target.cmake)
|
||||
|
||||
######################################################################################
|
||||
### 4) Define and add module paths : EO, MO, MOEO
|
||||
######################################################################################
|
||||
|
||||
## Paths
|
||||
set(EO_SRC_DIR "${CMAKE_SOURCE_DIR}/eo" CACHE PATH "ParadisEO-EO source directory" FORCE)
|
||||
set(EO_BIN_DIR "${CMAKE_BINARY_DIR}/eo" CACHE PATH "ParadisEO-EO binary directory" FORCE)
|
||||
|
||||
set(MO_SRC_DIR "${CMAKE_SOURCE_DIR}/mo" CACHE PATH "ParadisEO-MO source directory" FORCE)
|
||||
set(MO_BIN_DIR "${CMAKE_BINARY_DIR}/mo" CACHE PATH "ParadisEO-MO binary directory" FORCE)
|
||||
|
||||
set(MOEO_SRC_DIR "${CMAKE_SOURCE_DIR}/moeo" CACHE PATH "ParadisEO-MOEO source directory" FORCE)
|
||||
set(MOEO_BIN_DIR "${CMAKE_BINARY_DIR}/moeo" CACHE PATH "ParadisEO-MOEO binary directory" FORCE)
|
||||
|
||||
set(SMP_SRC_DIR "${CMAKE_SOURCE_DIR}/smp" CACHE PATH "ParadisEO-SMP source directory" FORCE)
|
||||
set(SMP_BIN_DIR "${CMAKE_BINARY_DIR}/smp" CACHE PATH "ParadisEO-SMP binary directory" FORCE)
|
||||
|
||||
set(PEO_SRC_DIR "${CMAKE_SOURCE_DIR}/peo" CACHE PATH "ParadisEO-PEO source directory" FORCE)
|
||||
set(PEO_BIN_DIR "${CMAKE_BINARY_DIR}/peo" CACHE PATH "ParadisEO-PEO binary directory" FORCE)
|
||||
|
||||
set(PROBLEMS_SRC_DIR "${CMAKE_SOURCE_DIR}/problems" CACHE PATH "Problems dependant source directory" FORCE)
|
||||
|
||||
set(CMAKE_BASE_SOURCE_DIR ${CMAKE_SOURCE_DIR})
|
||||
|
||||
## EO Module
|
||||
set(EO_MODULE_NAME "Evolving Object")
|
||||
set(CMAKE_SOURCE_DIR ${EO_SRC_DIR})
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR})
|
||||
|
||||
if(NOT EO_ONLY)
|
||||
## MO Module
|
||||
set(MO_MODULE_NAME "ParadisEO-MO")
|
||||
set(CMAKE_SOURCE_DIR ${MO_SRC_DIR})
|
||||
add_subdirectory(${MO_SRC_DIR})
|
||||
|
||||
## MOEO Module
|
||||
set(MOEO_MODULE_NAME "ParadisEO-MOEO")
|
||||
set(CMAKE_SOURCE_DIR ${MOEO_SRC_DIR})
|
||||
add_subdirectory(${MOEO_SRC_DIR})
|
||||
|
||||
## SMP Module
|
||||
if(SMP)
|
||||
set(SMP_MODULE_NAME "ParadisEO-SMP")
|
||||
set(CMAKE_SOURCE_DIR ${SMP_SRC_DIR})
|
||||
add_subdirectory(${SMP_SRC_DIR})
|
||||
endif()
|
||||
|
||||
## PEO Module
|
||||
if(PEO)
|
||||
set(PEO_MODULE_NAME "ParadisEO-PEO")
|
||||
set(CMAKE_SOURCE_DIR ${PEO_SRC_DIR})
|
||||
add_subdirectory(${PEO_SRC_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
######################################################################################
|
||||
### 5) Packaging : only in release !
|
||||
######################################################################################
|
||||
|
||||
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Package.cmake)
|
||||
endif()
|
||||
7
CTestConfig.cmake
Normal file
7
CTestConfig.cmake
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
set(CTEST_PROJECT_NAME "ParadisEO")
|
||||
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
|
||||
|
||||
set(CTEST_DROP_METHOD "http")
|
||||
set(CTEST_DROP_SITE "cdash.inria.fr")
|
||||
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=ParadisEO")
|
||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
||||
188
INSTALL
Normal file
188
INSTALL
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
|
||||
==========================================================================================
|
||||
INSTALLING PARADISEO
|
||||
==========================================================================================
|
||||
|
||||
There is several ways to install ParadisEO, according to your needs.
|
||||
|
||||
==========================================================================================
|
||||
WINDOWS
|
||||
==========================================================================================
|
||||
|
||||
On Windows, and for compatibility reason, ParadisEO supply support only for MinGW.
|
||||
Feel free to test with another compiler and to send us you report.
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
1) WITH EXE
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
The simpliest way ton install ParadisEO on Windows is to use the NSIS installer.
|
||||
We would like to draw your attention on the fact that the PATH variable will not
|
||||
be affected by the installation in order to allow anybody to install ParadisEO
|
||||
without administration right. To have further information about how to use ParadisEO
|
||||
in your project, see the tutorial on ParadisEO website (http://paradiseo.gforge.inria.fr/).
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
2) WITH CMAKE
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
You can also install ParadisEO using CMake. For that you must have a compiler installed,
|
||||
and obviously cmake.
|
||||
Then, follow UNIX instructions.
|
||||
|
||||
==========================================================================================
|
||||
UNIX
|
||||
==========================================================================================
|
||||
------------------------------------------------------------------------------------------
|
||||
1. WITH CMAKE
|
||||
------------------------------------------------------------------------------------------
|
||||
1.0 DEPENDENCIES
|
||||
------------------------------------------------------------------------------------------
|
||||
Optionnal
|
||||
- Doxygen for documentation
|
||||
- lcov for coverage
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
1.1 FAST INSTALLATION
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
After getting ParadisEO sources from repository, you have to create a build directory in order to keep your file tree clean.
|
||||
|
||||
> mkdir build
|
||||
> cd build
|
||||
|
||||
To make the installation easier, ParadisEO propose you two installation types which are "Full" and "Min".
|
||||
Full corresponds examples / lessons, tests and obviously libraries.
|
||||
Min corresponds to libraries and headers and it is the standard behavior.
|
||||
|
||||
You can specified an installation type by adding the following declaration to cmake :
|
||||
|
||||
> cmake .. -DINSTALL_TYPE=full
|
||||
> cmake .. -DINSTALL_TYPE=min
|
||||
which is equivalent to
|
||||
> cmake ..
|
||||
|
||||
Actually, by default the generator will be "Unix Makefiles" and cmake will try to look for a C++ compiler.
|
||||
Be sure you have make installed, or choose an alternative according to your configuration.
|
||||
To know available generators on your computer, type cmake -help. If you are on Windows and you use MinGW, you have to specify it explicitly by adding -G "MinGW Makefiles".
|
||||
|
||||
To compile ParadisEO simply compile sources using your generator. For instance, if you are using Unix Makefiles, type make.
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
1.2 BUILD TYPE
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
There are 2 types of build : Release or Debug.
|
||||
To explicitly change the type, add -DDEBUG=true, otherwise, it will be the Release type.
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
1.3 COMPILERS
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
You can change the compiler used by CMake with the following options :
|
||||
|
||||
>-DCMAKE_C_COMPILER=/path/to/your/c/compiler
|
||||
|
||||
>-DCMAKE_CXX_COMPILER=/path/to/your/c++/compiler
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
1.4 INSTALLATION
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
WARNING : This require administration rights.
|
||||
|
||||
To install ParadisEO in standard paths (such as /usr/lib for lib and /usr/include for headers on UNIX-like) :
|
||||
|
||||
> make install
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
2. SPECIFIC MODULE
|
||||
------------------------------------------------------------------------------------------
|
||||
2.1 EO MODULE ONLY
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
If you want to compile and install only the Evolving Objects module, you can add to CMake the following option :
|
||||
|
||||
> cmake .. -DEO_ONLY
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
2.1 SMP MODULE
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
WARNING : The SMP module requires gcc 4.7 or higher. This is due to the fact that it uses the new C++ standard.
|
||||
|
||||
WARNING : At the moment, the SMP module does not work on Windows or Mac OS X since MinGW does not provide support for std::thread
|
||||
and Apple does not supply a recent version of gcc (but you can try to compile gcc 4.7 by yourself).
|
||||
|
||||
To enable the compilation of the SMP module, just add -DSMP=true to CMake :
|
||||
|
||||
> cmake .. -DSMP=true
|
||||
|
||||
Depending on your distribution, you might have to give to CMake the path of gcc and g++ 4.7.
|
||||
This is the case for Ubuntu 12.04 LTS for instance. Please, check installation guide on ParadisEO website for more details.
|
||||
|
||||
If you are in that case and assuming you have a standard path for gcc et g++ 4.7 :
|
||||
|
||||
> cmake .. -DSMP=true -DCMAKE_C_COMPILER=/usr/bin/gcc-4.7 -DCMAKE_CXX_COMPILER=/usr/bin/g++-4.7
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
2.2 PEO MODULE
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
WARNING : The PEO module requires libXML 2 and a MPI implementation such as MPICH2.
|
||||
|
||||
To enable the compilation of the PEO module, just add -DPEO=true to CMake :
|
||||
|
||||
> cmake .. -DPEO=true
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
3. DOCUMENTATION
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
There is 2 ways to build ParadisEO documentation : module by module, or all the documentation.
|
||||
|
||||
Targets are :
|
||||
doc for all documentations
|
||||
doc-eo for building EO documentation
|
||||
doc-mo for MO
|
||||
doc-moeo for MOEO
|
||||
doc-smp for SMP
|
||||
|
||||
Each documentation are generated separatly in the module build folder.
|
||||
For instance, after the generation of the MO documentation, you will find it in build/paradise-mo/doc.
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
4. LESSONS / EXAMPLES
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
Examples and lessons are generated by default.
|
||||
If you want to disable lessons manually, you have to specify -DENABLE_CMAKE_TESTING=false to CMake.
|
||||
If you want to build a specific lesson or example, you can check the list of available targets with make help.
|
||||
|
||||
All lessons are build on the same pattern : <module>Lesson<number>.
|
||||
For instance, make moLesson4 will build the Lesson 4 from the MO module.
|
||||
Easy, isn't it ?
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
5. TESTS
|
||||
------------------------------------------------------------------------------------------
|
||||
5.1 CTESTS
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
By performing tests, you can check your installation.
|
||||
Testing is disable by default, except if you build with the full install type.
|
||||
To enable testing, define -DENABLE_TESTING when you launch cmake.
|
||||
|
||||
To perform tests simply type ctest ou make test.
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
5.2 REPORTING
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
Feel free to send us reports about building, installation, tests and profiling in order to help us to improve compatibilty and installation process. Sending reports is very simple :
|
||||
|
||||
> ctest -D Experimental
|
||||
|
||||
WARNING : Reports are anonymous. CTest will also send informations about your configuration such as OS, CPU frequency, etc.
|
||||
|
||||
|
||||
|
|
@ -3,17 +3,23 @@
|
|||
RELEASE
|
||||
==========================================================================================
|
||||
|
||||
The current release is paradisEO-1.3
|
||||
The current release is paradisEO-2.0
|
||||
|
||||
==========================================================================================
|
||||
INSTALLATION
|
||||
==========================================================================================
|
||||
The basic installation procedure must be done in the directory
|
||||
which contains the extracted archive.
|
||||
The basic installation procedure must be done in a separatly folder in order to keep
|
||||
your file tree clean.
|
||||
|
||||
--> Example : bash installParadiseo.sh
|
||||
1) mkdir build
|
||||
2) cd build
|
||||
3) cmake ..
|
||||
4) make
|
||||
5) Take a cofee.
|
||||
6) Congratulation, ParadiseEO is installed !
|
||||
|
||||
Please try source installParadiseo.sh --help for further information
|
||||
Please refer to paradisEO website or INSTALL file for further information about
|
||||
installation types and options.
|
||||
|
||||
==========================================================================================
|
||||
DIRECTORY STRUCTURE
|
||||
|
|
@ -21,38 +27,34 @@ Please try source installParadiseo.sh --help for further information
|
|||
After unpacking the archive file, you should end up with the following
|
||||
structure:
|
||||
|
||||
.../ Installation directory (specified with ./installParadiseo.sh)
|
||||
.../
|
||||
|
|
||||
|
|
||||
+-- AUTHORS Author list
|
||||
|
|
||||
|
|
||||
+-- downloads/
|
||||
| | +-- /cudatoolkit_3.2.16_linux_32_ubuntu10.04.run CUDA toolkit (required for ParadisEO-GPU)
|
||||
| +-- /devdriver_3.2_linux_32_260.19.26.run CUDA driver (required for ParadisEO-GPU)
|
||||
+-- cmake/ CMake dir
|
||||
|
|
||||
|
|
||||
+-- CMakeLists.txt For building process
|
||||
|
|
||||
|
|
||||
+-- CTestConfig.cmake For testing process
|
||||
|
|
||||
|
|
||||
+-- INSTALL INSTALL file
|
||||
|
|
||||
|
|
||||
+-- install.cmake ParadisEO-GPU main install config file
|
||||
+-- LICENCE Licence contents
|
||||
|
|
||||
|
|
||||
+-- installParadiseo.sh Install script
|
||||
+-- paradiseo-eo paradiseo-eo dir
|
||||
|
|
||||
|
|
||||
+-- logs Log files
|
||||
+-- paradiseo-mo paradiseo-mo dir
|
||||
|
|
||||
|
|
||||
+ LICENCE Licence contents
|
||||
|
|
||||
|
|
||||
+-- paradiseo-eo paradiseo-eo dir
|
||||
|
|
||||
|
|
||||
+-- paradiseo-gpu paradiseo-gpu dir
|
||||
|
|
||||
|
|
||||
+-- paradiseo-mo paradiseo-mo dir
|
||||
+-- paradiseo-moeo paradiseo-moeo dir
|
||||
|
|
||||
|
|
||||
+-- problems classical problems evaluation functions
|
||||
|
|
@ -64,12 +66,12 @@ structure:
|
|||
NOTES
|
||||
==========================================================================================
|
||||
|
||||
ParadisEO-GPU uses EO and MO, a templates-based, ANSI-C++ compliant evolutionary computation library and Moving Object Library.
|
||||
It contains classes for almost any kind of evolutionary computation and local search algorithms you might come up to - at
|
||||
ParadisEO uses EO, a templates-based, ANSI-C++ compliant evolutionary computation library.
|
||||
It contains classes for almost any kind of evolutionary computation you might come up to - at
|
||||
least for the ones we could think of.
|
||||
EO Website: http://eodev.sourceforge.net/.
|
||||
EO is distributed under the GNU Lesser General Public License: http://www.gnu.org/copyleft/lesser.html
|
||||
ParadisEO WebSite : http://paradiseo.gforge.inria.fr/.
|
||||
|
||||
Please read README file of each extracted directory if you have
|
||||
problems for the installation.
|
||||
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
Jean-Charles Boisson
|
||||
Sébastien Cahon
|
||||
Clive Canape
|
||||
Laetitia Jourdan
|
||||
Thomas Legrand
|
||||
Arnaud Liefooghe
|
||||
Nouredine Melab
|
||||
El-Ghazali Talbi
|
||||
Alexandru-Adrian Tantar
|
||||
Sebastien Verel
|
||||
Jérémie Humeau
|
||||
Karima Boufaras
|
||||
Thé van Luong
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
|
||||
#############################################################################
|
||||
# Dart config for report submission
|
||||
#############################################################################
|
||||
|
||||
SET (DROP_METHOD "xmlrpc")
|
||||
SET (DROP_SITE "http://dart.irisa.fr")
|
||||
SET (DROP_LOCATION "ParadisEO")
|
||||
SET (NIGHTLY_START_TIME "23:00:00 WEST")
|
||||
#############################################################################
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,107 +0,0 @@
|
|||
######################################################################################
|
||||
### CMake basic configuration
|
||||
######################################################################################
|
||||
|
||||
# check cmake version compatibility
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
|
||||
# regular expression checking
|
||||
INCLUDE_REGULAR_EXPRESSION("^.*$" "^$")
|
||||
|
||||
# set a language for the entire project.
|
||||
ENABLE_LANGUAGE(CXX)
|
||||
ENABLE_LANGUAGE(C)
|
||||
|
||||
####################################################################################
|
||||
|
||||
|
||||
#####################################################################################
|
||||
### Include required modules & utilities
|
||||
#####################################################################################
|
||||
INCLUDE(CMakeBackwardCompatibilityCXX)
|
||||
|
||||
INCLUDE(FindDoxygen)
|
||||
|
||||
INCLUDE(FindGnuplot)
|
||||
|
||||
INCLUDE(CheckLibraryExists)
|
||||
|
||||
INCLUDE(Dart OPTIONAL)
|
||||
|
||||
INCLUDE(CPack)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
#####################################################################################
|
||||
### Manage the build type
|
||||
#####################################################################################
|
||||
|
||||
# the user should choose the build type on windows environments,excepted under cygwin (default=none)
|
||||
SET(CMAKE_DEFAULT_BUILD_TYPE "Release" CACHE STRING "Variable that stores the default CMake build type" FORCE)
|
||||
|
||||
FIND_PROGRAM(MEMORYCHECK_COMMAND
|
||||
NAMES purify valgrind
|
||||
PATHS
|
||||
"/usr/local/bin /usr/bin [HKEY_LOCAL_MACHINE\\SOFTWARE\\Rational Software\\Purify\\Setup;InstallFolder]"
|
||||
DOC "Path to the memory checking command, used for memory error detection.")
|
||||
|
||||
IF(NOT CMAKE_BUILD_TYPE)
|
||||
SET( CMAKE_BUILD_TYPE
|
||||
${CMAKE_DEFAULT_BUILD_TYPE} CACHE STRING
|
||||
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
|
||||
FORCE)
|
||||
ENDIF(NOT CMAKE_BUILD_TYPE)
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fprofile-arcs -ftest-coverage -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
|
||||
SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -O6")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
IF(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
ADD_DEFINITIONS(-DCMAKE_VERBOSE_MAKEFILE=ON)
|
||||
ENDIF(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
|
||||
#####################################################################################
|
||||
|
||||
######################################################################################
|
||||
### compilation of examples?
|
||||
######################################################################################
|
||||
|
||||
SET(ENABLE_CMAKE_EXAMPLE TRUE CACHE BOOL "Enable copy of benchs and parameters file?")
|
||||
|
||||
######################################################################################
|
||||
### Test config
|
||||
######################################################################################
|
||||
|
||||
IF (ENABLE_CMAKE_TESTING OR ENABLE_MINIMAL_CMAKE_TESTING)
|
||||
ENABLE_TESTING()
|
||||
ENDIF (ENABLE_CMAKE_TESTING OR ENABLE_MINIMAL_CMAKE_TESTING)
|
||||
######################################################################################
|
||||
|
||||
#######################################################################################
|
||||
### Paths to EO, MO and MOEO must be specified above.
|
||||
#######################################################################################
|
||||
|
||||
SET(EO_SRC_DIR "${CMAKE_SOURCE_DIR}/../paradiseo-eo" CACHE PATH "ParadisEO-EO source directory" FORCE)
|
||||
SET(EO_BIN_DIR "${CMAKE_BINARY_DIR}/../../paradiseo-eo/build" CACHE PATH "ParadisEO-EO binary directory" FORCE)
|
||||
|
||||
SET(MO_SRC_DIR "${CMAKE_SOURCE_DIR}/../paradiseo-mo" CACHE PATH "ParadisMO-MO source directory" FORCE)
|
||||
SET(MO_BIN_DIR "${CMAKE_BINARY_DIR}/../../paradiseo-mo/build" CACHE PATH "ParadisMO-MO binary directory" FORCE)
|
||||
|
||||
SET(GPU_SRC_DIR "${CMAKE_SOURCE_DIR}/../paradiseo-gpu" CACHE PATH "ParadisEO-GPU source directory" FORCE)
|
||||
SET(GPU_BIN_DIR "${CMAKE_BINARY_DIR}/../../paradiseo-gpu/build" CACHE PATH "ParadisEO-GPU binary directory" FORCE)
|
||||
|
||||
SET(PROBLEMS_SRC_DIR "${CMAKE_SOURCE_DIR}/../problems" CACHE PATH "Problems dependant source directory" FORCE)
|
||||
|
||||
######################################################################################
|
||||
######################################################################################
|
||||
### Subdirectories that CMake should process for EO, MO and GPU
|
||||
######################################################################################
|
||||
|
||||
ADD_SUBDIRECTORY(doc)
|
||||
ADD_SUBDIRECTORY(src)
|
||||
ADD_SUBDIRECTORY(test)
|
||||
ADD_SUBDIRECTORY(tutorial)
|
||||
######################################################################################
|
||||
|
||||
|
|
@ -1,583 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
#########################################################################################
|
||||
#
|
||||
# Project : paradisEO-GPU full package install
|
||||
# File : installParadiseo-gpu.sh
|
||||
# Comment : # This file attempts to install ParadisEO-GPU #
|
||||
#
|
||||
#########################################################################################
|
||||
|
||||
# global variables
|
||||
installStartTime=$SECONDS
|
||||
resourceKitPath=$PWD
|
||||
TAR_MSG=" "
|
||||
DIE=0
|
||||
PROG=ParadisEO-GPU
|
||||
CMAKE_PRIMARY_CONFIG_FILE=install.cmake
|
||||
HOME_PATH=$HOME
|
||||
CUDA=" " #****
|
||||
bash_path='$PATH'
|
||||
library_path='$LD_LIBRARY_PATH'
|
||||
|
||||
# generator types available on Unix platforms
|
||||
P_UNIX_MAKEFILES=1
|
||||
G_UNIX_MAKEFILES="Unix Makefiles"
|
||||
|
||||
# should we compile ParadisEO ?
|
||||
COMPILE_PARADISEO=1
|
||||
|
||||
# Build types
|
||||
DEFAULT_BUILD_TYPE=Release
|
||||
BUILD_TYPE=$DEFAULT_BUILD_TYPE
|
||||
|
||||
# CMake/CTest/Dart flags
|
||||
CTEST_DEFAULT_CONFIG="-D ExperimentalStart -D ExperimentalBuild -D ExperimentalTest"
|
||||
CTEST_CONFIG=$CTEST_DEFAULT_CONFIG
|
||||
|
||||
# What are the tests that should be always run ?
|
||||
MIN_CMAKE_FLAGS='-DENABLE_MINIMAL_CMAKE_TESTING=TRUE'
|
||||
|
||||
# install types to select in the main menu
|
||||
P_FULL_INSTALL=1
|
||||
P_RM_PREVIOUS_INSTALLL=2
|
||||
P_EXIT_INSTALL=3
|
||||
|
||||
IS_CUDA_INSTALLED=1
|
||||
|
||||
# install steps
|
||||
S_INTRODUCTION=1000
|
||||
S_UNPACK_EO=1001
|
||||
S_INSTALL_EO=1002
|
||||
S_INSTALL_MO=1003
|
||||
S_INSTALL_CUDA=1004 #****
|
||||
S_INSTALL_GPU=1005 #****
|
||||
S_CONFIGURE_ENV=1006
|
||||
S_REMOVE_INSTALL=1007
|
||||
S_END=1008
|
||||
#S_CHECK_AUTOTOOLS=1018
|
||||
|
||||
#### define what are the possible installs and their content
|
||||
|
||||
# full install
|
||||
|
||||
FULL_INSTALL="$S_INTRODUCTION $S_INSTALL_EO $S_INSTALL_MO $S_INSTALL_CUDA $S_INSTALL_GPU $S_END"
|
||||
|
||||
# remove a previous install
|
||||
RM_PREVIOUS_INSTALL="$S_REMOVE_INSTALL"
|
||||
|
||||
#others
|
||||
LIBS_PATH=lib
|
||||
# errors
|
||||
SUCCESSFUL_STEP=0
|
||||
EO_UNPACKING_ERROR=100
|
||||
EO_INSTALL_ERROR=104
|
||||
MO_INSTALL_ERROR=108
|
||||
GPU_INSTALL_ERROR=112 #****
|
||||
CUDA_INSTALLING_ERROR=116 #****
|
||||
REMOVE_TEMP_DIRECTORY_ERROR=113
|
||||
VAR_CONFIG_ERROR=114
|
||||
RM_PARADISEO_EO_ERROR=119
|
||||
DART_SUBMISSION_ERROR=64
|
||||
|
||||
#Date
|
||||
DATE=`/bin/date '+%Y%m%d%H%M%S'`
|
||||
# create log file
|
||||
SPY=$PWD/logs/install-paradiseo-gpu.${DATE}.log
|
||||
|
||||
#------------------------------------------------------#
|
||||
#-- FUNCTION : execute_cmd ---#
|
||||
#------------------------------------------------------#
|
||||
#-- PARAMETERS : ---#
|
||||
#-- $1 : cmd line ---#
|
||||
#-- $2 : comment ---#
|
||||
#-- $3 : spy file ---#
|
||||
#-- $4 : output std file ---#
|
||||
#-- $5 : error log file ---#
|
||||
#-- ---#
|
||||
#------------------------------------------------------#
|
||||
#-- CODE RETURN : 0 : OK ---#
|
||||
#-- CODE RETURN : 1 : NOK ---#
|
||||
#------------------------------------------------------#
|
||||
function execute_cmd
|
||||
{
|
||||
COMMAND=${1}
|
||||
COMMENT=${2}
|
||||
FIC_ESP=${3}
|
||||
FIC_OUT=${4}
|
||||
FIC_ERR=${5}
|
||||
|
||||
if [ `echo ${FIC_OUT} | wc -c` -eq 1 ]
|
||||
then
|
||||
FIC_OUT=${FIC_ESP}
|
||||
fi
|
||||
|
||||
if [ `echo ${FIC_ERR} | wc -c` -eq 1 ]
|
||||
then
|
||||
FIC_ERR=${FIC_ESP}
|
||||
fi
|
||||
|
||||
echo "" >> ${FIC_ESP}
|
||||
echo "[execute_cmd][Begin][`/bin/date +%H:%M:%S`]" >> ${FIC_ESP}
|
||||
|
||||
echo "------------------------------------------------------------------------------------------------------------" >> ${FIC_ESP}
|
||||
echo "${COMMENT}" >> ${FIC_ESP}
|
||||
echo "------------------------------------------------------------------------------------------------------------" >> ${FIC_ESP}
|
||||
echo "${COMMAND}" >> ${FIC_ESP}
|
||||
|
||||
${COMMAND} >> ${FIC_OUT} 2>> ${FIC_ERR}
|
||||
|
||||
RETURN_CODE=$?
|
||||
echo "RETURN_CODE : ${RETURN_CODE}" >> ${FIC_ESP}
|
||||
|
||||
if [ ${RETURN_CODE} -eq 0 ]
|
||||
then
|
||||
echo " ${COMMENT} OK" >> ${FIC_ESP}
|
||||
echo "[execute_cmd][End][`/bin/date +%H:%M:%S`]" >> ${FIC_ESP}
|
||||
return 0
|
||||
else
|
||||
echo " $ERROR_TAG ${COMMENT} NOK" >> ${FIC_ESP}
|
||||
return ${RETURN_CODE}
|
||||
fi
|
||||
}
|
||||
|
||||
#------------------------------------------------------#
|
||||
#-- FUNCTION : on_error ---#
|
||||
#------------------------------------------------------#
|
||||
#-- PARAMETERS : ---#
|
||||
#-- Error number ---#
|
||||
#------------------------------------------------------#
|
||||
#-- RETURN: ---#
|
||||
#------------------------------------------------------#
|
||||
function on_error()
|
||||
{
|
||||
case $1 in
|
||||
$CUDA_INSTALLING_ERROR)
|
||||
echo
|
||||
echo " An error has occured : impossible to install CudaToolkit.See $SPY for more details"
|
||||
echo "If you need help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY"
|
||||
echo
|
||||
echo
|
||||
kill $$;;
|
||||
|
||||
$EO_INSTALL_ERROR)
|
||||
echo
|
||||
echo " An error has occured : impossible to install Paradiseo-EO.See $SPY for more details"
|
||||
echo "If you need help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY"
|
||||
echo
|
||||
echo
|
||||
kill $$;;
|
||||
|
||||
$MO_INSTALL_ERROR)
|
||||
echo
|
||||
echo " An error has occured : impossible to install Paradiseo-MO.See $SPY for more details"
|
||||
echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY"
|
||||
echo
|
||||
kill $$;;
|
||||
|
||||
$MOEO_INSTALL_ERROR)
|
||||
echo
|
||||
echo " An error has occured : impossible to install Paradiseo-MOEO.See $SPY for more details"
|
||||
echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY"
|
||||
echo
|
||||
kill $$;;
|
||||
|
||||
$RM_PARADISEO_EO_ERROR)
|
||||
echo
|
||||
echo " An error has occured : impossible to remove ParadisEO-EO. See $SPY for more details"
|
||||
echo " You may not have a previous ParadisEO install available in the current directory"
|
||||
echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY"
|
||||
echo
|
||||
kill $$;;
|
||||
|
||||
$SUCCESSFUL_STEP)
|
||||
;;
|
||||
*)
|
||||
echo
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
#------------------------------------------------------#
|
||||
#-- FUNCTION : run_install_step ---#
|
||||
#------------------------------------------------------#
|
||||
#-- PARAMETERS : ---#
|
||||
#-- install path ---#
|
||||
#-- step to launch (0,1 ...) ---#
|
||||
#-- counter for loop ---#
|
||||
#-- Major function for install ---#
|
||||
#------------------------------------------------------#
|
||||
#-- RETURN: 0 if install OK ---#
|
||||
#------------------------------------------------------#
|
||||
|
||||
function run_install_step()
|
||||
{
|
||||
installKitPath=$1
|
||||
stepToRun=$2
|
||||
currentStepCounter=$3
|
||||
RETURN=0
|
||||
|
||||
case "$stepToRun" in
|
||||
|
||||
$S_INTRODUCTION)
|
||||
########## Introduction #########
|
||||
clear
|
||||
echo ""
|
||||
echo -e ' \033[40m\033[1;33m### ParadisEO-GPU install starting .... ### \033[0m '
|
||||
echo
|
||||
echo "Installing the environment for ParadisEO-GPU... To avoid build and test reports to be sent to our repository, please stop the program and restart it using the --skipdart option."
|
||||
sleep 6
|
||||
echo
|
||||
echo
|
||||
return $SUCCESSFUL_STEP
|
||||
;;
|
||||
|
||||
$S_INSTALL_EO)
|
||||
########## installing paradiseo-eo ##########
|
||||
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m "
|
||||
echo ' --> Installing Paradiseo-EO. Please wait ...'
|
||||
|
||||
if [ ! "$installKitPath" = "$resourceKitPath" ]
|
||||
then
|
||||
cp -Rf $resourceKitPath/paradiseo-eo/ $installKitPath/
|
||||
rm -Rf $installKitPath/paradiseo-eo/build
|
||||
fi
|
||||
|
||||
execute_cmd "mkdir $installKitPath/paradiseo-eo/build" "[$currentStepCounter-1] Create build directory" $SPY
|
||||
|
||||
execute_cmd "cd $installKitPath/paradiseo-eo/build" "[$currentStepCounter-2] Go in Paradiseo-EO build dir" $SPY
|
||||
RETURN=`expr $RETURN + $?`
|
||||
|
||||
execute_cmd " echo \"cmake ../ -G$BUILD_PROCESS_TYPE $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS\" " "[$currentStepCounter-3] Run CMake using generator $BUILD_PROCESS_TYPE" $SPY
|
||||
|
||||
cmake ../ -G"$BUILD_PROCESS_TYPE" -DCMAKE_BUILD_TYPE=$BUILD_TYPE $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS >> ${SPY} 2>> ${SPY}
|
||||
RETURN=`expr $RETURN + $?`
|
||||
|
||||
if [ "$COMPILE_PARADISEO" = "1" ]
|
||||
then
|
||||
execute_cmd "ctest $CTEST_CONFIG" "[$currentStepCounter-4] Compile ParadisEO-EO using CTest" $SPY
|
||||
LAST_RETURN=$?
|
||||
# don't consider a submission error as a "right error"
|
||||
if [ ! "$LAST_RETURN" = "$DART_SUBMISSION_ERROR" ]
|
||||
then
|
||||
RETURN=`expr $RETURN + $LAST_RETURN`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! $(($RETURN)) = 0 ]
|
||||
then
|
||||
echo ''
|
||||
echo " --> Error when installing Paradiseo-EO"
|
||||
echo -e ' \033[40m\033[1;33m### END ### \033[0m '
|
||||
return $EO_INSTALL_ERROR
|
||||
else
|
||||
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m"
|
||||
echo
|
||||
return $SUCCESSFUL_STEP
|
||||
fi
|
||||
;;
|
||||
$S_INSTALL_MO)
|
||||
########## installing paradiseo-mo ##########
|
||||
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m "
|
||||
echo ' --> Installing Paradiseo-MO. Please wait ...'
|
||||
|
||||
if [ ! "$installKitPath" = "$resourceKitPath" ]
|
||||
then
|
||||
cp -Rf $resourceKitPath/paradiseo-mo/ $installKitPath/
|
||||
cp $resourceKitPath/install.cmake $installKitPath/
|
||||
rm -Rf $installKitPath/paradiseo-mo/build/*
|
||||
fi
|
||||
|
||||
execute_cmd "cd $installKitPath/paradiseo-mo/build" "[$currentStepCounter-1] Go in Paradiseo-MO dir" $SPY
|
||||
RETURN=$?
|
||||
|
||||
execute_cmd " echo \"cmake ../ -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE -G\"$BUILD_PROCESS_TYPE\" $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE\" " "[$currentStepCounter-2] Run CMake using generator $BUILD_PROCESS_TYPE -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE" $SPY
|
||||
cmake ../ -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE -G"$BUILD_PROCESS_TYPE" -DCMAKE_BUILD_TYPE=$BUILD_TYPE $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS>> ${SPY} 2>> ${SPY}
|
||||
RETURN=`expr $RETURN + $?`
|
||||
|
||||
if [ "$COMPILE_PARADISEO" = "1" ]
|
||||
then
|
||||
execute_cmd "ctest $CTEST_CONFIG" "[$currentStepCounter-3] Compile ParadisEO-MO using CTest" $SPY
|
||||
LAST_RETURN=$?
|
||||
# don't consider a submission error as a "right error"
|
||||
if [ ! "$LAST_RETURN" = "$DART_SUBMISSION_ERROR" ]
|
||||
then
|
||||
RETURN=`expr $RETURN + $LAST_RETURN`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! $(($RETURN)) = 0 ]
|
||||
then
|
||||
echo ''
|
||||
echo " --> Error when installing Paradiseo-MO"
|
||||
echo -e ' \033[40m\033[1;33m### END ### \033[0m '
|
||||
return $MO_INSTALL_ERROR
|
||||
else
|
||||
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m"
|
||||
echo
|
||||
return $SUCCESSFUL_STEP
|
||||
fi
|
||||
;;
|
||||
|
||||
$S_INSTALL_CUDA)
|
||||
########## installing cudaToolkit 3.2##########
|
||||
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m "
|
||||
echo ' --> installing cudaToolkit (required for ParadisEO-GPU) ...'
|
||||
execute_cmd "cd $installKitPath/downloads/" "[$currentStepCounter-2] Go in downloads dir" $SPY
|
||||
sudo ./cudatoolkit_3.2.16_linux_32_ubuntu10.04.run
|
||||
RETURN=$?
|
||||
if [ ! "$?" = "0" ]
|
||||
then
|
||||
echo ''
|
||||
echo " --> Error when installing cudaToolkit"
|
||||
echo -e ' \033[40m\033[1;33m### END ### \033[0m '
|
||||
return $CUDA_INSTALLING_ERROR
|
||||
else
|
||||
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m"
|
||||
echo
|
||||
return $SUCCESSFUL_STEP
|
||||
fi
|
||||
kill $?;;
|
||||
|
||||
$S_INSTALL_GPU)
|
||||
########## installing paradiseo-gpu ##########
|
||||
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m "
|
||||
echo ' --> Installing Paradiseo-GPU. Please wait ...'
|
||||
|
||||
if [ ! "$installKitPath" = "$resourceKitPath" ]
|
||||
then
|
||||
cp -Rf $resourceKitPath/paradiseo-gpu/ $installKitPath/
|
||||
cp $resourceKitPath/install.cmake $installKitPath/
|
||||
rm -Rf $installKitPath/paradiseo-gpu/build/*
|
||||
fi
|
||||
|
||||
execute_cmd "cd $installKitPath/paradiseo-gpu/build" "[$currentStepCounter-1] Go in Paradiseo-GPU dir" $SPY
|
||||
RETURN=$?
|
||||
|
||||
execute_cmd " echo \"cmake ../ -G\"$BUILD_PROCESS_TYPE\" $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE\" " "[$currentStepCounter-2] Run CMake using generator $BUILD_PROCESS_TYPE" $SPY
|
||||
cmake ../ -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE -G"$BUILD_PROCESS_TYPE" -DCMAKE_BUILD_TYPE=$BUILD_TYPE $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS>> ${SPY} 2>> ${SPY}
|
||||
RETURN=`expr $RETURN + $?`
|
||||
|
||||
if [ "$COMPILE_PARADISEO" = "1" ]
|
||||
then
|
||||
execute_cmd "ctest $CTEST_CONFIG" "[$currentStepCounter-3] Compile ParadisEO-GPU using CTest" $SPY
|
||||
LAST_RETURN=$?
|
||||
# don't consider a submission error as a "right error"
|
||||
if [ ! "$LAST_RETURN" = "$DART_SUBMISSION_ERROR" ]
|
||||
then
|
||||
RETURN=`expr $RETURN + $LAST_RETURN`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! $(($RETURN)) = 0 ]
|
||||
then
|
||||
echo ''
|
||||
echo " --> Error when installing Paradiseo-GPU"
|
||||
echo -e ' \033[40m\033[1;33m### END ### \033[0m '
|
||||
return $GPU_INSTALL_ERROR
|
||||
else
|
||||
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m"
|
||||
echo
|
||||
return $SUCCESSFUL_STEP
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
$S_REMOVE_INSTALL)
|
||||
########## removing a previous install of EO ##########
|
||||
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m "
|
||||
echo ' --> Removing your previous install of ParadisEO-GPU ...'
|
||||
|
||||
execute_cmd "rm -Rf $installKitPath/paradiseo-eo/build/*" "[$currentStepCounter] Remove $installKitPath/paradiseo-eo/build/*" $SPY
|
||||
idx=$?
|
||||
execute_cmd "rm -Rf $installKitPath/paradiseo-mo/build/*" "[$currentStepCounter] Remove $installKitPath/paradiseo-mo/build/*" $SPY
|
||||
idx=`expr $idx + $?`
|
||||
execute_cmd "rm -Rf $installKitPath/paradiseo-gpu/build/*" "[$currentStepCounter] Remove $installKitPath/paradiseo-gpu/build/*" $SPY
|
||||
idx=`expr $idx + $?`
|
||||
|
||||
if [ ! $(($idx)) = 0 ]
|
||||
then
|
||||
echo ''
|
||||
echo " --> Error when removing previous install of ParadisEO"
|
||||
echo -e ' \033[40m\033[1;33m### END ### \033[0m '
|
||||
return $RM_UTIL_ERROR
|
||||
else
|
||||
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m"
|
||||
echo -e "Please \033[40m\033[1;33m CLOSE YOUR TERMINAL OR OPEN A NEW ONE \033[0m before proceeding with a new installation."
|
||||
echo
|
||||
return $SUCCESSFUL_STEP
|
||||
fi
|
||||
;;
|
||||
|
||||
$S_END)
|
||||
echo
|
||||
echo
|
||||
echo -e " \033[40m\033[1;34m# SUCCESSFULL INSTALLATION. \033[0m"
|
||||
echo
|
||||
return $SUCCESSFUL_STEP
|
||||
;;
|
||||
*)
|
||||
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
########################################################
|
||||
######### BODY ########
|
||||
#########################################################
|
||||
|
||||
|
||||
(cmake --version) < /dev/null > /dev/null 2>&1 ||
|
||||
{
|
||||
echo "You must have CMake installed to compile $PROG. Please update your system to get it before installing $PROG."
|
||||
execute_cmd "echo \"You must have CMake installed to compile $PROG. Please update your system to get it before installing $PROG.\"" "[0-3] Check autoconf" $SPY
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if [ "$DIE" = "1" ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
########################################################################
|
||||
# Simple menu
|
||||
# The options are :
|
||||
# --prefix
|
||||
# --debug
|
||||
# --skipdart
|
||||
# --help
|
||||
#######################################################################
|
||||
|
||||
INSTALL_TREATENED=0
|
||||
INSTALL_PATH=$PWD
|
||||
for i in $*
|
||||
do
|
||||
if [ "${i%=*}" = "--help" ] || [ "${i%=*}" = "-h" ]
|
||||
then
|
||||
clear
|
||||
echo "installParadiseo-gpu.sh"
|
||||
echo
|
||||
echo -e "\033[1mNAME\033[0m"
|
||||
echo ' installParadiseo-gpu.sh - Install ParadisEO-GPU'
|
||||
echo
|
||||
echo -e "\033[1mSYNOPSIS\033[0m"
|
||||
echo -e ' \033[1m./installParadiseo-gpu.sh\033[0m or \033[1mbash installParadiseo-gpu.sh\033[0m'
|
||||
echo -e ' [\033[1m--prefix=\033[0m\033[4mPATH\033[0m] [\033[1m--debug\033[0m] [\033[1m--skipdart\033[0m] [\033[1m--home=\033[0m\033[4mHOME\033[0m] [\033[1m-h\033[0m] [\033[1m--help\033[0m]'
|
||||
echo
|
||||
echo -e "\033[1mDESCRIPTION\033[0m"
|
||||
echo -e " \033[1m--prefix=\033[0m\033[4mPATH\033[0m"
|
||||
echo -e " ParadisEO-GPU will be installed in the directory \033[0m\033[4mPATH\033[0m. The current directory is used by default."
|
||||
echo
|
||||
echo -e " \033[1m--debug\033[0m"
|
||||
echo ' Debug mode, set warning compiler flags and run tests.'
|
||||
echo
|
||||
echo -e " \033[1m--skipdart\033[0m"
|
||||
echo ' Use this option to avoid build/test report submission to our Dart server.'
|
||||
echo
|
||||
echo -e " \033[1m--home=\033[0m\033[4mHOME\033[0m"
|
||||
echo -e " Using \033[0m\033[4mHOME\033[0m as your home directory. Should be used when ~ doesnt reference your home. "
|
||||
echo
|
||||
echo -e " \033[1m-h, --help\033[0m"
|
||||
echo ' Print these useful lines.'
|
||||
echo
|
||||
echo -e "\033[1mAUTHOR\033[0m"
|
||||
echo " Written by Karima Boufaras."
|
||||
echo
|
||||
echo -e "\033[1mBUGS\033[0m"
|
||||
echo " Report bugs to paradiseo-bugs@lists.gforge.inria.fr."
|
||||
echo
|
||||
echo -e "\033[1mCOPYRIGHT\033[0m"
|
||||
echo " This software is governed by the CeCILL license under French law and"
|
||||
echo " abiding by the rules of distribution of free software. You can use,"
|
||||
echo " modify and/ or redistribute the software under the terms of the CeCILL"
|
||||
echo " license as circulated by CEA, CNRS and INRIA at the following URL"
|
||||
echo " http://www.cecill.info. "
|
||||
echo
|
||||
echo -e "\033[1mSEE ALSO\033[0m"
|
||||
echo " For further help, please contact paradiseo-help@lists.gforge.inria.fr."
|
||||
echo
|
||||
exit
|
||||
fi
|
||||
if [ "${i%=*}" = "--prefix" ]
|
||||
then
|
||||
INSTALL_PATH=${i#*=}
|
||||
fi
|
||||
if [ "${i%=*}" = "--debug" ]
|
||||
then
|
||||
BUILD_TYPE=Debug
|
||||
OPTIONNAL_CMAKE_FLAGS='-DENABLE_CMAKE_TESTING=TRUE'
|
||||
CTEST_CONFIG="$CTEST_CONFIG -D ExperimentalTest"
|
||||
fi
|
||||
if [ "${i%=*}" = "--skipdart" ]
|
||||
then
|
||||
SKIP_DART="1"
|
||||
fi
|
||||
if [ "${i%=*}" = "--home" ]
|
||||
then
|
||||
HOME_PATH=${i#*=}
|
||||
fi
|
||||
done
|
||||
#######################################################################
|
||||
|
||||
### Do we have a valid home path ?
|
||||
if [ ! -d $HOME_PATH ]
|
||||
then
|
||||
echo " Please give a valid path for your home directory (use --help for further information)"
|
||||
fi
|
||||
|
||||
|
||||
### Add a CTest flag depending on the "skipdart" option.
|
||||
if [ ! "$SKIP_DART" = "1" ]
|
||||
then
|
||||
CTEST_CONFIG="$CTEST_CONFIG -D ExperimentalSubmit"
|
||||
fi
|
||||
|
||||
### Need the generator
|
||||
BUILD_PROCESS_TYPE="$G_UNIX_MAKEFILES"
|
||||
GENERATOR_TREATENED=1
|
||||
while [ ! "$INSTALL_TREATENED" = "1" ]
|
||||
do
|
||||
case "$INSTALL_TYPE" in
|
||||
|
||||
$P_FULL_INSTALL)
|
||||
counter=0
|
||||
for step in $FULL_INSTALL
|
||||
do
|
||||
run_install_step $INSTALL_PATH $step $counter
|
||||
on_error $?
|
||||
counter=`expr $counter + 1`
|
||||
done
|
||||
INSTALL_TREATENED=1
|
||||
;;
|
||||
|
||||
$P_RM_PREVIOUS_INSTALLL)
|
||||
counter=0
|
||||
for step in $RM_PREVIOUS_INSTALL
|
||||
do
|
||||
run_install_step $INSTALL_PATH $step $counter
|
||||
on_error $?
|
||||
counter=`expr $counter + 1`
|
||||
done
|
||||
INSTALL_TREATENED=1
|
||||
;;
|
||||
|
||||
$P_EXIT_INSTALL)
|
||||
INSTALL_TREATENED=1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo
|
||||
echo -e ' \033[40m\033[1;33m### Please select your install for ParadisEO : ### \033[0m '
|
||||
echo
|
||||
echo " 1 : Full install (all the components : EO,MO and GPU)"
|
||||
echo " 2 : Remove a previous install of ParadisEO located in $INSTALL_PATH"
|
||||
echo " 3 : Exit install"
|
||||
read INSTALL_TYPE
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
Authors:
|
||||
Boufaras Karima
|
||||
Thé Van Luong
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,79 +0,0 @@
|
|||
# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
|
||||
# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
|
||||
#
|
||||
# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved.
|
||||
#
|
||||
# Copyright (c) 2007-2009
|
||||
# Scientific Computing and Imaging Institute, University of Utah
|
||||
#
|
||||
# This code is licensed under the MIT License. See the FindCUDA.cmake script
|
||||
# for the text of the license.
|
||||
|
||||
# The MIT License
|
||||
#
|
||||
# License for the specific language governing rights and limitations under
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
# This converts a file written in makefile syntax into one that can be included
|
||||
# by CMake.
|
||||
|
||||
file(READ ${input_file} depend_text)
|
||||
|
||||
if (${depend_text} MATCHES ".+")
|
||||
|
||||
# message("FOUND DEPENDS")
|
||||
|
||||
# Remember, four backslashes is escaped to one backslash in the string.
|
||||
string(REGEX REPLACE "\\\\ " " " depend_text ${depend_text})
|
||||
|
||||
# This works for the nvcc -M generated dependency files.
|
||||
string(REGEX REPLACE "^.* : " "" depend_text ${depend_text})
|
||||
string(REGEX REPLACE "[ \\\\]*\n" ";" depend_text ${depend_text})
|
||||
|
||||
set(dependency_list "")
|
||||
|
||||
foreach(file ${depend_text})
|
||||
|
||||
string(REGEX REPLACE "^ +" "" file ${file})
|
||||
|
||||
if(NOT IS_DIRECTORY ${file})
|
||||
# If softlinks start to matter, we should change this to REALPATH. For now we need
|
||||
# to flatten paths, because nvcc can generate stuff like /bin/../include instead of
|
||||
# just /include.
|
||||
get_filename_component(file_absolute "${file}" ABSOLUTE)
|
||||
list(APPEND dependency_list "${file_absolute}")
|
||||
endif(NOT IS_DIRECTORY ${file})
|
||||
|
||||
endforeach(file)
|
||||
|
||||
else()
|
||||
# message("FOUND NO DEPENDS")
|
||||
endif()
|
||||
|
||||
# Remove the duplicate entries and sort them.
|
||||
list(REMOVE_DUPLICATES dependency_list)
|
||||
list(SORT dependency_list)
|
||||
|
||||
foreach(file ${dependency_list})
|
||||
set(cuda_nvcc_depend "${cuda_nvcc_depend} \"${file}\"\n")
|
||||
endforeach()
|
||||
|
||||
file(WRITE ${output_file} "# Generated by: make2cmake.cmake\nSET(CUDA_NVCC_DEPEND\n ${cuda_nvcc_depend})\n\n")
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
|
||||
# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
|
||||
#
|
||||
# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved.
|
||||
#
|
||||
# Copyright (c) 2007-2009
|
||||
# Scientific Computing and Imaging Institute, University of Utah
|
||||
#
|
||||
# This code is licensed under the MIT License. See the FindCUDA.cmake script
|
||||
# for the text of the license.
|
||||
|
||||
# The MIT License
|
||||
#
|
||||
# License for the specific language governing rights and limitations under
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
# Parses a .cubin file produced by nvcc and reports statistics about the file.
|
||||
|
||||
|
||||
file(READ ${input_file} file_text)
|
||||
|
||||
if (${file_text} MATCHES ".+")
|
||||
|
||||
# Remember, four backslashes is escaped to one backslash in the string.
|
||||
string(REGEX REPLACE ";" "\\\\;" file_text ${file_text})
|
||||
string(REGEX REPLACE "\ncode" ";code" file_text ${file_text})
|
||||
|
||||
list(LENGTH file_text len)
|
||||
|
||||
foreach(line ${file_text})
|
||||
|
||||
# Only look at "code { }" blocks.
|
||||
if(line MATCHES "^code")
|
||||
|
||||
# Break into individual lines.
|
||||
string(REGEX REPLACE "\n" ";" line ${line})
|
||||
|
||||
foreach(entry ${line})
|
||||
|
||||
# Extract kernel names.
|
||||
if (${entry} MATCHES "[^g]name = ([^ ]+)")
|
||||
string(REGEX REPLACE ".* = ([^ ]+)" "\\1" entry ${entry})
|
||||
|
||||
# Check to see if the kernel name starts with "_"
|
||||
set(skip FALSE)
|
||||
# if (${entry} MATCHES "^_")
|
||||
# Skip the rest of this block.
|
||||
# message("Skipping ${entry}")
|
||||
# set(skip TRUE)
|
||||
# else (${entry} MATCHES "^_")
|
||||
message("Kernel: ${entry}")
|
||||
# endif (${entry} MATCHES "^_")
|
||||
|
||||
endif(${entry} MATCHES "[^g]name = ([^ ]+)")
|
||||
|
||||
# Skip the rest of the block if necessary
|
||||
if(NOT skip)
|
||||
|
||||
# Registers
|
||||
if (${entry} MATCHES "reg([ ]+)=([ ]+)([^ ]+)")
|
||||
string(REGEX REPLACE ".*([ ]+)=([ ]+)([^ ]+)" "\\3" entry ${entry})
|
||||
message("Registers: ${entry}")
|
||||
endif()
|
||||
|
||||
# Local memory
|
||||
if (${entry} MATCHES "lmem([ ]+)=([ ]+)([^ ]+)")
|
||||
string(REGEX REPLACE ".*([ ]+)=([ ]+)([^ ]+)" "\\3" entry ${entry})
|
||||
message("Local: ${entry}")
|
||||
endif()
|
||||
|
||||
# Shared memory
|
||||
if (${entry} MATCHES "smem([ ]+)=([ ]+)([^ ]+)")
|
||||
string(REGEX REPLACE ".*([ ]+)=([ ]+)([^ ]+)" "\\3" entry ${entry})
|
||||
message("Shared: ${entry}")
|
||||
endif()
|
||||
|
||||
if (${entry} MATCHES "^}")
|
||||
message("")
|
||||
endif()
|
||||
|
||||
endif(NOT skip)
|
||||
|
||||
|
||||
endforeach(entry)
|
||||
|
||||
endif(line MATCHES "^code")
|
||||
|
||||
endforeach(line)
|
||||
|
||||
else()
|
||||
# message("FOUND NO DEPENDS")
|
||||
endif()
|
||||
|
||||
|
||||
|
|
@ -1,280 +0,0 @@
|
|||
# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
|
||||
#
|
||||
# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved.
|
||||
#
|
||||
# This code is licensed under the MIT License. See the FindCUDA.cmake script
|
||||
# for the text of the license.
|
||||
|
||||
# The MIT License
|
||||
#
|
||||
# License for the specific language governing rights and limitations under
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
##########################################################################
|
||||
# This file runs the nvcc commands to produce the desired output file along with
|
||||
# the dependency file needed by CMake to compute dependencies. In addition the
|
||||
# file checks the output of each command and if the command fails it deletes the
|
||||
# output files.
|
||||
|
||||
# Input variables
|
||||
#
|
||||
# verbose:BOOL=<> OFF: Be as quiet as possible (default)
|
||||
# ON : Describe each step
|
||||
#
|
||||
# build_configuration:STRING=<> Typically one of Debug, MinSizeRel, Release, or
|
||||
# RelWithDebInfo, but it should match one of the
|
||||
# entries in CUDA_HOST_FLAGS. This is the build
|
||||
# configuration used when compiling the code. If
|
||||
# blank or unspecified Debug is assumed as this is
|
||||
# what CMake does.
|
||||
#
|
||||
# generated_file:STRING=<> File to generate. This argument must be passed in.
|
||||
#
|
||||
# generated_cubin_file:STRING=<> File to generate. This argument must be passed
|
||||
# in if build_cubin is true.
|
||||
|
||||
if(NOT generated_file)
|
||||
message(FATAL_ERROR "You must specify generated_file on the command line")
|
||||
endif()
|
||||
|
||||
# Set these up as variables to make reading the generated file easier
|
||||
set(CMAKE_COMMAND "@CMAKE_COMMAND@")
|
||||
set(source_file "@source_file@")
|
||||
set(NVCC_generated_dependency_file "@NVCC_generated_dependency_file@")
|
||||
set(cmake_dependency_file "@cmake_dependency_file@")
|
||||
set(CUDA_make2cmake "@CUDA_make2cmake@")
|
||||
set(CUDA_parse_cubin "@CUDA_parse_cubin@")
|
||||
set(build_cubin @build_cubin@)
|
||||
# We won't actually use these variables for now, but we need to set this, in
|
||||
# order to force this file to be run again if it changes.
|
||||
set(generated_file_path "@generated_file_path@")
|
||||
set(generated_file_internal "@generated_file@")
|
||||
set(generated_cubin_file_internal "@generated_cubin_file@")
|
||||
|
||||
set(CUDA_NVCC_EXECUTABLE "@CUDA_NVCC_EXECUTABLE@")
|
||||
set(CUDA_NVCC_FLAGS "@CUDA_NVCC_FLAGS@;;@CUDA_WRAP_OPTION_NVCC_FLAGS@")
|
||||
@CUDA_NVCC_FLAGS_CONFIG@
|
||||
set(nvcc_flags "@nvcc_flags@")
|
||||
set(CUDA_NVCC_INCLUDE_ARGS "@CUDA_NVCC_INCLUDE_ARGS@")
|
||||
set(format_flag "@format_flag@")
|
||||
|
||||
if(build_cubin AND NOT generated_cubin_file)
|
||||
message(FATAL_ERROR "You must specify generated_cubin_file on the command line")
|
||||
endif()
|
||||
|
||||
# This is the list of host compilation flags. It C or CXX should already have
|
||||
# been chosen by FindCUDA.cmake.
|
||||
@CUDA_HOST_FLAGS@
|
||||
|
||||
# Take the compiler flags and package them up to be sent to the compiler via -Xcompiler
|
||||
set(nvcc_host_compiler_flags "")
|
||||
# If we weren't given a build_configuration, use Debug.
|
||||
if(NOT build_configuration)
|
||||
set(build_configuration Debug)
|
||||
endif()
|
||||
string(TOUPPER "${build_configuration}" build_configuration)
|
||||
#message("CUDA_NVCC_HOST_COMPILER_FLAGS = ${CUDA_NVCC_HOST_COMPILER_FLAGS}")
|
||||
foreach(flag ${CMAKE_HOST_FLAGS} ${CMAKE_HOST_FLAGS_${build_configuration}})
|
||||
# Extra quotes are added around each flag to help nvcc parse out flags with spaces.
|
||||
set(nvcc_host_compiler_flags "${nvcc_host_compiler_flags},\"${flag}\"")
|
||||
endforeach()
|
||||
if (nvcc_host_compiler_flags)
|
||||
set(nvcc_host_compiler_flags "-Xcompiler" ${nvcc_host_compiler_flags})
|
||||
endif()
|
||||
#message("nvcc_host_compiler_flags = \"${nvcc_host_compiler_flags}\"")
|
||||
# Add the build specific configuration flags
|
||||
list(APPEND CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS_${build_configuration}})
|
||||
|
||||
if(DEFINED CCBIN)
|
||||
set(CCBIN -ccbin "${CCBIN}")
|
||||
endif()
|
||||
|
||||
# cuda_execute_process - Executes a command with optional command echo and status message.
|
||||
#
|
||||
# status - Status message to print if verbose is true
|
||||
# command - COMMAND argument from the usual execute_process argument structure
|
||||
# ARGN - Remaining arguments are the command with arguments
|
||||
#
|
||||
# CUDA_result - return value from running the command
|
||||
#
|
||||
# Make this a macro instead of a function, so that things like RESULT_VARIABLE
|
||||
# and other return variables are present after executing the process.
|
||||
macro(cuda_execute_process status command)
|
||||
set(_command ${command})
|
||||
if(NOT _command STREQUAL "COMMAND")
|
||||
message(FATAL_ERROR "Malformed call to cuda_execute_process. Missing COMMAND as second argument. (command = ${command})")
|
||||
endif()
|
||||
if(verbose)
|
||||
execute_process(COMMAND "${CMAKE_COMMAND}" -E echo -- ${status})
|
||||
# Now we need to build up our command string. We are accounting for quotes
|
||||
# and spaces, anything else is left up to the user to fix if they want to
|
||||
# copy and paste a runnable command line.
|
||||
set(cuda_execute_process_string)
|
||||
foreach(arg ${ARGN})
|
||||
# If there are quotes, excape them, so they come through.
|
||||
string(REPLACE "\"" "\\\"" arg ${arg})
|
||||
# Args with spaces need quotes around them to get them to be parsed as a single argument.
|
||||
if(arg MATCHES " ")
|
||||
list(APPEND cuda_execute_process_string "\"${arg}\"")
|
||||
else()
|
||||
list(APPEND cuda_execute_process_string ${arg})
|
||||
endif()
|
||||
endforeach()
|
||||
# Echo the command
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E echo ${cuda_execute_process_string})
|
||||
endif(verbose)
|
||||
# Run the command
|
||||
execute_process(COMMAND ${ARGN} RESULT_VARIABLE CUDA_result )
|
||||
endmacro()
|
||||
|
||||
# Delete the target file
|
||||
cuda_execute_process(
|
||||
"Removing ${generated_file}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}"
|
||||
)
|
||||
|
||||
# For CUDA 2.3 and below, -G -M doesn't work, so remove the -G flag
|
||||
# for dependency generation and hope for the best.
|
||||
set(depends_CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}")
|
||||
set(CUDA_VERSION @CUDA_VERSION@)
|
||||
if(CUDA_VERSION VERSION_LESS "3.0")
|
||||
cmake_policy(PUSH)
|
||||
# CMake policy 0007 NEW states that empty list elements are not
|
||||
# ignored. I'm just setting it to avoid the warning that's printed.
|
||||
cmake_policy(SET CMP0007 NEW)
|
||||
# Note that this will remove all occurances of -G.
|
||||
list(REMOVE_ITEM depends_CUDA_NVCC_FLAGS "-G")
|
||||
cmake_policy(POP)
|
||||
endif()
|
||||
|
||||
# nvcc doesn't define __CUDACC__ for some reason when generating dependency files. This
|
||||
# can cause incorrect dependencies when #including files based on this macro which is
|
||||
# defined in the generating passes of nvcc invokation. We will go ahead and manually
|
||||
# define this for now until a future version fixes this bug.
|
||||
set(CUDACC_DEFINE -D__CUDACC__)
|
||||
|
||||
# Generate the dependency file
|
||||
cuda_execute_process(
|
||||
"Generating dependency file: ${NVCC_generated_dependency_file}"
|
||||
COMMAND "${CUDA_NVCC_EXECUTABLE}"
|
||||
-M
|
||||
${CUDACC_DEFINE}
|
||||
"${source_file}"
|
||||
-o "${NVCC_generated_dependency_file}"
|
||||
${CCBIN}
|
||||
${nvcc_flags}
|
||||
${nvcc_host_compiler_flags}
|
||||
${depends_CUDA_NVCC_FLAGS}
|
||||
-DNVCC
|
||||
${CUDA_NVCC_INCLUDE_ARGS}
|
||||
)
|
||||
|
||||
if(CUDA_result)
|
||||
message(FATAL_ERROR "Error generating ${generated_file}")
|
||||
endif()
|
||||
|
||||
# Generate the cmake readable dependency file to a temp file. Don't put the
|
||||
# quotes just around the filenames for the input_file and output_file variables.
|
||||
# CMake will pass the quotes through and not be able to find the file.
|
||||
cuda_execute_process(
|
||||
"Generating temporary cmake readable file: ${cmake_dependency_file}.tmp"
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "input_file:FILEPATH=${NVCC_generated_dependency_file}"
|
||||
-D "output_file:FILEPATH=${cmake_dependency_file}.tmp"
|
||||
-P "${CUDA_make2cmake}"
|
||||
)
|
||||
|
||||
if(CUDA_result)
|
||||
message(FATAL_ERROR "Error generating ${generated_file}")
|
||||
endif()
|
||||
|
||||
# Copy the file if it is different
|
||||
cuda_execute_process(
|
||||
"Copy if different ${cmake_dependency_file}.tmp to ${cmake_dependency_file}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${cmake_dependency_file}.tmp" "${cmake_dependency_file}"
|
||||
)
|
||||
|
||||
if(CUDA_result)
|
||||
message(FATAL_ERROR "Error generating ${generated_file}")
|
||||
endif()
|
||||
|
||||
# Delete the temporary file
|
||||
cuda_execute_process(
|
||||
"Removing ${cmake_dependency_file}.tmp and ${NVCC_generated_dependency_file}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E remove "${cmake_dependency_file}.tmp" "${NVCC_generated_dependency_file}"
|
||||
)
|
||||
|
||||
if(CUDA_result)
|
||||
message(FATAL_ERROR "Error generating ${generated_file}")
|
||||
endif()
|
||||
|
||||
# Generate the code
|
||||
cuda_execute_process(
|
||||
"Generating ${generated_file}"
|
||||
COMMAND "${CUDA_NVCC_EXECUTABLE}"
|
||||
"${source_file}"
|
||||
${format_flag} -o "${generated_file}"
|
||||
${CCBIN}
|
||||
${nvcc_flags}
|
||||
${nvcc_host_compiler_flags}
|
||||
${CUDA_NVCC_FLAGS}
|
||||
-DNVCC
|
||||
${CUDA_NVCC_INCLUDE_ARGS}
|
||||
)
|
||||
|
||||
if(CUDA_result)
|
||||
# Since nvcc can sometimes leave half done files make sure that we delete the output file.
|
||||
cuda_execute_process(
|
||||
"Removing ${generated_file}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}"
|
||||
)
|
||||
message(FATAL_ERROR "Error generating file ${generated_file}")
|
||||
else()
|
||||
if(verbose)
|
||||
message("Generated ${generated_file} successfully.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Cubin resource report commands.
|
||||
if( build_cubin )
|
||||
# Run with -cubin to produce resource usage report.
|
||||
cuda_execute_process(
|
||||
"Generating ${generated_cubin_file}"
|
||||
COMMAND "${CUDA_NVCC_EXECUTABLE}"
|
||||
"${source_file}"
|
||||
${CUDA_NVCC_FLAGS}
|
||||
${nvcc_flags}
|
||||
${CCBIN}
|
||||
${nvcc_host_compiler_flags}
|
||||
-DNVCC
|
||||
-cubin
|
||||
-o "${generated_cubin_file}"
|
||||
${CUDA_NVCC_INCLUDE_ARGS}
|
||||
)
|
||||
|
||||
# Execute the parser script.
|
||||
cuda_execute_process(
|
||||
"Executing the parser script"
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "input_file:STRING=${generated_cubin_file}"
|
||||
-P "${CUDA_parse_cubin}"
|
||||
)
|
||||
|
||||
endif( build_cubin )
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
######################################################################################
|
||||
### 0) Set your application properties
|
||||
######################################################################################
|
||||
# check cmake version compatibility
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
|
||||
# Here define your project name
|
||||
PROJECT(Paradiseo-GPU)
|
||||
|
||||
SET(PACKAGE_BUGREPORT "paradiseo-help@lists.gforge.inria.fr" CACHE STRING "Package bug report" FORCE)
|
||||
SET(PACKAGE_NAME "ParadisEO-GPU - Moving Objects GPU" CACHE STRING "Package name" FORCE)
|
||||
SET(PACKAGE_STRING "ParadisEO-GPU 1.1" CACHE STRING "GPU Package string full name" FORCE)
|
||||
SET(PACKAGE_VERSION "1.1" CACHE STRING "Package version" FORCE)
|
||||
SET(GLOBAL_VERSION "1.1" CACHE STRING "Global version" FORCE)
|
||||
SET(VERSION "1.1.0" CACHE STRING "Version" FORCE)
|
||||
|
||||
# regular expression checking
|
||||
INCLUDE_REGULAR_EXPRESSION("^.*$" "^$")
|
||||
|
||||
# set a language for the entire project.
|
||||
ENABLE_LANGUAGE(CXX)
|
||||
ENABLE_LANGUAGE(C)
|
||||
|
||||
######################################################################################
|
||||
|
||||
##########################################
|
||||
# Find Cuda package #
|
||||
##########################################
|
||||
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake/cuda" ${CMAKE_MODULE_PATH})
|
||||
find_package(CUDA QUIET REQUIRED)
|
||||
|
||||
# Check if CUDA was found
|
||||
if (CUDA_FOUND)
|
||||
message("CUDA found")
|
||||
else()
|
||||
message("CUDA not found")
|
||||
endif()
|
||||
|
||||
######################################################################################
|
||||
### 1) Include the install configuration file where are defined the main variables
|
||||
######################################################################################
|
||||
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/install.cmake)
|
||||
|
||||
######################################################################################
|
||||
|
||||
######################################################################################
|
||||
### 2) Include the sources
|
||||
######################################################################################
|
||||
|
||||
##########################################
|
||||
# Include required modules & utilities #
|
||||
##########################################
|
||||
|
||||
INCLUDE(CMakeBackwardCompatibilityCXX)
|
||||
|
||||
INCLUDE(FindDoxygen)
|
||||
|
||||
INCLUDE(CheckLibraryExists)
|
||||
|
||||
INCLUDE(Dart OPTIONAL)
|
||||
|
||||
SET(CMAKE_DEFAULT_BUILD_TYPE "Release" CACHE STRING "Variable that stores the default CMake build type" FORCE)
|
||||
|
||||
FIND_PROGRAM(MEMORYCHECK_COMMAND
|
||||
NAMES purify valgrind
|
||||
PATHS
|
||||
"/usr/local/bin /usr/bin [HKEY_LOCAL_MACHINE\\SOFTWARE\\Rational Software\\Purify\\Setup;InstallFolder]"
|
||||
DOC "Path to the memory checking command, used for memory error detection.")
|
||||
|
||||
IF(NOT CMAKE_BUILD_TYPE)
|
||||
SET( CMAKE_BUILD_TYPE
|
||||
${CMAKE_DEFAULT_BUILD_TYPE} CACHE STRING
|
||||
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
|
||||
FORCE)
|
||||
ENDIF(NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2 -g -pg -fprofile-arcs -ftest-coverage -Wall -Wextra -Wno-unused-parameter")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
|
||||
SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -O6")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
IF(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
ADD_DEFINITIONS(-DCMAKE_VERBOSE_MAKEFILE=ON)
|
||||
ENDIF(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
|
||||
##########################################################################################################################################
|
||||
######################################################################################
|
||||
### 3) Link the librairies for your executable
|
||||
######################################################################################
|
||||
|
||||
ADD_SUBDIRECTORY(doc)
|
||||
ADD_SUBDIRECTORY(test)
|
||||
ADD_SUBDIRECTORY(tutorial)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
|
||||
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
|
||||
"test/"
|
||||
"paradiseo-eo/"
|
||||
"paradiseo-mo/"
|
||||
"paradiseo-gpu/"
|
||||
"problems/"
|
||||
)
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue