@@ -508,36 +508,21 @@ extern "C" void mk_mech_init(int argc, char** argv) {
508
508
out.close ();
509
509
}
510
510
511
- // Not working
512
511
// initialise default coreneuron parameters
513
512
initnrn ();
514
- printf (" CoreNEURON Global Vars after initnrn(): second order=%d t=%g dt=%g rev_dt=%d celsius=%lf\n " , secondorder, t, dt, rev_dt, celsius);
515
513
516
514
// set global variables
517
515
// precedence is: set by user, globals.dat, 34.0
518
516
celsius = corenrn_param.celsius ;
519
- printf (" CoreNEURON Global Vars after corenrn_param: second order=%d t=%g dt=%g rev_dt=%d celsius=%lf\n " , secondorder, t, dt, rev_dt, celsius);
520
517
521
518
// read the global variable names and set their values from globals.dat
519
+ // some global variables need to be read before the ion_reg to initialize
520
+ // properly the in-built ion mechanisms
522
521
set_globals (corenrn_param.datpath .c_str (), (corenrn_param.seed >= 0 ), corenrn_param.seed );
523
- printf (" CoreNEURON Global Vars after set_globals(): second order=%d t=%g dt=%g rev_dt=%d celsius=%lf\n " , secondorder, t, dt, rev_dt, celsius);
524
522
525
523
// reads mechanism information from bbcore_mech.dat
526
524
mk_mech ((corenrn_param.datpath ).c_str ());
527
525
528
- // // Not working
529
- // // initialise default coreneuron parameters
530
- // initnrn();
531
- // printf("CoreNEURON Global Vars after initnrn(): second order=%d t=%g dt=%g rev_dt=%d celsius=%lf\n", secondorder, t, dt, rev_dt, celsius);
532
-
533
- // // set global variables
534
- // // precedence is: set by user, globals.dat, 34.0
535
- // celsius = corenrn_param.celsius;
536
- // printf("CoreNEURON Global Vars after corenrn_param: second order=%d t=%g dt=%g rev_dt=%d celsius=%lf\n", secondorder, t, dt, rev_dt, celsius);
537
-
538
- // // read the global variable names and set their values from globals.dat
539
- // set_globals(corenrn_param.datpath.c_str(), (corenrn_param.seed >= 0), corenrn_param.seed);
540
- // printf("CoreNEURON Global Vars after set_globals(): second order=%d t=%g dt=%g rev_dt=%d celsius=%lf\n", secondorder, t, dt, rev_dt, celsius);
541
526
}
542
527
543
528
extern " C" int run_solve_core (int argc, char ** argv) {
@@ -549,10 +534,9 @@ extern "C" int run_solve_core(int argc, char** argv) {
549
534
bool reports_needs_finalize = false ;
550
535
551
536
552
- // read the global variable names and set their values from globals.dat
537
+ // read agin the global variables to set the global variables defined by
538
+ // the mod files' mechanisms
553
539
set_globals (corenrn_param.datpath .c_str (), (corenrn_param.seed >= 0 ), corenrn_param.seed );
554
- printf (" CoreNEURON Global Vars after set_globals(): second order=%d t=%g dt=%g rev_dt=%d celsius=%lf\n " , secondorder, t, dt, rev_dt, celsius);
555
-
556
540
557
541
if (!corenrn_param.is_quiet ()) {
558
542
report_mem_usage (" After mk_mech" );
0 commit comments