QMol_CI_profiler - fmauger1/QMol-grid GitHub Wiki
QMol_CI_profiler
Memory and execution-time profiler for configuration interaction models.
Description
Use QMol_CI_profiler
to estimate the memory footprint and execution time of a configuration interaction (CI) model or component.
Use
Run the memory and execution-time profiling with either
QMol_CI_profiler(QM);
QMol_CI_profiler(QM,'all');
QM
is any of a (TD)CI model or potential objects.- The requirements and side effects as for both memory-only and execution-time-only modes are detailed next.
- Note that for TDCI object only the memory footprint, and not the execution time, is estimated.
Run only the memory profiling component with
QMol_CI_profiler(QM,'memory');
- Configuration interaction model case: If
QM
is a CI model object (QMol_CI
), it should define a proper CI model (domain, molecular orbitals, configuration basis); However, it does not need to be initialized before running the memory profiling. The memory profiling uses the object'sgetMemoryProfile
method and has its side effects: all the configuration interaction model properties are left unchanged while run-time properties may be altered. - TDCI propagator case: if QM is a TDCI propagator object, it should define a full CI model.
- In all cases, not all the listed components may be used in actual simulations and the memory estimate tries to be conservative. On the other hand, it only includes the discretization of member components on the domain grid and ignores other (small) properties.
Run only the execution-time profiling component with
QMol_CI_profiler(QM,'time');
- Configuration interaction model case: If
QM
is a CI model object (QMol_CI
), it should define a proper CI model (domain, molecular orbitals, configuration basis); However, it does not need to be initialized before running the memory profiling. The execution-time profiling initializes the object and returns it initialized. - TDCI propagator case: no execution time profiling is available for TDCI propagators. Run an actual TDCI propagation (over a short time interval) to get an estimate.
The execution-time profiling is performed by running each listed operation a certain number of times and returns the average elapsed time to do so. The default number of iterations is defined internally based on the dimension of the model. Overwrite this default values and specify the number of iterations nbIter
with
QMol_CI_profiler(QM,'all',nbIter); % Both memory and time profiling
QMol_CI_profiler(QM,'time',nbIter); % Execution-time profiling only
Test suite
Run the test suite for the class in normal or summary mode respectively with
QMol_test.test('CI_profiler');
QMol_test.test('-summary','CI_profiler');
Notes
QMol_CI_profiler
was introduced in version 01.23