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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,70265a5aadd5f024 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!g12g2000prg.googlegroups.com!not-for-mail From: Jerry Newsgroups: comp.lang.ada Subject: Re: gnatmake, gnat2007. Linking to lapack and blas using with Ada.Numerics.Generic_Real_Arrays; Date: Sat, 11 Aug 2007 18:01:01 -0700 Organization: http://groups.google.com Message-ID: <1186880461.557632.250230@g12g2000prg.googlegroups.com> References: <1186788863.427210.175620@g12g2000prg.googlegroups.com> NNTP-Posting-Host: 75.171.43.152 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1186880462 27915 127.0.0.1 (12 Aug 2007 01:01:02 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 12 Aug 2007 01:01:02 +0000 (UTC) In-Reply-To: <1186788863.427210.175620@g12g2000prg.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/420+ (KHTML, like Gecko, Safari/420) OmniWeb/v607.17,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g12g2000prg.googlegroups.com; posting-host=75.171.43.152; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:1405 Date: 2007-08-11T18:01:01-07:00 List-Id: Has anyone done this on OS X? I believe that lapack and blas are pre- installed but might be called clapack and cblas. Jerry On Aug 10, 4:34 pm, Nasser Abbasi wrote: > These are the steps I did to link a small ada program with lapack and > blas libraries which are needed if one uses some of the the new > packages such as Ada.Numerics.Generic_Real_Arrays and its linear > algebra functions. > > Here is the gnatmake command: > > $ gnatmake solve.adb -largs -L/usr/lib -lgnala -llapack -lblas > gcc -c solve.adb > gnatbind -x solve.ali > gnatlink solve.ali -L/usr/lib -lgnala -llapack -lblas > > On linux Ubuntu, I used adept_manger to install blas and lapack, then > after that, added the following symbolic links (which the link above > would fail otherwise): > > su - > cd /usr/lib > ln -s liblapack.so.3 liblapack.so > ln -s libblas.so libblas.so.3 > > This is the ada program (just to test with, no data in matric to do an > actual solve) > > --------------- solve.adb-------------- > $ cat solve.adb > with Ada.Numerics.Generic_Real_Arrays; > > procedure solve is > > package myReals is new Ada.Numerics.Generic_Real_Arrays(Float); > use myReals; > > nElements: constant integer:=6; > A: Real_Matrix(1..nElements,1..nElements):=(others => (others => > 0.0)); > b: Real_Vector(1..nElements):=(Others=>0.0); > > begin > b:=solve(A,b); > > end solve; > ------------- solve-------------------- > > Nasser