comp.lang.ada
 help / color / mirror / Atom feed
* Gnat Glade newbie questions
@ 2004-03-25 11:07 Roger Blum
  2004-03-25 19:34 ` Ludovic Brenta
  0 siblings, 1 reply; 6+ messages in thread
From: Roger Blum @ 2004-03-25 11:07 UTC (permalink / raw)


Hello

I'm new to gnat glade and im trying to build a framework for distributed
Monte-Carlo simulations.
Input (scenario and base data) comes from an Oracle database; output is
written into the same DB.
Statistical analysis of simulation results is then performed in the DB
itself.
I have a working system which is based on strictly sequential processing.

Now I intend to distribute the processing as follows:
-----------------------------------------------------
- Kind of 'shared memory' for base data (e.g. digital elevation model for
line of sight calculations)
- A worker process executing one independent 'run' of the whole simulation
- A master process spawning the desired amount of worker processes (runs)

My idea:
--------
- The base data:
  One process (an executable running as a service / an Ada task with
different entries accessing a
  protected object) acting as a server. Available to any worker process.
  Package categorized as REMOTE_CALL_INTERFACE (or SHARED_PASSIVE?).
- The worker process:
  Another executable
  Packages reading data from base data categorized as REMOTE_CALL_INTERFACE
or no categorization
  at all?
- The master:
  Starting worker processes with
GNAT.OS_LIB.NON_BLOCKING_SPAWN("worker.exe", args) as just creating
  Ada tasks wouldn't be enough to be migrated on openMosix (the target
platform).
  Probably no categorization necessary.

Now my questions:
-----------------
- All my tries to build and use GNAT Glade 3.15p from the source failed.
  Has anybody a working binary of GNAT Glade 3.15p for Windows and/or Linux
  (gnatdist and Garlic) or how can I build it from source without a lot of
error messages?

- Can gnatdist build all the necessary executables just on the base of
correct categorization
  of the packages or do I have to create 3 main procedures/packages?

- How can the worker get aware of the presence of the base data?

- Will the distributed processes generated that way migrate on openMosix?

- Has anybody experiences made with Ada / MPI or PVM?

Any help / information / suggestion is very much appreciated!

Thanks
Roger





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Gnat Glade newbie questions
  2004-03-25 11:07 Gnat Glade newbie questions Roger Blum
@ 2004-03-25 19:34 ` Ludovic Brenta
  2004-03-25 22:22   ` Duncan Sands
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ludovic Brenta @ 2004-03-25 19:34 UTC (permalink / raw)


"Roger Blum" <roger_blum@swissonline.ch> writes:

> - All my tries to build and use GNAT Glade 3.15p from the source failed.
>   Has anybody a working binary of GNAT Glade 3.15p for Windows and/or Linux
>   (gnatdist and Garlic) or how can I build it from source without a lot of
>   error messages?

Use Debian.  gnat and glade are there, precompiled for you.  If you
choose Woody (the latest, but ageing, stable version) these will be
3.14p.  If you choose Sarge (the upcoming stable version, currently in
testing), these will be 3.15p.

FWIW, I didn't have too much trouble compiling GNAT or GLADE, but you
can save yourself the sweat by using the precompiled packages.

> - Can gnatdist build all the necessary executables just on the base
>   of correct categorization of the packages or do I have to create 3
>   main procedures/packages?

You only write one main procedure.  gnatdist uses the configuration
pragmas and a configuration file to produce as many executables as
necessary.

> - How can the worker get aware of the presence of the base data?

This is also documented.  You can choose between static and dynamic
remote calls, but I don't know the details.

> - Will the distributed processes generated that way migrate on openMosix?

I don't know.  I don't know what openMosix is.

> - Has anybody experiences made with Ada / MPI or PVM?

What are these?

-- 
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Gnat Glade newbie questions
  2004-03-25 19:34 ` Ludovic Brenta
@ 2004-03-25 22:22   ` Duncan Sands
  2004-03-25 23:11   ` Ludovic Brenta
  2004-04-05  8:52   ` Roger Blum
  2 siblings, 0 replies; 6+ messages in thread
From: Duncan Sands @ 2004-03-25 22:22 UTC (permalink / raw)
  To: Ludovic Brenta, comp.lang.ada

On Thursday 25 March 2004 20:34, Ludovic Brenta wrote:
> "Roger Blum" <roger_blum@swissonline.ch> writes:
> > - All my tries to build and use GNAT Glade 3.15p from the source failed.
> >   Has anybody a working binary of GNAT Glade 3.15p for Windows and/or
> > Linux (gnatdist and Garlic) or how can I build it from source without a
> > lot of error messages?

You need to compile with gnat 3.15p.  Also, you may need to run autoconf
(or something like that, I forget what, maybe automake).

> > - Can gnatdist build all the necessary executables just on the base
> >   of correct categorization of the packages or do I have to create 3
> >   main procedures/packages?

You need to supply gnatdist with a configuration file (see the documentation).

> > - Will the distributed processes generated that way migrate on openMosix?

No (I tried it once).  openMosix won't migrate multithreaded programs, and glade
adds some threads to your program to handle the remote procedure calls.

Duncan.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Gnat Glade newbie questions
  2004-03-25 19:34 ` Ludovic Brenta
  2004-03-25 22:22   ` Duncan Sands
@ 2004-03-25 23:11   ` Ludovic Brenta
  2004-04-05  8:52   ` Roger Blum
  2 siblings, 0 replies; 6+ messages in thread
From: Ludovic Brenta @ 2004-03-25 23:11 UTC (permalink / raw)



(Duncan Sands <baldrick@free.fr> replied to me privately and
comp.lang.ada@ada-france.org, but I did not see his reply on the
newsgroup.  I forward it here -- Ludovic Brenta.)

On Thursday 25 March 2004 20:34, Ludovic Brenta wrote:
> "Roger Blum" <roger_blum@swissonline.ch> writes:
> > - All my tries to build and use GNAT Glade 3.15p from the source failed.
> >   Has anybody a working binary of GNAT Glade 3.15p for Windows and/or
> > Linux (gnatdist and Garlic) or how can I build it from source without a
> > lot of error messages?

You need to compile with gnat 3.15p.  Also, you may need to run autoconf
(or something like that, I forget what, maybe automake).

> > - Can gnatdist build all the necessary executables just on the base
> >   of correct categorization of the packages or do I have to create 3
> >   main procedures/packages?

You need to supply gnatdist with a configuration file (see the
documentation).

> > - Will the distributed processes generated that way migrate on openMosix?

No (I tried it once).  openMosix won't migrate multithreaded programs,
and glade adds some threads to your program to handle the remote
procedure calls.

Duncan.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Gnat Glade newbie questions
  2004-03-25 19:34 ` Ludovic Brenta
  2004-03-25 22:22   ` Duncan Sands
  2004-03-25 23:11   ` Ludovic Brenta
@ 2004-04-05  8:52   ` Roger Blum
  2004-04-06 12:13     ` Laurent Pautet
  2 siblings, 1 reply; 6+ messages in thread
From: Roger Blum @ 2004-04-05  8:52 UTC (permalink / raw)


Hello Ludovic and Duncan,

Thanks a lot for your replies and sorry for my late answer, but I've been
out of town for a couple of days.

I 've found installation instructions for glade on Linux at
http://www.univ-orleans.fr/SCIENCES/INFO/RESSOURCES/doc-install-gnat-linux.html.
Althoug anything didn't behave as described, I finally succeeded in building
GLADE 3.15p on Linux.
But when I do a gnatmake for my test programs, I get an error (s-stratt.adb
has to be recompiled), so something still is wrong.
Do you know how to fix this problem?

About migration on openMosix (a Linux Kernel extension for building Clusters
with automatic process migration (in a view simple words)):
Do no processes (partitions) migrate on openMosix, or is it just the server
partition containing the routines called by RPC?
If processes definitively do not migrate on openMosix, then GLADE is not an
option for me, and I have to find another way to implement
the distributed version of my simulation software.

About PVM and MPI:
PVM is an integrated set of software tools and libraries that emulates a
general-purpose, flexible, heterogeneous parallel computing
framework on interconnected computers of varied architecture. (From 'Beowulf
Cluster Computing with Linux').
MPI is a standardized specification of a Message Passing Interface. It's
implementations support the writing of parallel programs.
Both are mainly used by C/C++ routines and I've even found a link to an Ada
binding (maybe outdated). I will continue investigating these
two as possibilities, too.

Debian is not an option for me at the moment as the simulation platform is
fix (Linux / openMosix).

Thanks again,
Roger


"Ludovic Brenta" <ludovic.brenta@insalien.org> schrieb im Newsbeitrag
news:87u10c4t5y.fsf@insalien.org...
> "Roger Blum" <roger_blum@swissonline.ch> writes:
>
> > - All my tries to build and use GNAT Glade 3.15p from the source failed.
> >   Has anybody a working binary of GNAT Glade 3.15p for Windows and/or
Linux
> >   (gnatdist and Garlic) or how can I build it from source without a lot
of
> >   error messages?
>
> Use Debian.  gnat and glade are there, precompiled for you.  If you
> choose Woody (the latest, but ageing, stable version) these will be
> 3.14p.  If you choose Sarge (the upcoming stable version, currently in
> testing), these will be 3.15p.
>
> FWIW, I didn't have too much trouble compiling GNAT or GLADE, but you
> can save yourself the sweat by using the precompiled packages.
>
> > - Can gnatdist build all the necessary executables just on the base
> >   of correct categorization of the packages or do I have to create 3
> >   main procedures/packages?
>
> You only write one main procedure.  gnatdist uses the configuration
> pragmas and a configuration file to produce as many executables as
> necessary.
>
> > - How can the worker get aware of the presence of the base data?
>
> This is also documented.  You can choose between static and dynamic
> remote calls, but I don't know the details.
>
> > - Will the distributed processes generated that way migrate on
openMosix?
>
> I don't know.  I don't know what openMosix is.
>
> > - Has anybody experiences made with Ada / MPI or PVM?
>
> What are these?
>
> -- 
> Ludovic Brenta.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Gnat Glade newbie questions
  2004-04-05  8:52   ` Roger Blum
@ 2004-04-06 12:13     ` Laurent Pautet
  0 siblings, 0 replies; 6+ messages in thread
From: Laurent Pautet @ 2004-04-06 12:13 UTC (permalink / raw)


"Roger Blum" <roger_blum@swissonline.ch> writes:

> Hello Ludovic and Duncan,
>
> I 've found installation instructions for glade on Linux at
> http://www.univ-orleans.fr/SCIENCES/INFO/RESSOURCES/doc-install-gnat-linux.html.
> Althoug anything didn't behave as described, I finally succeeded in building
> GLADE 3.15p on Linux.
> But when I do a gnatmake for my test programs, I get an error (s-stratt.adb
> has to be recompiled), so something still is wrong.
> Do you know how to fix this problem?

This is a well-known issue. GLADE has its own s-stratt.adb based on
XDR in order to work between heterogeneous machines. GNAT has a
s-stratt.adb implementation based on memory copies (which only works
in homogeneous systme). You have to stick with only one
implementation. The best way would be to always use gnatdist.

--
--  Laurent



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-04-06 12:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-25 11:07 Gnat Glade newbie questions Roger Blum
2004-03-25 19:34 ` Ludovic Brenta
2004-03-25 22:22   ` Duncan Sands
2004-03-25 23:11   ` Ludovic Brenta
2004-04-05  8:52   ` Roger Blum
2004-04-06 12:13     ` Laurent Pautet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox