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 C1A2B7EE99 for ; Tue, 7 Jan 2014 21:35:47 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=pra; client-ip=212.227.17.8; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=mailfrom; client-ip=212.227.17.8; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of postmaster@moutng.kundenserver.de designates 212.227.17.8 as permitted sender) identity=helo; client-ip=212.227.17.8; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="postmaster@moutng.kundenserver.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuoBAE9kzFLU4xEIm2dsb2JhbABZg0ODU7ZsgRQWDgEBAQEBBgsLCRQogiYBAQQjMhgMEAtCAgJXBhMJh38JqW+aKReJOYUlJgeCL0CBSASPBopBhRAFjn4 X-IPAS-Result: AuoBAE9kzFLU4xEIm2dsb2JhbABZg0ODU7ZsgRQWDgEBAQEBBgsLCRQogiYBAQQjMhgMEAtCAgJXBhMJh38JqW+aKReJOYUlJgeCL0CBSASPBopBhRAFjn4 X-IronPort-AV: E=Sophos;i="4.95,620,1384297200"; d="asc'?scan'208";a="52153304" Received: from moutng.kundenserver.de ([212.227.17.8]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 07 Jan 2014 21:35:47 +0100 Received: from office1.lan.sumadev.de (dslb-178-004-065-004.pools.arcor-ip.net [178.4.65.4]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0Mh8o1-1Vnepn3cWH-00MdgZ; Tue, 07 Jan 2014 21:35:47 +0100 Received: from [192.168.0.110] (ip-109-90-191-98.unitymediagroup.de [109.90.191.98]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id 712C1C00D3; Tue, 7 Jan 2014 21:35:46 +0100 (CET) Message-ID: <1389126940.2692.4.camel@zotac> From: Gerd Stolpmann To: Yotam Barnoy Cc: Ocaml Mailing List Date: Tue, 07 Jan 2014 21:35:40 +0100 In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-eI9s83zlPUdakkdHnVDF" X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 X-Provags-ID: V02:K0:xHMEo9yg5Z7w5G+Edw4OxqUpBkSKb/agWB6ntyAk3r0 Dum8dvcyBX6j6nekdCVW5zSV40H1sZzARFty3XOGH0HaP3Hn0c W83lHd7rHoP8vylRj6UGRfkY53a5mzWxGC6jo2h9CzYUtc9B6Q MzqezCSfDGAyhBpubel1WfHEZWHFCcLz9EqGQwiDXlPr6DYwh7 uxNu/Mxh2kZtt6lZItYwp/MgmtiFnKAvrzdx2Y7ibhytzYW8XQ vvA4FaFlHjDCGLkRkLNezXJJHjdteJJaPKQF+r7lNEAuQFexlT TJTaL/LNudndYWOmhdQdR0vRs+H93NHNY+pfEjdEHqXwAThZIQ SjNXzqKzi4s13nqhrEd4= Subject: Re: [Caml-list] Concurrent/parallel programming --=-eI9s83zlPUdakkdHnVDF Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 >=20 >=20 > 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. >=20 >=20 > 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? >=20 >=20 > 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. >=20 >=20 > Thanks >=20 > Yotam >=20 --=20 ------------------------------------------------------------ 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 ------------------------------------------------------------ --=-eI9s83zlPUdakkdHnVDF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAABAgAGBQJSzGUcAAoJEAaM4b9ZLB5TmgMH/0pd9hq5weecFnRbMwvBsLxt /37afgntGUq00XFBfnx5Y7Pfh8DPIwwseah3+qI+e5bnB4MwQ8G2SJUFuQwJJcFH 7ymSSYdgP+jMyh7vwwLL2Xz5bJRI/AEQb1RLpsBDZtVvcVyoaLBm8edTZ35rKTFZ b1/Pq4VTeJQHfex77Rc7Ar2GGxwrmGSKuny7o/1k59YlQEw/RBNyGSolP+NaVj4p rRzZAQtRvme37W6EbbDyWgiy9gGNOehOg3Ynlq5tmPDSMbb+kW7uQ+6muoHko8t7 QSlxaFf65G8VctESeIN3dW0PgzpjJaH6H3CSB67SznyJ7txJV7xBX9D1AIhw13Q= =IiX/ -----END PGP SIGNATURE----- --=-eI9s83zlPUdakkdHnVDF--