From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,4486f278cc4730a7 X-Google-Attributes: gid103376,public From: gisle@struts.ii.uib.no (Gisle =?iso-8859-1?Q?S=E6lensminde?=) Subject: Re: Multiple partitions with GNAT 3.12p Date: 2000/11/15 Message-ID: #1/1 X-Deja-AN: 694009863 Content-Transfer-Encoding: 8bit References: <3A1284C8.58C2405D@CCI.de> <3A12AA18.87990C24@CCI.de> Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: abuse@uib.no X-Trace: toralf.uib.no 974314949 68808 129.177.17.22 (15 Nov 2000 19:02:29 GMT) Organization: University of Bergen Mime-Version: 1.0 User-Agent: slrn/0.9.6.2 (SunOS) NNTP-Posting-Date: 15 Nov 2000 19:02:29 GMT Newsgroups: comp.lang.ada Date: 2000-11-15T19:02:29+00:00 List-Id: In article <3A12AA18.87990C24@CCI.de>, Vincent Smeets wrote: >Gisle S�lensminde wrote: >> >> I presume you mean compilation unit, and not partition, that means >> something else in Ada95 terminology (Distributed programming) > >No, I mean partitions (from appendix E, Distributed programming). I'm so sorry. I made the "hello world" of GLADE, It have a procedure that multiply its input by three, and returns it, using a remote call interface. You must specify the pragma for this. I used the following program: package A is pragma remote_call_interface; function F(I : Integer) return Integer; end A; package body A is function F(I : Integer) return integer is begin return 3*I; end F; end A; with A; with Ada.Text_IO; procedure B is begin Ada.Text_IO.Put_line(A.F(3)'img); end B; To make a distributed app, I must make a config file, and run gnat on it. This file is called b_conf.cfg. "gekko" and "anakonda" are computers on my local net. The configuartion as used here requere a .rhost file which is a security risk. You can configure it to use ssh or start the partitions manually. configuration Bconf is pragma Starter (Ada); pragma Boot_Location ("tcp", "gekko:5557"); B_Part : Partition; for B_Part'Host use "gekko"; A_Part : Partition := (A); for A_Part'Host use "anakonda"; procedure B is in B_Part; end Bconf; Runing gnatdist I get: gisle@gekko:218> gnatdist bconf.cfg gnatdist: checking configuration consistency ------------------------------ ---- Configuration report ---- ------------------------------ Configuration : Name : bconf Main : b Starter : Ada code Protocol : tcp://gekko:5557 Partition b_part Main : b Host : gekko Units : - b (normal) Partition a_part Host : anakonda Units : - a (rci) ------------------------------- gnatdist: a caller stubs is up to date gnatdist: a receiver stubs is up to date gnatdist: building partition b_part gnatdist: building partition a_part gnatdist: generating starter b Time: 0:49.88 real 3.010 user 2.060 sys 10.1% gisle@gekko:219> b 9 gisle@gekko:220> -- Gisle S�lensminde ( gisle@ii.uib.no ) With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. (from RFC 1925)