-
Notifications
You must be signed in to change notification settings - Fork 0
Installing Adios2
These instructions work well with adios2.10.1 or less. It should work in the future but check their documentation if needed. So far this is the preferred installation method, as it will allow to use adios2 as a library in other applications (like Neko)
We typically install Adios2 using a bash script that follows some instructions from the main adios2 docs. Here we "deconstruct the script" but each individual component can readily be assembled in a file and executed.
We start by setting up some variables regarding the compiler wrappers (cc, and CC in some supercomputers), installation path, etc.
outer_path=$PWD
ver="2.10.1"
cc="$(which cc)"
CC="$(which CC)"
python="ON"
fortran="OFF"
bzip2="ON"
bzip2_path=""
For compressing data, we need a proper compression library. Typically we use bzip2, which we install as follows:
echo "First installing bzip2"
# Get bzip2
wget https://www.sourceware.org/pub/bzip2/bzip2-latest.tar.gz
tar -xvf bzip2*tar*
rm bzip2*tar*
cd bzip2-1.0.8
make CC=$cc -f Makefile-libbz2_so
bzip2_path=$PWD
cd $outer_path
Then you must download the version of adios2 you wish and set up the build and directory.
# Create directory
mkdir adios2
cd adios2
# Download the tagged version you want
git clone --depth 1 --branch v$ver https://github.com/ornladios/ADIOS2.git
# Create folder to build
mkdir adios2-build
cd adios2-build
Finally you must choose a configuration and compile the code. We typically use the following (Read more details in the adios2 docs):
# Configure
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=`pwd`/.. -DADIOS2_USE_BZip2=$bzip2 -DBZIP2_INCLUDE_DIR=$bzip2_path -DBZIP2_LIBRARY_DEBUG=$bzip2_path -DBZIP2_LIBRARY_RELEASE=$bzip2_path/libbz2.so.1.0.8 -DADIOS2_USE_Fortran=$fortran -DADIOS2_USE_ZeroMQ=OFF -DADIOS2_USE_Python=$python -DPython_EXECUTABLE=$(which python3) -DCMAKE_CXX_COMPILER=$CC -DCMAKE_C_COMPILER=$cc ../ADIOS2
make -j128
make install
In this example $outer_path/adios2
was the installation directory. You must include the path to the python3 module into the python path. Which should be done in the followng manner:
export PYTHONPATH="${PYTHONPATH}:$outer_path/adios2/lib/python3.10/site-packages/"
In this case, this installation was done with a pip enviroment with python 3.10. Therefore the path. This path inside the adios2 directory might vary, therefore inspect the directory until you find the site-packages/ subdirectory and add that to the python path as shown.