forum.alglib.net

ALGLIB forum
It is currently Tue Mar 19, 2024 9:12 am

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Numerical integration fails
PostPosted: Fri Mar 26, 2021 6:13 pm 
Offline

Joined: Fri Mar 26, 2021 5:47 pm
Posts: 2
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


Top
 Profile  
 
 Post subject: Re: Numerical integration fails
PostPosted: Sun Mar 28, 2021 3:02 pm 
Offline

Joined: Fri Mar 26, 2021 5:47 pm
Posts: 2
My fault, sorry. Should have checked that _state is being properly passed through the call stack.
I close the subject.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group