Skip to content

Commit 6f3eab4

Browse files
committed
📝 Document --runtime_usage and --runtime_buffer
1 parent 25dd533 commit 6f3eab4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/_sources/developer/nodes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ C-PAC automatically creates a JSON-like file called ``callback.log`` (via the fu
1818
* specified maximum number of threads per Node, and
1919
* threads used at runtime.
2020

21+
A ``callback.log`` can be provided to the pipeline configuration file (see :ref:`/user/compute_config`) or with the commandline flag ``--runtime_usage``. If a callback log is provided in the pipeline configuration, nodes with names that match nodes recorded in that pipeline log will have their memory estimates overridden by the values in the callback log plus a buffer percent (provided with the ``--runtime_buffer`` flag or in the pipeline configuration file).
22+
2123
When a developer creates or modifies a Node in C-PAC, a ``mem_gb`` and ``n_procs`` argument should be provided unless the respective defaults of 0.2 and None (number of available system cores) are expected to be sufficient. When testing, the ``mem_gb`` and ``n_procs`` arguments should be adjusted if the observed memory and/or thread usage of a Node exceeds the estimate.
2224

2325
For nodes that will use a varying amount of memory depending on the node's input data, the optional parameter ``mem_x`` takes a tuple of ``(memory multiplier, input file, multiplier mode)`` where ``memory multiplier`` is a number and ``input file`` is the string name of the Node input to multiply such that the memory estimate returned by the ``mem_gb`` attribute is the ``mem_gb`` argument plus ``memory multiplier`` times the dimensions of the ``input file`` as specified in the ``multiplier mode`` (``xyzt`` (spatial × temporal; default), ``xyz`` (spatial), or just ``t`` (temporal)).

docs/_sources/user/compute_config.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Computer Settings
88

99
#. **Maximum Cores Per Participant - [integer]:** Number of cores (on a single machine) or slots on a node (cluster/grid) per subject. Slots are cores on a cluster/grid node. 'Number of Cores Per Participant' multiplied by 'Number of Participants to Run Simultaneously' must not be greater than the total number of cores. Dedicating more than one core/CPU per participant will direct C-PAC to parallelize the motion correction and time series registration transform application steps, for a speed increase.
1010

11+
#. **Observed Usage**
12+
#. **Callback log - [text]:** The path to a callback log file from a previous run. This file is used override memory estimates with previously observed memory usage. Can be overridden with the commandline flag ``--runtime_usage``.
13+
#. **Buffer - [percent]:** A percent of the previously observed memory usage that is to be added to the memory estimate. Default: 10. Can be overridden with the commandline flag ``--runtime_buffer``.
14+
1115
#. **Number of Participants to Run Simultaneously - [integer]:** This number depends on computing resources.
1216

1317
#. **Number of Cores for Anatomical Registration (ANTS) - [integer]:** This number depends on computing resources.

0 commit comments

Comments
 (0)