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=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 517D3BC6B for ; Wed, 23 Jan 2008 12:43:43 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAKm2lkfAXQInh2dsb2JhbACQFwEBAQgKKZx/ X-IronPort-AV: E=Sophos;i="4.25,238,1199660400"; d="scan'208";a="21662231" Received: from concorde.inria.fr ([192.93.2.39]) by mail4-smtp-sop.national.inria.fr with ESMTP; 23 Jan 2008 12:43:42 +0100 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m0NBhe6f019504 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Wed, 23 Jan 2008 12:43:42 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAABi3lkfU4367nmdsb2JhbACQFwEBAQEBBgIIBwoYnHw X-IronPort-AV: E=Sophos;i="4.25,238,1199660400"; d="scan'208";a="8232848" Received: from moutng.kundenserver.de ([212.227.126.187]) by mail3-smtp-sop.national.inria.fr with ESMTP; 23 Jan 2008 12:43:42 +0100 Received: from [152.78.96.56] (babylon.cip.physik.uni-muenchen.de [141.84.136.30]) by mrelayeu.kundenserver.de (node=mrelayeu0) with ESMTP (Nemesis) id 0MKwh2-1JHe160onM-0005nd; Wed, 23 Jan 2008 12:43:40 +0100 Message-ID: <47972A93.7040202@functionality.de> Date: Wed, 23 Jan 2008 11:52:51 +0000 From: Thomas Fischbacher User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060607 Debian/1.7.12-1.2 X-Accept-Language: en MIME-Version: 1.0 To: Olivier Andrieu Cc: Caml-list List Subject: Re: [Caml-list] CamlMPI: sending marshalled objects References: <47963B6C.1010301@functionality.de> <95513600801230215k4798b826tfe6c0a38620ca73d@mail.gmail.com> In-Reply-To: <95513600801230215k4798b826tfe6c0a38620ca73d@mail.gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+viJskqm3x1FLfaGCupM6VtoRMdXfvc2AIMLf g2EdHd+qoU9oi//UH7WKA2oqMuNYGcjY+k6cJcFCxPgI25+1Zs GrNYh+lfJ4DyecjGOTTew== X-Miltered: at concorde with ID 4797286C.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; rewrote:01 malloc:01 serialize:01 alloc:01 buffer:01 bigarrays:01 iirc:01 buffer:01 ocamlmpi:01 ocaml:01 1998.:98 exception:01 caml-list:01 conventions:02 data:02 Olivier, >>there is an old Caml/MPI interface, written by Xavier himself in 1998. > > I've been using this interface some time ago (in 2006). I rewrote it a > bit to bring it up-to-date with the current conventions. Good to know. (I'd like to incorporate this into our own code then.) >>As far as I can see, output_value_to_malloc() actually should be able to >>serialize virtually any ML object (which does not contain alloc_custom() >>blocks and similar stuff) to a buffer. > > some custom blocks such as Bigarrays can be serialised too. Of course. >>So, (1) what is going on here, and (2) how can I repair it? >>Is there a quick fix? > > I'm not sure what is going on, I was able to transmit large marshalled > values IIRC. What I observe (using some extra debugging code) is that doing a small problem where this particular send buffer is ~10MB works as expected, while I reproducibly get a crash in the receiver if I send a ML value which serializes to a 20 MB buffer. Sending suggests to be okay, though. > One serious problem in the current code is the treatment of errors. > Ocamlmpi registers an error handler that raises an OCaml exception. > However, should an error occur during MPI_Send, the handler is invoked > with the global mutex released since MPI_Send is between > enter/leave_blocking_section. Maybe that's what causing the crash. I do not think this is what gives me trouble. As I said, small problems work, but large ones (which do the same stuff, only contain a larger amount of data) do not. -- best regards, Thomas Fischbacher t.fischbacher@soton.ac.uk