Hello, I'm using an optimization procedure and each step requires tens of integrations (definite integrals of smooth functions). Every time call of AutoGKSmooth fails at
ae_assert(ae_isfinite(a, _state), "AutoGKSmooth: A is not finite!", _state);
Every time in different place (optimization uses randomization), and debugger shows that "a" is a valid floating number. Nevertheless ae_assert() claims that "cond" is "false".
Code:
memset(&state, 0, sizeof(state));
memset(&rep, 0, sizeof(rep));
_autogkstate_init(&state, &_state, ae_true);
_autogkreport_init(&rep, &_state, ae_true);
autogksmooth(startLambda[i], stopLambda[i], &state, &_state);
while (autogkiteration(&state, &_state))
{
state.f = IntegrandAir(state.x, (void*)&pId[i]);
}
autogkresults(&state, &vAir, &rep, &_state);
Could it be a memory issue? Do I need to free anything after each integration?
Thank you,
Yuri