Skip to content

Commit

Permalink
Fix review
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Cornu committed Oct 21, 2024
1 parent 655a4f4 commit 4c2f419
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
29 changes: 24 additions & 5 deletions src/nrncvode/nrndaspk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,23 @@ 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,
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;
#if 0
Expand Down Expand Up @@ -285,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
Expand Down Expand Up @@ -464,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_;
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
Expand Down
6 changes: 6 additions & 0 deletions src/nrniv/multisend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,9 @@ void nrn_multisend_receive(NrnThread* nt) {
int& s = multisend_receive_buffer[current_rbuf]->nsend_;
int& r = multisend_receive_buffer[current_rbuf]->nrecv_;
double w1 = nrnmpi_wtime();
#if TBUFSIZE
int ncons = 0;
#endif
if (use_multisend_) {
nrn_multisend_advance();
TBUF
Expand All @@ -488,6 +491,9 @@ void nrn_multisend_receive(NrnThread* nt) {
TBUF
while (nrnmpi_multisend_conserve(s, r) != 0) {
nrn_multisend_advance();
#if TBUFSIZE
++ncons;
#endif
}
TBUF
}
Expand Down

0 comments on commit 4c2f419

Please sign in to comment.