Details¶
This section lists all options and its related dependencies.
Options (=Default Value)¶
The options are mutually independent to each other.
-DSERIAL_MODE (=OFF)¶
Notes |
Dependency |
Python dependency |
|
|---|---|---|---|
Parallel Mode (OFF) |
Compile |
|
|
Serial Mode (ON) |
Compile |
Attention
Make sure Python bindings for MPI (mpi4py), MPI used for compiling simulation and libyt are the same. Check how to install mpi4py here.
-DINTERACTIVE_MODE (=OFF)¶
Notes |
Dependency |
|
|---|---|---|
Normal Mode (OFF) |
Shut down and terminate all the processes including simulation, if error occurs during in situ analysis. |
|
Interactive Mode (ON) |
Will not terminate the processes if error occurs while doing in situ analysis. Support Interactive Python Prompt and Reloading Script. |
|
-DJUPYTER_KERNEL (=OFF)¶
Notes |
Dependency |
Python dependency |
|
|---|---|---|---|
Jupyter Kernel Mode (ON) |
Activate Jupyter kernel and enable JupyterLab UI. (See Jupyter Notebook Access) |
|
|
-DSUPPORT_TIMER (=OFF)¶
Notes |
|
|---|---|
Time Profiling (ON) |
Support time profiling. (See Time Profiling) |
-DUSE_PYBIND11 (=OFF)¶
Notes |
Dependency |
|
|---|---|---|
Pure Python C API (OFF) |
Use pure Python C API to build the library. |
|
Pybind11 (ON) |
Use Pybind11 API to build the library. |
|
Dependencies¶
Option indicates under what circumstances will we need this dependency.
Get by libyt indicates whether libyt will fetch and build the dependency itself, if the paths aren’t provided. The downloaded content will be stored under
libyt/vendor, andlibytwill link to dependencies inside this folder.
Dependency path |
Required version |
Notes |
Option |
Get by libyt |
|---|---|---|---|---|
|
>=3.7 |
Python installation prefix, the path contains folders include, lib etc. |
Always |
No |
|
Path to |
|
Yes |
|
|
MPI installation prefix. The path contains folders |
|
No |
|
|
GNU |
|
No |
|
|
>=3.2.0, <4.0.0 |
Path to |
|
Yes |
|
>=0.7.0, <0.8.0 |
Path to |
|
Yes |
|
>=4.2.5, <5.0.0 |
Path to |
|
Yes |
|
>=4.8.1, <5.0.0 |
Path to |
|
Yes |
|
>=3.0.0, <4.0.0 |
Path to |
|
Yes |
|
1.x release |
Path to |
|
Yes |
Important
If our system doesn’t have readline installed, use system package manager (ex: brew, apt) to install. If we want to compile and install from the source code ourselves, make sure --with-curses is used when configuring.
Python Dependencies¶
Option indicates under what circumstances will we need this package.
Python package |
pip |
Required version |
Notes |
Option |
|---|---|---|---|---|
|
<2.0 |
The fundamental package for scientific computing with Python. |
Always |
|
|
The core analytic tool. |
Always |
||
|
|
Always |
||
|
Python bindings for the Message Passing Interface (MPI) standard. |
|
||
|
Support auto-completion in Jupyter Notebook and JupyterLab. (We will have this if IPython is already installed.) |
|
||
|
>=8.0.0 |
Jupyter Client. |
|
|
|
Jupyter kernel provisioner for |
|
Note
jupyter-client and jupyter_libyt are used for launching Jupyter Notebook and JupyterLab. Make sure the Python environment used for launching the notebook have them installed.
The Python used in in situ analysis which is also for compiling libyt and the Python used for launching Jupyter Notebook/JupyterLab might be different.
For example, when running libyt in HPC cluster, the Python environment is different from the one starting Jupyter Notebook on your local laptop. (See Jupyter Notebook Access)
Step-by-Step Instructions¶
Toggle options, set paths and generate files to build the project. This can be done through either (a) or (b):
(a) Set it through editing
CMakeLists.txtat root directory. For example, this uses option-DSERIAL_MODE=OFFand providesMPI_PATH:option(SERIAL_MODE "Compile library for serial process" OFF) set(MPI_PATH "<path-to-mpi-prefix>" CACHE PATH "Path to MPI installation prefix (-DSERIAL_MODE=OFF)")
(b) Set the options and paths through command line. For example, the flags here are equivalent to the above:
-DSERIAL_MODE=OFF -DMPI_PATH=<path-to-mpi-prefix>
[Optional] Set the GCC compiler, export the environment variable
CCto targetgcccompiler andCXXto targetg++compiler before runningcmake. For example:export CC=/software/gcc/bin/gcc export CXX=/software/gcc/bin/g++
It should support
c++14.Generate files for project,
<1-(b)>contains the flags in step 1-(b):cd libyt # go to the root of the project cmake -B <build-dir-name> -S . <1-(b)>
Build the project:
cmake --build <build-dir-name>
Install the library:
cmake --install <build-dir-name> --prefix <libyt-install-prefix>
Examples¶
The following builds
libytin serial mode using user designated GCC compiler and then installs the library in/home/user/softwares/libyt:cd libyt # go to project root directory export CC=/software/gcc/8.4.0/bin/gcc # set gcc compiler export CXX=/software/gcc/8.4.0/bin/g++ # set g++ compiler rm -rf build # clean up previous build cmake -B build -S . -DSERIAL_MODE=ON # generate files for project cmake --build build # build the project cmake --install build --prefix /home/user/softwares/libyt # install
The following builds
libytin parallel mode using user designated MPI compiler and then installs the library in/home/user/softwares/libyt:cd libyt # go to project root directory rm -rf build # clean up previous build cmake -B build -S . -DSERIAL_MODE=OFF -DMPI_PATH=/software/openmpi/4.1.1-gnu # set mpi path and generate files for project cmake --build build # build the project cmake --install build --prefix /home/user/softwares/libyt # install