[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Which is the best way to parallelize a loop in octave

From: Francesco Potortì
Subject: Re: Which is the best way to parallelize a loop in octave
Date: Wed, 05 Jul 2017 21:59:08 +0200

>Option two: I could parallelize the for loop in Octave.
>Regarding last option, there are two packages in Octave for parallel
>(mpi and parallel)
>Taking into account that I am on a Ubuntu 14.04 desktop system in a real
>dual processor (or four virtual):
>Which is the best option you advise to me?

My understanding is that parallel is easier to use and more general.
There is a pararrayfun function that could be appropriate to your needs,
provided that for loops are independent of each other.  If the results
of your loop n depends on the results of loop n-1, you are out of luck
with any parallel method.  Parallel uses multiprocessing on several
cores, which is very efficient if you can dispatch many loops to each

MPI is more appropriate for low-level parallel computing, and I think is
more appropriate for clusters rather than single machines.

Francesco Potortì (ricercatore)        Voice:  +39.050.621.3058
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Skype:  wnlabisti
(entrance 20, 1st floor, room C71)     Web:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]