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 8C61B7EE99 for ; Tue, 7 Jan 2014 21:12:26 +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: AsUBAFNezFImacjlnGdsb2JhbABZhBi5aYEMHg4BAQEBAQYWCTyCJQEBAQRAAQErDAEPCwsNLiEBEgEFARwGE4dwAxEDAp11ixOEUgEFkUoNhGMRBoxxghMHhDeJR4xogWyMWoNOGCmEdw X-IPAS-Result: AsUBAFNezFImacjlnGdsb2JhbABZhBi5aYEMHg4BAQEBAQYWCTyCJQEBAQRAAQErDAEPCwsNLiEBEgEFARwGE4dwAxEDAp11ixOEUgEFkUoNhGMRBoxxghMHhDeJR4xogWyMWoNOGCmEdw X-IronPort-AV: E=Sophos;i="4.95,620,1384297200"; d="scan'208";a="52151489" 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:12:25 +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 1W0d0h-0006lh-Lb for caml-list@inria.fr; Tue, 07 Jan 2014 15:12:23 -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 1W0d0h-00018j-Ja for caml-list@inria.fr; Tue, 07 Jan 2014 15:12:23 -0500 Received: from mail-lb0-f170.google.com ([209.85.217.170]) by mxgoog2.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1W0d0h-0002Xm-E7 for caml-list@inria.fr; Tue, 07 Jan 2014 15:12:23 -0500 Received: by mail-lb0-f170.google.com with SMTP id c11so653440lbj.1 for ; Tue, 07 Jan 2014 12:12:22 -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=n6bxVFKHFa7wpny4rskBqGd/wtdTG79Y1ycD8RPNeQk=; b=TkjpnbEJr8UK2rB9N065kZ/WMtd68lxL8LmqrVIi6CjW0NT1P1IjmY14p4yJoBWDH1 p+Mc88WlGzcyL6Bg2nWLoZkrIm8kxzwtuYd/tSDN/72ETBxUAF17dZGJdtRdGcyzRliL tYp9lxK7+Udl6dlO1YpzhqFM8K5/MnLGhVsMs= 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=n6bxVFKHFa7wpny4rskBqGd/wtdTG79Y1ycD8RPNeQk=; b=iwYyfkXCxXzTjkQoG94LdcTdONsn0AZAvagdDiVIRHC0soHk61sVZ+1mlyQIu0B+/X CbbQt3ykiCVBHjNhdc8Tqw2Fj9sDmBB23bqkDzemAiaAMZSXigYFDJMze8+ZqmDQYyAD XiM6h4YgLkABJSB5PYvhydaY49tuVoBxBUb9HYHAtSsgDiHfnBKCzk7aZWOwa5AE0gQM hGaAeRFNf+EdDPXV6Wt3H8HBRZZDlJlblNPEh9NsGaUNgOM2YZQqZ6KB+nRGMI3ET+oN mUpQx+GEBtEZPsrBG5YqlOfBPHyatB5SicajeNLfrrN6bjZ1AO7NxfZHPFoPu8wxuyoc P0Pw== X-Gm-Message-State: ALoCoQnjX4gZjNxEK6+hT9QupG44OJZtzrN6iLbJzbTHo7sIuGrhF1UReXZGpvbZf6vlVJdZaeWmpI1mcnAHcQh767lne+jdvVXQZvj2bDHLmWRWFTXJ1iUq6pzTvnHOQ68zno9WevmTY5FlAM1ySgdQc/nfwN9Q7w== X-Received: by 10.152.20.6 with SMTP id j6mr46799605lae.8.1389125542779; Tue, 07 Jan 2014 12:12:22 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.152.20.6 with SMTP id j6mr46799545lae.8.1389125541363; Tue, 07 Jan 2014 12:12:21 -0800 (PST) Received: by 10.112.1.69 with HTTP; Tue, 7 Jan 2014 12:12:21 -0800 (PST) In-Reply-To: References: Date: Tue, 7 Jan 2014 15:12:21 -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 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