[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] is gsl_integration_workspace reusable?

From: Rhys Ulerich
Subject: Re: [Help-gsl] is gsl_integration_workspace reusable?
Date: Thu, 1 Dec 2011 16:33:03 -0600

Hi Denes,

> Unfortunately our 'test' code is 400-500 lines. We may be able to reduce it
> in the coming weeks. Apart from all the bells and whistles, the original
> code allocated a single workspace and then used that in a loop to compute
> billions of integrals (calls to gsl_integration_qags()) with stochastic
> parameters. The results were really strange (and wrong) until we changed the
> code to allocate a workspace for every single integration.

Any chance your test code is overwriting memory in places where it
shouldn't?  If it trampled the gsl_integration_workspace I'd expect
similar behavior which might be resolved by allocating new workspaces
all the time.  What does valgrind say?  Do you see identical (or
identically strange) results across different compiler versions or
optimization levels?

400-500 lines isn't ideal but it'd be usable if you can reproduce the
issue with O(2) iterations instead of billions.

- Rhys

reply via email to

[Prev in Thread] Current Thread [Next in Thread]