Skip to content

Optimization and refactoring of the permutation algorithm#2617

Merged
pramodk merged 21 commits into
hines/node_order_optimfrom
magkanar/hines/node_order_optim
Jan 7, 2024
Merged

Optimization and refactoring of the permutation algorithm#2617
pramodk merged 21 commits into
hines/node_order_optimfrom
magkanar/hines/node_order_optim

Conversation

@iomaganaris

Copy link
Copy Markdown
Member

I believe that's a good start to improve a bit how the permutation algorithm is applied to the NEURON vectors.
For the next steps and to avoid duplicating the code between NEURON and CoreNEURON I think we need to think about the following:

  1. How to make the code same for both NEURON and CoreNEURON. New namespace? Code compiled for NEURON and CoreNEURON separately?
  2. Further potential improvements by changing the related int* to vectors in both NEURON and CoreNEURON to avoid redefinition of functions based on * and std::vectors

@iomaganaris iomaganaris self-assigned this Nov 20, 2023
@bbpbuildbot

This comment has been minimized.

@azure-pipelines

Copy link
Copy Markdown

✔️ c3e4d26 -> Azure artifacts URL

@azure-pipelines

Copy link
Copy Markdown

✔️ 39c8cce -> Azure artifacts URL

@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

@nrnhines nrnhines 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.

My suggestions are entirely optional.

Comment thread src/node_order_optim/node_permute.h Outdated
Comment thread src/node_order_optim/node_permute.cpp
@azure-pipelines

Copy link
Copy Markdown

✔️ dccc456 -> Azure artifacts URL

@bbpbuildbot

This comment has been minimized.

@azure-pipelines

Copy link
Copy Markdown

✔️ 79ab06c -> Azure artifacts URL

@bbpbuildbot

This comment has been minimized.

@sonarqubecloud

Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 12 Code Smells

No Coverage information No Coverage information
1.5% 1.5% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@azure-pipelines

Copy link
Copy Markdown

✔️ 3da5e31 -> Azure artifacts URL

@pramodk pramodk merged commit cc981f2 into hines/node_order_optim Jan 7, 2024
@pramodk pramodk deleted the magkanar/hines/node_order_optim branch January 7, 2024 15:52
nrnhines added a commit that referenced this pull request Apr 12, 2024
* nrn and corenrn share src/coreneuron/permute files.
  #if CORENRN_BUILD  used where code fragments differ

* Optimization and refactoring of the permutation algorithm (#2617)

* external/ringtest tests ParallelContext.optimize_node_order(i)
* Unit test for permutation algorithms
* Added permute benchmark file

* Clearing up more unused code in NEURON and added implementations for reverse_permute

* Improve return values of new functions based on C++ core guidelines

* Windows has no std::aligned_alloc.
 There is an _aligned_alloc, but that must be paired with _aligned_free.
 cannot std::swap if one is malloc and other is new


---------

Co-authored-by: Ioannis Magkanaris <iomagkanaris@gmail.com>
Co-authored-by: Pramod Kumbhar <pramod.s.kumbhar@gmail.com>
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.

4 participants