Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Use the module name adios2 to discover versions available and to load the application.

The framework provides a command that will generate the compile command-line for you:

Code Block
[@blog1 globalArray]$ adios2-config
adios2-config [OPTION]
  -h, --help       Display help information
  -v, --version    Display version information
  -c               Both compile and link flags for the C bindings
  --c-flags        Preprocessor and compile flags for the C bindings
  --c-libs         Linker flags for the C bindings
  -x, --cxx        Both compile and link flags for the C++ bindings
  --cxx-flags      Preprocessor and compile flags for the C++ bindings
  --cxx-libs       Linker flags for the C++ bindings
  -f, --fortran    Both compile and link flags for the F90 bindings
  --fortran-flags  Preprocessor and compile flags for the F90 bindings
  --fortran-libs   Linker flags for the F90 bindings
  -s, --serial     Select flags for serial applications
  -m, --mpi        Select flags for mpi applications

For example, based on the basics globalArray cpp example, you can run the adios2-config command and then construct you compile command line:

Code Block
[]$ adios2-config --cxx
-DADIOS2_USE_MPI -isystem /apps/u/spack/gcc/12.2.0/adios2/2.8.3-fxnyrpu/include -Wl,-rpath,/apps/u/spack/gcc/12.2.0/adios2/2.8.3-fxnyrpu/lib64 /apps/u/spack/gcc/12.2.0/adios2/2.8.3-fxnyrpu/lib64/libadios2_cxx11_mpi.so.2.8.3 /apps/u/spack/gcc/12.2.0/adios2/2.8.3-fxnyrpu/lib64/libadios2_cxx11.so.2.8.3 -Wl,-rpath-link,/apps/u/spack/gcc/12.2.0/adios2/2.8.3-fxnyrpu/lib64

# Using the output above, create the following command-line:
# Note: the library paths will be different depending on the version of adios2 being used.
# Prefix with "mpicxx"since we are using MPI (openmpi), and add the name of the source "globalArray_write.cpp" at the end.
[@blog1 globalArray]$ mpicxx -DADIOS2_USE_MPI -isystem /apps/u/spack/gcc/12.2.0/adios2/2.8.3-fxnyrpu/include -Wl,-rpath,/apps/u/spack/gcc/12.2.0/adios2/2.8.3-fxnyrpu/lib64 /apps/u/spack/gcc/12.2.0/adios2/2.8.3-fxnyrpu/lib64/libadios2_cxx11_mpi.so.2.8.3 /apps/u/spack/gcc/12.2.0/adios2/2.8.3-fxnyrpu/lib64/libadios2_cxx11.so.2.8.3 -Wl,-rpath-link,/apps/u/spack/gcc/12.2.0/adios2/2.8.3-fxnyrpu/lib64 globalArray_write.cpp

To test, create an interactive sessions and use srun:

Code Block
[@blog1 globalArray]$ salloc -A <project-name> -t 10:00 -N 2
[@m001 globalArray]$ srun a.out

The GitHub examples can be built with cmake (you'll need to load this module). If creting an MPI application you’ll need to set the compilers with the associated MPI compiler versions, for example:

Code Block
export CC=mpicc
export CXX=mpicxx

We have noticed that within some of the example source code that there are commands that do not match the actual API commands. As a developer you will need to debug these.

Multicore

The adios2 application has been build with OpenMPI openmpi and can thus run across multiple nodes as demonstrated in the example above..