From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.user Subject: object serialization Date: Sun, 06 Feb 2005 11:46:57 +0100 Message-ID: Reply-To: Mikael Djurfeldt NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1107686843 13462 80.91.229.2 (6 Feb 2005 10:47:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 6 Feb 2005 10:47:23 +0000 (UTC) Cc: djurfeldt@nada.kth.se Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Feb 06 11:47:23 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1CxjwZ-0006ot-S5 for guile-user@m.gmane.org; Sun, 06 Feb 2005 11:47:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxkAU-0001n4-4t for guile-user@m.gmane.org; Sun, 06 Feb 2005 06:01:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cxk9q-0001gF-O1 for guile-user@gnu.org; Sun, 06 Feb 2005 06:00:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cxk9p-0001fk-3S for guile-user@gnu.org; Sun, 06 Feb 2005 06:00:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cxk9o-0001fN-M3 for guile-user@gnu.org; Sun, 06 Feb 2005 06:00:48 -0500 Original-Received: from [213.212.20.77] (helo=kvast.blakulla.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CxjwS-0008OM-CD for guile-user@gnu.org; Sun, 06 Feb 2005 05:47:00 -0500 Original-Received: from mamaliga.blakulla.net ([213.212.20.147] helo=witch) by kvast.blakulla.net with esmtp (Exim 3.36 #1 (Debian)) id 1CxjwP-0005Rf-00; Sun, 06 Feb 2005 11:46:57 +0100 Original-Received: from mdj by witch with local (Exim 4.43) id 1CxjwP-0002fx-4w; Sun, 06 Feb 2005 11:46:57 +0100 Original-To: Mario Storti , guile-user@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org X-MailScanner-To: guile-user@m.gmane.org Xref: main.gmane.org gmane.lisp.guile.user:4212 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:4212 [Resending to list as well.] On Sat, 5 Feb 2005 11:40:36 -0600 (CST), Mario Storti wrote: > I=B4m writing a parallel Finite Element > (http://www.cimec.org.ar/petscfem) program and I=B4m making some > experiments with extending it with Guile. That's very exciting! I've written a neuron simulator which is parallelized with MPI and extended with Guile. (It's not publicly available right now. It's GPL:ed alright, but not in a releasable state and doesn't have enough docs.) > The program runs in parallel using Message Passing with the MPI Library > (http://www-unix.mcs.anl.gov/mpi/). I have wrapped some basic MPI > functions (MPI_Comm_rank,MPI_Comm_size,MPI_Recv and MPI_Wend), and it > seems to work fine, but I ask you people if someone knows of a port of > MPI to Guile. I've never seen one. I don't think it exists. However, I would welcome on= e! > When running in parallel I had to compile myself the Guile interpreter > since I need that all processes read and interpret the script. This > prevents me to using the interpreter in interactive form (when running > in parallel) because MPI does not broadcast the standard input to the > other processes. I think that this can be fixed by modifiying the REPL, > i.e. when running in interactive mode, in parallel, the REPL in the > master node should be in charge of broadcasting the standard input to > the nodes. Any ideas? Maybe you should have a look at how to implement custom port objects.=20 There should be some documentation in the reference manual and guile-readline is one example. The idea would then be that you interact with a master process with a custom standard input port. At every newline, it sends data to another kind of custom standard input port on the slaves. Once you have figured out how to make the ports, you can simply redirect input with: (set-current-input-port MY-PORT) > Also, i=B4m not very happy with the way I do the MPI initialization. I > had to write my own guile interpreter because MPI needs to have accesss > to the argc, argv arguments of main(), so that MPI initialization is > done _always_. I would like rather to have a Scheme `mpi-init' function > called by the user. My view on this situation is that since the installed Guile interpreter currently can't run any custom code before parsing its arguments and since MPI *has to* parse the arguments before that, there's no other choice but to write your own interpreter like you've done. > But, on the other hand I can=B4t do the finalization > in the `inner_main()=B4 because I receive a lot of `net_recv' errors > _before_ reaching the MPI_Finalize(). But this should be due to some synchronization problem in your program. Maybe everybody hasn't received all data before senders begin to finalize? Have you tried to but a call to MPI_Barrier right before MPI_Finalize? Best regards, Mikael D. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user