diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index cbcdc8d326..f00cd120ae 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -659,7 +659,7 @@ int arkEvolve(ARKodeMem ark_mem, sunrealtype tout, N_Vector yout, sunrealtype troundoff, nrm; sunbooleantype inactive_roots; sunrealtype dsm; - int nflag, attempts, ncf, nef, constrfails; + int nflag, ncf, nef, constrfails; int relax_fails; /* Check and process inputs */ @@ -843,16 +843,21 @@ int arkEvolve(ARKodeMem ark_mem, sunrealtype tout, N_Vector yout, /* Looping point for step attempts */ dsm = ZERO; - attempts = ncf = nef = constrfails = ark_mem->last_kflag = 0; + ncf = nef = constrfails = ark_mem->last_kflag = 0; relax_fails = 0; nflag = FIRST_CALL; + +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + int attempts = 0; +#endif + for(;;) { /* increment attempt counters */ - attempts++; ark_mem->nst_attempts++; #if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + attempts++; SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::arkEvolve", "start-step", "step = %li, attempt = %i, h = %"RSYM", tcur = %"RSYM, diff --git a/src/cvode/cvode_impl.h b/src/cvode/cvode_impl.h index caf84fbf60..f8e825b7c0 100644 --- a/src/cvode/cvode_impl.h +++ b/src/cvode/cvode_impl.h @@ -476,7 +476,7 @@ typedef struct CVodeMemRec { /* Resize history workspace */ N_Vector resize_wrk[L_MAX]; - booleantype first_step_after_resize; + sunbooleantype first_step_after_resize; int cv_err_weight_method; diff --git a/src/cvode/cvode_resize.c b/src/cvode/cvode_resize.c index 5d39933774..fc76a630fe 100644 --- a/src/cvode/cvode_resize.c +++ b/src/cvode/cvode_resize.c @@ -23,8 +23,8 @@ #include "cvode_impl.h" #include -#define ZERO RCONST(0.0) /* real 0.0 */ -#define ONE RCONST(1.0) /* real 1.0 */ +#define ZERO SUN_RCONST(0.0) /* real 0.0 */ +#define ONE SUN_RCONST(1.0) /* real 1.0 */ /* ----------------------------------------------------------------------------- * Build Adams Nordsieck array from f(t,y) history diff --git a/test/unit_tests/cvode/CXX_serial/test_nordsieck.cpp b/test/unit_tests/cvode/CXX_serial/test_nordsieck.cpp index 02c30c6ce2..7607a072a1 100644 --- a/test/unit_tests/cvode/CXX_serial/test_nordsieck.cpp +++ b/test/unit_tests/cvode/CXX_serial/test_nordsieck.cpp @@ -12,8 +12,8 @@ #include #include "test_utilities.hpp" -#define ZERO RCONST(0.0) /* real 0.0 */ -#define ONE RCONST(1.0) /* real 1.0 */ +#define ZERO SUN_RCONST(0.0) /* real 0.0 */ +#define ONE SUN_RCONST(1.0) /* real 1.0 */ #define PI 3.14159265358979323846 /* -----------------------------------------------------------------------------