Installation
Julia Installation
Enter the package mode using ]
in the Julia REPL and type:
That's it!
C++ Compilation
Using XDiag with C++ is a two-step process. First the xdiag
library needs
to be compiled and installed. Therafter, application codes are compiled
in a second step. Here we explain how to compile the library.
Prerequisites
- A C++ compiler that supports C++17 (
g++
,clang
, or Intel'sicpx
) - git version control system
- CMake build system generator
- A linear algebra backend (BLAS/LAPACK, Intel MKL or Accelerate on OSX)
- optional HDF5, OpenMP
- optional MPI for the distributed library
Basic Compilation
-
Download the source code using git
-
Compile the default library
By default, the library is now installed in the subdirectoryinstall
. -
Compile the distributed library
To use the distributed computing features of
xdiag
, the distributed library has to be built which requires MPI.
Advanced Compilation
-
Parallel compilation To speed up the compilation process, the build step can be performed in parallel using the
-j
flag -
Listing compile options
The available compilation options can be displayed using
-
Choosing a certain compiler
The compiler (e.g.
icpx
) can be specified usingWarning
If the
xdiag
library is compiled with a certain compiler, it is advisable to also compile the application codes with the same compiler. -
Setting the install path
In the installation step, the install directory can be set in the following way
-
Disabling HDF5/OpenMP
-
Building and running tests
To compile and run the testing programs, use
-
Building the Julia wrapper locally
First, get the path to the
and print the corresponding path using This should print theCxxWrap
package of julia. To do so, enter the Julia REPL,/path/to/libcxxwrap-julia-prefix
. This is then used to configure the cmake compilation.The julia wrapper library can then be found in the install dir ascmake -S . -B build -D XDIAG_JULIA_WRAPPER=On -D CMAKE_PREFIX_PATH=/path/to/libcxxwrap-julia-prefix cmake --build build cmake --install build
libxdiagjl.so
, (or the corresponding library format on non-Linux systems).
Building Documentation
The source files for the documentation can be found in the directory docs
. The documentation is built using Material for MKDocs. To work on it locally, it can be served using
from the xdiag
root source directory. A local build of the documentation can then be accessed in a webbrowser at the adress