Introduction
Compiling OPAL can be quite challenging due to all the required libraries. Even if some libraries are available on the system, this doesn’t mean that they can be used for compiling OPAL due to missing features.
NOTE: In the code snippets below we use the environment variables
SRC_DIR
andPREFIX
. WherebySRC_DIR
must be set to the directory OPAL will be build in andPREFIX
to the OPAL installation directory.
Get the OPAL sources
Clone the OPAL Git repository
mkdir -p "${SRC_DIR}/OPAL"
cd "${SRC_DIR}/OPAL"
git clone https://gitlab.psi.ch/OPAL/src.git
Select the OPAL branch you want to compile. The current stable branch is OPAL-2024.1
:
cd "${SRC_DIR}/OPAL/src"
git checkout OPAL-2024.1
To checkout the (unstable) development branch run:
cd "${SRC_DIR}/OPAL/src"
git checkout master
To get a list of all available branches, you can run the command
git branch -a
from inside your clone.
Configure OPAL
OPAL uses CMake to configure the build process. You can either pass options to cmake
or you can run the command ccmake
in the build directory after calling cmake
.
mkdir -p "${SRC_DIR}/OPAL/build" && cd "$_"
CC=mpicc CXX=mpicxx cmake \
--prefix="${PREFIX}" \
"${SRC_DIR}/OPAL/src"
The following table shows the most important options:
|
build type can be either |
|
|
prefix for installation |
|
|
enable the unit-tests |
requires google-test >= 1.10.0 |
|
enable AMR solver |
requires AMReX (release 18.07) |
|
enable AMR multigrid solver |
requires trilinos >= 12.x and AMReX (release 18.07) |
|
compile BANDRF field conversion scripts |
|
|
enable full-wave solver |
requires MITHRA 2.0 |
|
enable SAAMG solver |
requires trilinos >= 12.x |
|
enable PyOPAL |
requires Python 3.0+ and Boost with Python. You have to set |
|
build libOPAL as shared library |
this must be enabled for PyOPAL |
|
automatically configures Doxyfile.in |
Trilinos
For compiling Trilinos please see the Trilinos build recipe. |