Skip to content

Move codebase to CPP #763

Merged
nrnhines merged 39 commits into
masterfrom
cpp
Feb 3, 2021
Merged

Move codebase to CPP #763
nrnhines merged 39 commits into
masterfrom
cpp

Conversation

@alexsavulescu

Copy link
Copy Markdown
Member

More details in #708.

@alexsavulescu alexsavulescu force-pushed the cpp branch 8 times, most recently from 67d9bc3 to f99a341 Compare October 13, 2020 13:00
@alexsavulescu alexsavulescu force-pushed the cpp branch 7 times, most recently from 71ada5b to ef7513f Compare October 23, 2020 16:17
@alexsavulescu alexsavulescu force-pushed the cpp branch 3 times, most recently from 313a09f to 44c78f2 Compare October 28, 2020 15:03
@alexsavulescu

Copy link
Copy Markdown
Member Author

For reasons that elude me at this point in time, 5 rxd tests are failing for the autotools jobs:

Passed:      ca_pump, multicompartment_mebrane_mismatch, multicompartment_reactions_with_v, nodes_update, cabuf, include_flux_cvode, cabuf_fixed_step, pure_diffusion_cvode, IraHH, react_region_specified, include_flux, verify_no_initialization_order_issue, reaction_test, multicompartment_reactions_del, reaction_param_test, multicompartment_reactions, pure_diffusion, reaction_null_dest, 3d/circadian_rhythm, 3d/pure_diffusion_3d_cvode, 3d/pure_diffusion_3d, 3d/include_flux3d_cvode, 3d/include_flux3d, 3d/multicompartment_reactions, wave1d/wave1d_125_1, wave1d/wave1d_25_5, wave1d/wave1d_taper_125_1, wave1d/wave1d_taper_25_5, wave1d/wave1d_tree_125_1, wave1d/wave1d_tree2_125_1, wave1d/wave1d_tree2_25_5, wave1d/wave1d_tree_25_5, ecs/ecs_example_cvode, ecs/ecs_example, ecs/ecs_multi_example_cvode, ecs/ecs_multi_example, ecs/ecs_before_sections, ecs/ecs_include_flux, ecs/ecs_include_flux_cvode, hybrid/bistable_hybrid_cvode, hybrid/bistable_hybrid_cvode_change_nthread, hybrid/bistable_hybrid, hybrid/bistable_hybrid_change_nthread, hybrid/pure_diffusion_hybrid_cvode, hybrid/pure_diffusion_hybrid
Failed:      hh_param, hh_cvode, hh_param_cvode, hh_morph, hh
Incomplete:  
---
Ran 50 tests:
Passed:     45
Failed:     5
Incomplete: 0

more here: https://travis-ci.com/github/neuronsimulator/nrn/jobs/414446958#L8937

@nrnhines

Copy link
Copy Markdown
Member

How does one run one of the autotools tests. For cmake, make test is successful.

@alexsavulescu

alexsavulescu commented Oct 28, 2020

Copy link
Copy Markdown
Member Author

How does one run one of the autotools tests.

For autotools I use (on mac) :

cd nrn
git checkout cpp
./build.sh
./configure --without-x --with-paranrn=dynamic --with-nrnpython=`which python` --with-readline=no --prefix=`pwd`/install
make
make install
export PYTHONPATH=`pwd`/install/lib/python:$PYTHONPATH
export PATH=`pwd`/install/x86_64/bin:$PATH
python share/lib/python/neuron/rxdtests/run_all.py

For cmake, make test is successful.

I don't think those tests are run with cmake; by running python share/lib/python/neuron/rxdtests/run_all.py for a cmake install, all tests pass.

@pramodk

pramodk commented Oct 28, 2020

Copy link
Copy Markdown
Member

@nrnhines : Just to be sync : @adamjhn just informed us following:

It looks like it's a difference in the currents coming from the hh mechanism. e.g. here is the difference in the ik for a simple model with no rxd on a CMake build - an autotools build

import numpy
from neuron import h
from matplotlib import pyplot
h.load_file('stdrun.hoc')
soma = h.Section('soma')
soma.insert('hh')
stim = h.IClamp(soma(0.5))
stim.delay = 50
stim.amp = 1
stim.dur = 50
tvec = h.Vector().record(h._ref_t)
kvec = h.Vector().record(soma(0.5)._ref_ik)
h.finitialize(-70)
h.continuerun(100)
numpy.save("/tmp/kvec.npy",kvec.as_numpy())
#kvec2 = numpy.load("/tmp/kvec.npy")
#pyplot.plot(tvec, kvec - kvec2)
#pyplot.xlabel("time (ms)")
#pyplot.ylabel("diff (mA/cm$^2$)")

So, if simple hh results are different between autotools and CMake then I suspect we have missed something fundamental. We haven't checked details yet. (Note that this different happens only this pull request branch; master works correctly)

@pramodk

pramodk commented Oct 28, 2020

Copy link
Copy Markdown
Member

@nrnhines : I have fixed the issue in 26b4a77. (hh.mod modified by CMake was accidentally got committed)

@alexsavulescu

Copy link
Copy Markdown
Member Author

Thank you @adamjhn & @pramodk.
This PR is ready for review.

@pramodk

pramodk commented Oct 28, 2020

Copy link
Copy Markdown
Member

I will block some dedicated hours to go though all those 458 files 👀. All changes are straightforward but just to be sure we don't miss anything.

  • @alexsavulescu @jorblancoa : we should run full BBP simulation test suite with this branch.
  • We should also build this on Cray Piz-Daint system (just to be sure everything is consistent)

And then we should be ready to go 🚀

@alexsavulescu

alexsavulescu commented Oct 28, 2020

Copy link
Copy Markdown
Member Author

I'll also

  • re-run nrnivmodl on all ModelDB repos for linux and macos.

@pramodk

pramodk commented Feb 2, 2021

Copy link
Copy Markdown
Member

@alexsavulescu : Having bit curated commit message would be helpful for this mega merge? May be you can take a look at the log and copy message here?

@nrnhines @alexsavulescu : another question - should we merge all (or most of the) commits from current master to release/8.0 before this merge?

@pramodk pramodk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still WIP

Comment thread cmake/CompilerFlagsHelpers.cmake Outdated
@alexsavulescu

Copy link
Copy Markdown
Member Author

@alexsavulescu : Having bit curated commit message would be helpful for this mega merge? May be you can take a look at the log and copy message here?

This sums it up:
move codebase to cpp (except nmodl + 3rd party old libs) - #708

@nrnhines @alexsavulescu : another question - should we merge all (or most of the) commits from current master to release/8.0 before this merge?

Sure, save ourselves some cherry-picking

@pramodk pramodk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Half way through...!

Comment thread src/modlunit/list.cpp
Comment thread src/modlunit/units.cpp
Comment thread src/modlunit/units.cpp
Comment thread src/mswin/extra/splitnrn.cpp Outdated
Comment thread src/mswin/rdln/readline.cpp Outdated
Comment thread src/nmodl/lex.lpp Outdated
Comment thread src/nmodl/modl.cpp
Comment thread src/nmodl/noccout.cpp Outdated
Comment thread src/nrnoc/cabcode.cpp
Comment thread src/nrnoc/capac.cpp
Comment thread src/nrnoc/fadvance.cpp
Comment thread src/nrnoc/fadvance.cpp
Comment thread src/nrnoc/init.cpp Outdated
Comment thread src/nrnoc/init.cpp Outdated
Comment thread src/nrnoc/treeset.cpp Outdated
Comment thread src/nrnpython/rxdmath.cpp
Comment thread src/oc/fileio.cpp
Comment thread src/oc/ftime.cpp

@pramodk pramodk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few minor comments/questions otherwise LGTM

Comment thread src/readline/readline.c
Comment thread src/sparse13/spmatrix.h
Comment thread src/nrnoc/code.cpp
@alexsavulescu alexsavulescu requested a review from pramodk February 3, 2021 11:06
@alexsavulescu

Copy link
Copy Markdown
Member Author

@pramodk so I'm happy if you're happy. CI providers have been erratic these past days (GHA doubling jobs, failed actions for no reason, Azure reporting failed jobs but they weren't...) but everything is a-OK.

Comment thread cmake/CompilerFlagsHelpers.cmake

@pramodk pramodk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pramodk so I'm happy if you're happy.

😃 ✅ 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate models failing nrntest run after CPP update

6 participants