Skip to content

Commit

Permalink
Cherry-pick multiple commits to make release/8.2 functional (#2074)
Browse files Browse the repository at this point in the history
* refactoring: drop java code (#1937)

* Update removed_features.rst

* Fine tune clang-format and fix CI (#2041)

* Delete return statement to avoid ASan error.

* CVode.poolshrink(1) deletes unused mechanism pools. (#2033)

* Pin bokeh<3, don't pin matplotlib (#2048)

* Add list(...) for new matplotlib.

Co-authored-by: Alexandru Săvulescu <alexandru.savulescu@epfl.ch>
Co-authored-by: Olli Lupton <oliver.lupton@epfl.ch>
Co-authored-by: nrnhines <michael.hines@yale.edu>
  • Loading branch information
4 people committed Nov 9, 2022
1 parent c159069 commit eb19ae0
Show file tree
Hide file tree
Showing 50 changed files with 80 additions and 4,066 deletions.
2 changes: 1 addition & 1 deletion .clang-format.changes
@@ -1,3 +1,3 @@
SortIncludes: false
Standard: c++11
StatementMacros: [MKDLL, MKDLLdec, MKDLLif, MKDLLvp, MKDLLvpf]
StatementMacros: [MKDLL, MKDLLdec, MKDLLif, MKDLLvp, MKDLLvpf, declareList, declarePtrList, implementList, implementPtrList]
1 change: 0 additions & 1 deletion cmake/ConfigFileSetting.cmake
Expand Up @@ -276,7 +276,6 @@ nrn_configure_file(bbsconf.h src/parallel)
nrn_configure_file(nrnneosm.h src/nrncvode)
nrn_configure_file(sundials_config.h src/sundials)
nrn_configure_file(mos2nrn.h src/uxnrnbbs)
nrn_configure_file(njconf.h src/nrnjava)
nrn_configure_dest_src(nrnunits.lib share/nrn/lib nrnunits.lib share/lib)
nrn_configure_dest_src(nrn.defaults share/nrn/lib nrn.defaults share/lib)
# NRN_DYNAMIC_UNITS requires nrnunits.lib.in be in same places as nrnunits.lib
Expand Down
1 change: 0 additions & 1 deletion cmake/NeuronFileLists.cmake
Expand Up @@ -31,7 +31,6 @@ set(HEADER_FILES_TO_INSTALL
nrncvode.h
nrnisaac.h
nrniv_mf.h
nrnjava.h
nrnoc_ml.h
nrnmpi.h
nrnmpidec.h
Expand Down
3 changes: 2 additions & 1 deletion docs/docs_requirements.txt
Expand Up @@ -4,7 +4,8 @@ jupyter
nbconvert
recommonmark
matplotlib
bokeh
# bokeh 3 seems to break docs notebooks
bokeh<3
# do not check import of next line
ipython
plotnine
Expand Down
7 changes: 0 additions & 7 deletions docs/guide/faq.rst
Expand Up @@ -30,13 +30,6 @@ To make NEURON read a file called ``foo.hoc`` when it starts :

To exit NEURON : type ``quit()`` or ``^D`` ("control D") at the ``oc>`` or ``>>>`` prompt, or use :menuselection:`File --> Quit` in the NEURON Main Menu toolbar.


Installation went smoothly, but every time I bring NEURON up, the interpreter prints this strange message: "jvmdll" not defined in nrn.def JNI_CreateJavaVM returned -1
++++++++++++++++++++++++++++++++++++

You must be running an old version of NEURON. Warnings about Java, such as "Can't create Java VM" or "Info: optional feature is not present" mean that NEURON can't find a Java run-time environment. This is of interest only to individuals who are using Java to develop new tools. NEURON's computational engine, standard GUI library, etc. don't use Java.


What's the best way to learn how to use NEURON?
-----------------------------------------------
First be sure to join `The NEURON Forum <https://www.neuron.yale.edu/phpBB/index.php>`_.
Expand Down
17 changes: 0 additions & 17 deletions docs/hoc/programming/gui/pwman.rst
Expand Up @@ -227,23 +227,6 @@ PWManager
printed to a postscript file with the "filename" or filebrowser selection.


----



.. hoc:method:: PWManager.jwindow
Syntax:
``index = p.jwindow(hoc_owner, mapORhide, x, y, w, h)``


Description:
Manipulate the position and size of a java window frame associated with the
java object referenced by the hoc object. The mapORhide value may be 0
or 1. The index of the window is returned. This is used by session file
statements created by the java object in order to specify window attributes.


----

Expand Down
18 changes: 0 additions & 18 deletions docs/python/programming/gui/pwman.rst
Expand Up @@ -336,24 +336,6 @@ PWManager



.. method:: PWManager.jwindow


Syntax:
``index = p.jwindow(hoc_owner, mapORhide, x, y, w, h)``


Description:
Manipulate the position and size of a java window frame associated with the
java object referenced by the hoc object. The mapORhide value may be 0
or 1. The index of the window is returned. This is used by session file
statements created by the java object in order to specify window attributes.


----



.. method:: PWManager.scale


Expand Down
4 changes: 4 additions & 0 deletions docs/removed_features.rst
Expand Up @@ -39,3 +39,7 @@ To that end, the following table's columns constitute:
- Windows versions now use MINGW (more native to WINDOWS).
- `#1802 <https://github.com/neuronsimulator/nrn/pull/1802>`_
- 2f90f37
* - Java
- NEURON Java support.
- `#1937 <https://github.com/neuronsimulator/nrn/pull/1937>`_
- 5a67957
2 changes: 1 addition & 1 deletion docs/tutorials/ball-and-stick-2.ipynb
Expand Up @@ -740,7 +740,7 @@
"plt.figure()\n",
"\n",
"for i, spike_times_vec in enumerate(spike_times):\n",
" plt.vlines(spike_times_vec, i + 0.5, i + 1.5)\n",
" plt.vlines(list(spike_times_vec), i + 0.5, i + 1.5)\n",
"plt.show()"
]
},
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/ball-and-stick-3.ipynb
Expand Up @@ -341,7 +341,7 @@
"source": [
"plt.figure()\n",
"for i, cell in enumerate(ring.cells):\n",
" plt.vlines(cell.spike_times, i + 0.5, i + 1.5)\n",
" plt.vlines(list(cell.spike_times), i + 0.5, i + 1.5)\n",
"plt.show()"
]
},
Expand Down Expand Up @@ -371,7 +371,7 @@
" h.finitialize(-65 * mV)\n",
" h.continuerun(100 * ms)\n",
" for i, cell in enumerate(ring.cells):\n",
" plt.vlines(cell.spike_times, i + 0.5, i + 1.5, color=color)\n",
" plt.vlines(list(cell.spike_times), i + 0.5, i + 1.5, color=color)\n",
"\n",
"plt.show()"
]
Expand Down
3 changes: 2 additions & 1 deletion nrn_requirements.txt
Expand Up @@ -2,7 +2,8 @@ wheel
setuptools<59.7.0
scikit-build
matplotlib
bokeh
# bokeh 3 seems to break docs notebooks
bokeh<3
ipython
cython
pytest
Expand Down
11 changes: 0 additions & 11 deletions share/lib/nrn.defaults.in
Expand Up @@ -112,17 +112,6 @@
// Following useful for one button mouse. Mac has this as 10 by default
*scene_menu_box_size: 10.

// The full pathname for the Java VM dynamically loadable
// library is specified here
// two examples for mswin on my machines are
//*jvmdll: c:\Java\jre1.5.0_01\bin\client\jvm.dll
//*jvmdll: c:\jdk1.3.1\jre\bin\classic\jvm.dll
// for gnu-linux it should be set as below and the LD_LIBRARY_PATH set
// so that libjvm.so can itself find other libraries. For example
// export LD_LIBRARY_PATH=/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server
@nrndef_unix@*jvmdll: libjvm.so
@nrndef_mac@*jvmdll: libjvm.dylib

// The default stack size is 1000 and the frame (recursion depth) size is 512 unless explicitly set nonzero below
// One may also use the -NSTACK stacksize -NFRAME framesize options at launch.
*NSTACK: 0
Expand Down
4 changes: 0 additions & 4 deletions src/ivoc/apwindow.h
Expand Up @@ -136,7 +136,6 @@ class StandardWindow: public PrintableWindow {
};

class PWMImpl;
class JavaWindow;

class PrintableWindowManager: public Observer {
public:
Expand All @@ -149,9 +148,6 @@ class PrintableWindowManager: public Observer {
void append(PrintableWindow*);
void remove(PrintableWindow*);
void reconfigured(PrintableWindow*);
void append(JavaWindow*);
void remove(JavaWindow*);
void reconfigured(JavaWindow*);
void doprint();

virtual void update(Observable*);
Expand Down
5 changes: 3 additions & 2 deletions src/ivoc/checkpnt.cpp
Expand Up @@ -339,9 +339,10 @@ void PortablePointer::set(void* address, int type, unsigned long s) {
}
PortablePointer::~PortablePointer() {}

declareList(PPList, PortablePointer) implementList(PPList, PortablePointer)
declareList(PPList, PortablePointer)
implementList(PPList, PortablePointer)

class OcCheckpoint {
class OcCheckpoint {
public:
OcCheckpoint();
virtual ~OcCheckpoint();
Expand Down
6 changes: 0 additions & 6 deletions src/ivoc/ivocmain.cpp
Expand Up @@ -45,12 +45,6 @@ void iv_display_scale(float);
#undef MAC
#endif

#if MAC || defined(WIN32)
#include "njconf.h"
#else
#include "../nrnjava/njconf.h"
#endif

#if 1
void pr_profile();
#define PR_PROFILE pr_profile();
Expand Down
5 changes: 3 additions & 2 deletions src/ivoc/ochelp.cpp
Expand Up @@ -31,9 +31,10 @@ static FILE* help_pipe;

extern const char* hoc_current_xopen();

declareList(CopyStringList, CopyString) implementList(CopyStringList, CopyString)
declareList(CopyStringList, CopyString)
implementList(CopyStringList, CopyString)

static CopyStringList* filequeue;
static CopyStringList* filequeue;

extern "C" void ivoc_help(const char* s) {
#if 1
Expand Down

0 comments on commit eb19ae0

Please sign in to comment.