Skip to content

rxd handles np.float64 - #3808

Merged
ramcdougal merged 5 commits into
masterfrom
ramcdougal-patch-2
Jun 25, 2026
Merged

rxd handles np.float64#3808
ramcdougal merged 5 commits into
masterfrom
ramcdougal-patch-2

Conversation

@ramcdougal

Copy link
Copy Markdown
Member

No description provided.

@ramcdougal ramcdougal added the rxd reaction-diffusion label Jun 25, 2026
@ramcdougal
ramcdougal requested a review from adamjhn June 25, 2026 00:53
@azure-pipelines

Copy link
Copy Markdown

✔️ 31e8684 -> Azure artifacts URL

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.43%. Comparing base (d42eb9c) to head (95affc9).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3808      +/-   ##
==========================================
- Coverage   68.44%   68.43%   -0.02%     
==========================================
  Files         688      688              
  Lines      111309   111311       +2     
==========================================
- Hits        76190    76175      -15     
- Misses      35119    35136      +17     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ramcdougal
ramcdougal enabled auto-merge (squash) June 25, 2026 01:53
@azure-pipelines

Copy link
Copy Markdown

✔️ 95affc9 -> Azure artifacts URL

@ramcdougal
ramcdougal merged commit aed209b into master Jun 25, 2026
40 of 47 checks passed
@ramcdougal
ramcdougal deleted the ramcdougal-patch-2 branch June 25, 2026 03:17
@sonarqubecloud

Copy link
Copy Markdown

@ramcdougal ramcdougal mentioned this pull request Jul 6, 2026
61 tasks
nrnhines added a commit that referenced this pull request Jul 21, 2026
* Fix Python extension library name (#3679)

When generating the name of the NEURON Python libraries (like `hoc.cp313.so`),
we make use of `CMAKE_LIBRARY_ARCHITECTURE`. On Fedora with the clang compiler,
`CMAKE_LIBRARY_ARCHITECTURE` is set to `x86_64-redhat-linux-gnu`, but Python
does not recognize this extension when importing:

```
$ python -c 'import importlib.machinery;print(importlib.machinery.EXTENSION_SUFFIXES)'
['.cpython-313-x86_64-linux-gnu.so', '.abi3.so', '.so']
```

The solution is to not rely on `CMAKE_LIBRARY_ARCHITECTURE` and just always set
the extension to `${ARCH}-linux-gnu`, which should be importable in Python on
all "reasonable" Linux platforms.

* Bump urllib3 from 2.5.0 to 2.6.0 in /ci (#3681)

* Bump urllib3 from 2.5.0 to 2.6.0 in /ci

Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.5.0...2.6.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.6.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Ownership

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Goran Jelic-Cizmek <goran.jelic-cizmek@epfl.ch>

* Add NMODL development guide (#3683)

* Bump urllib3 from 2.6.0 to 2.6.3 in /ci (#3693)

* Bump urllib3 from 2.6.0 to 2.6.3 in /ci

Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.0 to 2.6.3.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.6.0...2.6.3)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.6.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Retrigger CI

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: nrnhines <michael.hines@yale.edu>

* NMODL: Handle `state_discontinuity` call in NET_RECEIVE block (#3592)

* Fix the Neumann BC in the x-direction of fixed step extracellular diffusion. (#3690)


* Update ECS node volume access and testdata.

* Update data for neuron.test_rxd().

* Bump bokeh from 3.7.2 to 3.8.2 in /ci (#3691)

Bumps [bokeh](https://github.com/bokeh/bokeh) from 3.7.2 to 3.8.2.
- [Changelog](https://github.com/bokeh/bokeh/blob/3.8.2/docs/CHANGELOG)
- [Commits](bokeh/bokeh@3.7.2...3.8.2)

---
updated-dependencies:
- dependency-name: bokeh
  dependency-version: 3.8.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: nrnhines <michael.hines@yale.edu>

* NMODL: Add codegen for implicit `diam` and `area` (#3631)

* Add explicit METHOD to SOLVE if target is a DERIVATIVE block (#3600)

* Add unrolling of FROM iteration variables (#3597)

* NMODL: Generalize MergeInitialBlocksVisitor (#3598)

* Add tests

* Fix name collision when merging top-level blocks (#3701)

---------

Co-authored-by: David McDougall <dam1784@rit.edu>

* link updates to readthedocs (#3718)

* How to contribute to Documentation (#3721)

* Update forum link to NEURON discussion board (#3724)

* Bump tornado from 6.5.1 to 6.5.5 in /ci (#3723)

* ci: add conditional Codecov token for Dependabot branches

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: nrnhines <michael.hines@yale.edu>

* link back to forum (#3726)

* ci: for macosx wheels, try to use system clang. (#3730)

* This allows minimization of MACOSX_DEPLOYMENT_TARGET
Otherwise linkage to libunwind with brew clang requires a deployment target of 14

* wheel build  on macos-15 runners: ensure libomp installed

* Path has specifc paths for brew bison and flex

* fix: make Sprintf interpret %% -> % correctly when no args are passed (#3727)

* FAQ comment about GUI. (#3738)

* NMODL: make v, celsius, and dt available in VERBATIM (#3740)

* more neutral language (#3739)

* Bump minimal python to 3.10 (#3745)

* 1.9 -> 1e9 for large dt (#3754)

* removed link to page that doesn't exist in current docs (#3731)

* CTNG cleanup (#3564)

* refactoring into smaller functions and 2->3 updates

* removed legacy code

* removed voxelize and voxelize2 from cmakelists

* corner_pts a list, removed circular imports

* cython shortcuts and minor cleanups

* don't use bisect

* removed numpy array creation from closest_pt and extreme_pts

* don't need numpy for isnan

* xs,ys,zs are numpy array; using memview; removed unused function

* changed % formatting to f-string

* updated cmake documentation link (#3775)

* Python typo fix (#3776)

comma was period

* fix section pushing examples in C API docs (#3785)

* handle segment iteration when no mechs (#3794)

* Fix Vector.min_ind(i1, i2) bug (#3787)


* test of Vector.min_ind(i1, i2)

* Doc warning for Vector.min_ind with example

* SourceForge link is unreliable in CI due to Cloudflare protection

* fix for file type detection on linux and mac (#3788)

On a mac (running Tahoe), the old expression with the escaped < always evaluated to 0. On Linux, it always evaluated to -1. This meant that the macs always thought files were MorphML and Linux never thought they were.

* rxd handles np.float64 and other numpy.generic types (#3808)

* unwrap numpy objects (preserves floats and ints)
* added a test

* Fix install docs: minimum Python version is 3.10 (#3806)


Fixes  issue #3803

Co-authored-by: Grok <grok@x.ai>

* Retry 3 times when downloading from gnu mirrors (#3809)

Update readline to a more modern version (7.0 => 8.3).

Sometimes the mirrors are not really stable so it failed the creation
of wheels on macos

* Fix buffer overflow in output_spikes_parallel with zero spikes (#3813)

Fix: #3812

When `num_spikes == 0`, `malloc(0)` followed by `strcpy(spike_data, "")` triggers glibc's FORTIFY_SOURCE buffer overflow detection on Linux.

## Fix

- Allocate at least 1 byte: `malloc(num_bytes > 0 ? num_bytes : 1)`
- Use direct assignment `spike_data[0] = '\0'` instead of `strcpy`

## Testing

Reproduces in neurodamus CI (`test_v5_coreneuron_no_lfp_smoke`) on Ubuntu when tstop is too short for any cell to fire.

* neuronapi: recompute 3d-derived diam in nrn_segment_diam_get (#3814)

When a section's geometry is defined by 3d points, NEURON rewrites the
segment diam from those points lazily, gated per-section on recalc_area_.
nrn_segment_diam_get returned the range-variable pointer without checking
that flag, so a diam read after pt3dadd (before define_shape/finitialize)
returned a stale default rather than the 3d-derived value.

Mirror the range-variable read path (nrnpy_nrn.cpp): trigger the pending
per-section recompute via nrn_area_ri before reading. Uses the per-section
recalc_area_ flag and nrn_area_ri (not the global diam_changed/recalc_diam,
which rebuilds the whole solver matrix and asserts !tree_changed).

Adds test/api/segment_diam.cpp: a uniform 3d section reads diam 10 both
before and after finitialize. Documents the behavior in capi.rst.

* neuronapi: fix nrn_symbol_dataptr for top-level runtime scalars (#3815)

nrn_symbol_dataptr returned sym->u.pval for every symbol. For a NOTUSER
runtime scalar (created in HOC by e.g. `x = 42`) that union member holds
an object-data offset, not a pointer, so the returned value was a small
integer that segfaults on dereference. The real storage for such a
scalar is hoc_top_level_data[sym->u.oboff].pval, matching the NOTUSER
branch of eval() in oc/code.cpp.

Return that address for the top-level VAR/NOTUSER case so the result is a
dereferenceable double*, as the name promises; every other symbol is
unchanged. A caller can now read and write `x = 42`-style globals through
the pointer, the same as built-in USERDOUBLE scalars like t.

Adds test/api/global_scalar.cpp: a NOTUSER scalar's dataptr now
dereferences to the stored value and aliases the storage HOC reads
(cross-checked by copying into hoc_ac_), plus a USERDOUBLE round-trip.

* Bump version

* formatting
my attempts to resolve a merge conflict broke formatting

* update website to www.neuronsimulator.org (#3818)

* changelog for 9.0.2

date is listed as TBD

* Fixed a MPI bug with MultiCompartmentReaction which produce membrane currents. (#3736)

* Fixed a MPI bug with MultiCompartmentReaction which produce membrane current.

* Avoid increased memory allocation for rxd currents with MPI due to repeated calls.

* Fix some leaks.

* Remove unnecessary check on num_ecs_species

* Replace NULL with nullptr for flux initialization

* Change reaction_indices to nullptr from NULL

* Update changelog in regard to #3736

* coverage.yml token line same as master.
  - Avoid "Token required because branch is protected"

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: JCGoran <JCGoran@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Goran Jelic-Cizmek <goran.jelic-cizmek@epfl.ch>
Co-authored-by: nrnhines <michael.hines@yale.edu>
Co-authored-by: Adam Newton <adam.newton@yale.edu>
Co-authored-by: David McDougall <dam1784@rit.edu>
Co-authored-by: nikhilmishra145 <144335088+nikhilmishra145@users.noreply.github.com>
Co-authored-by: Nicolas Cornu <me@alkino.fr>
Co-authored-by: Grok <grok@x.ai>
Co-authored-by: Alessandro Cattabiani <cattabiani@users.noreply.github.com>
Co-authored-by: E. Cruz <176174870+ec1dev@users.noreply.github.com>
Co-authored-by: Adam Newton <adam.newton@neurosim.downstate.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rxd reaction-diffusion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants