Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: ParallelMap in FindMinimum getting slower

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122063] Re: ParallelMap in FindMinimum getting slower
  • From: Rafael Reiter <mail at zonk.at>
  • Date: Tue, 11 Oct 2011 04:24:52 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201110070848.EAA07424@smc.vnet.net> <Pine.LNX.4.63.1110070439250.26775@wopr.wolfram.com> <4E8F12CA.1060405@zonk.at> <Pine.LNX.4.63.1110100217081.32138@wopr.wolfram.com>

Using Block instead of Module solved the problem, thank you very much 
for your help! I'd never have guessed that!

Rafael

On 10.10.2011 09:24, Oliver Ruebenkoenig wrote:
> On Fri, 7 Oct 2011, Rafael Reiter wrote:
>
>> Hi,
>>
>> find the file attached. You can just hit "Evaluate Notebook".
>> I noticed in top that the used memory is also increasing all the 
>> time. I guess the distributed data gets bigger and bigger, but what 
>> is it?
>>
>> Rafael
>
>
> I do not have the time to read you notebook in all detail. Here are 
> some random ideas:
>
> - Use $HistoryLength = 0 (also evaluated via ParallelEvaluate)
> - Some of the data you pass around are not packed arrays: e.g. try
>
>
> Bloch[nkx_, nky_] := Developer`ToPackedArray[N[BlochH /. kx -> nkx /. 
> ky -> nky]];
>
> - Also the path data contains integer and reals. Perhaps that could be 
> avoided.
>
> - After //Chop use //N//Developer`ToPackedArray
>
> - Perhaps replace the Module with Block
>
> Hope this contains the right clue.
> Oliver
>
>>
>> On 07.10.2011 11:39, Oliver Ruebenkoenig wrote:
>>> On Fri, 7 Oct 2011, Rafael Reiter wrote:
>>>
>>>> Hi everyone,
>>>>
>>>> I use ParallelMap with Mathematica on Linux to solve 100 eigenvalue
>>>> problems on 4 kernels. This operation ist repeated very often by
>>>> FindMinimum, and over the course of time the performance drops
>>>> significantly. Using top, you can see that the CPU used by the master
>>>> kernel increases, and the CPU used by the slave kernels decreases from
>>>> 70 to appr. 20 percent. Has anyone else experienced this phenomenon?
>>>>
>>>> Best wishes,
>>>> Rafael
>>>>
>>>>
>>>
>>> Can you send the example?
>>>
>>> Oliver
>>
>>




  • Prev by Date: Re: Interesting problem looking for a solution.
  • Next by Date: Re: Interesting problem looking for a solution.
  • Previous by thread: Re: ParallelMap in FindMinimum getting slower
  • Next by thread: FFT Speed