[IPython-dev] Using IPython Parallel inside a class
Rafał Skolasiński
rjtskolasinski at gmail.com
Wed Dec 3 12:21:31 EST 2014
Oh, in the file I attached there should ofc be line
spectrum = dview.map_sync(self.get_energy,momenta)
instead of
spectrum = dview.map_sync(self.get_energy_for_parallel,momenta)
Sorry for mistake.
Raphael
2014-12-03 18:05 GMT+01:00 Rafał Skolasiński <rjtskolasinski at gmail.com>:
> Hi Guys,
>
> I hope this is the right place to ask this kind of question.
>
> I would like to use IPython parallel in my physical simulation.
> In my mind I've got class Simulation, which contain as a field object
> hamiltonian of class Hamiltonian.
>
> Method get_energy should call hamiltonian.get_matrix(momentum),
> diagonalize it with scipy method and return energies.
>
> I would like to execute it in parallel for a list of different momenta.
>
>
> I tested it with a standard python 'map' function and it worked so I
> thought that easiest way would be to use 'dview.map_sync' in the same way
> but it doesn't looks like a proper way of doing it.
>
> I am attaching my testing code. I would be very grateful for any help and
> ideas how to do it in a nice and clean way.
>
> Cheers,
> Raphael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141203/0d42ab78/attachment.html>
More information about the IPython-dev
mailing list