MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Issue with ParallelTable and AstronomicalData

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116226] Re: Issue with ParallelTable and AstronomicalData
  • From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
  • Date: Mon, 7 Feb 2011 06:06:39 -0500 (EST)

Hi,

gives the same results here (Linux-x86-64) but this anyway a very bad
idea:

Say you move from New York to Germany and you send all your stuff on a
big ship to reassemble it after two weeks journey in your new flat in
Germany. Pretty long time you think, but you come up with a brilliant
idea: Lets to all this work in parallel! 
So you send not only one ship, but say 4 ships and distribute you stuff
on them and you reassemble not alone but with 3 other workers..

Do you see where the bottleneck is and why this won't be really faster?

I'm pretty sure that AstronomicalData[..] accesses your hard-drive to
fetch the data and if so, you shouldn't expect a speedup by a parallel
execution.

Cheers
Patrick








On Sat, 2011-02-05 at 05:44 -0500, Thomas Melehan wrote:
> Group: 
> 
> The the only difference in the following two modules is the use of 
> ParallelTable in one and Table in the other.  For some strange reason 
> they give different results.  I tried to DistributeDefinitions 
> [AstronomicalData], with no impact.  Any ideas?
> 
> 
> I am using Mathematica 8 on Mac OSX 10.6.6
> 
> 
> 
> 
> Module[{date, month, day, =CE=B1, =CE=B3Sun, testData},
> 
>  ParallelTable[
>  
>   date = DateList[{2010, ToExpression[month], ToExpression[day],
>      ToExpression[hour]}, TimeZone -> -5];
>   =CE=B1 = Max[AstronomicalData["Sun", {"Altitude", date}, TimeZone -> -5] ,
>      0] Degree ;
>   =CE=B3Sun = AstronomicalData["Sun", {"Azimuth", date}, TimeZone -> -5] Degree;
>   testData =
>    AstronomicalData["Sun", {#, date}] Degree & /@ {"Azimuth", "Altitude"};
>  
>   {date, =CE=B3Sun, =CE=B1, testData, month, day, hour}
>  
>   , {month, {"01"}}, {day, {"15"}}, {hour, {"08", "09"}}]
> 
>  ]
> 
> 
> Module[{date, month, day, =CE=B1, =CE=B3Sun, testData},
> 
>  Table[
>  
>   date = DateList[{2010, ToExpression[month], ToExpression[day],
>      ToExpression[hour]}, TimeZone -> -5];
>   =CE=B1 = Max[AstronomicalData["Sun", {"Altitude", date}, TimeZone -> -5] ,
>      0] Degree ;
>   =CE=B3Sun = AstronomicalData["Sun", {"Azimuth", date}, TimeZone -> -5] Degree;
>   testData =
>    AstronomicalData["Sun", {#, date}] Degree & /@ {"Azimuth", "Altitude"};
>  
>   {date, =CE=B3Sun, =CE=B1, testData, month, day, hour}
>  
>   , {month, {"01"}}, {day, {"15"}}, {hour, {"08", "09"}}]
> 
>  ]
> 




  • Prev by Date: Re: Mathematica 8 Home Edition
  • Next by Date: Re: Mathematica 8 Home Edition
  • Previous by thread: Issue with ParallelTable and AstronomicalData
  • Next by thread: Pattern matching