-
Notifications
You must be signed in to change notification settings - Fork 59
In Situ Python Analysis
In situ analysis is to analyze ongoing simulation data without outputting data to disk before conducting analysis. It enables us to explore these ongoing simulation data through accessing memory directly using Python.
- Install libyt and yt_libyt: the in situ analysis library and its yt frontend.
- Install yt: the core analysis tool.
libyt has compilation options in Makefile
:
- SUPPORT_LIBYT: Use libyt for in situ analysis
- LIBYT_USE_PATCH_GROUP: Use patch group as a unit grid. It will be a lot faster when doing analysis, but consumes more memory. Must enable SUPPORT_LIBYT.
- LIBYT_INTERACTIVE: Activate interactive Python prompt in in situ analysis. Must enable SUPPORT_LIBYT and compile libyt in interactive mode.
Must set LIBYT_PATH
in Makefile
, the path should contain folder include
and lib
.
libyt has input parameters:
-
YT_SCRIPT: The Python script name to be loaded. Do not include file extension
.py
. - YT_VERBOSE: Log level of libyt.
- YT_FIG_BASENAME: Figure base name of the output from yt.
For example, Input__Parameter
with these lines will read Python script inline_script.py
, set log level to information only, and set the figure basename to MHD.
# YT inline analysis
YT_SCRIPT inline_script # inline python script name, exclude ".py" extension
YT_VERBOSE 1 # log level (0=off, 1=info, 2=warning, 3=debug)
YT_FIG_BASENAME MHD # figure basename, this is optional.
If you happen to have error messages related to MPI remote memory access operation, something look like:
ompi_osc_ucx_win_attach: Assertion ......
Please add OMPI_MCA_osc=sm,pt2pt
before mpirun
, for example:
OMPI_MCA_osc=sm,pt2pt mpirun -np 4
This is something libyt will fixed in the future.
Getting Started
User Guide
- Installation
- Running the Code
- Adding New Simulations
- Runtime Parameters
- MPI and OpenMP
- GPU
- Physics Modules
- Outputs
- Simulation Logs
- Data Analysis
- In Situ Python Analysis
- Test Problems
- Troubleshooting
Advanced Topics
Developer Guide