Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • A ADIOS2
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 97
    • Issues 97
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Podhorszki, Norbert
  • ADIOS2
  • Wiki
  • Building and installing with CMake

Last edited by pnorbert Aug 14, 2017
Page history

Building and installing with CMake

ADIOS2 uses CMake for its build environment. CMake expects projects 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).

To build ADIOS2:

  1. Clone the repository:
$ mkdir adios2
$ cd adios2
$ git clone https://github.com/ornladios/adios2.git source
  1. Create a separate build directory:
$ mkdir build
  1. Configure the project with CMake:
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/opt/adios2/2.0.0/gnu/openmpi ../source
-- The C compiler identification is GNU 6.3.1
-- The CXX compiler identification is GNU 6.3.1
...

ADIOS2 build configuration:
  ADIOS Version: 2.0.0
  C++ Compiler : GNU 6.3.1
    /usr/bin/c++

  Installation prefix: /opt/adios2/2.0.0/gnu/openmpi
  Features:
    Library Type: shared
    Build Type:   Debug
    Testing: ON
    Build Options:
      BZip2    : ON
      ZFP      : OFF
      MPI      : ON
      DataMan  : ON
      ZeroMQ   : ON
      HDF5     : ON
      ADIOS1   : OFF
      Python   : ON
      SysVShMem: ON

-- Configuring done
-- Generating done
-- Build files have been written to: /home/chuck/Code/adios2/build
$

The following options can be specified with CMake's -DVAR=VALUE syntax to control which features get enabled or disabled:

CMake Option Values Description
ADIOS2_USE_BZip2 AUTO/ON/OFF Enable BZip2 compression (not implemented).
ADIOS2_USE_ZFP AUTO/ON/OFF Enable ZFP compression (not implemented).
ADIOS2_USE_MPI AUTO/ON/OFF Enable MPI.
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.
ADIOS2_USE_HDF5 AUTO/ON/OFF Enable the HDF5 engine. If HDF5 is not in the path or not the correct version is in the path, set the correct path by the -DHDF5_ROOT=... option
ADIOS2_USE_ADIOS1 AUTO/ON/OFF Enable the ADIOS 1.x engine. If ADIOS 1.x is not in the path or not the correct version is in the path, set the correct path by the -DADIOS1_ROOT=... option
ADIOS2_USE_Python AUTO/ON/OFF Enable the Python >= 2.7 bindings. If you want a python version not in the path then choose the right pyhton executable by -DPYTHON_EXECUTABLE=...

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.

In addition to the ADIOS2_USE_Feature options, the following options are also available to control how the library get's built:

CMake Options Values Description
ADIOS2_BUILD_SHARED_LIBS ON/OFF Build shared libraries.
ADIOS2_ENABLE_PIC ON/OFF Enable Position Independent Code for static libraries.
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.
  1. Compile:
$ make -j8
  1. Run tests:
$ ctest
Test project /home/chuck/Code/adios2/build
      Start  1: ADIOSInterfaceWriteTest.DefineVarChar1x10
 1/31 Test  #1: ADIOSInterfaceWriteTest.DefineVarChar1x10 ..............   Passed    0.00 sec
      Start  2: ADIOSInterfaceWriteTest.DefineVarShort1x10
 2/31 Test  #2: ADIOSInterfaceWriteTest.DefineVarShort1x10 .............   Passed    0.00 sec
...
      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)
$
  1. 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
...
$ 
Clone repository
  • ADIOS2 Coding Guidelines
  • ADIOS2 Contributing on GitHub
  • Building and installing with CMake
  • C Interoperability and Type Casting
  • Clang Format Text Style
  • Classes and Structs
  • Exceptions for Error Reporting
  • File Header Structure and Includes
  • Generating Doxygen API documentation
  • Hello ADIOS2 Write Read Example
  • Home
  • Proposed ADIOS2 architecture based on standard OSI 7 layer model
  • RAII Memory Management
  • Setting your Local Repository
  • Submitting Changes
View All Pages