Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into config_refactoring_next
- Loading branch information
Showing
32 changed files
with
1,738 additions
and
2,308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,3 +69,6 @@ | |
# Matlab projects | ||
/dymola-adapter/bin/ | ||
/dynamic-indexes/*/bin/ | ||
|
||
# iPST compilation settings | ||
install.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,117 @@ | ||
[![Build Status](https://travis-ci.org/itesla/ipst.svg?branch=master)](https://travis-ci.org/itesla/ipst) | ||
[![Coverage Status](https://coveralls.io/repos/github/itesla/ipst/badge.svg?branch=master)](https://coveralls.io/github/itesla/ipst?branch=master) | ||
[![MPL-2.0 License](https://img.shields.io/badge/license-MPL_2.0-blue.svg)](https://www.mozilla.org/en-US/MPL/2.0/) | ||
|
||
# iTESLA | ||
http://www.itesla-project.eu/ | ||
|
||
http://www.itesla-pst.org | ||
|
||
## Environment requirements | ||
In order to build iPST you need: | ||
* JDK *(1.8 or greater)* | ||
* Maven | ||
* CMake *(2.6 or greater)* | ||
* Recent C++ compiler (GNU g++ or Clang) | ||
* OpenMPI *(1.8.3 or greater)* | ||
|
||
Optional C++ modules requires: | ||
* Intel Fortran Compiler | ||
* Matlab | ||
* Dymola | ||
* Eurostag | ||
|
||
### OpenMPI (required) | ||
In order to support the MPI modules, you need to compile and install the [OpenMPI](https://www.open-mpi.org/) library. | ||
``` | ||
$> wget http://www.open-mpi.org/software/ompi/v1.8/downloads/openmpi-1.8.3.tar.bz2 | ||
$> tar xjf openmpi-1.8.3.tar.bz2 | ||
$> cd openmpi-1.8.3 | ||
$> ./configure --prefix=<INSTALL_DIR> --enable-mpi-thread-multiple | ||
$> make install | ||
$> export PATH=$PATH:<INSTALL_DIR>/bin | ||
``` | ||
|
||
### Intel Fortran Compiler | ||
To compile Eurostag dependant modules, you have to set your INTEL_HOME environment variable to the root of the | ||
Intel Fortran Compiler installation. | ||
|
||
## Install | ||
To easily compile iPST, you can use the toolchain: | ||
``` | ||
$> git clone https://github.com/itesla/ipst.git | ||
$> ./install.sh | ||
``` | ||
By default, the toolchain will: | ||
* download and compile all external packages from the Internet | ||
* compile C++ and Java modules | ||
* install iPST | ||
|
||
### Targets | ||
|
||
| Target | Description | | ||
| ------ | ----------- | | ||
| clean | Clean iPST modules | | ||
| clean-thirdparty | Clean the thirdparty libraries | | ||
| compile | Compile iPST modules | | ||
| package | Compile iPST modules and create a distributable package | | ||
| __install__ | __Compile iPST modules and install it__ | | ||
| docs | Generate the documentation (Doxygen/Javadoc) | | ||
| help | Display this help | | ||
|
||
### Options | ||
|
||
The toolchain options are saved in the *install.cfg* configuration file. This configuration file is loaded and updated | ||
each time you use the toolchain. | ||
|
||
#### iPST | ||
|
||
| Option | Description | Default value | | ||
| ------ | ----------- | ------------- | | ||
| --help | Display this help | | | ||
| --prefix | Set the installation directory | $HOME/itesla | | ||
| --package-type | Set the package format. The supported formats are zip, tar, tar.gz and tar.bz2 | zip | | ||
|
||
#### C++ modules | ||
|
||
| Option | Description | Default value | | ||
| ------ | ----------- | ------------- | | ||
| --with-dymola | Enable the compilation of Dymola dependant modules | $DYMOLA_HOME | | ||
| --without-dymola | Disable the compilation of Dymola dependant modules | | | ||
| --with-eurostag | Enable the compilation of Eurostag dependant modules | $EUROSTAG_SDK_HOME | | ||
| --without-eurostag | Disable the compilation of Eurostag dependant modules | | | ||
| --with-matlab | Enable the compilation of Matlab dependant modules | $MATLAB_HOME | | ||
| --without-matlab | Disable the compilation of Matlab dependant modules | | | ||
|
||
#### Third-parties | ||
|
||
| Option | Description | Default value | | ||
| ------ | ----------- | ------------- | | ||
| --with-thirdparty | Enable the compilation of thirdparty libraries | | | ||
| --without-thirdparty | Disable the compilation of thirdparty libraries | | | ||
| --thirdparty-prefix | Set the thirdparty installation directory | $HOME/itesla_thirdparty | | ||
| --thirdparty-download | Sets false to compile thirdparty libraries from a local repository | true | | ||
| --thirdparty-packs | Sets the thirdparty libraries local repository | $HOME/itesla_packs | | ||
|
||
### Default configuration file | ||
``` | ||
ipst_prefix=$HOME/itesla | ||
ipst_package_type=zip | ||
# -- iPST C++ modules options -- | ||
eurostag_build=false | ||
eurostag_home=$EUROSTAG_SDK_HOME | ||
dymola_build=false | ||
dymola_home=$DYMOLA_HOME | ||
matlab_build=false | ||
matlab_home=$MATLAB_HOME | ||
# -- iPST thirdparty libraries -- | ||
thirdparty_build=true | ||
thirdparty_prefix=$HOME/itesla_thirdparty | ||
thirdparty_download=true | ||
thirdparty_packs=$HOME/itesla_packs | ||
``` | ||
|
||
## License | ||
https://www.mozilla.org/en-US/MPL/2.0/ | ||
https://www.mozilla.org/en-US/MPL/2.0/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# - Find Dymola | ||
# | ||
# Dymola_FOUND True if Dymola exists, false otherwise | ||
# | ||
# ============================================================================= | ||
# Copyright (c) 2016, RTE (http://www.rte-france.com) | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
# ============================================================================= | ||
|
||
if (NOT DYMOLA_HOME AND NOT $ENV{DYMOLA_HOME} STREQUAL "") | ||
set(DYMOLA_HOME $ENV{DYMOLA_HOME}) | ||
endif() | ||
|
||
if (NOT DYMOLA_HOME AND NOT $ENV{DYMOLA_ROOT} STREQUAL "") | ||
set(DYMOLA_HOME $ENV{DYMOLA_ROOT}) | ||
endif() | ||
|
||
if (NOT DYMOLA_HOME OR NOT IS_DIRECTORY "${DYMOLA_HOME}") | ||
message(FATAL_ERROR "Dymola not found. The variable DYMOLA_HOME is NOT set or is NOT a valid directory") | ||
endif() | ||
|
||
set(Dymola_FOUND TRUE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# - Find Eurostag | ||
# | ||
# Eurostag_FOUND True if Eurostag exists, false otherwise | ||
# Eurostag_INCLUDE_DIRS Include path | ||
# Eurostag_LIBRARIES Eurostag libraries | ||
# | ||
# ============================================================================= | ||
# Copyright (c) 2016, RTE (http://www.rte-france.com) | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
# ============================================================================= | ||
|
||
if (NOT EUROSTAG_SDK_HOME AND NOT $ENV{EUROSTAG_SDK_HOME} STREQUAL "") | ||
set(EUROSTAG_SDK_HOME $ENV{EUROSTAG_SDK_HOME}) | ||
endif() | ||
|
||
if (NOT EUROSTAG_SDK_HOME AND NOT $ENV{EUROSTAG_SDK_ROOT} STREQUAL "") | ||
set(EUROSTAG_SDK_HOME $ENV{EUROSTAG_SDK_ROOT}) | ||
endif() | ||
|
||
if (NOT EUROSTAG_SDK_HOME) | ||
message(FATAL_ERROR "Eurostag SDK not found. The variable EUROSTAG_SDK_HOME is NOT set or is NOT a valid directory") | ||
endif() | ||
|
||
find_path(Eurostag_INCLUDE_DIR NAME api_eurostag.h HINTS ${EUROSTAG_SDK_HOME}/include) | ||
mark_as_advanced(Eurostag_INCLUDE_DIR) | ||
|
||
set(components | ||
eustag_esg eustag_cpt | ||
eustag_a light_lib_a_t | ||
eustag_i | ||
eustag_s light_lib_s | ||
eustag_lf | ||
light_lib_t_s light_lib_t | ||
eustag_bld | ||
util klu amd | ||
) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
foreach(component ${components}) | ||
string(TOUPPER ${component} COMPONENT) | ||
set(Eurostag_${component}_FIND_QUIETLY true) | ||
|
||
find_library(Eurostag_${component}_LIBRARY lib${component}.a HINTS ${EUROSTAG_SDK_HOME}/lib) | ||
mark_as_advanced(Eurostag_${component}_LIBRARY) | ||
find_package_handle_standard_args(Eurostag_${component} DEFAULT_MSG Eurostag_${component}_LIBRARY) | ||
|
||
if (EUROSTAG_${COMPONENT}_FOUND) | ||
set(Eurostag_LIBRARIES ${Eurostag_LIBRARIES} ${Eurostag_${component}_LIBRARY}) | ||
else() | ||
message(FATAL_ERROR "Eurostag library not found: ${component}") | ||
endif() | ||
|
||
unset(EUROSTAG_${COMPONENT}_FOUND) | ||
unset(COMPONENT) | ||
unset(Eurostag_${component}_FIND_QUIETLY) | ||
unset(Eurostag_${component}_LIBRARY) | ||
endforeach() | ||
|
||
set(Eurostag_FOUND true) | ||
set(Eurostag_INCLUDE_DIRS ${Eurostag_INCLUDE_DIR}) | ||
message(STATUS "Eurostag SDK found: ${EUROSTAG_SDK_HOME}") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# - Find HDF5 | ||
# | ||
# HDF5_FOUND True if HDF5 exists, false otherwise | ||
# HDF5_INCLUDE_DIRS Include path | ||
# HDF5_LIBRARIES HDF5 libraries | ||
# HDF5_VERSION_STRING Library version | ||
# HDF5_VERSION_MAJOR Library version (major version) | ||
# HDF5_VERSION_MINOR Library version (minor version) | ||
# HDF5_VERSION_PATCH Library version (patch level) | ||
# | ||
# ============================================================================= | ||
# Copyright (c) 2016, RTE (http://www.rte-france.com) | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
# ============================================================================= | ||
|
||
if (NOT HDF5_HOME AND NOT $ENV{HDF5_HOME} STREQUAL "") | ||
set(HDF5_HOME $ENV{HDF5_HOME}) | ||
endif() | ||
|
||
if (NOT HDF5_HOME AND NOT $ENV{HDF5_ROOT} STREQUAL "") | ||
set(HDF5_HOME $ENV{HDF5_ROOT}) | ||
endif() | ||
|
||
if (NOT HDF5_HOME) | ||
message(FATAL_ERROR "HDF5 libraries not found. The variable HDF5_HOME is NOT set or is NOT a valid directory") | ||
endif() | ||
|
||
find_path(HDF5_INCLUDE_DIR NAME hdf5.h H5pubconf.h HINTS ${HDF5_HOME}/include) | ||
if (USE_STATIC_LIBS) | ||
find_library(HDF5_LIBRARY libhdf5.a HINTS ${HDF5_HOME}/lib) | ||
else() | ||
find_library(HDF5_LIBRARY hdf5 HINTS ${HDF5_HOME}/lib) | ||
endif() | ||
|
||
mark_as_advanced(HDF5_INCLUDE_DIR HDF5_LIBRARY) | ||
|
||
if (HDF5_INCLUDE_DIR AND EXISTS "${HDF5_INCLUDE_DIR}/H5pubconf.h") | ||
set(_HDF5_VERSION_REGEX "^#define[ ^t]+H5_VERSION[ \t]+\"([^\"]+)\".*$") | ||
file(STRINGS "${HDF5_INCLUDE_DIR}/H5pubconf.h" _HDF5_VERSION_STRING LIMIT_COUNT 1 REGEX ${_HDF5_VERSION_REGEX}) | ||
if (_HDF5_VERSION_STRING) | ||
string(REGEX REPLACE "${_HDF5_VERSION_REGEX}" "\\1" HDF5_VERSION_STRING "${_HDF5_VERSION_STRING}") | ||
endif() | ||
endif() | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(HDF5 DEFAULT_MSG HDF5_LIBRARY HDF5_INCLUDE_DIR) | ||
if (HDF5_FOUND) | ||
if (DEFINED HDF5_FIND_VERSION) | ||
if (${HDF5_FIND_VERSION} VERSION_GREATER ${HDF5_VERSION_STRING}) | ||
message(FATAL_ERROR "HDF5 ${HDF5_VERSION_STRING} found but ${HDF5_FIND_VERSION} is required") | ||
endif() | ||
endif() | ||
|
||
set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) | ||
set(HDF5_LIBRARIES ${HDF5_LIBRARY}) | ||
|
||
message(STATUS "HDF5 version: ${HDF5_VERSION_STRING}") | ||
endif() |
Oops, something went wrong.