git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2577 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
be420b46fd
commit
296a076341
8 changed files with 423716 additions and 0 deletions
12
branches/ParadisEO-GPU/AUTHORS
Normal file
12
branches/ParadisEO-GPU/AUTHORS
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
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
|
||||
1019
branches/ParadisEO-GPU/LICENSE
Normal file
1019
branches/ParadisEO-GPU/LICENSE
Normal file
File diff suppressed because it is too large
Load diff
10
branches/ParadisEO-GPU/OldDartConfig.cmake
Normal file
10
branches/ParadisEO-GPU/OldDartConfig.cmake
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
#############################################################################
|
||||
# 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")
|
||||
#############################################################################
|
||||
84
branches/ParadisEO-GPU/README
Normal file
84
branches/ParadisEO-GPU/README
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
|
||||
==========================================================================================
|
||||
RELEASE
|
||||
==========================================================================================
|
||||
|
||||
The current release is paradisEO-1.3
|
||||
|
||||
==========================================================================================
|
||||
INSTALLATION
|
||||
==========================================================================================
|
||||
The basic installation procedure must be done in the directory
|
||||
which contains the extracted archive.
|
||||
|
||||
--> Example : bash installParadiseo.sh
|
||||
|
||||
Please try source installParadiseo.sh --help for further information
|
||||
|
||||
==========================================================================================
|
||||
DIRECTORY STRUCTURE
|
||||
==========================================================================================
|
||||
After unpacking the archive file, you should end up with the following
|
||||
structure:
|
||||
|
||||
.../ Installation directory (specified with ./installParadiseo.sh)
|
||||
|
|
||||
|
|
||||
+-- AUTHORS Author list
|
||||
|
|
||||
|
|
||||
+-- INSTALL INSTALL file
|
||||
|
|
||||
|
|
||||
+-- install.cmake ParadisEO main install config file
|
||||
|
|
||||
|
|
||||
+-- installParadiseo.sh Install script
|
||||
|
|
||||
+-- lib/
|
||||
| | +-- /libxml2-2.7.3.tar.gz LIBXML2 archive (required for ParadisEO-PEO)
|
||||
| | +-- /mpich2-1.0.8.tar.gz MPICH2 archive (required for ParadisEO-PEO)
|
||||
|
|
||||
|
|
||||
+ LICENCE Licence contents
|
||||
|
|
||||
|
|
||||
+-- paradiseo-eo paradiseo-eo dir
|
||||
|
|
||||
|
|
||||
+-- paradiseo-mo paradiseo-mo dir
|
||||
|
|
||||
|
|
||||
+-- paradiseo-moeo paradiseo-moeo dir
|
||||
|
|
||||
|
|
||||
+-- paradiseo-old-mo paradiseo-old-mo dir
|
||||
|
|
||||
|
|
||||
+-- paradiseo-peo paradiseo-peo dir
|
||||
|
|
||||
|
|
||||
+-- problems classical problems evaluation functions
|
||||
|
|
||||
|
|
||||
+-- README README file
|
||||
|
||||
==========================================================================================
|
||||
NOTES
|
||||
==========================================================================================
|
||||
|
||||
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
|
||||
|
||||
Please read README file of each extracted directory if you have
|
||||
problems for the installation.
|
||||
|
||||
==========================================================================================
|
||||
CONTACT
|
||||
==========================================================================================
|
||||
For further information about ParadisEO, help or to report any
|
||||
problem : paradiseo-help@lists.gforge.inria.fr
|
||||
|
||||
319635
branches/ParadisEO-GPU/downloads/cudatoolkit_3.2.16_linux_32_ubuntu10.04.run
Executable file
319635
branches/ParadisEO-GPU/downloads/cudatoolkit_3.2.16_linux_32_ubuntu10.04.run
Executable file
File diff suppressed because one or more lines are too long
102246
branches/ParadisEO-GPU/downloads/devdriver_3.2_linux_32_260.19.26.run
Executable file
102246
branches/ParadisEO-GPU/downloads/devdriver_3.2_linux_32_260.19.26.run
Executable file
File diff suppressed because one or more lines are too long
127
branches/ParadisEO-GPU/install.cmake
Normal file
127
branches/ParadisEO-GPU/install.cmake
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
######################################################################################
|
||||
### 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)
|
||||
|
||||
# Set a special flag if the environment is windows (should do the same in a config.g file)
|
||||
IF (WIN32)
|
||||
ADD_DEFINITIONS(-D_WINDOWS=1)
|
||||
ENDIF (WIN32)
|
||||
######################################################################################
|
||||
|
||||
|
||||
#####################################################################################
|
||||
### 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(WIN32 AND NOT CYGWIN)
|
||||
IF(CMAKE_CXX_COMPILER MATCHES cl)
|
||||
IF(NOT WITH_SHARED_LIBS)
|
||||
IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10")
|
||||
SET(CMAKE_CXX_FLAGS "/nologo /Gy")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "/W3 /MTd /Z7 /Od")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "/w /MT /O2 /wd4530")
|
||||
SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O2")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MTd /Z7 /Od")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE")
|
||||
ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10")
|
||||
ENDIF(NOT WITH_SHARED_LIBS)
|
||||
ENDIF(CMAKE_CXX_COMPILER MATCHES cl)
|
||||
ELSE(WIN32 AND NOT CYGWIN)
|
||||
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)
|
||||
ENDIF(WIN32 AND NOT CYGWIN)
|
||||
|
||||
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 MO, MOEO and PEO
|
||||
######################################################################################
|
||||
|
||||
ADD_SUBDIRECTORY(doc)
|
||||
ADD_SUBDIRECTORY(src)
|
||||
ADD_SUBDIRECTORY(test)
|
||||
ADD_SUBDIRECTORY(tutorial)
|
||||
######################################################################################
|
||||
|
||||
583
branches/ParadisEO-GPU/installParadiseo-gpu.sh
Normal file
583
branches/ParadisEO-GPU/installParadiseo-gpu.sh
Normal file
|
|
@ -0,0 +1,583 @@
|
|||
#!/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
|
||||
Loading…
Add table
Add a link
Reference in a new issue