The Micro Manager uses the Python logging functionality. The format is:
(<rank>) <date and time> <part/functionality of Micro Manager> <log level> <message>
For example
(0) 04/17/2025 02:54:02 PM - micro_manager.micro_manager - INFO - Time window 1 converged.
The information (INFO
level) message Time window 1 converged.
from the file micro_manager/micro_manager.py
is logged by rank 0
at 02:54:02 PM
on 04/17/2025
.
Parsing log output
By default, the Micro Manager parses the log output to the terminal (sys.out
). A log file, for example micro-manager.log
, can be passed as a command line input in the following way
micro-manager-precice micro-manager-precice.json micro-manager.log
Logging adaptivity metrics
If the Micro Manager is run with adaptivity, rank-wise and global metrics are written to CSV files. By default, the files are created in the working directory. To create the files in a specific folder, provide the folder path via the configuration parameter output_dir
. More information is in the configuration section.
The following global metrics are logged to the file adaptivity-metrics-global.csv
:
- Time window at which the metrics are logged
- Average number of active simulations
- Average number of inactive simulations
- Maximum number of active simulations
- Maximum number of inactive simulations
The CSV file heading is n,avg active,avg inactive,max active,max inactive
.
The following local metrics are logged to the file adaptivity-metrics-
rank.csv
:
for local adaptivity:
- Time window at which the metrics are logged
- Number of active simulations
- Number of inactive simulations
The CSV file heading is n,n active,n inactive
.
for global adaptivity:
- Time window at which the metrics are logged
- Number of active simulations
- Number of inactive simulations
- Ranks to which inactive simulations on this rank are associated
The CSV file heading is n,n active,n inactive,assoc ranks
.
To set the output interval of adaptivity metrics, set output_n
in the adaptivity configuration.