Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Incorrect parallel computation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125983] Re: Incorrect parallel computation
  • From: Yasha Gindikin <gindikin at gmail.com>
  • Date: Wed, 11 Apr 2012 18:18:24 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jlrhi8$eoe$1@smc.vnet.net> <jm0k4t$agm$1@smc.vnet.net>

On Tuesday, April 10, 2012 10:31:57 AM UTC+4, David Bailey wrote:
> I think this illustrates the pitfalls of parallel computing
I suspect it rather illustrates a bug in a SetSharedVariable realization.

> why I have never used this feature for serous code!
Actually, I wrote a modified Lanczos method for the exact diagonalization study of many-electron system in a quantum dot. I do not know, whether it is serious enough, but it successfully runs in parallel, which saves me a lot of time (literally, days). The only step that fails to parallelize is the last step of the calculation of Fourier components of the density. This is what I essentially describe here.

> You probably thought your update was atomic, but I doubt if
>
> c[[a[[l, k]]]] += 1
>
> qualifies as an atomic update!

It is indeed crucial for SetSharedVariable, however, AtomQ[c[[a[[l, k]]]] += 1] gives True.

Best,
Yasha Gindikin.



  • Prev by Date: Re: Import HTTP data in asynchronous/parallel way
  • Next by Date: Re: Incorrect parallel computation
  • Previous by thread: Re: Incorrect parallel computation
  • Next by thread: Re: Incorrect parallel computation