Skip to content

Commit 2db595e

Browse files
committed
🔀 Merge docs/profiler into docs/nested-config
2 parents 4539d18 + 97d4286 commit 2db595e

File tree

4 files changed

+51
-3
lines changed

4 files changed

+51
-3
lines changed

docs/_sources/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def _unireplace(release_note, unireplace):
391391
# default_role = None
392392

393393
# If true, '()' will be appended to :func: etc. cross-reference text.
394-
# add_function_parentheses = True
394+
add_function_parentheses = False
395395

396396
# If true, the current module name will be prepended to all description
397397
# unit titles (such as .. function::).

docs/_sources/developer/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55
6+
.. title:: Developer Documentation
7+
68
Welcome to CPAC's developer documentation!
79
==========================================
810

@@ -12,6 +14,7 @@ Contents:
1214
:maxdepth: 2
1315

1416
installation
17+
nodes
1518
workflow_documentation
1619
workflows/index
1720
testing

docs/_sources/developer/nodes.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
*****
2+
Nodes
3+
*****
4+
5+
.. _mem_gb:
6+
7+
.. _n_procs:
8+
9+
.. _n_cpus:
10+
11+
.. warning::
12+
A Nipype :py:class:`~nipype.pipeline.engine.nodes.Node` has an initialization parameter ``mem_gb`` that differs from the :doc:`commandline option </user/run/help>` ``--mem_gb``. While the commandline option is **a limit**, the Node initialization parameter is **an estimate** of the most memory that Node will consume when run. The Node parameter is not a limit; rather, this value is used to allocate system resources at runtime.
13+
14+
Conversely, the commandline option ``--n_cpus`` is **a limit** and the Node initialization parameter ``n_procs`` is **also a limit** of the maximum number of threads a Node will be permmitted to consume.
15+
16+
C-PAC automatically creates a JSON-like file called ``callback.log`` (via the function :py:func:`~CPAC.utils.monitoring.log_nodes_cb`) when running. This file includes for each Node:
17+
18+
* estimated memory,
19+
* memory usage observed at runtime,
20+
* specified maximum number of threads per Node, and
21+
* threads used at runtime.
22+
23+
The Nipype utility function :py:func:`~nipype.utils.draw_gantt_chart.log_to_dict` reads a log file generated by ``log_nodes_cb`` to a Python dictionary.
24+
25+
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.
26+
27+
28+
.. autoclass:: CPAC.pipeline.nipype_pipeline_engine.Node
29+
:special-members: __init__
30+
:members:
31+
:inherited-members:
32+
33+
.. autoclass:: CPAC.pipeline.nipype_pipeline_engine.MapNode
34+
:special-members: __init__
35+
:members:
36+
:inherited-members:
37+
38+
.. autofunction:: CPAC.utils.monitoring.log_nodes_cb
39+
40+
draw_gantt_chart
41+
================
42+
43+
.. automodule:: CPAC.utils.monitoring.draw_gantt_chart
44+
:members: resource_report, log_to_dict, generate_gantt_chart, resource_overusage_report
45+
:inherited-members:

docs/_sources/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Contents:
1111
.. toctree::
1212
:maxdepth: 1
1313

14-
User Guide<user/index>
15-
Developer Documentation<developer/index>
14+
User Guide <user/index>
15+
Developer Documentation <developer/index>
1616

1717

1818
Indices and tables

0 commit comments

Comments
 (0)