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-7-bit X-Google-Thread: 103376,3b74366795b5f025 X-Google-Attributes: gid103376,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: How To Compile Ada Prog Interfaced With Fortran Date: 1998/09/23 Message-ID: #1/1 X-Deja-AN: 394107720 References: <87ogs6g498.fsf@zaphod.enst.fr> Organization: The Mitre Corp., Bedford, MA. Newsgroups: comp.lang.ada Date: 1998-09-23T00:00:00+00:00 List-Id: In article william.oliver@colorado.edu (oliver) writes: > This seems to good to be true. Could one use this approach to gain > complete access to LAPACK or to the Numerical Recipes software? Yes. > Or is this something that one can do in theory but no one does in > practice? Sort of. > I'm looking into using Ada for numeric programming, but I'm > disheartened to find that there is very little supporting code > available. Is this because it is very easy in Ada to access > existing functions in such packages as LAPACK? Yes and no. There are some good numerics libraries available which support Ada (NaG and others), and in fact there are some good numerics libraries which are written in Ada, even when used from Fortran. But when you use the "standard" Fortran libraries, you find there is a problem. They generate junk if the values go out of range or the matrices become too stiff. Even though, in the good libraries, there is an error number scheme to tell you when that happens, on the Ada side, users expect to get notified through exceptions. So when you look at binding to numerics libraries, some bindings are trivial, some are available from the vendor, and some are just too much work. I've looked at the Numerical Recipies book, and been appalled at the amount of non-trivial work to recode some of them in Ada. The problem is not the actual algorithmic code, it is the amount of thinking necessary to design appropriate Ada interfaces. (Rewriting the code in Ada, although unnecessary, would probably be done anyway. It would amount to such a small part of the effort compared to changing the interfaces and rewriting the documentation.) -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...