Skip to content

Commit

Permalink
Merge branch 'master' into hines/soma-center
Browse files Browse the repository at this point in the history
  • Loading branch information
nrnhines authored Jul 30, 2024
2 parents efc9f28 + fec8ce6 commit 3e38a26
Show file tree
Hide file tree
Showing 12 changed files with 104 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: |
python3 -m venv music-venv
source music-venv/bin/activate
python3 -m pip install mpi4py "cython<3" 'numpy<2' setuptools
python3 -m pip install 'mpi4py<4' "cython<3" 'numpy<2' setuptools
sudo mkdir -p $MUSIC_INSTALL_DIR
sudo chown -R $USER $MUSIC_INSTALL_DIR
curl -L -o MUSIC.zip https://github.com/INCF/MUSIC/archive/refs/tags/${MUSIC_VERSION}.zip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/neuron-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ jobs:
run: |
python3 -m venv music-venv
source music-venv/bin/activate
python3 -m pip install mpi4py "cython<3" 'numpy<2' setuptools
python3 -m pip install 'mpi4py<4' "cython<3" 'numpy<2' setuptools
sudo mkdir -p $MUSIC_INSTALL_DIR
sudo chown -R $USER $MUSIC_INSTALL_DIR
curl -L -o MUSIC.zip https://github.com/INCF/MUSIC/archive/refs/tags/${MUSIC_VERSION}.zip
Expand Down
13 changes: 12 additions & 1 deletion bin/nrnivmodl.in
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,19 @@ while [ "$1" ] ; do
UserNMODLFLAGS="$UserNMODLFLAGS $2"
shift
shift;;
-h|--help)
echo "Usage: nrnivmodl [options] [mod files or directories with mod files]"
echo "Options:"
echo " -coreneuron Compile MOD files for CoreNEURON using nrnivmodl-core."
echo " -incflags \"include flags\" Extra include flags and paths when MOD (C++) files are compiled."
echo " -loadflags \"link flags\" Extra link flags, paths, and libraries when MOD (C++) files are linked."
echo " -nmodl /path/to/nmodl Path to the new NMODL transpiler for MOD files (pre-alpha, development use only)."
echo " -nmodlflags \"CLI flags\" Additional CLI flags for new NMODL transpiler"
echo " -h, --help Show this help message and exit."
echo "If no MOD files or directories provided then MOD files from current directory are used."
exit 0;;
-*)
echo "$1 unrecognized"
echo "$1 unrecognized, check available CLI options with --help"
exit 1;;
*)
break;;
Expand Down
16 changes: 16 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# NEURON 8.2

## 8.2.6
_Release Date_ : 24-07-2024

This release pins numpy to <2 and includes backports for several fixes.

### Bug Fixes
- Informative error when cannot import hoc module
- ParallelContext: hoc_ac_ encodes global id of submitted process.
- Python 3.12 compatibility with Windows installer (#2963)
- Windows 11 fix for nrniv -python (#2946)
- Fix for dynamic ECS diffusion characteristics.
- python38 is back. For testing can use rx3doptlevel=0 bash bldnrnmacpkgcmake.sh
- Fix cvode.use_fast_imem(1) error with electrode time varying conductance.
- Apple M1 cmake failure in cloning subrepository. See #2326.
- Update iv

## 8.2.4
_Release Date_ : 08-02-2024

Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Installation
pip3 install neuron
Alternatively, you can use the `PKG installer <https://github.com/neuronsimulator/nrn/releases/download/8.2.4/nrn-8.2.4-macosx-10.9-universal2-py-38-39-310-311.pkg>`_.
Alternatively, you can use the `PKG installer <https://github.com/neuronsimulator/nrn/releases/download/8.2.6/nrn-8.2.6-macosx-10.9-universal2-py-38-39-310-311-312.pkg>`_.

For troubleshooting, see the `detailed installation instructions <install/install_instructions.md>`_.

Expand All @@ -115,7 +115,7 @@ Installation

.. tab-item:: Windows

`Download the Windows Installer <https://github.com/neuronsimulator/nrn/releases/download/8.2.4/nrn-8.2.4.w64-mingw-py-37-38-39-310-311-setup.exe>`_.
`Download the Windows Installer <https://github.com/neuronsimulator/nrn/releases/download/8.2.6/nrn-8.2.6.w64-mingw-py-38-39-310-311-312-setup.exe>`_.

You can also install the Linux wheel via the Windows Subsystem for Linux (WSL). See `instructions <install/install_instructions.html#windows-subsystem-for-linux-wsl-python-wheel>`_.

Expand Down
25 changes: 20 additions & 5 deletions docs/install/python_wheels.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,24 +264,39 @@ $ git checkout 8.1a -b release/8.1a-aarch64
# manually updated `.circleci/config.yml`
$ git diff
@@ -15,6 +15,10 @@ jobs:
@@ -14,6 +14,11 @@ jobs:
machine:
image: ubuntu-2004:202101-01
+ environment:
+ SETUPTOOLS_SCM_PRETEND_VERSION: 8.1a
+ SETUPTOOLS_SCM_PRETEND_VERSION: 8.2.6
+ NEURON_NIGHTLY_TAG: ""
+ NRN_NIGHTLY_UPLOAD: false
+ NRN_RELEASE_UPLOAD: false
@@ -89,7 +95,7 @@ workflows:
- manylinux2014-aarch64:
resource_class: arm.medium
@@ -54,6 +59,7 @@ jobs:
39) pyenv_py_ver="3.9.1" ;;
310) pyenv_py_ver="3.10.1" ;;
311) pyenv_py_ver="3.11.0" ;;
+ 312) pyenv_py_ver="3.12.2" ;;
*) echo "Error: pyenv python version not specified!" && exit 1;;
esac
@@ -95,7 +101,7 @@ workflows:
- /circleci\/.*/
matrix:
parameters:
- NRN_PYTHON_VERSION: ["311"]
+ NRN_PYTHON_VERSION: ["38", "39", "310", "311"]
+ NRN_PYTHON_VERSION: ["38", "39", "310", "311", "312"]
NRN_NIGHTLY_UPLOAD: ["false"]
nightly:
```

The reason we are setting `SETUPTOOLS_SCM_PRETEND_VERSION` to a desired version `8.1a` because `setup.py` uses `git describe` and it will give different version name as we are now on a new branch!
`NEURON_WHEEL_VERSION` will also stop your wheels from getting extra numbers on the version


## Nightly wheels
Expand Down
4 changes: 2 additions & 2 deletions nrn_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
wheel
setuptools
setuptools_scm
setuptools<=70.3.0
scikit-build
matplotlib
# bokeh 3 seems to break docs notebooks
Expand All @@ -10,6 +10,6 @@ cython<3
packaging
pytest<=8.1.1 # potential bug from 8.2.0 due to parallelism?
pytest-cov
mpi4py
mpi4py<4 # MUSIC not compatible with MPI 4
numpy<2
find_libpython
4 changes: 2 additions & 2 deletions packaging/python/build_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cython<3
packaging
numpy==1.17.5;python_version=='3.8'
numpy==1.19.3;python_version=='3.9' and platform_machine=='x86_64'
numpy==1.19.3;python_version=='3.9' and platform_machine!='arm64'
numpy==1.21.3;python_version=='3.9' and platform_machine=='arm64'
numpy==1.21.3;python_version=='3.10'
numpy==1.21.4;python_version=='3.10'
numpy==1.23.5;python_version=='3.11'
numpy==1.26.0;python_version=='3.12'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def setup_package():
"numpy>=1.9.3,<2",
"packaging",
"find_libpython",
"setuptools",
"setuptools<=70.3.0",
]
+ (
[
Expand Down
13 changes: 13 additions & 0 deletions src/mswin/bin/nrnivmodl.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,23 @@ setlocal
set nrnhome=/cygdrive/%~dp0%/..
set "nrnhome=%nrnhome:\=/%"
set "nrnhome=%nrnhome::=%"
if /I not "%~1" == "-h" (
if /I not "%~1" == "--help" (
goto :afterhelp
)
)

echo Usage: nrnivmodl [options] [mod files or directories with mod files]
echo Options:
echo -h, --help Show this help message and exit.
echo If no MOD files or directories provided then MOD files from current directory are used.
goto :done
:afterhelp
if not "%~1"=="" (
pushd %~1
%~dp0/../mingw/usr/bin/sh %~dp0/../lib/mknrndll.sh %nrnhome% "--OUTPUTDIR=%CD%"
popd
) else (
%~dp0/../mingw/usr/bin/sh %~dp0/../lib/mknrndll.sh %nrnhome% --OUTPUTDIR=.
)
:done
28 changes: 20 additions & 8 deletions src/nmodl/parse1.ypp
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,26 @@ model: MODEL line
line: {$$ = inputline();}
;
define1: DEFINE1 NAME INTEGER
/* all subsequent occurences of NAME will be replaced
by integer during parseing. See 'integer:' */
{ Symbol *sp = SYM($2);
if (sp->subtype)
diag(sp->name, " used before DEFINEed");
sp->u.str = STR($3);
sp->type = DEFINEDVAR;
deltokens($1, $3);}
/* all subsequent occurences of NAME will be replaced
by integer during parseing. See 'integer:' */
{
Symbol *sp = SYM($2);
if (sp->subtype)
diag(sp->name, " used before DEFINEed");
sp->u.str = STR($3);
sp->type = DEFINEDVAR;
deltokens($1, $3);
}
| DEFINE1 NAME '-' INTEGER
{
Symbol *sp = SYM($2);
if (sp->subtype)
diag(sp->name, " used before DEFINEed");
Sprintf(buf, "-%s", STR($4));
sp->u.str = stralloc(buf, nullptr);
sp->type = DEFINEDVAR;
deltokens($1, $4);
}
| DEFINE1 error {myerr("syntax: DEFINE name integer");}
;
Name: NAME
Expand Down
22 changes: 14 additions & 8 deletions src/nrnoc/eion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,13 @@ double nrn_nernst_coef(int type) {
}

/*
It is generally an error for two models to WRITE the same concentration
It is generally an error for two models to WRITE the same concentration.
This functions checks that there's no write conflict; and warns if it detects
one. It also sets respective write flag in the style of the ion.
The argument `i` specifies which concentration is being written to. It's 0 for
exterior; and 1 for interior.
*/
void nrn_check_conc_write(Prop* p_ok, Prop* pion, int i) {
static long *chk_conc_, *ion_bit_, size_;
Expand Down Expand Up @@ -546,13 +552,13 @@ void nrn_promote(Prop* p, int conc, int rev) {
}

/*the bitmap is
03 concentration unused, nrnocCONST, DEP, STATE
04 initialize concentrations
030 reversal potential unused, nrnocCONST, DEP, STATE
040 initialize reversal potential
0100 calc reversal during fadvance
0200 ci being written by a model
0400 co being written by a model
03 concentration unused, nrnocCONST, DEP, STATE
04 initialize concentrations
030 reversal potential unused, nrnocCONST, DEP, STATE
040 initialize reversal potential
0100 calc reversal during fadvance
0200 ci being written by a model
0400 co being written by a model
*/

/* Must be called prior to any channels which update the currents */
Expand Down

0 comments on commit 3e38a26

Please sign in to comment.