From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 2D91CBBAF for ; Thu, 24 Sep 2009 02:02:01 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah8GACFUukrRVYTzkGdsb2JhbACCIGGOR4h4PwEBAQEJCQwHEwOqNIExj2oBAwIEhBcFgVg X-IronPort-AV: E=Sophos;i="4.44,441,1249250400"; d="scan'208";a="33398625" Received: from an-out-0708.google.com ([209.85.132.243]) by mail2-smtp-roc.national.inria.fr with ESMTP; 24 Sep 2009 02:02:00 +0200 Received: by an-out-0708.google.com with SMTP id d14so481523and.3 for ; Wed, 23 Sep 2009 17:01:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=EdxRmrP6IISw+d1wcJcqB3dawNumgirAJqdWXEyo3Qc=; b=Fbs7p3xJ6yfvtaPdkpPwIUr8TF1U1ha8GeGcvFIyM3hvMRwD2n4AsHzQhy/MVY+7MZ +q1aG1S6F709XBLC1fTdcasGVESZNMP/jhzPd2fXCTPWT/ai5v18CnsqGH3z0OlmZdZI WtM9FJNoOcgP2M52xeiSXa0m9IeNj6r/cN+kg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Zn/kQG4QpN8qAMeZU4cXYx33nkvVzUe29jxvBkEKTznmOQd/vw+C+fGRFDO4koWKIy DrCUZOORVwBurPm06zALz2WGv9D4aeTYW3q6kqLOdVAcRoaZDo76Z8BorSC58JvUKgaX IfxAX94W+GX73M6gGPxcgE4eymf4wx4C/XRRY= MIME-Version: 1.0 Received: by 10.101.27.20 with SMTP id e20mr3241487anj.137.1253750518288; Wed, 23 Sep 2009 17:01:58 -0700 (PDT) In-Reply-To: <200909240105.18288.jon@ffconsultancy.com> References: <200909240121.02123.jon@ffconsultancy.com> <4d1b2df20909231615t49deff43w2c27daad1c3effda@mail.gmail.com> <200909240105.18288.jon@ffconsultancy.com> Date: Thu, 24 Sep 2009 02:01:58 +0200 Message-ID: <4d1b2df20909231701l2248f7f7w841b1d5ece9aa62e@mail.gmail.com> Subject: Re: [Caml-list] OC4MC : OCaml for Multicore architectures From: Philippe Wang To: Jon Harrop Cc: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; ocaml:01 ocamlopt:01 ocamlopt:01 wget:01 wget:01 ocaml:01 cheers:01 lib:01 lib:01 runtime:01 runtime:01 -cclib:01 -cclib:01 -thread:01 cmxa:01 Ok... well, I guess that - whether it is something about your environment that is too different from ours (in which case build.sh is bad), - whether you have corrupted your installation (it could be by having a bad PATH value that makes original ocamlopt be mixed up with oc4mc ocamlopt) What I suggest is to use a default PATH (without modifying it for the purpose of OC4MC), and do these steps in a clean directory that is not included in PATH : 1) wget oc4mc-2009XXXX.tgz 2) tar xzf oc4mc-2009XXXX.tgz 3) cd oc4mc-2009XXXX 4) wget ocaml 3.10.2 (tar.gz or tar.bz2) 5) bash build.sh ... wait 6) cd test 7) make matmul.th 8) time matmul.th 1000 8 Sorry it's messy, we are thinking about something cleaner... (there's a matter of lack of time somewhere) cheers, --=20 Philippe Wang mail@philippewang.info On Thu, Sep 24, 2009 at 2:05 AM, Jon Harrop wrote: > On Thursday 24 September 2009 00:15:14 you wrote: >> make program.nc uses original ocamlopt >> >> make program.th uses the newly built ocamlopt with the necessary >> options (lib links) >> >> then you can compare program.nc and program.th > > Aha! Progress, but now I get errors: > > $ make matmul.th > ../out/bin/ocamlopt -ccopt -march=3Dnative -ccopt -mtune=3Dnative -ccopt = -O4 -I /home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../out/lib/ocaml= / -I /home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../runtime/gcs/sc_= par /home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../runtime/gcs/sc_p= ar/gci.o -cclib -lgc -cclib -g -thread > unix.cmxa threads.cmxa graphics.cmxa -verbose -compact -rectypes -inline > 100 -fno-PIC -cclib -lunix -cclib -lpthread "matmul.ml" -o "matmul.th" > 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. > + as -o matmul.o /tmp/camlasm081590.s > + as -o /tmp/camlstartupdac3e2.o /tmp/camlstartup8f7152.s > + > gcc -o 'matmul.th' -I'/home/jdh30/src/ocaml/parallel/oc4mc-20090823/oca= ml-3.10.2/../out/lib/ocaml' -march=3Dnative -mtune=3Dnative -O4 '/tmp/camls= tartupdac3e2.o' '/home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../out= /lib/ocaml/std_exit.o' 'matmul.o' '/home/jdh30/src/ocaml/parallel/oc4mc-200= 90823/tests/../out/lib/ocaml/graphics.a' '/home/jdh30/src/ocaml/parallel/oc= 4mc-20090823/ocaml-3.10.2/../out/lib/ocaml/threads/threads.a' '/home/jdh30/= src/ocaml/parallel/oc4mc-20090823/tests/../out/lib/ocaml/unix.a' '/home/jdh= 30/src/ocaml/parallel/oc4mc-20090823/tests/../out/lib/ocaml/stdlib.a' '-L/= home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../out/lib/ocaml/' '-L/h= ome/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../runtime/gcs/sc_par' '-= L/home/jdh30/src/ocaml/parallel/oc4mc-20090823/ocaml-3.10.2/../out/lib/ocam= l/threads' '-L/home/jdh30/src/ocaml/parallel/oc4mc-20090823/ocaml-3.10.2/..= /out/lib/ocaml' '-lgraphics' '-lX11' '-lthreadsnat' '-lunix' '-lpthread' '-= lunix' '/home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../runtime/gcs/= sc_par/gci.o' '-lgc' '-g' '-lunix' '-lpthread' '/home/jdh30/src/ocaml/paral= lel/oc4mc-20090823/tests/../out/lib/ocaml/libasmrun.a' -lm -ldl > /home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../out/lib/ocaml/liba= smrun.a(memory.o): > In function `gc_end_roots': > memory.c:(.text+0x10): multiple definition of `gc_end_roots' > /home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../runtime/gcs/sc_par= /gci.o:/home/jdh30/src/ocaml/parallel/oc4mc-20090823/runtime/gcs/sc_par/gci= .c:948: > first defined here > /home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../out/lib/ocaml/liba= smrun.a(memory.o): > In function `gc_begin_roots': > memory.c:(.text+0x12): multiple definition of `gc_begin_roots' > /home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../runtime/gcs/sc_par= /gci.o:/home/jdh30/src/ocaml/parallel/oc4mc-20090823/runtime/gcs/sc_par/gci= .c:947: > first defined here > /home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../out/lib/ocaml/liba= smrun.a(finalise.o): > In function `caml_final_do_strong_roots': > finalise.c:(.text+0x0): multiple definition of `caml_final_do_strong_root= s' > /home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../runtime/gcs/sc_par= /gci.o:/home/jdh30/src/ocaml/parallel/oc4mc-20090823/runtime/gcs/sc_par/gci= .c:301: > first defined here > /home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../runtime/gcs/sc_par= /gci.o: > In function `stop_the_world': > gci.c:(.text+0x38e): undefined reference to `caml_all_threads' > gci.c:(.text+0x403): undefined reference to `caml_all_threads' > gci.c:(.text+0x410): undefined reference to `caml_all_threads' > gci.c:(.text+0x48a): undefined reference to `caml_all_threads' > /home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../runtime/gcs/sc_par= /gci.o: > In function `resume_the_world': > gci.c:(.text+0x4c4): undefined reference to `caml_all_threads' > /home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../runtime/gcs/sc_par= /gci.o:gci.c: > (.text+0x57c): more undefined references to `caml_all_threads' follow > /home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../runtime/gcs/sc_par= /gci.o: > In function `termination_action': > gci.c:(.text+0x1e94): undefined reference to `remove_thread_from_list' > /home/jdh30/src/ocaml/parallel/oc4mc-20090823/tests/../runtime/gcs/sc_par= /gci.o: > In function `gc_terminate_local': > gci.c:(.text+0x1fe5): undefined reference to `remove_thread_from_list' > collect2: ld returned 1 exit status > Error during linking > make: *** [matmul.th] Error 2 > > -- > Dr Jon Harrop, Flying Frog Consultancy Ltd. > http://www.ffconsultancy.com/?e >