|
|
:doctype: article
|
|
|
|
|
|
'''
|
|
|
|
|
|
== Introduction
|
|
|
|
|
|
Compiling _OPAL_ can be quite challenging due to all link:Compile-required-software[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` and `PREFIX`. Whereby `SRC_DIR` must be set to the directory _OPAL_ will be build in and `PREFIX` to the _OPAL_ installation directory.
|
|
|
|
|
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
== Get the OPAL sources
|
|
|
|
|
|
Clone the OPAL Git repository
|
|
|
|
|
|
[source,sh]
|
|
|
----
|
|
|
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-2022.1`:
|
|
|
|
|
|
[source,sh]
|
|
|
----
|
|
|
cd "${SRC_DIR}/OPAL/src"
|
|
|
git checkout OPAL-2022.1
|
|
|
----
|
|
|
|
|
|
To checkout the (unstable) development branch run:
|
|
|
|
|
|
[source,sh]
|
|
|
----
|
|
|
cd "${SRC_DIR}/OPAL/src"
|
|
|
git checkout master
|
|
|
----
|
|
|
|
|
|
To get a list of all available branches, you can run the command
|
|
|
|
|
|
[source,sh]
|
|
|
----
|
|
|
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`.
|
|
|
|
|
|
[source,sh]
|
|
|
--------------------------------------
|
|
|
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:
|
|
|
[width="80%",cols="3"]
|
|
|
|=======
|
|
|
|
|
|
| `CMAKE_BUILD_TYPE`
|
|
|
| build type can be either `Debug`, `Release`, `RelWithDebInfo` or `MinSizeRel`
|
|
|
|
|
|
|
|
|
|
| `CMAKE_INSTALL_PREFIX`
|
|
|
| prefix for installation
|
|
|
|
|
|
|
|
|
|
| `BUILD_OPAL_UNIT_TESTS`
|
|
|
| enable the unit-tests
|
|
|
| requires google-test >= 1.10.0
|
|
|
|
|
|
| `ENABLE_AMR`
|
|
|
| enable AMR solver
|
|
|
| requires AMReX (release 18.07)
|
|
|
|
|
|
| `ENABLE_AMR_MG_SOLVER`
|
|
|
| enable AMR multigrid solver
|
|
|
| requires trilinos >= 12.x and AMReX (release 18.07)
|
|
|
|
|
|
| `ENABLE_BANDRF`
|
|
|
| compile BANDRF field conversion scripts
|
|
|
|
|
|
|
|
|
|
| `ENABLE_OPAL_FEL`
|
|
|
| enable full-wave solver
|
|
|
| requires MITHRA 2.0
|
|
|
|
|
|
| `ENABLE_SAAMG_SOLVER`
|
|
|
| enable SAAMG solver
|
|
|
| requires trilinos >= 12.x
|
|
|
|
|
|
| `BUILD_OPAL_PYTHON`
|
|
|
| enable PyOPAL
|
|
|
| requires Python 3.0+ and Boost with Python.
|
|
|
|
|
|
|=======
|
|
|
|
|
|
[NOTE]
|
|
|
.Trilinos
|
|
|
====
|
|
|
For compiling Trilinos please see the https://gitlab.psi.ch/OPAL/build-recipes/-/blob/master/220-build-trilinos?ref_type=heads[Trilinos build recipe].
|
|
|
====
|
|
|
|
|
|
== Compile and install OPAL
|
|
|
|
|
|
[source,sh]
|
|
|
----
|
|
|
cd "${SRC_DIR}/OPAL/build"
|
|
|
make -j ${NJOBS}
|
|
|
make install
|
|
|
:doctype: article
|
|
|
|
|
|
'''
|
|
|
|
|
|
== Introduction
|
|
|
|
|
|
Compiling _OPAL_ can be quite challenging due to all link:Compile-required-software[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` and `PREFIX`. Whereby `SRC_DIR` must be set to the directory _OPAL_ will be build in and `PREFIX` to the _OPAL_ installation directory.
|
|
|
|
|
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
== Get the OPAL sources
|
|
|
|
|
|
Clone the OPAL Git repository
|
|
|
|
|
|
[source,sh]
|
|
|
----
|
|
|
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`:
|
|
|
|
|
|
[source,sh]
|
|
|
----
|
|
|
cd "${SRC_DIR}/OPAL/src"
|
|
|
git checkout OPAL-2024.1
|
|
|
----
|
|
|
|
|
|
To checkout the (unstable) development branch run:
|
|
|
|
|
|
[source,sh]
|
|
|
----
|
|
|
cd "${SRC_DIR}/OPAL/src"
|
|
|
git checkout master
|
|
|
----
|
|
|
|
|
|
To get a list of all available branches, you can run the command
|
|
|
|
|
|
[source,sh]
|
|
|
----
|
|
|
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`.
|
|
|
|
|
|
[source,sh]
|
|
|
--------------------------------------
|
|
|
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:
|
|
|
[width="80%",cols="3"]
|
|
|
|=======
|
|
|
|
|
|
| `CMAKE_BUILD_TYPE`
|
|
|
| build type can be either `Debug`, `Release`, `RelWithDebInfo` or `MinSizeRel`
|
|
|
|
|
|
|
|
|
|
| `CMAKE_INSTALL_PREFIX`
|
|
|
| prefix for installation
|
|
|
|
|
|
|
|
|
|
| `BUILD_OPAL_UNIT_TESTS`
|
|
|
| enable the unit-tests
|
|
|
| requires google-test >= 1.10.0
|
|
|
|
|
|
| `ENABLE_AMR`
|
|
|
| enable AMR solver
|
|
|
| requires AMReX (release 18.07)
|
|
|
|
|
|
| `ENABLE_AMR_MG_SOLVER`
|
|
|
| enable AMR multigrid solver
|
|
|
| requires trilinos >= 12.x and AMReX (release 18.07)
|
|
|
|
|
|
| `ENABLE_BANDRF`
|
|
|
| compile BANDRF field conversion scripts
|
|
|
|
|
|
|
|
|
|
| `ENABLE_OPAL_FEL`
|
|
|
| enable full-wave solver
|
|
|
| requires MITHRA 2.0
|
|
|
|
|
|
| `ENABLE_SAAMG_SOLVER`
|
|
|
| enable SAAMG solver
|
|
|
| requires trilinos >= 12.x
|
|
|
|
|
|
| `BUILD_OPAL_PYTHON`
|
|
|
| enable PyOPAL
|
|
|
| requires Python 3.0+ and Boost with Python. You have to set `WILL_BUILD_SHARED_LIBRARY=on`.
|
|
|
|
|
|
|=======
|
|
|
|
|
|
[NOTE]
|
|
|
.Trilinos
|
|
|
====
|
|
|
For compiling Trilinos please see the https://gitlab.psi.ch/OPAL/build-recipes/-/blob/master/220-build-trilinos?ref_type=heads[Trilinos build recipe].
|
|
|
====
|
|
|
|
|
|
== Compile and install OPAL
|
|
|
|
|
|
[source,sh]
|
|
|
----
|
|
|
cd "${SRC_DIR}/OPAL/build"
|
|
|
make -j ${NJOBS}
|
|
|
make install
|
|
|
---- |
|
|
\ No newline at end of file |