From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 57F697EE99 for ; Tue, 7 Jan 2014 21:21:46 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of yminsky@janestreet.com) identity=pra; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yminsky@janestreet.com"; x-sender="yminsky@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of yminsky@janestreet.com designates 38.105.200.229 as permitted sender) identity=mailfrom; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yminsky@janestreet.com"; x-sender="yminsky@janestreet.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@tot-dmz-mxout1.janestreet.com) identity=helo; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yminsky@janestreet.com"; x-sender="postmaster@tot-dmz-mxout1.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsUBAMhgzFImacjlnGdsb2JhbABZhBi5aoEMHg4BAQEBAQYWCTyCJQEBAQRAAQErDAEPCwsNLiEBEgEFARwGE4dwAxEDAp13ixOEUgEFkUkNhGMRBoxxgTERAVAHhDeJR4xogWyMWoNOGCmEd4FT X-IPAS-Result: AsUBAMhgzFImacjlnGdsb2JhbABZhBi5aoEMHg4BAQEBAQYWCTyCJQEBAQRAAQErDAEPCwsNLiEBEgEFARwGE4dwAxEDAp13ixOEUgEFkUkNhGMRBoxxgTERAVAHhDeJR4xogWyMWoNOGCmEd4FT X-IronPort-AV: E=Sophos;i="4.95,620,1384297200"; d="scan'208";a="52152340" Received: from mx5.janestreet.com (HELO tot-dmz-mxout1.janestreet.com) ([38.105.200.229]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Jan 2014 21:21:45 +0100 Received: from tot-oib-smtp1.delacy.com ([172.27.22.15] helo=tot-smtp) by tot-dmz-mxout1.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1W0d9l-0007dV-41 for caml-list@inria.fr; Tue, 07 Jan 2014 15:21:45 -0500 Received: from tot-dmz-mxgoog1.delacy.com ([172.27.224.14] helo=mxgoog2.janestreet.com) by tot-smtp with esmtps (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1W0d9l-00037W-2q for caml-list@inria.fr; Tue, 07 Jan 2014 15:21:45 -0500 Received: from mail-la0-f51.google.com ([209.85.215.51]) by mxgoog2.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1W0d9k-0002uh-Ri for caml-list@inria.fr; Tue, 07 Jan 2014 15:21:44 -0500 Received: by mail-la0-f51.google.com with SMTP id ec20so482629lab.24 for ; Tue, 07 Jan 2014 12:21:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2PHWv14qqQVdZWLtHr5gH1Oo9K6zr2HDO6KbbzdVmNE=; b=vD0DHG70lmn/OjwlN+M/lCIYJEQupugcjFW2mZwU+Soh960KAFVKjN2ePdjK41Ugka /uBUdFBflB5mPncKHnWF8EMrTns1PAd+VMYweEPVfwZAKASk33WfAyzXxhES95Ksjb3N Dro1xDKoxE4u44zfhVVW4dg002WpQJ7mNLOdY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=2PHWv14qqQVdZWLtHr5gH1Oo9K6zr2HDO6KbbzdVmNE=; b=IxRIWMg7l8m4o3wz2JyeAqMh2zlY63WVpielH2Zbnj4PXZ0P2ZMP6nZK4y6w76LB8C fGKCTkpped/RsmROHDbUUFtunGlQ0h4qLxHHm+DnjlS9T9niBXucCtMrX9s8sZLR3DIM NOPOjakXTlqwqCBvzl1J8pVF5RdJc1JpeDDuGl5CYnJXX/oDhcYYiGP0aMDDkZiJXHOw IpgloycEsmr01W9ntQJXTIYvzxKGOzmgxJ2G3Kh3DpsBv3hTzOoN961pBknfDZqOC8iY yuxLpUs9xCKaXiAKLePbPSl5TiIyEFsdI6P3XZIaWs6Drb59DBQTECp/wN3nUPZfuj8o Kf1A== X-Gm-Message-State: ALoCoQnRiefSWNUOQkq4EVre3uFAu/kws7PYJXHIGS41fJZhfjB0r11NYxjN+qdJVQbi0wUVDBzvxy3egxaPAz4RBpXKK9QFMHPKk03JWyoFYq/LPvIZ6Sfg2NJ4JVoRze/v9zQgMOEr666cfuT+yuDX4I3JFdEbVQ== X-Received: by 10.112.64.10 with SMTP id k10mr3359914lbs.86.1389126104200; Tue, 07 Jan 2014 12:21:44 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.112.64.10 with SMTP id k10mr3359911lbs.86.1389126104137; Tue, 07 Jan 2014 12:21:44 -0800 (PST) Received: by 10.112.1.69 with HTTP; Tue, 7 Jan 2014 12:21:44 -0800 (PST) In-Reply-To: References: Date: Tue, 7 Jan 2014 15:21:44 -0500 Message-ID: From: Yaron Minsky To: Yotam Barnoy Cc: Ocaml Mailing List , Eric Stokes Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] Concurrent/parallel programming It's also probably worth trying to understand what went wrong with parmap. Might make sense to email their dev list... y On Tue, Jan 7, 2014 at 3:12 PM, Yaron Minsky wrote: > This is indeed something that is not well covered in RWO. That said, > the Async_parallel library is aimed at this kind of target. No shared > memory region, just some automation around spinning up processes and > communicating jobs between them. > > CC'ing Eric Stokes, who is the primary author of the library. > > y > > > On Tue, Jan 7, 2014 at 2:54 PM, Yotam Barnoy wrote: >> Hi List >> >> So far, I've been programming in ocaml using only sequential programs. In my >> last project, which was an implementation of a large machine learning >> algorithm, I tried to speed up computation using a little bit of parallelism >> with ParMap, and it was a complete failure. It's possible that more time >> would have yielded better results, but I just didn't have the time to invest >> in it given how bad the initial results were. >> >> My question is, what are the options right now as far as parallelism is >> concerned? I'm not talking about cooperative multitasking, but about really >> taking advantage of multiple cores. I'm well aware of the runtime lock and >> I'm ok with message passing between processes or a shared area in memory, >> but I'd rather have something more high level than starting up several >> processes, creating a named pipe or a socket, and trying to pass messages >> through that. Also, I assume that using a shared area in memory involves >> some C code? Am I wrong about that? >> >> I was expecting Core's Async to fill this role, but realworldocaml is fuzzy >> on this topic, apparently preferring to dwell on cooperative multitasking >> (which is fine but not what I'm looking for), and I couldn't find any other >> documentation that was clearer. >> >> Thanks >> Yotam