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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c3d0e99376a4f379 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn11feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: Interested about number crunching in Ada Reply-To: anon@anon.org (anon) References: <1187235764.909133.180650@19g2000hsx.googlegroups.com> <46c49e6e$1_6@news.bluewin.ch> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Fri, 17 Aug 2007 04:44:07 GMT NNTP-Posting-Host: 12.64.234.107 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1187325847 12.64.234.107 (Fri, 17 Aug 2007 04:44:07 GMT) NNTP-Posting-Date: Fri, 17 Aug 2007 04:44:07 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:1468 Date: 2007-08-17T04:44:07+00:00 List-Id: As for F2A: Language converts are nice but in the GNU series they may add useless code because of the number of steps take to convert the code from the source to object code. An example: GNU F77 GNU F90 -- to --> C then using GCC -- to --> asm GNU F95 asm then using GCC -- to --> object GNU F2C -- to --> C then using GCC -- to --> asm asm then using GCC -- to --> object GNAT -- to --> C then using GCC -- to --> asm asm then using GCC -- to --> object F2A -- to --> Ada then using GNAT -- to --> C C using GCC -- to --> asm asm then using GCC -- to --> object The asm package is internal data file unless you ask for a assembly listing by insert -S into the command line. The "-S" cause the "GCC" to format and write the data to the 'stdout'. To truly optimize the code you need to stop and perform code optimization at each step and then repeat all previous steps. That's a lot of coding and testing just to optimize code that is already optimize in FORTRAN. And rewriting the code 2 .. x times to optimize the algorithm, is pure boring. Some programmers may take the full time alotted by the school for a Doctoral just to try to increase performance and optimize an algorithm. After the first couple of months re-writing the same algorithm they state they are truly bored with the whole process. To test this try re-writing an algorithm a couple of times a day for a month to try to increase the performance. You will get bored too. Also, as many will tell you those little codes seams to turn into bigger ones in a blink of an eye. For school projects, that is fine, but in big business, time is money and that can mean someone job. So, the faster it works is not always the best policy, it faster you can get operational the best policy. And that's the reason why people use the pre-defined libraries. Then there the compatibility, any library code written in FORTRAN 2, or IV can be compiled and be linked in FORTRAN 77, 90, 95 or beyond. I/O may need to be redirected but numerical code needs no rewriting. But in Ada, like JAVA the packages have changed. Such as 'LOW_LEVEL_IO' package which as defined in Ada 83 but in not in Ada 95, see RM Annex J for some other changes. This suggest that Ada 95 compiler are not required to support Ada 83, and Ada 2005 compiles may not support Ada 83 or 95. Which means the built-in Ada packages that you use today may not be there tomorrow and that includes the numeric packages. Gnat allows one to limit its code to Ada 83, Ada 95, and Ada 05, but will that be the case in the next Ada specification update. Of course, they still have GNAT obsolescent features that still work like the 'pragma No_Run_Time'. So, only time will see! Then, you forgot to say that HP is playing politics. That is, there are three main groups that deal with FORTRAN. First, is the part-time programmers. Like Doctors who program uses the language because the FORTRAN routine libraries exist. That save time and lives. but it does increase cost that is pass on to the end-user for libraries fees. The second group, loves FORTRAN and actively use FORTRAN and push for modifications/updates that will make it easier for them to use the language. They HATE the idea that they may have to rewrite the FORTRAN libraries so the function of the code can still be used. Plus, some do not want to give up the copyrights or licenses they own. So, more Software Patents. Then there are the one that are trying to kill FORTRAN. HP since the late 70's is one companies that is trying to retire FORTRAN. They also voted against adopting FORTRAN 90 and 95, stating that FORTRAN is outdated and should stop with FORTRAN 77. HP has it reasons, and one could be Ada. Which brings us to Ada. Ada was developed for the military by DEC using DEC computer systems. So, DEC had at that time had the Software Licenses and Copyright to Ada. DEC was purchase by COMPAQ then both were purchase by HP. This means that HP owns the Software licenses and Copyright to Ada. Now, HP pays for the FORTRAN Software licenses to third parties for the FORTRAN libraries. If they sell that Ada out performs FORTRAN then they can start receiving more fees for Ada libraries license then what they are paying for FORTRAN. Since, licensing fees is a big business, HP wants a bigger piece of the pie. TI did something like this with their TI-990 series computers and PASCAL. They wrote all compilers, assemblers, and Operating Systems in PASCAL for their home-owned and mini-frame computer system. The PASCAL programs would be allowed to steal resources from other users environments or programs. Such as memory and would receive more time-slice from the operating system. In some cases FORTRAN programs would require twice to triple the time just to equal the execution of a PASCAL program. After fine tuning the operating system for balancing executions, a numeric algorithm written in FORTRAN would out perform the same algorithm in PASCAL. In <46c49e6e$1_6@news.bluewin.ch>, Gautier writes: >anon wrote: plenty of right things that explain the situation - first of all >the issue of Ada compilers i.r.o. performance for numerics (it exists: at >least, there is a performant one, HP Ada). Now, there are two missing aspects: > >- even if you intend to use Ada for number crunching, you don't need to >translate all the large building blocks that are presently in Fortran: Ada >provides the Import and Convention pragmata. If you look at GNAT's sources >behind the new Ada.Numerics.Generic_Real_Arrays, you will see that it cleverly >uses the famous and broadly-tested and possibly non-GNU-compiled BLAS and >LAPACK libraries. > >- for small and/or less tested pieces of code, it is relatively easy to >translate them with the f2a tool and the amount of bugs that pop during the >Ada-ptation is not boring at all! > >Maybe a kind of Sourceforge repository for Ada numerical code would be a good >idea - any volunteer ? At least, there would be several contributors... >______________________________________________________________ >Gautier -- http://www.mysunrise.ch/users/gdm/index.htm >Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm > >NB: For a direct answer, e-mail address on the Web site!