I am working with a home-brewed program that evaluates magnetic fields from air-core coils. While I have analytic expressions for the field itself, the code involves numeric integration through regions of the field. It also involves adding up the contributions of several coils.
Speed is becoming an issue. I dearly would like to run some of the integrations (which is where the time is spent) in parallel. The contributions from different coils would trivially parallelize, however, none of the integration routines are labelled as thread safe (up to and including Maple 17). I mostly use the default numeric methods, but I can of course chose whichever I want. When it works, I like _d01akc but it has failed on me on occasion. Note that I have not considered to parallelize the integrand so far as I think it is unlikely to yield good results due to overhead.
Is this desire doomed from the start with present-day Maple, or is there a known way to parallelize this? Note that I have a severe problem with the Threads:- package in Maple 17 as it seems to put the kernel into a weird state (SCRd and confirmed by Maplesoft) but could fall back to Maple 16 or 15 where Threads:- seems to work.
What I am looking for is an example where parallelization of numeric integrals works, or a statement telling me that it has been tried and does not work.
Maple 17 (mostly) on Mac OS X 10.6.8