-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce warnings nrncvode #3158
Open
alkino
wants to merge
2
commits into
cornu/reduce_warnings
Choose a base branch
from
cornu/warnings/nrncvode
base: cornu/reduce_warnings
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Reduce warnings nrncvode #3158
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -204,24 +204,25 @@ static void do_ode_thread(neuron::model_sorted_token const& sorted_token, NrnThr | |
} | ||
} | ||
|
||
#if 0 | ||
static double check(double t, Daspk* ida) { | ||
res_gvardt(t, ida->cv_->y_, ida->yp_, ida->delta_, ida->cv_); | ||
double norm = N_VWrmsNorm(ida->delta_, ((IDAMem) (ida->mem_))->ida_ewt); | ||
Printf("ida check t=%.15g norm=%g\n", t, norm); | ||
#if 0 | ||
for (int i=0; i < ida->cv_->neq_; ++i) { | ||
printf(" %3d %22.15g %22.15g %22.15g\n", i, | ||
for (int i=0; i < ida->cv_->neq_; ++i) { | ||
printf(" %3d %22.15g %22.15g %22.15g\n", i, | ||
N_VGetArrayPointer(ida->cv_->y_)[i], | ||
N_VGetArrayPointer(ida->yp_)[i], | ||
N_VGetArrayPointer(ida->delta_)[i]); | ||
} | ||
} | ||
#endif | ||
return norm; | ||
} | ||
#endif | ||
|
||
int Daspk::init() { | ||
extern double t; | ||
int i; | ||
#if 0 | ||
printf("Daspk_init t_=%20.12g t-t_=%g t0_-t_=%g\n", | ||
cv_->t_, t-cv_->t_, cv_->t0_-cv_->t_); | ||
|
@@ -301,7 +302,7 @@ cv_->t_, t-cv_->t_, cv_->t0_-cv_->t_); | |
break; | ||
} | ||
#if 0 | ||
for (i=0; i < cv_->neq_; ++i) { | ||
for (int i=0; i < cv_->neq_; ++i) { | ||
printf(" %d %g %g %g %g\n", i, nt_t, N_VGetArrayPointer(cv_->y_)[i], N_VGetArrayPointer(yp_)[i], N_VGetArrayPointer(delta_)[i]); | ||
} | ||
#endif | ||
|
@@ -449,10 +450,8 @@ void Cvode::daspk_gather_y(double* y, int tid) { | |
int Cvode::res(double tt, double* y, double* yprime, double* delta, NrnThread* nt) { | ||
CvodeThreadData& z = ctd_[nt->id]; | ||
++f_calls_; | ||
static int res_; | ||
int i; | ||
nt->_t = tt; | ||
res_++; | ||
|
||
#if 0 | ||
printf("Cvode::res enter tt=%g\n", tt); | ||
|
@@ -482,10 +481,12 @@ for (i=0; i < z.nvsize_; ++i) { | |
// subtract yp from mechanism state delta's | ||
|
||
#if 0 | ||
printf("Cvode::res after ode and gather_ydot into delta\n"); | ||
for (i=0; i < z.nvsize_; ++i) { | ||
printf(" %d %g %g %g\n", i, y[i], yprime[i], delta[i]); | ||
} | ||
static int res_ = 0; | ||
++res_; | ||
Comment on lines
+484
to
+485
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isn't it still unused? |
||
printf("Cvode::res after ode and gather_ydot into delta\n"); | ||
for (i=0; i < z.nvsize_; ++i) { | ||
printf(" %d %g %g %g\n", i, y[i], yprime[i], delta[i]); | ||
} | ||
#endif | ||
// the cap nodes : see nrnoc/capac.cpp for location of cm, etc. | ||
// these are not in same order as for cvode but are in | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should write an error message here. Is anyone able to tell me what we should write?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem like something a user could do anything about if they encountered it. Therefore, something semi generic would be sufficient?
Not sure it fits the theme of removing unused variables.