[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: octave going parallel
From: |
Olaf Till |
Subject: |
Re: octave going parallel |
Date: |
Thu, 6 Apr 2017 20:23:19 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Thu, Apr 06, 2017 at 07:19:22PM +0200, christoph wrote:
> Hello,
>
> Has anyone experience in doing parallel application with octave? As I have
> 32 threads available in Linux it is poor seeing octave just using one core!
> I used parcellfun already and it seems to work fine, my question would be,
> what will happen if I use parcellfun in a function and call this function in
> a pararrayfun.
>
> ss=[array]
>
> tt=pararray(32,@calculate,ss);
>
>
> *calculate* is a function like
>
>
> function[tt]=calculate(matrix,varargin)
>
> do some code
>
> do more code
>
> then call
>
> pattern = parcellfun (30, @findpattern,sliced_matrix);
>
> do more code
>
> even more code
>
> endfunction
>
> Is this going to work??
>
> What is going to happen when a parfunction calls a parfunction ??
It should work. But your example may generate up to 960 computing
child processes, which the kernel has to schedule to your 32 cores. If
you still get a speedup depends on your code and your machine and has
to be tested.
Note that Octave may internally parallelize certain steps of
computation even without being told so.
Olaf
--
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net
signature.asc
Description: Digital signature