Skip to content

Commit

Permalink
Merge branch 'master' into jelic/test_313
Browse files Browse the repository at this point in the history
  • Loading branch information
JCGoran committed Oct 4, 2024
2 parents f9c77ad + ab0a571 commit 038b322
Show file tree
Hide file tree
Showing 53 changed files with 598 additions and 220 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/neuron-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ jobs:
python -m pip install --upgrade pip -r nrn_requirements.txt
- name: Install a new automake
# A new automake is needed for python 3.12 because it generate a python script
# A automake >= 1.16.5 is needed for python 3.12 because it generates a python script
# called py-compile and the original one is not supporting this version of python
# Once ubuntu got a newer version of automake we can remove this part.
if: matrix.config.music == 'ON' && startsWith(matrix.os, 'ubuntu')
run: |
curl -L -o automake.tar.xz https://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.xz
curl -L -o automake.tar.xz https://ftpmirror.gnu.org/gnu/automake/automake-1.16.5.tar.xz
tar -xf automake.tar.xz
cd automake-1.16.5/
./configure --prefix=/usr/
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ Linux and Mac you can install the official Python 3 wheel with:
pip3 install neuron
```

If you want to build the latest version from source, we support **CMake** as build system. **Autotools** build system has been removed after 8.0 release.
If you want to build the latest version from source, we support **CMake** as build system.
See detailed installation instructions: [docs/install/install_instructions.md](docs/install/install_instructions.md).

It is possible to install the Linux Python wheels on Windows via the Windows Subsystem for Linux (WSL) - check the installation instructions above.

> [!NOTE]
> **About NEURON >= 9.0**: If you are experiencing compilation errors while using
> `nrnivmodl` with NEURON >=9.0, but not with previous 8.x releases, see
> [Adapting MOD files for C++ with NEURON >= 9.0](docs/guide/porting_mechanisms_to_cpp.rst).
## Documentation

* See documentation section of the [NEURON website](https://neuron.yale.edu/neuron/docs)
Expand Down
14 changes: 12 additions & 2 deletions bin/nrnivmodl.in
Original file line number Diff line number Diff line change
Expand Up @@ -274,5 +274,15 @@ if [ "$LinkCoreNEURON" = true ] ; then
fi
fi

make -j 4 -f "${bindir}/nrnmech_makefile" "ROOT=${prefix}" "MODOBJFILES=$MODOBJS" "UserLDFLAGS=$UserLDFLAGS" "UserINCFLAGS=$UserINCFLAGS" "LinkCoreNEURON=$LinkCoreNEURON" "UserNMODLBIN=$UserNMODLBIN" "UserNMODLFLAGS=$UserNMODLFLAGS" special &&
echo "Successfully created $MODSUBDIR/special"
set +e

make -j 4 -f "${bindir}/nrnmech_makefile" "ROOT=${prefix}" "MODOBJFILES=$MODOBJS" "UserLDFLAGS=$UserLDFLAGS" "UserINCFLAGS=$UserINCFLAGS" "LinkCoreNEURON=$LinkCoreNEURON" "UserNMODLBIN=$UserNMODLBIN" "UserNMODLFLAGS=$UserNMODLFLAGS" special

MAKE_STATUS=$?

if [ $MAKE_STATUS -eq 0 ]; then
echo "Successfully created $MODSUBDIR/special"
else
printf "\nNOTE: If you are encountering MOD file compilation errors only with NEURON version 9.0 or later\n"
printf "refer to the C++ migration guide at https://nrn.readthedocs.io/en/9.0.0/guide/porting_mechanisms_to_cpp.html\n\n"
fi
10 changes: 5 additions & 5 deletions cmake/NeuronFileLists.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ set(MODLUNIT_FILES_LIST
units1.cpp
version.cpp)

set(NMODL_FILES_LIST
set(NOCMODL_FILES_LIST
consist.cpp
deriv.cpp
discrete.cpp
Expand Down Expand Up @@ -430,7 +430,7 @@ set(NRN_NODEORDEROPTIM_SRC_DIR ${PROJECT_SOURCE_DIR}/src/coreneuron/permute)
set(NRN_NRNCVODE_SRC_DIR ${PROJECT_SOURCE_DIR}/src/nrncvode)
set(NRN_NRNIV_SRC_DIR ${PROJECT_SOURCE_DIR}/src/nrniv)
set(NRN_MODLUNIT_SRC_DIR ${PROJECT_SOURCE_DIR}/src/modlunit)
set(NRN_NMODL_SRC_DIR ${PROJECT_SOURCE_DIR}/src/nmodl)
set(NRN_NOCMODL_SRC_DIR ${PROJECT_SOURCE_DIR}/src/nocmodl)
set(NRN_IVOS_SRC_DIR ${PROJECT_SOURCE_DIR}/src/ivos)
set(NRN_MUSIC_SRC_DIR ${PROJECT_SOURCE_DIR}/src/neuronmusic)
set(NRN_PARALLEL_SRC_DIR ${PROJECT_SOURCE_DIR}/src/parallel)
Expand Down Expand Up @@ -462,13 +462,13 @@ nrn_create_file_list(NRN_MODFILE_BASE_NAMES src/nrnoc ${MODFILE_BASE_NAMES})
nrn_create_file_list(NRN_BIN_SRC_FILES ${PROJECT_SOURCE_DIR}/src/ivoc/ nrnmain.cpp)
nrn_create_file_list(NRN_BIN_SRC_FILES ${PROJECT_SOURCE_DIR}/src/oc/ ockludge.cpp modlreg.cpp)
nrn_create_file_list(NRN_MODLUNIT_SRC_FILES ${NRN_MODLUNIT_SRC_DIR} ${MODLUNIT_FILES_LIST})
nrn_create_file_list(NRN_NMODL_SRC_FILES ${NRN_NMODL_SRC_DIR} ${NMODL_FILES_LIST})
nrn_create_file_list(NRN_NOCMODL_SRC_FILES ${NRN_NOCMODL_SRC_DIR} ${NOCMODL_FILES_LIST})
nrn_create_file_list(NRNMPI_DYNAMIC_INCLUDE_FILE ${PROJECT_SOURCE_DIR}/src/nrnmpi
${MPI_DYNAMIC_INCLUDE})
nrn_create_file_list(NRN_IVOS_SRC_FILES ${NRN_IVOS_SRC_DIR} ${IVOS_FILES_LIST})
nrn_create_file_list(NRN_MUSIC_SRC_FILES ${NRN_MUSIC_SRC_DIR} ${NRN_MUSIC_FILES_LIST})
list(APPEND NRN_OC_SRC_FILES ${PROJECT_BINARY_DIR}/src/oc/hocusr.h)
list(APPEND NRN_NMODL_SRC_FILES ${NRN_MODLUNIT_SRC_DIR}/units.cpp)
list(APPEND NRN_NOCMODL_SRC_FILES ${NRN_MODLUNIT_SRC_DIR}/units.cpp)

# =============================================================================
# Create mswin install lists needed for setup_exe target
Expand All @@ -480,7 +480,7 @@ if(MINGW)
list(APPEND MSWIN_FILES ${MSWIN_SRC_DIR}/notes.txt)

list(APPEND NRN_MODLUNIT_SRC_FILES ${PROJECT_SOURCE_DIR}/src/mswin/extra/d2upath.cpp)
list(APPEND NRN_NMODL_SRC_FILES ${PROJECT_SOURCE_DIR}/src/mswin/extra/d2upath.cpp)
list(APPEND NRN_NOCMODL_SRC_FILES ${PROJECT_SOURCE_DIR}/src/mswin/extra/d2upath.cpp)
list(APPEND NRN_OC_SRC_FILES ${PROJECT_SOURCE_DIR}/src/mswin/extra/d2upath.cpp)

nrn_create_file_list(MSWIN_BIN_FILES ${MSWIN_SRC_DIR} nrniv.ico nrniv10.ico nmodl2a.ico)
Expand Down
1 change: 0 additions & 1 deletion cmake/NeuronTestHelper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ function(nrn_add_test)
set(feature_mod_compatibility_enabled OFF)
endif()
set(feature_gpu_enabled ${CORENRN_ENABLE_GPU})
set(feature_nmodl_enabled ${CORENRN_ENABLE_NMODL})
# Check REQUIRES
set(requires_coreneuron OFF)
foreach(required_feature ${NRN_ADD_TEST_REQUIRES})
Expand Down
6 changes: 6 additions & 0 deletions cmake/SanitizerHelper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ set(${CODING_CONV_PREFIX}_SANITIZERS_UNDEFINED_EXCLUSIONS
include("${CODING_CONV_CMAKE}/sanitizers.cmake")
include(${CODING_CONV_CMAKE}/build-time-copy.cmake)

# If there is an issue with the automatically determined LD_PRELOAD then force with an environment
# variable when running cmake.
if(DEFINED ENV{NRN_OVERRIDE_LD_PRELOAD})
set(NRN_SANITIZER_LIBRARY_PATH "$ENV{NRN_OVERRIDE_LD_PRELOAD}")
endif()

# Propagate the sanitizer flags to the NEURON sources
list(APPEND NRN_COMPILE_FLAGS ${NRN_SANITIZER_COMPILER_FLAGS})
list(APPEND NRN_LINK_FLAGS ${NRN_SANITIZER_COMPILER_FLAGS})
Expand Down
4 changes: 2 additions & 2 deletions docs/cmake_doc/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ Other CoreNEURON options:
-------------------------
There are 20 or so cmake arguments specific to a CoreNEURON
build that are listed in https://github.com/neuronsimulator/nrn/blob/master/src/coreneuron/CMakeLists.txt.
The ones of particular interest that can be used on the NEURON
CMake configure line are `CORENRN_ENABLE_NMODL` and `CORENRN_ENABLE_GPU`.
The one of particular interest that can be used on the NEURON
CMake configure line is `CORENRN_ENABLE_GPU`.

NMODL options
=============
Expand Down
5 changes: 2 additions & 3 deletions docs/docs_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ jupyter
nbconvert
myst_parser
matplotlib
# bokeh 3 seems to break docs notebooks
bokeh<3
bokeh
# do not check import of next line
ipython
plotnine
numpy<2
numpy
plotly
nbsphinx
jinja2
Expand Down
Loading

0 comments on commit 038b322

Please sign in to comment.