Skip to content
Snippets Groups Projects
Commit e8405e42 authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon
Browse files

Merge branch 'release'

* release:
  Re-work CMake build documentation
  Use consistent names for build options
parents 156a3736 6f8a9799
No related branches found
No related tags found
No related merge requests found
...@@ -57,14 +57,21 @@ include(CMakeDependentOption) ...@@ -57,14 +57,21 @@ include(CMakeDependentOption)
# Setup shared library / -fPIC stuff # Setup shared library / -fPIC stuff
get_property(SHARED_LIBS_SUPPORTED GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS) get_property(SHARED_LIBS_SUPPORTED GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
option(BUILD_SHARED_LIBS "Build shared libraries (so/dylib/dll)." ${SHARED_LIBS_SUPPORTED}) if(DEFINED BUILD_SHARED_LIBS)
set(ADIOS2_BUILD_SHARED_LIBS_DEFAULT ${BUILD_SHARED_LIBS})
elseif(DEFINED ADIOS2_BUILD_SHARED_LIBS)
set(ADIOS2_BUILD_SHARED_LIBS_DEFAULT ${ADIOS2_BUILD_SHARED_LIBS})
else()
set(ADIOS2_BUILD_SHARED_LIBS_DEFAULT ${SHARED_LIBS_SUPPORTED})
endif()
unset(BUILD_SHARED_LIBS)
option(ADIOS2_BUILD_SHARED_LIBS "Build shared libraries (so/dylib/dll)." ${ADIOS2_BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS ${ADIOS2_BUILD_SHARED_LIBS})
if(NOT SHARED_LIBS_SUPPORTED) if(NOT SHARED_LIBS_SUPPORTED)
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
message(WARNING "A shared library build was requested but is not supported on this platform / compiler. Unexpected build results will likely occur") message(WARNING "A shared library build was requested but is not supported on this platform / compiler. Unexpected build results will likely occur")
endif() endif()
set(BUILD_SHARED_LIBS OFF CACHE BOOL set(BUILD_SHARED_LIBS OFF)
"Build shared libraries (so/dylib/dll)." FORCE
)
endif() endif()
cmake_dependent_option(ADIOS2_ENABLE_PIC cmake_dependent_option(ADIOS2_ENABLE_PIC
...@@ -80,7 +87,7 @@ adios_option(MPI "Enable support for MPI" AUTO) ...@@ -80,7 +87,7 @@ adios_option(MPI "Enable support for MPI" AUTO)
adios_option(DataMan "Enable support for DataMan" AUTO) adios_option(DataMan "Enable support for DataMan" AUTO)
adios_option(ZeroMQ "Enable support for ZeroMQ" AUTO) adios_option(ZeroMQ "Enable support for ZeroMQ" AUTO)
adios_option(HDF5 "Enable support for the HDF5 engine" AUTO) adios_option(HDF5 "Enable support for the HDF5 engine" AUTO)
adios_option(ADIOS1 "Enable support for the ADIOS 1 engine" AUTO) adios_option(ADIOS1 "Enable support for the ADIOS 1.x engine" AUTO)
adios_option(Python "Enable support for Python bindings" AUTO) adios_option(Python "Enable support for Python bindings" AUTO)
adios_option(SysVShMem "Enable support for SysV Shared Memory IPC on *NIX" AUTO) adios_option(SysVShMem "Enable support for SysV Shared Memory IPC on *NIX" AUTO)
include(${ADIOS2_SOURCE_DIR}/cmake/DetectOptions.cmake) include(${ADIOS2_SOURCE_DIR}/cmake/DetectOptions.cmake)
...@@ -98,10 +105,8 @@ install(FILES ${ADIOS2_BINARY_DIR}/source/adios2/ADIOSConfig.h ...@@ -98,10 +105,8 @@ install(FILES ${ADIOS2_BINARY_DIR}/source/adios2/ADIOSConfig.h
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Third party libraries # Third party libraries
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
option(ADIOS2_BUILD_TESTING "Build ADIOS tests" ON)
set(BUILD_TESTING ${ADIOS2_BUILD_TESTING})
mark_as_advanced(BUILD_TESTING)
include(CTest) include(CTest)
mark_as_advanced(BUILD_TESTING)
add_subdirectory(thirdparty) add_subdirectory(thirdparty)
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
...@@ -126,7 +131,15 @@ endif() ...@@ -126,7 +131,15 @@ endif()
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Testing # Testing
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# We have to wait until after the library is defined to enable testing if(DEFINED BUILD_TESTING)
set(ADIOS2_BUILD_TESTING_DEFAULT ${BUILD_TESTING})
else()
set(ADIOS2_BUILD_TESTING_DEFAULT ON)
endif()
unset(BUILD_TESTING)
option(ADIOS2_BUILD_TESTING "Build the ADIOS2 testing tree" ${ADIOS2_BUILD_TESTING_DEFAULT})
include(CTest)
set(BUILD_TESTING ${ADIOS2_BUILD_TESTING})
if(BUILD_TESTING) if(BUILD_TESTING)
enable_testing() enable_testing()
add_subdirectory(testing) add_subdirectory(testing)
......
...@@ -9,10 +9,10 @@ Copyright.txt for more details. ...@@ -9,10 +9,10 @@ Copyright.txt for more details.
## Directory layout ## Directory layout
* cmake - Project specific CMake modules * cmake - Project specific CMake modules
* examples - ADIOS Examples * examples - ADIOS2 Examples
* include - Public header files
* scripts - Project maintenance and development scripts * scripts - Project maintenance and development scripts
* source - Main ADIOS source * source - Main ADIOS2 source
* bindings - Additional language bindings (currently only Python is available)
* testing - Tests * testing - Tests
## Documentation ## Documentation
...@@ -24,102 +24,149 @@ instructions under: [doc/ReadMe.md](doc/ReadMe.md) ...@@ -24,102 +24,149 @@ instructions under: [doc/ReadMe.md](doc/ReadMe.md)
## Getting Started ## Getting Started
ADIOS 2.0.0.alpha uses CMake for its build environment. CMake expects projects ADIOS2 uses CMake for its build environment. CMake expects projects
to use "out-of-source" builds, which means keeping a separate build and source to use "out-of-source" builds, which means keeping a separate build and source
directory (different from autotools, which usually uses an in-source build). directory (different from autotools, which usually uses an in-source build).
To build ADIOS: To build ADIOS2:
1. Clone the repository: 1. Clone the repository:
``` ```bash
$ mkdir ADIOS2 $ mkdir adios2
$ cd ADIOS2 $ cd adios2
$ git clone https://github.com/ornladios/adios2.git source $ git clone https://github.com/ornladios/adios2.git source
``` ```
2. Create a separate build directory: 2. Create a separate build directory:
``` ```bash
$ mkdir build $ mkdir build
``` ```
3. ***Configure the project with CMake***. The following options can be specified as `ON` or `OFF` with cmake's `-DVAR=VALUE` syntax, where VAR options are: 3. Configure the project with CMake:
* `ADIOS2_BUILD_SHARED_LIBS` - Build shared libraries (`OFF` for static) ```bash
* `ADIOS2_BUILD_EXAMPLES ` - Build examples $ cd build
* `ADIOS2_BUILD_TESTING ` - Build test code $ cmake -DCMAKE_INSTALL_PREFIX=/opt/adios2/2.0.0/gnu/openmpi ../source
* `ADIOS2_USE_MPI ` - Enable MPI -- The C compiler identification is GNU 6.3.1
* `ADIOS2_USE_BZip2 ` - Enable [BZip2](http://www.bzip.org/) compression (not implemented) -- The CXX compiler identification is GNU 6.3.1
* `ADIOS2_USE_ZFP ` - Enable [ZFP](https://github.com/LLNL/zfp) compression (not implemented) ...
* `ADIOS2_USE_ADIOS1 ` - Enable the [ADIOS 1.x](https://www.olcf.ornl.gov/center-projects/adios/) engine
* `ADIOS2_USE_DataMan ` - Enable the DataMan engine for WAN transports ADIOS2 build configuration:
* `ADIOS2_USE_Python ` - Enable the Python bindings ADIOS Version: 2.0.0
C++ Compiler : GNU 6.3.1
***Important, automatic discovery***: ADIOS 2.0 CMake has an AUTO discovery "ON" default option. If a certain /usr/bin/c++
dependency is found in the system installation path (_e.g._ /usr/), not a custom one (_e.g._ /home , /opt ) it will turn on installation for that dependency automatically
Installation prefix: /opt/adios2/2.0.0/gnu/openmpi
In addition, the -DCMAKE_VAR frequent options can be selected: Features:
* `CMAKE_INSTALL_PREFIX ` - Prefix location for installation with `make install`, default depends on system (_e.g._ /usr/local) Library Type: shared
* `CMAKE_BUILD_TYPE ` - Debug (default, debugging symbols), or Release (compiler optimizations) Build Type: Debug
Testing: ON
Example: Build Options:
``` BZip2 : ON
$ cd build ZFP : OFF
$ cmake -DADIOS_USE_MPI=ON -DCMAKE_BUILD_TYPE=Debug ../ADIOS2 MPI : ON
-- The C compiler identification is GNU 6.3.1 DataMan : ON
-- The CXX compiler identification is GNU 6.3.1 ZeroMQ : ON
-- Check for working C compiler: /usr/bin/cc HDF5 : ON
-- Check for working C compiler: /usr/bin/cc -- works ADIOS1 : OFF
-- Detecting C compiler ABI info Python : ON
-- Detecting C compiler ABI info - done SysVShMem: ON
-- Detecting C compile features
-- Detecting C compile features - done -- Configuring done
-- Check for working CXX compiler: /usr/bin/c++ -- Generating done
-- Check for working CXX compiler: /usr/bin/c++ -- works -- Build files have been written to: /home/chuck/Code/adios2/build
-- Detecting CXX compiler ABI info $
-- Detecting CXX compiler ABI info - done ```
-- Detecting CXX compile features
-- Detecting CXX compile features - done The following options can be specified with CMake's `-DVAR=VALUE` syntax to control which features get enabled or disabled:
-- Found BZip2: /usr/lib64/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit | CMake Option | Values | Description |
-- Looking for BZ2_bzCompressInit - found | :------------------- | :-------------------------: | :------------------------------------------------------------------------------- |
| `ADIOS2_USE_BZip2` | **`AUTO`**/``ON``/``OFF`` | Enable [BZip2](http://www.bzip.org/) compression (not implemented). |
ADIOS2 build configuration: | `ADIOS2_USE_ZFP` | **`AUTO`**/``ON``/``OFF`` | Enable [ZFP](https://github.com/LLNL/zfp) compression (not implemented). |
C++ Compiler: GNU 6.3.1 | `ADIOS2_USE_MPI` | **`AUTO`**/``ON``/``OFF`` | Enable MPI. |
/usr/bin/c++ | `ADIOS2_USE_DataMan` | **`AUTO`**/``ON``/``OFF`` | Enable the DataMan engine for WAN transports. |
| `ADIOS2_USE_ZeroMQ` | **`AUTO`**/``ON``/``OFF`` | Enable ZeroMQ for the DataMan engine. |
Installation prefix: /usr/local | `ADIOS2_USE_HDF5` | **`AUTO`**/``ON``/``OFF`` | Enable the [HDF5](https://www.hdfgroup.org) engine. |
Features: | `ADIOS2_USE_ADIOS1` | **`AUTO`**/``ON``/``OFF`` | Enable the [ADIOS 1.x](https://www.olcf.ornl.gov/center-projects/adios/) engine. |
Library Type: shared | `ADIOS2_USE_Python` | **`AUTO`**/``ON``/``OFF`` | Enable the Python >= 2.7 bindings. |
Build Type: Debug
Testing: ON Note: The `ADIOS2_USE_HDF5` and `ADIOS2_USE_ADIOS1` options require the use of a matching serial or parallel version depending on whether `ADIOS2_USE_MPI` is enabled. SImilary, enabling MPI and Python bindings requires the presence of `mpi4py`.
MPI: OFF
BZip2: OFF In addition to the `ADIOS2_USE_Feature` options, the following options are also available to control how the library get's built:
ADIOS1: OFF
DataMan: OFF | CMake Options | Values | Description |
| :------------------------- | :-------------------------------------------------------: | :------------------------------------------------------------------------------------ |
-- Configuring done | `ADIOS2_BUILD_SHARED_LIBS` | **`ON`**/`OFF` | Build shared libraries. |
-- Generating done | `ADIOS2_ENABLE_PIC` | **`ON`**/`OFF` | Enable Position Independent Code for static libraries. |
-- Build files have been written to: /path/to/adios/build | `ADIOS2_BUILD_EXAMPLES` | **`ON`**/`OFF` | Build examples. |
$ | `ADIOS2_BUILD_TESTING` | **`ON`**/`OFF` | Build test code. |
``` | `CMAKE_INSTALL_PREFIX` | /path/to/install (`/usr/local`) | Install location. |
| `CMAKE_BUILD_TYPE` | **`Debug`** / `Release` / `RelWithDebInfo` / `MinSizeRel` | The level of compiler optimization to use. |
You can also use CMake's curses-base UI with `ccmake ../source`.
4. Compile: 4. Compile:
``` ```bash
$ make -j8 $ make -j8
``` ```
5. Run tests: 5. Run tests:
``` ```bash
$ make test $ ctest
``` Test project /home/chuck/Code/adios2/build
Start 1: ADIOSInterfaceWriteTest.DefineVarChar1x10
## Developers 1/31 Test #1: ADIOSInterfaceWriteTest.DefineVarChar1x10 .............. Passed 0.00 sec
Start 2: ADIOSInterfaceWriteTest.DefineVarShort1x10
To summit changes to ADIOS 2.0: please see the [wiki's](https://github.com/ornladios/ADIOS2/wiki) 2/31 Test #2: ADIOSInterfaceWriteTest.DefineVarShort1x10 ............. Passed 0.00 sec
Contributing to ADIOS section, or the local [Contributors Guide](Contributing.md). ...
Start 21: HDF5WriteReadTest.ADIOS2HDF5WriteHDF5Read1D8
21/31 Test #21: HDF5WriteReadTest.ADIOS2HDF5WriteHDF5Read1D8 ........... Passed 0.01 sec
Start 22: HDF5WriteReadTest.ADIOS2HDF5WriteADIOS2HDF5Read1D8
22/31 Test #22: HDF5WriteReadTest.ADIOS2HDF5WriteADIOS2HDF5Read1D8 .....***Not Run (Disabled) 0.00 sec
Start 23: HDF5WriteReadTest.HDF5WriteADIOS2HDF5Read1D8
23/31 Test #23: HDF5WriteReadTest.HDF5WriteADIOS2HDF5Read1D8 ...........***Not Run (Disabled) 0.00 sec
...
Start 30: PythonBPWrite
30/31 Test #30: PythonBPWrite .......................................... Passed 0.12 sec
Start 31: XMLConfigTest.TwoIOs
31/31 Test #31: XMLConfigTest.TwoIOs ................................... Passed 0.01 sec
100% tests passed, 0 tests failed out of 25
Total Test time (real) = 0.29 sec
The following tests did not run:
22 - HDF5WriteReadTest.ADIOS2HDF5WriteADIOS2HDF5Read1D8 (Disabled)
23 - HDF5WriteReadTest.HDF5WriteADIOS2HDF5Read1D8 (Disabled)
25 - HDF5WriteReadTest.ADIOS2HDF5WriteADIOS2HDF5Read2D2x4 (Disabled)
26 - HDF5WriteReadTest.HDF5WriteADIOS2HDF5Read2D2x4 (Disabled)
28 - HDF5WriteReadTest.ADIOS2HDF5WriteADIOS2HDF5Read2D4x2 (Disabled)
29 - HDF5WriteReadTest.HDF5WriteADIOS2HDF5Read2D4x2 (Disabled)
$
```
6. Install:
```
$ make install
[ 7%] Built target adios2sys_objects
...
[ 61%] Built target adios2
[ 68%] Built target adios2py
...
Install the project...
-- Install configuration: "Debug"
-- Installing: /opt/adios2/2.0.0/gnu/openmpi/include/adios2/ADIOSConfig.h
...
-- Installing: /opt/adios2/2.0.0/gnu/openmpi/bin/adios2-config
...
-- Installing: /opt/adios2/2.0.0/gnu/openmpi/include/adios2.h
...
-- Installing: /opt/adios2/2.0.0/gnu/openmpi/lib/libadios2.so.2.0.0
-- Installing: /opt/adios2/2.0.0/gnu/openmpi/lib/libadios2.so.2
-- Installing: /opt/adios2/2.0.0/gnu/openmpi/lib/libadios2.so
...
$
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment