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 18F367EE99 for ; Wed, 8 Jan 2014 04:33:57 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of berenger@riken.jp) identity=pra; client-ip=134.160.33.175; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of berenger@riken.jp designates 134.160.33.175 as permitted sender) identity=mailfrom; client-ip=134.160.33.175; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of postmaster@postman.riken.jp designates 134.160.33.175 as permitted sender) identity=helo; client-ip=134.160.33.175; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="postmaster@postman.riken.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwBAPHFzFKGoCGvnGdsb2JhbABZg0O6RoEmDgEBAQEBBg0JCRQogiUBAQEDATgdGAsGCwsYCRYIBwkDAgECATQREwYCAQEFEodhCA3EOxeOXi2ENwSJQYxtgWmBMIUVjww X-IPAS-Result: ApwBAPHFzFKGoCGvnGdsb2JhbABZg0O6RoEmDgEBAQEBBg0JCRQogiUBAQEDATgdGAsGCwsYCRYIBwkDAgECATQREwYCAQEFEodhCA3EOxeOXi2ENwSJQYxtgWmBMIUVjww X-IronPort-AV: E=Sophos;i="4.95,621,1384297200"; d="scan'208";a="52177379" Received: from postman3.riken.jp (HELO postman.riken.jp) ([134.160.33.175]) by mail2-smtp-roc.national.inria.fr with ESMTP; 08 Jan 2014 04:33:55 +0100 Received: from postman.riken.jp (postman3.riken.jp [127.0.0.1]) by postman.riken.jp (Postfix) with SMTP id 1BD993838105 for ; Wed, 8 Jan 2014 12:33:52 +0900 (JST) Received: from [172.27.98.103] (rikad98.riken.jp [134.160.214.98]) by postman.riken.jp (Postfix) with ESMTPA id 532F02AE0001 for ; Wed, 8 Jan 2014 12:33:51 +0900 (JST) Message-ID: <52CCC71F.4040207@riken.jp> Date: Wed, 08 Jan 2014 12:33:51 +0900 From: Francois Berenger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: caml-list@inria.fr References: <1389126940.2692.4.camel@zotac> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.1.8.32114 Subject: Re: [Caml-list] Concurrent/parallel programming On 01/08/2014 11:35 AM, Yotam Barnoy wrote: > Thanks for the links and info, everyone. > > Gerd, would it be possible to put netmulticore up on opam? I think it should be included in the ocamlnet package that is in OPAM. > I realize > this is a sensitive topic for you, but from what I can tell, this is the > most comprehensive and efficient solution to parallel programming that > exists for ocaml, so why not make it as easily available as possible? > > Also, regarding the ocaml_modify() and ocaml_initialize() regression in > 4.01 -- yikes! Is there any way to get support back for writing outside > of the ocaml heap? This seems like a pretty big deal! (Sorry if I'm > arriving late for whatever discussion took place about this before). > > -Yotam > > > On Tue, Jan 7, 2014 at 3:35 PM, Gerd Stolpmann > wrote: > > There is Netmulticore, a part of Ocamlnet: > > http://projects.camlcity.org/projects/dl/ocamlnet-3.7.3/doc/html-main/Intro.html#ch_comp > > It utilizes shared memory, and accesses it from several processes. There > is no C code involved, but it is fairly unsafe nevertheless, because you > need to stick to certain programming rules, or the program crashes. > However, if you manage to encapsulate all the unsafe things, it is a > good option. I'm using Netmulticore in the Plasma Map/Reduce > implementation. > > Gerd > > Am Dienstag, den 07.01.2014, 14:54 -0500 schrieb Yotam Barnoy: > > 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 > > > > -- > ------------------------------------------------------------ > Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de > > My OCaml site: http://www.camlcity.org > Contact details: http://www.camlcity.org/contact.html > Company homepage: http://www.gerd-stolpmann.de > ------------------------------------------------------------ > > -- Best regards, Francois Berenger.