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=1.9 required=5.0 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 9AA9BBC69 for ; Fri, 9 Feb 2007 15:24:16 +0100 (CET) Received: from smtp16.orange.fr (smtp16.orange.fr [193.252.23.89]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l19EOGZZ010920 for ; Fri, 9 Feb 2007 15:24:16 +0100 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1604.orange.fr (SMTP Server) with ESMTP id 1845B7000091; Fri, 9 Feb 2007 15:24:14 +0100 (CET) Received: from wwinf1630 (wwinf1630 [172.22.147.104]) by mwinf1604.orange.fr (SMTP Server) with ESMTP id 0D9707000090; Fri, 9 Feb 2007 15:24:14 +0100 (CET) X-ME-UUID: 20070209142414557.0D9707000090@mwinf1604.orange.fr From: Frederic GAVA Reply-To: frederic.gava@wanadoo.fr To: Brian Hurt , ls-ocaml-developer-2006@m-e-leypold.de Cc: caml-list@yquem.inria.fr Message-ID: <25200556.147861171031054008.JavaMail.www@wwinf1630> Subject: Re: [Caml-list] Multiplication of matrix in C and OCaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [194.214.15.155] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~||~| X-WUM-CC: |~| X-WUM-REPLYTO: |~| Date: Fri, 9 Feb 2007 15:24:14 +0100 (CET) X-j-chkmail-Score: MSGID : 45CC8410.000 on concorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at concorde with ID 45CC8410.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; gava:01 gava:01 ocaml:01 printf:01 usefull:01 ric:98 caml-list:01 frederic:03 frederic:03 mpi:04 mpi:04 parallel:05 parallel:05 initialize:05 timer:08 > For the C side, I recommend using clock() to time the runs. This also=20 > factors out the cost of creating the random matricies. Basically, you=20 > just do: >=20 > #include=20 >=20 > ... > { > clock_t start, stop; > ... > start =3D clock(); > /* stuff to time here */ > stop =3D clock(); > printf("The amount of time taken =3D %f seconds\n",=20 > ((double)(stop-start))/((double) CLOCKS_PER_SEC)); > /* write result to file */ > } Many parallel C libraries have also there own timer. MPI=3D> MPI_Wtime BSPlib =3D> bsp_time PVM=3D>... It is very usefull because they do not take into account time to initialize= the parallel machine... Fr=C3=A9d=C3=A9ric Gava