Re: [Haskell-cafe] Control.Parallel on 6.10.4 - Mac OS X version

2009-08-19 Thread Kevin Smith
I ran the simple parallel "hello world" on my system.  the output of the
programs with N1 and N2 is shown below. I'm not sure how to interpret this -
it looks like I am getting a little speedup on the "real time". I'm running
the 6.10.4 install package for Mac OS X on a intel core 2 mac book.
Here is output of ghc --info:

Macintosh-4:~ kevinsmith$ ghc --info
 [("Project name","The Glorious Glasgow Haskell Compilation System")
 ,("Project version","6.10.4")
 ,("Booter version","6.10.3.20090628")
 ,("Stage","2")
 ,("Interface file version","6")
 ,("Have interpreter","YES")
 ,("Object splitting","YES")
 ,("Have native code generator","YES")
 ,("Support SMP","YES")
 ,("Unregisterised","NO")
 ,("Tables next to code","YES")
 ,("Win32 DLLs","")
 ,("RTS ways"," debug  thr thr_p thr_debug")
 ,("Leading underscore","YES")
 ,("Debug on","False")
 ]


Here is output from program:

$ time ./paratest +RTS -N1 -s
./paratest +RTS -N1 -s
1405006117752879898543142606244511569936384005711076
 758,080,164 bytes allocated in the heap
  61,076 bytes copied during GC
   3,044 bytes maximum residency (1 sample(s))
  16,204 bytes maximum slop
   1 MB total memory in use (0 MB lost due to fragmentation)

  Generation 0:  1445 collections, 0 parallel,  0.08s,  0.08s elapsed
  Generation 1: 1 collections, 0 parallel,  0.00s,  0.00s elapsed

  Task  0 (worker) :  MUT time:   0.00s  (  0.00s elapsed)
  GC  time:   0.00s  (  0.00s elapsed)

  Task  1 (worker) :  MUT time:   1.91s  (  1.86s elapsed)
  GC  time:   0.00s  (  0.00s elapsed)

  Task  2 (worker) :  MUT time:   1.83s  (  1.86s elapsed)
  GC  time:   0.08s  (  0.08s elapsed)

  INIT  time0.00s  (  0.00s elapsed)
  MUT   time1.83s  (  1.86s elapsed)
  GCtime0.08s  (  0.08s elapsed)
  EXIT  time0.00s  (  0.00s elapsed)
  Total time1.91s  (  1.94s elapsed)

  %GC time   4.1%  (4.3% elapsed)

  Alloc rate413,412,206 bytes per MUT second

  Productivity  95.9% of total user, 94.4% of total elapsed

recordMutableGen_sync: 0
gc_alloc_block_sync: 0
whitehole_spin: 0
gen[0].steps[0].sync_todo: 0
gen[0].steps[0].sync_large_objects: 0
gen[0].steps[1].sync_todo: 0
gen[0].steps[1].sync_large_objects: 0
gen[1].steps[0].sync_todo: 0
gen[1].steps[0].sync_large_objects: 0

real 0m1.946s
user 0m1.912s
sys 0m0.025s
Macintosh-4:~ kevinsmith$ time ./paratest +RTS -N2 -s
./paratest +RTS -N2 -s
1405006117752879898543142606244511569936384005711076
 758,092,440 bytes allocated in the heap
  79,084 bytes copied during GC
   3,076 bytes maximum residency (1 sample(s))
  14,724 bytes maximum slop
   2 MB total memory in use (0 MB lost due to fragmentation)

  Generation 0:  1024 collections, 0 parallel,  0.08s,  0.08s elapsed
  Generation 1: 1 collections, 0 parallel,  0.00s,  0.00s elapsed

  Parallel GC work balance: nan (0 / 0, ideal 2)

  Task  0 (worker) :  MUT time:   1.84s  (  1.18s elapsed)
  GC  time:   0.08s  (  0.08s elapsed)

  Task  1 (worker) :  MUT time:   1.92s  (  1.18s elapsed)
  GC  time:   0.00s  (  0.00s elapsed)

  Task  2 (worker) :  MUT time:   1.92s  (  1.18s elapsed)
  GC  time:   0.00s  (  0.00s elapsed)

  Task  3 (worker) :  MUT time:   1.92s  (  1.18s elapsed)
  GC  time:   0.00s  (  0.00s elapsed)

  INIT  time0.00s  (  0.00s elapsed)
  MUT   time1.84s  (  1.18s elapsed)
  GCtime0.08s  (  0.08s elapsed)
  EXIT  time0.00s  (  0.00s elapsed)
  Total time1.92s  (  1.27s elapsed)

  %GC time   4.0%  (6.5% elapsed)

  Alloc rate411,138,454 bytes per MUT second

  Productivity  95.9% of total user, 145.6% of total elapsed

recordMutableGen_sync: 0
gc_alloc_block_sync: 0
whitehole_spin: 0
gen[0].steps[0].sync_todo: 0
gen[0].steps[0].sync_large_objects: 0
gen[0].steps[1].sync_todo: 0
gen[0].steps[1].sync_large_objects: 0
gen[1].steps[0].sync_todo: 0
gen[1].steps[0].sync_large_objects: 0

real 0m1.269s
user 0m1.922s
sys 0m0.042s


On Tue, Aug 18, 2009 at 8:17 PM, Don Stewart  wrote:

> k2msmith:
> > I'm using the Control.Parallel package on ghc version 6.10.4 and I don't
> seem
> > to be getting any parallel threads or sparks created at all with the
> > "-threaded" compilation option using runtime flags "+RTS -N2".  I'm using
> > simple examples from the paper "A Tutorial on Parallel and Concurrent
> > Programming in Haskell" by Jones and Singh.
> >
> > I'm running on an Intel Mac core 2 duo.  Does anyone know how I can check
> if
> > the parallel functionality in ghc is working on my 6.10.4 ghc package
> installed
> > on this platform ? I installed it from the "supported" runtime pkg for OS
> X
> > from the ghc website.
> >
>
> A simple parallel 'hello world'
>
>
> http://haskell.org/haskellwiki/Haskell_in_5_steps#Write_your_first_parallel_Haskell_program
>
__

[Haskell-cafe] Control.Parallel on 6.10.4 - Mac OS X version

2009-08-18 Thread Kevin Smith
I'm using the Control.Parallel package on ghc version 6.10.4 and I don't
seem to be getting any parallel threads or sparks created at all with the
"-threaded" compilation option using runtime flags "+RTS -N2".  I'm using
simple examples from the paper "A Tutorial on Parallel and Concurrent
Programming in Haskell" by Jones and Singh.
I'm running on an Intel Mac core 2 duo.  Does anyone know how I can check if
the parallel functionality in ghc is working on my 6.10.4 ghc package
installed on this platform ? I installed it from the "supported" runtime pkg
for OS X from the ghc website.

thanks
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] haskell embedded

2009-08-09 Thread Kevin Smith
Hello, I checked the Hugs User Manual and I didn't find any notes on this in
section 4. "Other Ways of Running Hugs".  can you point me to this section
or reference ?  thanks

On Sat, Aug 8, 2009 at 9:37 PM, Bulat Ziganshin
wrote:

> Hello Kevin,
>
> Sunday, August 9, 2009, 5:24:02 AM, you wrote:
>
> > Hello,  Could someone point me in the the direction of any
> > references for using Haskell as an embedded language in an
>
> hugs documentation notes how to embed Hugs into application
>
>
> --
> Best regards,
>  Bulatmailto:bulat.zigans...@gmail.com
>
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] haskell embedded

2009-08-08 Thread Kevin Smith
Hello,  Could someone point me in the the direction of any references for
using Haskell as an embedded language in an application. Xmonad seems to
come to mind because the configuration files are written using Haskell.  Any
other information ?  Thanks in advance.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] parallel haskell

2009-06-28 Thread Kevin Smith
I'm interested in doing some research with parallel programming using
Haskell (both multi-core on one machine and clusters using multiple
machines) but in going through the various resources on the web (looking at
GPH and others), it is not clear to me what the current state is as many of
the resources/projects have out of date information in them.
Any pointers ?  What parallel extensions are available in the current
version 6.10.3 ?  Which parallel extensions support clustered networks ?
 Where to start ?

Thanks
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] attaching a ghci session to another process

2009-05-28 Thread Kevin Smith
I am starting to get more involved with haskell programming and I'd like to
create a program where I can use the interactive loop in ghci to run a
haskell functions that create graphics in a separate openGL window.  This
would be a separate interactive window from the terminal i am running ghci
in and have it's own event-loop/thread of execution.   For a very simple
example, I would have a haskel function called "w = window" , which when
executed would create an openGL window (inside a seprate window manager
shell) and return an identifier to it.   A call to another fuinction might
be "obj = cube [..] w" whch would draw an cube in the window. etc.   The
openGL would have it's own event loop running to handle mouse/keyboard and
refresh events which means that I would be able to manipuolate the camera
with the mouse (pan, zoom, rotate etc.). This would be separate fromt he
ghci input loop running in the original terminal window.

The graphics part of this is easy for me, I have this implemented in other
langauges, but what i would like to do is create a functional programming
environment for prototyping in 3D, so I would like to have a haskell session
which I can "attach" to this 3D environment.

Any comments/feedback on the architecture/design of such a program would be
appreciated.

thanks
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe