Version française
Home     About     Download     Resources     Contact us    
Browse thread
OC4MC : OCaml for Multicore architectures
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] OC4MC : OCaml for Multicore architectures
On Wednesday 23 September 2009 11:53:09 Goswin von Brederlow wrote:
> Has anyone tested this yet? Any success stories?

Well, I've used the build.sh script to build a patched OCaml 3.10.2 that 
identifies itself as:

$ ocamlopt -v
The Objective Caml native-code compiler, version 
3.10.2+patch-ocaml4multicore-20090823
Standard library 
directory: /home/jdh30/src/ocaml/parallel/oc4mc-20090823/ocaml-3.10.2/../out/lib/ocaml

and I've built their tests:

$ cd tests
$ make matmul.nc
ocamlopt -o "matmul.nc" -thread unix.cmxa threads.cmxa 
graphics.cmxa "matmul.ml"
File "matmul.ml", line 25, characters 8-13:
Warning Y: unused variable count.
File "matmul.ml", line 26, characters 8-16:
Warning Y: unused variable last_col.

and run them:

$ time ./matmul.nc 1000 8
Temp de calcul: utime 38.930433, stime 0.012000, rtime 38.943138
Fatal error: exception Invalid_argument("index out of bounds")

real    0m38.974s
user    0m38.942s
sys     0m0.028s

Note the exception that (I think) should have been caught and handled 
silently.

But I cannot get anything to run in parallel. None of the tests use more than 
one core and my own busy-wait-loops-on-two-threads test also runs only on one 
core. Any idea what I'm doing wrong? Is there a flag to enable it or 
something?

One possible cause: I'm running in a 64-bit chroot.

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e