Question: Threads:-Seq question

I have a somewhat time-consuming numerical integration which is needed for many different parameters so I'd like to parallelize the various integrations. Threads:-Seq should be just the ticket for this; so I write:

respr128:=[Threads:-Seq(evalf(Int(S(ener,Ecrit)*rangeexp(amp,depth/4,t0[128]),ener=0.001..10*Ecrit,method=_d01ajc,epsilon=1.0e-5)),depth=1..36)];

The functions S and rangeexp are defined thus:

S:=(omega,omega_c)->(9*sqrt(3)/(8*Pi)*omega/omega_c) * int(BesselK(5/3,x),x=omega/omega_c..infinity);

rangeexp:=(amp,t,t0)->amp*exp(-t/t0);

All the remaining variables are just numbers when this gets executed.

The code runs correctly with the normal seq construct. The code runs correctly also with Threads:-Seq and gives the same result. HOWEVER, it does not parallelize anything, as verified by Maple timing as well as looking at the system load. I verify that kerneloptions(numcpus) indeed gives 4, so Maple does recognize the processors I have.

I have looked through the blog on parallel programming by one of the Maple developers (dohani??) and am wondering whether the index variables used in S (i.e. x) as well as in the Int of the primary function (i.e. ener) are an issue. Another potential issue could be the use of the NAG routine for the numerical integration (which I have to use; else the time taken for each point is prohibitive). But I get no complaint from Maple.

This is Maple 15, running on a Quad G5 Power Mac under OSX 10.4 (Tiger). This is of course an old system; could that have to do with it?

Thanks for any hints,

 

Mac Dude

Please Wait...