From: anon@anon.org (anon)
Subject: Re: Direct Quote from the RM
Date: Tue, 20 Nov 2007 13:43:13 GMT
Date: 2007-11-20T13:43:13+00:00 [thread overview]
Message-ID: <RvB0j.33606$if6.33572@bgtnsc05-news.ops.worldnet.att.net> (raw)
In-Reply-To: 4740d5f0$0$27131$9b4e6d93@newsspool1.arcor-online.net
For Georg Bauhaus
As for parallel, I was talking about compiling up to 3_000 packages or
files used in a partition for a computer system with 4GB. Not all parallel
operations are about threads or a thread hopping onto different
processor's job schedulers. In this parallel design the system can contain
up to 3_000 copies of "gcc", "gnat1" and "as" in memory and excuting
in parallel design with each other to utilize the cpu and memory to the
fullest! In other words,
Task 1 in memmory -> (copy #1 of gnat compiler system) + (package 1)
Task 2 in memmory -> (copy #2 of gnat compiler system) + (package 2)
Task 3 in memmory -> (copy #3 of gnat compiler system) + (package 3)
...
Task N in memmory -> (copy #4 of gnat compiler system) + (package N)
Note: "gnat compiler system" is "gcc" and "gnat1" and as", which is
done by the "gnat compile" command or "gcc -c".
In this design it does not matter the number of processors or the number
of threads. This can be done by creating a script file like (linux version):
#script
#
gnat compile <name1>.adb &
gnat compile <name2>.adb &
gnat compile <name3>.adb &
..
gnat compile <nameN>.adb &
#
#end script
Usage of the Swapper file must be turn off. Swapping defeat the purpose.
And you may have to up the priority of the background tasks but that not
a problem either. Also I could of used "gcc -c" but that too much like C
programming. so I choose not too use it.
Note: "gnatmake" or "make" can not be setup in this way to preform is
type of parallel processing.
Now as for "gnatmake" try this "gnatmake *". It does not work in
Linux/FreeBSD. So, to compile packages before you create the main
program you must use "gnat compile" or better yet "gcc -c". Also, If you
have more than a couple of packages you normally build a script file to
compile the code, which can easily be turn into loading multiple copies of
the compiler and fully use the system resources aka parallel compiling.
Then when you build the main procedure out of habit you will again use
the "gcc -c" or "gnat compile" instead of "gnatmake" and then
"gnatbind" and then "gnatlink".
So, teaching or using "gnatmake" is a waste of the newbee time!
Because most project require more than one or two extra packages!
For "Elaboration rule"! Well try this:
1. create a temporary dir
2. cd to that temporary dir
3. copy system.ads to this temporary dir.
4. copy s-stoele.ad* to this temporary dir
-- System.Storage_Elements package for example.
5. edit system.ads and remove the comment at the top of the file.
Note: Any child package should, by the "Elaboration rules" force the
operator to recompile system.ads first.
6. gnat compile s-stoele.adb -gnatpg -nostdinc
This file is a child of system. But where is the error?
7. gnat compile system.ads -gnatpg -nostdinc
Note: Only if you "bind" a program that uses the
System.Storage_Elements will you see the Error based
on the "Elaboration rule" in this example.
Plus, not all project require Elaboration to be used.
In <4740d5f0$0$27131$9b4e6d93@newsspool1.arcor-online.net>, Georg Bauhaus <rm.tsoh+bauhaus@maps.futureapps.de> writes:
>anon wrote:
>
>> "Any proposed construct whose implementation was unclear or that required
>> excessive machine resources was rejected." That statement suggest that
>> "gnatmake" in using requires 5 complete programs to be loaded at one time
>> just to compile a single routine or package when 3 to 3 will do should be
>> rejected!
>
>I had been under the impression that Ada was designed for software
>systems of more than one compilation unit...
>
>
>> Note: Parallel => I mean the number of complete compilers loaded and
>> running in core (no swapper file usage) at the same time.
>
>I'm curious about the elaboration rules when a compilation system
>of 3_000 complete compilers is working on the same source at the
>same time (not using gnatmake).
>How many compilation units would be under the control of the
>3_000 compilers in this example? How do they get organized?
>
> > Note: The "make -jN" or "gnatmake -jN" does not allow multiple
> > compilers to be loaded in core at the same time.
>
>Ehr, why is that?
>"`-jn'
> Use n processes to carry out the (re)compilations. On a
> multiprocessor machine compilations will occur in parallel."
next prev parent reply other threads:[~2007-11-20 13:43 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-17 21:22 Direct Quote from the RM anon
2007-11-18 7:07 ` Simon Wright
2007-11-18 9:43 ` anon
2007-11-18 12:57 ` Markus E L
2007-11-19 0:16 ` Georg Bauhaus
2007-11-20 13:43 ` anon [this message]
2007-11-20 15:10 ` parallel translation (was: Direct Quote from the RM) Georg Bauhaus
2007-11-20 18:47 ` parallel translation Jeffrey R. Carter
2007-11-20 19:48 ` Samuel Tardieu
2007-11-21 0:09 ` Jeffrey R. Carter
2007-11-20 20:26 ` Georg Bauhaus
2007-11-20 17:07 ` Direct Quote from the RM Vadim Godunko
2007-11-21 6:44 ` anon
2007-11-19 21:48 ` Randy Brukardt
2007-11-20 12:32 ` anon
2007-11-20 16:21 ` Adam Beneschan
2007-11-21 3:14 ` Randy Brukardt
2007-11-21 8:03 ` anon
2007-11-21 3:01 ` Randy Brukardt
2007-11-26 18:23 ` Adam Beneschan
2007-11-21 3:01 ` Randy Brukardt
2007-11-19 21:48 ` Randy Brukardt
2007-11-19 22:41 ` Ludovic Brenta
2007-11-19 21:48 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox