• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openbraininstitute / neurodamus / 24997006652
91%

Build:
DEFAULT BRANCH: main
Ran 27 Apr 2026 01:18PM UTC
Jobs 5
Files 50
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Apr 2026 01:10PM UTC coverage: 91.278% (+0.09%) from 91.186%
24997006652

push

github

web-flow
New CLI option to allow dry run and memeory load balancing based on heap memory (#507)

## Context
Fix #363, improve memory load balancing to match dry-run memory
estimates
1. In the `--dry-run` mode, cells and synapses are included into the
estimated memory, and neurodamus produces the allocation file
`allocation_r<No_Ranks>_c1.pkl.gz` as well as `cell_memory_usage.json`.
In the `--lb-mode=Memory` mode, if the allocation file is missing, run
the cell distribution on-the-fly just as in dry run mode. This PR fixes
an issue in the `--lb-mode=Memory` mode, that is , when neither
allocation file or `cell_memory_usage.json` exists, distributing cells
on the fly should include the memory estimates for synapses, just as in
dry run.
2. Enable memory measurement by RSS or Heap size via CLI option
`--memory-tracker`.
3. When distributing cells across ranks, distribute cells from the most
memory consuming to the least.


## Scope
1. In `memory.py:_memory_mode_load_balancing` function: create synapse
manager for all the connections when estimate memory for each metype
combination.
2. In `export_cell_memory_usage` function: to reuse
`cell_memory_usage.json` to generate the allocation file without
instantiating cells and synapses, dump the data dict
`metype_cell_syn_average` and `pop_metype_gids` into
`cell_memory_usage.json`, together with the existing data
`metype_memory`.
4. in `memory.py: distribute_cells`, sort `metype_memory_usage` by its
values `total_mem_per_cell` in descending order, and distribute cells
from most memory consuming to the least.
5. CLI option `--memory-tracker` to either measure rss or use memray to
measure the heap size per cell metype. Measuring rss is faster, our
default option. Measuring heap requires additional dependency (memray),
but it would bring indentical measurement from run to run, used for
testing.

## Testing
New test `test_lb_mode_memory_from_scratch` in
`tests/unit-mpi/test_dry_run.py`

## Review
* [x] PR description is com... (continued)

104 of 105 new or added lines in 5 files covered. (99.05%)

7849 of 8599 relevant lines covered (91.28%)

2.84 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
92.16
0.0% neurodamus/connection_manager.py
Subprojects
ID Flag name Job ID Ran Files Coverage
1 unit-ngv-mpi 24997006652.1 27 Apr 2026 01:18PM UTC 50
54.3
GitHub Action Run
2 unit-allen-v1 24997006652.2 27 Apr 2026 01:18PM UTC 50
52.96
GitHub Action Run
3 unit 24997006652.3 27 Apr 2026 01:18PM UTC 50
88.58
GitHub Action Run
4 baseline 24997006652.4 27 Apr 2026 01:18PM UTC 50
26.36
GitHub Action Run
5 unit-mpi 24997006652.5 27 Apr 2026 01:18PM UTC 50
62.1
GitHub Action Run
Source Files on build 24997006652
  • Tree
  • List 50
  • Changed 7
  • Source Changed 6
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24997006652
  • e928afb4 on github
  • Prev Build on main (#24508120101)
  • Next Build on main (#24998768517)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc