Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Refactoring and clean-up of legacy code #250

Closed
10 of 18 tasks
alkino opened this issue Feb 5, 2020 · 9 comments
Closed
10 of 18 tasks

Refactoring and clean-up of legacy code #250

alkino opened this issue Feb 5, 2020 · 9 comments
Assignees

Comments

@alkino
Copy link
Member

alkino commented Feb 5, 2020

Here is the list of what to do to clean code.

#ifdef _OPENMP
void Phase1::populate(NrnThread& nt, int imult, OMP_Mutex& mut) {
#else
void Phase1::populate(NrnThread& nt, int imult) {
#endif
  • Use fstream instead of File*
  • Use tie for .first, .second assignment

- [ ] For AoS increment pointer instead of using indexes : we will deprecate AoS separately (soon)
- [ ] Get rid of warnings from generated code : we shouldn't worry about mod2c as it will be replaced by NMODL
- [ ] nrnmpi_pgvts_least remove? : will need it for cvode so we can it for now
- [ ] Use spdlog? #180 CNEUR-22 : there is separate ticket for logging

@alkino
Copy link
Member Author

alkino commented Feb 12, 2020

@pramodk About « nrnmpi_pgvts_least remove? », nobody use it.
Maybe this function is used from outside world?
Are you sure no VERBATIM code use it?

@nrnhines
Copy link
Collaborator

nrnmpi_pgvts_least is used by cvode which does not exist (yet) in CoreNEURON.

@alkino
Copy link
Member Author

alkino commented Feb 13, 2020

@pramodk @nrnhines @ohm314 do you agree to use spdlog instead of printf / fprintf?

@ohm314
Copy link
Contributor

ohm314 commented Feb 13, 2020

I'm definitely in favor of using spdlog and fmt to clean up all logging and string formatting.

@pramodk pramodk added this to the NEURON v8.0 Release milestone Jul 24, 2020
@pramodk pramodk changed the title Clean code Refactoring and clean-up of legacy code Aug 9, 2020
@pramodk
Copy link
Collaborator

pramodk commented Aug 9, 2020

@alkino : I have updated/re-ordered some of the tasks above. With #283 out of the way, this can be now taken up.

pramodk pushed a commit that referenced this issue Nov 18, 2020
* Replace assert(!busy) with nrn_assert
    nrn_assert is compiled too when in release mode.
* Using using instead of typedef
@alkino
Copy link
Member Author

alkino commented Oct 12, 2021

I close this, because last items are no more relevant

@alkino alkino closed this as completed Oct 12, 2021
@nrnhines
Copy link
Collaborator

do you agree to use spdlog

First I've heard of it. After a quick look, the benefits seem worth it. It was not clear to me if logging could be turned off.

@alkino
Copy link
Member Author

alkino commented Oct 12, 2021

Yes it can.

@alkino
Copy link
Member Author

alkino commented Oct 12, 2021

#316 : the right place to have a discussion about spdlog

pramodk pushed a commit to neuronsimulator/nrn that referenced this issue Nov 2, 2022
* Replace assert(!busy) with nrn_assert
    nrn_assert is compiled too when in release mode.
* Using using instead of typedef

CoreNEURON Repo SHA: BlueBrain/CoreNeuron@08c2aeb
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants