Alexander Herz | 7 Nov 10:40 2013
Picon

repa not running in parallel?

Hi,

I'm new to haskell and I tried to reproduce the perfomance values from 
the paper "Regular, Shape-polymorphic, Parallel Arrays in Haskell".

I modified the repa-mmult example from the repa-example package to use 
the mmultP from Data.Array.Repa.Algorithms.Matrix.

Then I compile it with "ghc -threaded -fglasgow-exts -O Main.hs" but 
running it with two large matrices :

"./Main -random 4096 4096 -random 4096 4096" I can see that only one of 
my 4 cpus is utilized.

What am I doing wrong?

Note: The unmodified repa-example also does not run in parallel.

Thx,
Alex
Roman Cheplyaka | 7 Nov 10:44 2013

Re: repa not running in parallel?

Try adding +RTS -N at the end of your ./Main command line.

* Alexander Herz <alexander.herz <at> mytum.de> [2013-11-07 10:40:59+0100]
> Hi,
> 
> I'm new to haskell and I tried to reproduce the perfomance values
> from the paper "Regular, Shape-polymorphic, Parallel Arrays in
> Haskell".
> 
> I modified the repa-mmult example from the repa-example package to
> use the mmultP from Data.Array.Repa.Algorithms.Matrix.
> 
> Then I compile it with "ghc -threaded -fglasgow-exts -O Main.hs" but
> running it with two large matrices :
> 
> "./Main -random 4096 4096 -random 4096 4096" I can see that only one
> of my 4 cpus is utilized.
> 
> What am I doing wrong?
> 
> Note: The unmodified repa-example also does not run in parallel.
> 
> Thx,
> Alex
> _______________________________________________
> Haskell mailing list
> Haskell <at> haskell.org
> http://www.haskell.org/mailman/listinfo/haskell
(Continue reading)

Tikhon Jelvis | 7 Nov 10:45 2013
Picon

Re: repa not running in parallel?

I think you need to specify how many cores to use when you call your ./Main program. Something like "./Main -random 4096 4096 -random 4096 4096 +RTS -N4" (given that you have 4 cores). You'll also need to add -rtsopts when you're compiling your code with ghc.


On Thu, Nov 7, 2013 at 1:40 AM, Alexander Herz <alexander.herz <at> mytum.de> wrote:
Hi,

I'm new to haskell and I tried to reproduce the perfomance values from the paper "Regular, Shape-polymorphic, Parallel Arrays in Haskell".

I modified the repa-mmult example from the repa-example package to use the mmultP from Data.Array.Repa.Algorithms.Matrix.

Then I compile it with "ghc -threaded -fglasgow-exts -O Main.hs" but running it with two large matrices :

"./Main -random 4096 4096 -random 4096 4096" I can see that only one of my 4 cpus is utilized.

What am I doing wrong?

Note: The unmodified repa-example also does not run in parallel.

Thx,
Alex
_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell

_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell
Alexander Herz | 7 Nov 10:47 2013
Picon

Re: repa not running in parallel?

Problem solved!
Sorry for using the wrong list.

Alex

On 11/07/2013 10:40 AM, Alexander Herz wrote:
> Hi,
>
> I'm new to haskell and I tried to reproduce the perfomance values from 
> the paper "Regular, Shape-polymorphic, Parallel Arrays in Haskell".
>
> I modified the repa-mmult example from the repa-example package to use 
> the mmultP from Data.Array.Repa.Algorithms.Matrix.
>
> Then I compile it with "ghc -threaded -fglasgow-exts -O Main.hs" but 
> running it with two large matrices :
>
> "./Main -random 4096 4096 -random 4096 4096" I can see that only one 
> of my 4 cpus is utilized.
>
> What am I doing wrong?
>
> Note: The unmodified repa-example also does not run in parallel.
>
> Thx,
> Alex
> _______________________________________________
> Haskell mailing list
> Haskell <at> haskell.org
> http://www.haskell.org/mailman/listinfo/haskell
Claude Heiland-Allen | 7 Nov 10:54 2013
Picon

Re: repa not running in parallel?

Hi Alexander,

On 07/11/13 09:40, Alexander Herz wrote:
> Hi,
>
> I'm new to haskell and I tried to reproduce the perfomance values from
> the paper "Regular, Shape-polymorphic, Parallel Arrays in Haskell".
>
> I modified the repa-mmult example from the repa-example package to use
> the mmultP from Data.Array.Repa.Algorithms.Matrix.
>
> Then I compile it with "ghc -threaded -fglasgow-exts -O Main.hs" but
> running it with two large matrices :
>
> "./Main -random 4096 4096 -random 4096 4096" I can see that only one of
> my 4 cpus is utilized.
>
> What am I doing wrong?

Probably, not running with ./Main +RTS -N -RTS ...

http://www.haskell.org/ghc/docs/7.6.3/html/users_guide/using-smp.html#parallel-options

> Note: The unmodified repa-example also does not run in parallel.
>
> Thx,
> Alex

Claude
--

-- 
http://mathr.co.uk

Gmane