yasfpy.benchmark.adda ===================== .. py:module:: yasfpy.benchmark.adda .. autoapi-nested-parse:: Wrapper for ADDA-based benchmarks. This module provides a manager/helper to run ADDA (if available) and collect results for comparison/benchmarking. Attributes ---------- .. autoapisummary:: yasfpy.benchmark.adda.DEFAULT_BIN_PATH yasfpy.benchmark.adda.DEFAULT_CONF_PATH yasfpy.benchmark.adda.adda Classes ------- .. autoapisummary:: yasfpy.benchmark.adda.ADDAManager Module Contents --------------- .. py:data:: DEFAULT_BIN_PATH :value: '' .. py:data:: DEFAULT_CONF_PATH :value: '' .. py:class:: ADDAManager(config_path = DEFAULT_CONF_PATH, binary = DEFAULT_BIN_PATH, output_file = 'wow') Manage and run ADDA benchmarks. This is a lightweight wrapper that: - reads a YASF configuration via :class:`yasfpy.config.Config` - runs the external ADDA binary (if present) - parses basic cross sections/efficiencies from ADDA output .. rubric:: Notes This module is primarily used for benchmarking and comparisons; it does not attempt to expose the full ADDA feature set. .. py:attribute:: config .. py:attribute:: binary :value: '' .. py:attribute:: output_file :value: 'wow' .. py:method:: clean() Remove ADDA run directories. .. rubric:: Notes This deletes directories matching ``run_sphere*`` in the current working directory. .. py:method:: run(runner = None, cleanup = True) Run ADDA and optionally parse output. :param runner: Optional :class:`pyperf.Runner` to benchmark the command. When omitted, the external binary is executed directly and outputs are parsed. :param cleanup: If True, delete ADDA output directories after the run. .. py:method:: export(file = None, cleanup = False) Run ADDA and export results to a file. :param file: Output filename. Supported extensions are ``.json``, ``.yaml``/``.yml``, and ``.bz2``. :param cleanup: If True, delete ADDA output directories after exporting. .. py:data:: adda