@@ -508,36 +508,21 @@ extern "C" void mk_mech_init(int argc, char** argv) {
508508 out.close ();
509509 }
510510
511- // Not working
512511 // initialise default coreneuron parameters
513512 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);
515513
516514 // set global variables
517515 // precedence is: set by user, globals.dat, 34.0
518516 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);
520517
521518 // 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
522521 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);
524522
525523 // reads mechanism information from bbcore_mech.dat
526524 mk_mech ((corenrn_param.datpath ).c_str ());
527525
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);
541526}
542527
543528extern " C" int run_solve_core (int argc, char ** argv) {
@@ -549,10 +534,9 @@ extern "C" int run_solve_core(int argc, char** argv) {
549534 bool reports_needs_finalize = false ;
550535
551536
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
553539 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-
556540
557541 if (!corenrn_param.is_quiet ()) {
558542 report_mem_usage (" After mk_mech" );
0 commit comments