Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arbor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
arbor-sim
arbor
Commits
87d64031
Commit
87d64031
authored
5 years ago
by
akuesters
Committed by
Benjamin Cumming
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Py doc corr (#809)
* correct doc for meter_report and small word fixes * shift make_report to next section
parent
f8f73c83
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/py_cable_cell.rst
+1
-1
1 addition, 1 deletion
doc/py_cable_cell.rst
doc/py_profiler.rst
+20
-19
20 additions, 19 deletions
doc/py_profiler.rst
python/profiler.cpp
+1
-1
1 addition, 1 deletion
python/profiler.cpp
with
22 additions
and
21 deletions
doc/py_cable_cell.rst
+
1
−
1
View file @
87d64031
...
...
@@ -4,7 +4,7 @@ Python Cable Cells
====================
The interface for specifying cell morphologies with the distribution of ion channels
and sy
a
npses is a key part of the user interface. Arbor will have an advanced and user-friendly
and syn
a
pses is a key part of the user interface. Arbor will have an advanced and user-friendly
interface for this, which is currently under construction.
To allow users to experiment will multi-compartment cells, we provide some helpers
...
...
This diff is collapsed.
Click to expand it.
doc/py_profiler.rst
+
20
−
19
View file @
87d64031
...
...
@@ -32,8 +32,8 @@ Checkpoints are defined by a string describing the process to be measured.
.. function:: checkpoint(name, context)
Create a new checkpoint ``name`` using the
the
chosen execution :class:`arbor.context`.
Records the time since the last checkpoint (or the call to start if no previous checkpoints),
Create a new checkpoint ``name`` using the chosen execution :class:`arbor.context`.
Records the time since the last checkpoint (or the call to start if no previous checkpoints
exist
),
and restarts the timer for the next checkpoint.
.. function:: checkpoint_names
...
...
@@ -44,12 +44,6 @@ Checkpoints are defined by a string describing the process to be measured.
Returns a list of all metering times.
At any point a summary of the timing regions can be obtained by the :func:`make_meter_report`.
.. function:: make_meter_report(meter_manager, context)
Generate a meter report based on the :class:`meter_manager` and chosen execution :class:`arbor.context`.
For instance, the following python code will record and summarize the total time (and memory) spent:
.. container:: example-code
...
...
@@ -65,42 +59,49 @@ For instance, the following python code will record and summarize the total time
n_cells = 100
recipe = my_recipe(n_cells)
meter_manager.checkpoint('recipe
create', context)
meter_manager.checkpoint('recipe
-
create', context)
decomp = arbor.partition_load_balance(recipe, context)
meter_manager.checkpoint('load
balance', context)
meter_manager.checkpoint('load
-
balance', context)
sim = arbor.simulation(recipe, decomp, context)
meter_manager.checkpoint('simulation
init', context)
meter_manager.checkpoint('simulation
-
init', context)
tSim = 2000
dt = 0.025
sim.run(tSim, dt)
meter_manager.checkpoint('simulation
run', context)
meter_manager.checkpoint('simulation
-
run', context)
Metering Output
------------------
Calling :func:`make_meter_report` will generate a measurement summary, which can be printed using ``print``.
At any point a summary of the timing regions can be obtained by the :class:`meter_report`.
.. class:: meter_report
.. function:: meter_report(meter_manager, context)
Summarises the performance meter results, used to print a report to screen or file.
If a distributed context is used, the report will contain a summary of results from all MPI ranks.
Take the example output from above:
.. container:: example-code
.. code-block:: python
print(arbor.
make_
meter_report(meter_manager, context))
print(arbor.meter_report(meter_manager, context))
>>> <arbor.meter_report>:
>>> ---- meters -------------------------------------------------------------------------------
>>> meter time(s) memory(MB)
>>> -------------------------------------------------------------------------------------------
>>> recipe
create 0.000 0.001
>>> load
balance 0.000 0.009
>>> simulation
init 0.026 3.604
>>> simulation
run 4.171 0.021
>>> recipe
-
create 0.000 0.001
>>> load
-
balance 0.000 0.009
>>> simulation
-
init 0.026 3.604
>>> simulation
-
run 4.171 0.021
>>> meter-total 4.198 3.634
This diff is collapsed.
Click to expand it.
python/profiler.cpp
+
1
−
1
View file @
87d64031
...
...
@@ -31,7 +31,7 @@ void register_profiler(pybind11::module& m) {
},
"name"
_a
,
"context"
_a
,
"Create a new checkpoint. Records the time since the last checkpoint\
(or the call to start if no previous checkpoints),\
(or the call to start if no previous checkpoints
exist
),\
and restarts the timer for the next checkpoint."
)
.
def_property_readonly
(
"checkpoint_names"
,
&
arb
::
profile
::
meter_manager
::
checkpoint_names
,
"A list of all metering checkpoint names."
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment